tag:blogger.com,1999:blog-89419832008-04-28T14:48:02.680+04:00Kir's blogKir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-8941983.post-25932363978916856212008-04-28T13:42:00.000+04:002008-04-28T14:48:01.018+04:00TeamCity developer blogTeamCity team has decided that it might be a good idea to have an own "unofficial" <a href="http://teamcitydev.blogspot.com">developer blog</a>. It's a kind of experiment, because most developer's time is spent on, well, developing. But sometimes it is enticing to share some ideas, findings, tell about a feature which will be available in the next <a href="http://www.jetbrains.net/confluence/display/TW">EAP</a> build. And this stuff may be too "unofficial" and personal to go to the <a href="http://blogs.jetbrains.com/teamcity">main product blog</a>.<br /><br />Anyway, this blog already has some <a href="http://teamcitydev.blogspot.com">interesting notes</a> and I hope it will emerge over the time. <br /><br /> So, starting from this moment, I'm going to post TeamCity-related articles to developer blog (and even added it to <a href="http://friendfeed.com/kir">my FriendFeed stuff</a>).<br /><br />BTW, on the home page of the <a href="http://teamcitydev.blogspot.com">blog</a> there is a poll about which new SCM should be supported by the next version of TeamCity - <span style="font-weight:bold;">Calcutta</span>. Add your vote!Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-75462634335862481422008-04-22T23:29:00.003+04:002008-04-23T11:58:54.478+04:00href value for javascript link anchorIf you create a link with javascript handler, and href attribute doesn't matter for you, do not use <span style="font-weight:bold;font-size: 120%">#</span> as the value of the attribute. This results in page scrolling to the top of the page in MSIE.<br /><br /> Instead, use value like <span style="font-weight:bold;">javascript://</span> - this is safe and most browsers will ignore it. And this is what you want when you have an onclick handler, isn't it?<br /><br />Update: I was pointed out, that if javascript click event was cancelled in onclick handler (like Event.stop(e) in prototype), you can safely put # to the href, because default click behaviour will be disabled in this case. This works, but I still prefer to put javascript:// to the link href - IMO this reveals intentions more explicit.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-87644551938736796642008-02-24T14:47:00.011+03:002008-02-24T22:11:56.395+03:00Internet Explorer rendering problems or how to repaint Web-page<div>A short prelude.</div><div><br /></div><div>I'm developing a small checklist application, to study ruby/rails and to play with various Web 2.0 UI patterns. And to get a tool which will help me to organize all my todos.</div><div><br /></div><div>On the checklist screen I have, guess what - list of tasks, the checklist is comprised of. On some actions (like completing a task) the tasks are updated incrementally (with plain Javascript), on some actions (like undo) the list is reloaded as a whole.</div><div><br /></div><div>Now the story.</div><div><br /></div><div>To avoid task rendering in two places (on the server-side, when tasks are loaded from the server and on the client-side when they are updated in-place) I've used an approach when all rendering is performed by Javascript, even on the full page reload. This implies generation of the HTML on the browser-side and inserting the resulting HTML into the page in window.onload hook.</div><div><br /></div><div>The problem was that in IE the inserted HTML was rendered like a total mess. Elements were painted one upon another, lost their position, styles.</div><div><br /></div><div>As I found out later, the page resize fixes the rendering.</div><div><br /></div><div>So I had to force a repaint of the inserted elements to fix the rendering.</div><div><br /></div><div>The solution was simple. All I had to do was to add a fake CSS class to the inserted element and remove it afterwards (in fact, there is no strict need to remove the class). This operation forces an element restyling in IE and fixes its rendering. Looks like a hack, and it is.</div><div><br /></div><div>By the way, moving task list rendering from the server side to browser gave me performance gain of 200% on the server.</div><div><br /></div>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-42289969560346557922008-01-12T18:38:00.000+03:002008-01-12T20:47:12.703+03:00TeamCity: immediate test failure notificationsThis feature is particularly useful, if you have lengthy builds.<br /><br />With most continuous integration tools, one have to wait until build is finished to get notified about test failure. TeamCity can send notification right after test failure, before build completion.<br /><h3>Scenario</h3><ul><li> Developer commits a change<br /></li><li> Build is started<br /></li><li> A test fails<br /><ul><li>Notification "Build is failing" is sent to the developer and to other subscribers via configured notifiers</li><li> Test failure details immediately appear in the Web UI<br /></li><li> Clickable stacktrace on the Web page allows to open the test and the stacktrace in IDE<br /></li><li>Developer can see if this test failed in the previous build</li></ul><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://kirblog.idetalk.com/uploaded_images/stacktrace-774033.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://kirblog.idetalk.com/uploaded_images/stacktrace-774030.png" alt="" border="0" /></a><br /></li><li>If the fix is simple, developer commits the fix even before original build has finished.<br /></li><li>Optionally, developer may stop the original build to free the build agent.<br /></li><li>Otherwise the original build finishes (possibly with other test failures).</li><li>TeamCity sends notification about build completion and its results.</li></ul>According to this scenario, it may take a little time between problem detection and the fix, and the same little time the broken code will stay in the version control system. And this is a Good Thing, and I like this.<br /><br />You can read more about <a href="http://www.jetbrains.com/teamcity/features/continuous_integration.html#On-the-fly_Test_Results_Reporting">this</a> and <a href="http://www.jetbrains.com/teamcity/features">other features</a> on the official TeamCity site.<br /><br />Good builds in new year,<br /><br />KIR<br /><br />BTW, in the previous post I described <a href="http://kirblog.idetalk.com/2007/12/what-i-like-about-teamcity-pre-tested.html">how to avoid broken code in version control</a> at all.<small><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-19840631777470832892007-12-06T13:11:00.000+03:002007-12-07T02:36:20.767+03:00What I like about TeamCity: Pre-tested commitI am one of the TeamCity developers so you can surely consider my opinion to be biased. But I am speaking here of a typical problems that any of you can experience and will try not to brag about my product too much ;-)<br /><br />I'm a software developer. And though <a href="http://www.jetbrains.com/teamcity">TeamCity</a> is not an individual tool like <a href="http://www.jetbrains.com/idea">IntelliJ IDEA</a>, I'd like to present TeamCity features which ease my life as a software developer.<br /><h2>Pre-tested commit</h2><br />In days before TeamCity, I used to write the following command line:<br /><pre>kir@work:~$ ant test && svn ci -m "FBQ-3324 fixed"</pre><br />As you see, all I want is to ensure that my changes don't break tests and commit them the to version control afterwards. Usually, I wrote such a command once a day, right before going home.<br /><br />Why I did so? Running the tests was a rather long process, because there were plenty integration and functional tests. And this situation is quite normal for non-pet projects. And still, I want to run all the tests to ensure that my changes won't break the build and the team is not affected by problems in my code.<br /><br />Unfortunately, running a full suite of tests on the own machine is a luxury I can afford only when going home (or in the lunch time). Usually the computer load caused by running tests is pretty high and interrupts the productive development process.<br /><br />Back to TeamCity. My current use case is as follows:<br /><ol><br /><li> I do some modifications in the code, write more tests<br /></li><li> I send the changelist to TeamCity and mark build configurations to be built with my changes. I also set checkbox "Commit if build successful" (see the illustration screenshot below)<br /></li><li> I continue working with the code (edit same files, write more tests)<br /></li><li> If TeamCity builds were successful, my IDE got the corresponding notification and my changes made in position 2 are sent to the version control. I continue working with the code, preparing for the new pre-tested commit.<br /></li><li> If the TeamCity builds were unsuccessful, I get the information about failed tests, navigate to the failing stacktrace (all within IDE), and fix discovered problems. I.e. the build with my problematic code was run on TeamCity build agent and didn't affect the version control and my team mates' work.<br /></li><li> The TeamCity build may be unsuccessful, but no new tests has failed (this information is also provided by TeamCity). In this case I may decide to force commit of my changes. I am on the safe side when doing that, because TeamCity IDE plugin remembers the state of my code when remote build was initiated.<br /></li></ol><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://kirblog.idetalk.com/uploaded_images/Screenshot.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://kirblog.idetalk.com/uploaded_images/Screenshot.png" alt="" border="0" /></a><br /><br />So, as you can see, I am pretty confident that my changes won't break the build and the bad code won't go to the version control. And I like this.<br /><br />What happens, when someone else commits changes and these changes conflict with mine? In such case, my commit will be rejected and IDE plugin will notify me about that. I'll have to update changed files from the version control and resolve the conflict manually - no unexpected magic here.<br /><br />Please note, that TeamCity supports this scenario with different IDEs, including IntelliJ IDEA 6.0/7.0, Eclipse, and Visual Studio, with minor variations.<br /><br />This feature is described <a href="http://www.jetbrains.com/teamcity/delayed_commit.html">on the JetBrains site</a> in more detail, but may be it's better to <a href="http://www.jetbrains.com/teamcity/download">try it</a> and see for yourself. <br /><br />Good luck and successful builds,<br />KIRKir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-40799834954280593122007-10-04T12:28:00.000+04:002007-10-04T12:42:19.270+04:00Problem with offsetTop and element position location in IEThis is just a small note for someone looking into a similar problem. <br /><br />I was implementing keyboard navigation with explicit scrolling using <b>scrollTo</b> method, and found out that in IE I cannot get correct values for element position on the page. I use Prototype and it's <b>Position.cumulativeOffset</b> method (which, in turn, uses <b>offetTop/offsetParent</b> properties of the element). Position calculation worked fine in FF, Safari and Opera, but sometimes failed in IE. <br /> <br /> The DOM tree I was operating with consisted of several nested UL, LI, SPAN elements (SPAN inside LI).<br /><br /> I added some debug code and found out, that SPAN elements sometimes got huge offset relative to LI, though it should be simply 0 (FF showed value of -1).<br /><br /> The solution to the problem was to add <b>position:relative</b> style to the SPAN, after that the problem disappears. <br /><br /> Unfortunately, I was unable to reproduce the problem with a simple test case to give the example here.<br /><br /><small><br /><a href="http://technorati.com/tag/css" rel="tag">css</a> <a href="http://technorati.com/tag/javascript" rel="tag">javascript</a> <a href="http://technorati.com/tag/ie" rel="tag">ie</a><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1327098898137639222007-09-09T14:47:00.000+04:002007-09-10T14:55:55.862+04:00How to run rake tasks for non-development rails environmentsI’ve found that parameters passed to rake tasks in the form “name=value” are converted into the environment variables. This magic is done by rake itself when parsing command-line parameters. It has an interesting consequence – you can run some db-oriented rake tasks for any of your ruby on rails environments. For instance, to migrate your production database to the latest version you can run:<br /><pre>rake db:migrate RAILS_ENV=production</pre><br />This knowledge is also useful when writing custom rake tasks; you can access environment variables using predefined ENV hash (you can also access rake command line parameters using ARGV hash).<br /><br /><small><br /><a href="http://technorati.com/tag/rake" rel="tag">rake</a> <a href="http://technorati.com/tag/ruby+on+rails" rel="tag">ruby on rails</a> <a href="http://technorati.com/tag/ror" rel="tag">ror</a> <a href="http://technorati.com/tag/rails" rel="tag">rails</a><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-16337740033829650862007-03-01T16:15:00.000+03:002007-03-01T17:23:34.659+03:00How EAP worksI'm really excited how <a href="http://www.jetbrains.net/confluence/display/TW">TeamCity EAP</a> program works. Using our <a href="http://www.intellij.net/forums/forum.jspa?forumID=68">discussion forum</a>, people report bug, problems, enhancements, features, ask for and got real help. We're trying hard to answer all questions and requests, and though it takes noticeable time, it's worth doing it.<br /><br />One small example.<br /><br />Some time ago we got a <a href="http://www.intellij.net/forums/thread.jspa?messageID=5181680">message</a> from Jacques Morel regarding support for third-party reporting tools in TeamCity. After some discussion with Dave Griffith and Tim McNerney it turned into an interesting feature - custom reporting tab for any third-party reporting tool, which provides report in web-enabled format (e.g. html, text, image etc). Such a tab can be configured with just one line of xml, which describes title of the tab and content location in the artifacts directory of the corresponding build.<br />So it was implemented; we've migrated our EMMA coverage support to this approach, and released a EAP with this feature. <br /><br />You may see how this feature works for <a href="http://jroller.com/page/ulc?entry=teamcity_2_custom_report_integration">Etienne Studer</a> <br />Try it yourself in our latest EAP - I hope you'll like it :)<br /><br />Another exciting feature of TeamCity, which is already available in the EAP - <a href="http://www.jetbrains.net/confluence/display/TW/Release+Notes+for+Agra%2C+build+3776#ReleaseNotesforAgra%2Cbuild3776-eclipse">Eclipse plugin</a> with personal builds, own changes view and build status information. <br /><br />And if you want more features, or have any suggestions about the implemented ones - we'll be glad to get your feedback in our <a href="http://www.jetbrains.net/confluence/display/TW">EAP</a>.<br /><br /><small><br />Technorati:<br /><a href="http://technorati.com/tag/TeamCity" rel="tag">TeamCity</a> <a href="http://technorati.com/tag/eap" rel="tag">EAP</a> <a href="http://technorati.com/tag/continuous+integration" rel="tag">continuous integration</a> <a href="http://technorati.com/tag/JetBrains" rel="tag">JetBrains</a> <a href="http://technorati.com/tag/eclipse" rel="tag">Eclipse</a><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-8907700593127111602007-01-31T18:09:00.000+03:002007-02-07T19:40:08.690+03:00Agra: popups everywhereJust a couple of screenshots from the latest <a href="http://www.jetbrains.net/confluence/display/TW">EAP</a> of <a href="http://www.jetbrains.com/teamcity/">TeamCity</a>.<br />Quick access to artifacts:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://kirblog.idetalk.com/uploaded_images/artifacts-767069.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://kirblog.idetalk.com/uploaded_images/artifacts-765922.png" alt="" border="0" /></a><br />Quick access to the list of failed tests:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://kirblog.idetalk.com/uploaded_images/tests-703452.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://kirblog.idetalk.com/uploaded_images/tests-701266.png" alt="" border="0" /></a><br /><span style="font-size:70%"><br /><a href="http://technorati.com/tag/TeamCity" rel="tag">TeamCity</a> <a href="http://technorati.com/tag/continuous+integration" rel="tag">continuous integration</a> <a href="http://technorati.com/tag/ajax" rel="tag">Ajax</a> <a href="http://technorati.com/tag/web+2.0" rel="tag">Web 2.0</a><br /></span>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-2548302750607018412007-01-26T10:58:00.000+03:002007-01-26T11:13:28.112+03:00Humanized and EnzoI've read about that tool at <a href="http://www.37signals.com/svn/posts/228-humanized-enso">37 Signals</a> and watched the <a href="http://humanized.com/">short demo</a>. I should say it looks brilliant. Quite obvious for Mac users but it is first time I see such a good implementation on Windows.<br /><br />In fact, they put to life "Command" button inspired by <a href="http://jef.raskincenter.org/home/index.html">Jeff Raskin</a> in his <a href="http://rchi.raskincenter.org/index.php?title=Home#Jef_Raskin.27s_The_Humane_Interface">The Humane Interface</a> book. The implementation is simple, and very impressive - they just use "Caps Lock" key as such "Command" button.<br /><br />And looks like Aza Raskin (who is one of the owners of Humanized) is a good son of his father.<br /><br />Well, I'd like to see Linux port of this tool. Anyone?Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-90983352067438426802006-11-21T00:17:00.000+03:002006-11-21T00:27:07.656+03:00Release woesShit happens. You've prepared final release build, marked it as 1.1 and put on the site. Next day a couple of people from your company comes - they found an unnoticed critical bug. Because of strange consequence of events this bug wasn't noticed before.<br/><br/> Bug is fixed, new 1.1.1 build is <a href="http://www.jetbrains.com/teamcity/download">uploaded</a> to the main site, build number is corrected.<br/> Next day you got an e-mail from support with message "whether 1.1.1 was really released?". Because of strange consequence of events the download path on the site still points to TeamCity 1.1. As long as all announces were already published, you wonder how many users downloaded the non-updated version. Sigh.<br/><br/> TeamCity announce on dzone.org was published under the title <a href="http://www.dzone.com/links/intellij_idea_602_maintenance_release_is_out.html">"IntelliJ IDEA 6.0.2 released"</a>. Cool. <br/><br/> Ups. Your latest fix for 1.1.1 introduced another critical bug - code coverage information from TeamCity cannot be viewed in IDEA. Looks like we really have plans for TeamCity 1.1.2. <br/><br/>But TeamCity's roadmap will be a subject of the next post. Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1161851154218163282006-10-26T12:25:00.000+04:002006-11-11T20:30:49.013+03:00Getting Real, freeA highly recommended reading for everyone involved in software development. Now you may read it free in HTML: <a href="http://gettingreal.37signals.com/">Getting Real (37signals)</a>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1161791194902695502006-10-25T19:39:00.000+04:002006-11-11T20:30:48.767+03:00IDEtalk goes open sourceJust a small note - <a href="http://www.idetalk.com">IDEtalk</a> project goes open source.<br /><br />It's repository is located at <a href="http://svn.jetbrains.org/idea/Trunk/IDEtalk/">http://svn.jetbrains.org/idea/Trunk/IDEtalk/</a>,<br />so you can view code, fix bugs and participate if you wish.<br /><br />I'll continue work on it, though I cannot spend much time because<br />of another <a href="http://teamcity.jetbrains.com">cool project</a> I'm working on.<br /><br />Have no idea when I'll update main IDEtalk site.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1150833393923787462006-06-20T23:43:00.000+04:002006-11-11T20:30:48.553+03:00Safari JavaScript problemsToday I spent several hours fixing various bugs in <a href="http://www.jetbrains.net/confluence/display/TW/Team+Server+Home">Team Server</a> for another EAP release, and two of them concerned Javascript issues in the Safari browser.<br /><br />The first issue:<br /> In Safari you cannot specify the location of an absolutely positioned element if this element has display:none. I had a code which set style.left and style.top of a hidden div and then showed it on the screen. It worked fine in every browser except Safari. To make it work, I had to assign display:block to the div first, and then assign coordinates. <br /><br />The second issue - how to add a mouse document listener. <br /> Again, code like <a href="http://wiki.script.aculo.us/scriptaculous/show/Event.observe">Event.observe</a>(document.body, "mousedown", handler) worked out in every browser. Except Safari. In Safari one has to use 'useCapture' option when adding the event handler, i.e. use Event.observe(document.body, "mousedown", handler, true).<br /><br />I tried to google for the solution of my problems with Safari, but failed. Hence this post. Hope this saves someone's time and headache :)<br /><br /><small><br />Technorati: <a href="http://technorati.com/tag/Safari" rel="tag">Safari</a> <a href="http://technorati.com/tag/Javascript" rel="tag">Javascript</a> <a href="http://technorati.com/tag/Prototype" rel="tag">Prototype</a> <a href="http://technorati.com/tag/team+server" rel="tag">Team Server</a> <br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1145135495972031672006-04-16T00:51:00.000+04:002006-11-11T20:30:48.343+03:00Team Server: Remote Run functionalityTo be honest, I didn't believe that this feature will be implemented in the first version of the Team Server.<br /><br />But now it is real - with the latest EAP of <a href="http://www.intellij.net/eap/">Demetra</a> and <a href="http://www.jetbrains.net/confluence/display/TW/">Team Server</a> a developer can integrate and run build with own changes without commiting them to version control system!<br /><br />The implementation is not perfect - but it works and surely will be improved. On the <a href="http://www.intellij.net/forums/forum.jspa?forumID=68">forum</a> you can read how to <a href="http://www.intellij.net/forums/thread.jspa?threadID=214859#5092725">setup remote run</a> and discuss this feature as well as its successor - Deferred Commit.<br /><br /><small><br />Technorati: <a href="http://technorati.com/tag/IntelliJ IDEA" rel="tag">IntelliJ IDEA</a> <a href="http://technorati.com/tag/team+server" rel="tag">Team Server</a> <a href="http://technorati.com/tag/continuous+integration" rel="tag">Continuous Integration</a><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1139089278608741452006-02-04T23:59:00.000+03:002006-11-11T20:30:47.884+03:00Unit test for IntelliJ IDEA plugin: load complex projectRecently Hugo Palma had a <a href="http://www.intellij.net/forums/thread.jsp?nav=false&forum=23&thread=191941&start=0&msRange=50">problem</a> with writing a unit test for his IDEA plugin. What he needed was a custom project configuration with a web module.<br /><br />Actually, IDEA's OpenAPI does not allow to load project from disk (so far). But there is a way to do it using closed API. I've wrote a <a href="http://kirblog.idetalk.com/complexIdeaTestExample.zip">small example</a> which shows how to write such a test, but remember, there is no guarantee that this code will work with future versions of IDEA.<br /><br />You'll also have to add idea.jar to your classpath and use some <a href="http://kirblog.idetalk.com/2005/09/writing-unit-tests-for-intellij-idea.html">previously described tricks</a> to make tests runnable.<br /><small><br />Technorati: <a href="http://technorati.com/tag/IntelliJ IDEA" rel="tag">IntelliJ IDEA</a> <a href="http://technorati.com/tag/unit+test" rel="tag">Unit Test</a><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1137610104587942762006-01-18T21:42:00.001+03:002008-03-04T15:52:04.775+03:00Export b2evolution to Movable Type<p>Just a small note. Recently I've migrated <a href="http://sashblog.idetalk.com">Sashblog</a> from <a href="http://b2evolution.net/">b2evolution</a> to <a href="http://www.sixapart.com/movabletype/">Movable Type</a>. To accomplish this, I wrote an <a href="http://kirblog.idetalk.com/b2evolution_export_for_movable_type.php.txt">export script</a> for b2evolution database, which prepares data in format Movable Type can understand. The <a href="http://kirblog.idetalk.com/b2evolution_export_for_movable_type.php.txt">script</a> exports published entries and comments to them.<br /><p><br />What's wrong with b2? The primary reason - bad spam protection and publicly available statistics, which opens a hole for reference hunters. Also, MT has a better template system.<br /><br /><small><br />Technorati: <a href="http://technorati.com/tag/Movable+Type" rel="tag">Movable Type</a> <a href="http://technorati.com/tag/b2evolution" rel="tag">b2evolution</a><br /></small>Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1135864157324855962005-12-29T16:29:00.000+03:002006-11-11T20:30:47.030+03:00BuildServer: Queue reorderingThe build queue of the BuildServer, which serves IDEA project, was rather long until we've set up 10 build agents for it. But before that, the queue was long enough to add some management operations for it, like move build up/down and remove build from the queue.<br /><br />So, each build in the queue had links "move up", "move down" and "remove". Guess, how many mouse clicks were needed to move build from the tail of the queue to the first position when there are 5 builds in the queue? Too many anyway. After the first attempt to do such a trick it became obvious that the "up/down" solution was wrong.<br /><br />The first simple modification I intended to make was to add "Move to the top" link and remove "up/down" ones. That would remove some flexibility but save the screen space and make the interface more use-case-oriented. But Sashka convinced me that Drag-n-Drop is much more flexible solution in this situation. It took one day to implement it, including update of the queue on the server after reordering (thanks to <a href="http://script.aculo.us">scriptaculos</a> again).<br /><br />There was a couple of diffuculties, because Drag-n-Drop support cannot be safely done for table rows, so I had to convert rows to the list of div's. But anyway, now it works and you can see the result on the following screenshot (in the middle of DnD operation in my test environment).<br /><br /><img src="http://kirblog.idetalk.com/buildQueue.gif" /><br />There are still some areas for improvement, like adding a visual hint that D-n-D operation is possible and removing duplicates for "Remove" link.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1134251319291040902005-12-10T23:15:00.000+03:002006-11-11T20:30:46.783+03:00Build Server: Web<a href="http://blogs.jetbrains.com/yole/">Dmitry Jemerov</a> made a <a href="http://blogs.jetbrains.com/yole/archives/000053.html">very good overview</a> of what kept me busy for the last couple of weeks.<br /><br />The initial Web-interface of the Build Server was ugly and hardly usable, and the current version looks and works much better.<br /><br /><a href="http://sashblog.idetalk.com/">Sashka</a> had created an accurate sketch for the build status overview interface, and described its behaviour. I just had to make it real. Thanks to <a href="http://prototype.conio.net/">prototype</a> library, AJAX updates were implemented mostly painless. But is was much harder with visual effects (in fact, I spent a couple of days trying to expand/collapse a table row in IE using <a href="http://script.aculo.us/">aculos</a>. I solved the problem by patching prototype.js).<br /><br />And what with IDEtalk? Well, I'd love to work on it but Build Server currently has higher priority. I've made several Jabber-related fixes, sending code pointers for library sources, and viewing a diff between local and remote version of arbitrary project file.<br /><br />If you happen to visit JavaPolis next week, Max Shafirov and Mike Aizatsky will give you an overview of the forthcoming Demetra and Build Server features, answer your questions and even give you a chance to win one of <a href="http://wiki.javapolis.com/confluence/display/JP05/IDEA+in+Action">20 free IDEA licences</a>.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1129535991892608712005-10-17T11:19:00.000+04:002006-11-11T20:30:46.408+03:00Things do changeAnd sometimes they are not nice. No more <a href="http://www.jetbrains.com/fabrique/index.html">Fabrique</a>. No more <a href="http://www.idetalk.com">IDEtalk</a>. Both will migrate in some form to IDEA 6 (Demetra).<br /><br />Anyway, I've released IDEtalk 0.5.6.2 - most likely it is the last release of IDEtalk as a separate plugin.<br />The good thing about all of that - to develop IDEA collaboration features I'll spend not night hours but work ones.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1127752340915649922005-09-30T23:06:00.000+04:002006-11-11T20:30:46.016+03:00Writing unit tests for IntelliJ IDEA pluginsAccording to some old saying, if code can be broken, it should be tested. Unfortunately, writing tests for IntelliJ IDEA plugins is not that obvious. I've spent some noticable time trying to setup enviroment for IDEA-specific code in the <a href="http://www.idetalk.com/">IDEtalk</a> plugin and now I'd like to share what I've learned.<br /><br />First of all, if you have a chance to write isolated tests, that don't require implementation of IDEA interfaces from OpenAPI - just do it. Such tests will be much faster, because they won't require ~10 seconds of setUp() execution.<br /><br />But if you really have to write integration tests (in my case, I wanted to be sure that IDEtalk's internal file representation is syncronized with IDEA's VirtualFiles) - welcome to IDEA's TestCases. IDEA's distribution contains a number of base TestCase classes, placed in the <span style="font-weight: bold;">com.intellij.testFramework</span> package. The most noticeable of them are <span style="font-weight: bold;">IdeaTestCase</span> and <span style="font-weight: bold;">LightIdeaTestCase</span>. The lightness of <span style="font-weight: bold;">LightIdeaTestCase</span> springs from the fact, that tests derived from this class share the same virtual IDEA application and opened project. So, after the long startup of the first test, subsequent ones will run quite fast. <span style="font-weight: bold;">IdeaTestCase</span> - derived tests share only the application, and each test run includes the overhead of another IDEA project setup.<br /><br />Guess, which base class is recommended for your tests?<br /><br />OK, you've chosen the base TestCase and now eager to run your tests. Not so fast. Please make sure that:<br /><ol><li>tools.jar from your JDK is in your classpath</li> <li>all jar files from $IDEA_HOME/lib are in your classpath</li> <li>you've added <span style="font-weight: bold; color: rgb(0, 0, 0);font-size:85%;" ><span style="font-family:courier new;">-Didea.plugins.load=false -Xbootclasspath/p:$IDEA_HOME/lib/boot.jar</span></span> to your VM parameters. The first parameter can be skipped, but in this case you'll have to add all IDEA plugins to classpath.<br /></li> </ol>So, now can get your tests working.<br />Good luck :)Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1121777103875973052005-07-19T16:14:00.000+04:002006-11-11T20:30:45.635+03:00IDEA 5.0 release candidate/First Powered by Fabrique siteFinally, the first release candidate of IDEA 5.0 aka Irida is <a href="http://www.intellij.net/eap/products/idea/download.jsp">out</a>. I'd like to congratulate my colleagues from IDEA team with this hard milestone. The "official" list of new features is <a href="http://www.jetbrains.com/idea/features/newfeatures.html">available</a> on the <a href="http://www.jetbrains.com">Jetbrains</a> site, <a href="http://www.intellij.net/eap/products/idea/changes.jsp">plain list of changes</a> is also available from the EAP site.<br /><br />BTW, you can get IDEA 5.0 for free if you buy IDEA 4.5. Moreover, if you're working on an open source project, you can try to get a <a href="http://www.jetbrains.com/idea/opensource/opensource.html">free open source license</a>.<br /><br />Another nice thing is that our friends from <a href="http://www.miik.com.ua/eng/index.html">MIIK Ltd.</a> have released a new version of <a href="http://www.jniwrapper.com">JNIWrapper site</a>. And this site is powered by <a href="http://www.jetbrains.com/fabrique/">Fabrique</a>, the product I'm working on! <br /><br />These news are good, but I have a better reason for celebration - my son has a birthday today :).Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1119340329062567652005-06-21T11:38:00.000+04:002006-11-11T20:30:45.329+03:00IDEtalk statusRecently I made a bad move - release of IDEtalk 0.5.6 without proper testing of the distribution. Moreover, I <a href="http://www.javalobby.org/java/forums/t19077.html">announced</a> this release at Javalobby and <a href="http://today.java.net/pub/n/IDEtalk0.5.6">java.net</a>.<br /><br />As a result, in the same day I got a bug report that release was unusable (some class files were missing from the distribution) so I made a fix - <a href="http://www.idetalk.com/download.html">IDEtalk 0.5.6.1</a>. I have to admit that my "quick fingers" sometimes make me sorry, and that was one of the worst cases :(. Well, I'll be much more careful in the future and never release a distribution without proper testing of the very file I'm going to release.<br /><br />Work on the Jabber support in progress. I've come to a conclusion that Jabber contact list entries in IDEtalk should be synchronized with server-side Jabber roster of the user and I'm very close to imlementing this behaviour. So IDEtalk will work as a normal Jabber client + will have code-related extensions for those contacts who use IDEtalk as well.<br /><br />Unfortunately, it seems that my initial estimates for 1.0 were somewhat optimistic. But I hope to release 1.0 in July or at least in August.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1118305406769269532005-06-09T12:13:00.000+04:002006-11-11T20:30:45.036+03:00IDEtalk 0.5.5.. has been released. This is a bugfix release with minor improvements, please see <a href="http://groups.yahoo.com/group/idetalk/message/15">this message</a> for details.<br /><br />Download as usual either at <a href="http://www.idetalk.com">plugin site</a> or via IntelliJ IDEA's plugin manager.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.comtag:blogger.com,1999:blog-8941983.post-1115894311138084122005-05-12T14:01:00.000+04:002006-11-11T20:30:44.698+03:00Evaluate Expression in IntelliJ IDEARecently I found out another cool feature of IntelliJ IDEA's debugger - evaluate expression of the selected in the Frame view item.<br />Every IDEA user knows that you can select some expression and evaluate it via Alt-F8 while debugging. But I didn't know that I can use Alt-F8 for any selection in Frame view of IDEA's debugger. Using this feature, you can, for instance, evaluate/set runtime value for collection items or map entries. <br />See <a href="http://kirblog.idetalk.com/altF8.png">screenshot</a>.Kir Maximovhttp://www.blogger.com/profile/11739397709323043771noreply@blogger.com