Thursday, May 13, 2010

Extension Intermission #1 - Subversion Monitor, Extension to monitor a Subversion repository

Introduction

There are at least a couple of utility programs that will let you monitor the commit activity on a Subversion repository both running on the Windows platform. Here is a third one, appropriately baptized Subversion Monitor, developed to run - of course - as a JDeveloper extension.

Main Theme

Installation

To install Subversion Monitor, first download the SubversionMonitor.zip file from the link below and save it somewhere in your computer. Then start JDeveloper - it was developed and tested with the Studio Edition Version 11.1.1.2.0 version of JDeveloper - and select Help | Check for Updates... to bring up the Check for Updates dialog. Chose Install From Local File and then click on the Browse... button to browse for the SubversionMonitor.zip file you just downloaded.



Click Next to proceed with the installation and in the Summary page click Finish. JDeveloper needs to re-start to finalize the installation, so in the Confirm Exit dialog that is presented click Yes.

Setting up

Upon re-starting, JDeveloper should load the Subversion Monitor extension and notify you that it is unable to connect to the Subversion repository.


This is OK. You will need to setup the Subversion repository url along with your Subversion credentials. To do this, select Preferences from the Tools menu to bring up the Subversion Monitor Preferences dialog.


Enter your Subversion repository URL, username and password in the dialog and uncheck the Disable Monitoring check-box. This will enable a timer to notify you when there is a new revision in your repository. Set the timer delay appropriately with the Monitor Repository Every (seconds) spinner. When done, click OK to see Subversion Monitor in action!


You can bring up the notification balloon on demand anytime by clicking on the team icon on the status bar. To disable the timer monitor, check the Disable monitoring check-box on the balloon. You can review the latest revisions by clicking anywhere else on the notification balloon. Doing so will bring up the Revisions editor.


As you click on the revision in the Revisions table, the files that were changed for that revision will be displayed in the Revision Files panel at the bottom. The M flag in front of the file is the action on the file and it can be any of the M(odified), A(dded), D(eleted). You can set the number of top revisions to view using the Maximum Revisions to View in Editor spinner in the preferences page.

As a final note, Subversion Monitor does not require that you configure versioning for Subversion in JDeveloper.


[Amended on May 17th, 2010]
Subversion Monitor is now available directly from the Open Source and Partners Extensions of the JDeveloper Help | Check for Updates... feature!



Conclusion

Enjoy monitoring your colleagues as they commit their changes using Subversion Monitor! Your comments, suggestions (, bug reports) are welcomed.

Until the next time, keep on JDeveloping!


Extension

SubversionMonitor.zip







13 comments:

  1. would be nice to use, but I get errors when trying to see the revisions tab (by clickling on the ballon).

    Performing action Preferences...[ from com.haralabidis.jdeveloper.extension.subversionmonitor.addin.editor.RevisionsEditor ]
    Invoking command: [ from com.haralabidis.jdeveloper.extension.subversionmonitor.addin.editor.RevisionsEditor ]
    Uncaught exception
    java.lang.NullPointerException
    com.haralabidis.jdeveloper.extension.subversionmonitor.util.xml.XMLExtractor.getNodes(XMLExtractor.java:57)
    com.haralabidis.jdeveloper.extension.subversionmonitor.addin.editor.RevisionsGeneralPane.layoutComponents(RevisionsGeneralPane.java:59)
    com.haralabidis.jdeveloper.extension.subversionmonitor.addin.editor.RevisionsGeneralPane.(RevisionsGeneralPane.java:51)
    com.haralabidis.jdeveloper.extension.subversionmonitor.addin.editor.RevisionsEditorPanel.refresh(RevisionsEditorPanel.java:30)
    com.haralabidis.jdeveloper.extension.subversionmonitor.addin.editor.RevisionsEditor.getGUI(RevisionsEditor.java:58)
    o.i.editor.Editor.getDefaultFocusComponent(Editor.java:233)
    o.ii.editor.SplitPane.focusCurrentEditor(SplitPane.java:1172)
    o.ii.editor.TabGroupState.focusCurrentEditor(TabGroupState.java:862)
    o.ii.editor.TabGroup.focusCurrentEditor(TabGroup.java:631)
    o.ii.editor.EditorManagerImpl.focusEditor(EditorManagerImpl.java:1282)
    o.ii.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1252)
    o.i.editor.EditorUtil.openDefaultEditorInFrameExternal(EditorUtil.java:111)
    com.haralabidis.jdeveloper.extension.subversionmonitor.addin.SubversionMonitor$3.actionPerformed(SubversionMonitor.java:322)
    o.javatools.ui.balloon.Balloon.fireActionPerformed(Balloon.java:91)
    o.javatools.ui.balloon.BalloonUI$1.mouseReleased(BalloonUI.java:45)
    j.a.Component.processMouseEvent(Component.java:6263)
    jx.s.JComponent.processMouseEvent(JComponent.java:3267)
    j.a.Component.processEvent(Component.java:6028)
    j.a.Container.processEvent(Container.java:2041)
    j.a.Component.dispatchEventImpl(Component.java:4630)
    j.a.Container.dispatchEventImpl(Container.java:2099)
    j.a.Component.dispatchEvent(Component.java:4460)
    j.a.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    j.a.LightweightDispatcher.processMouseEvent(Container.java:4238)
    j.a.LightweightDispatcher.dispatchEvent(Container.java:4168)
    j.a.Container.dispatchEventImpl(Container.java:2085)
    j.a.Window.dispatchEventImpl(Window.java:2478)
    j.a.Component.dispatchEvent(Component.java:4460)
    j.a.EventQueue.dispatchEvent(EventQueue.java:599)
    j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    j.a.EventDispatchThread.run(EventDispatchThread.java:122)


    Timo

    ReplyDelete
  2. Hi Timo

    Thanks for trying it. The extension creates an xml file in the JDeveloper user settings temporary folder, called SubversionMonitor.submon. In Windows 7, this folder is in C:\Users\user_name\.jdeveloper\tmp. When you get a chance, could you please verify that both the tmp directory and the SubversionMonitor.submon exist?

    Regards,

    Nick

    ReplyDelete
  3. Nick,

    I'm running on XP.

    I see the tmp folder but not the xml file (SubversionMonitor.submon).
    I've found the file at
    C:\Dokumente und Einstellungen\\Anwendungsdaten\JDeveloper\tmp
    Could there be a problem with the spaces in the path?

    Timo

    ReplyDelete
  4. Timo,

    don't know what to say. There is a double \\ in your path. Is that a typo or this is the actual path? The problem is file. Does the file have any data in it?

    Email me directly at nharalabidis@gmail.com If you can.

    Thanks again.

    Nick

    ReplyDelete
  5. Nick,
    The path is a typo. There should have been the user name between the //.
    File file is huge (3.5 Meg).

    Timo

    ReplyDelete
  6. Nick,
    I guess I've found the problem. The file is found at the given position. When the XML parser tries to read the file, it stumbles over some special characters like o diereses (รถ) or all German special character.
    I tried it out with the number of revisions to display in the monitor. If i set it to 1 and the last comment in the revision tag does not contain German special characters. it shows the revision. Same is true unless you hit a revision with a special character in the comment. Then you get the stack trace from the first post.
    Hope this helps you to fix it. I find this a valuable tool!

    Timo

    ReplyDelete
  7. Timo,

    good detective work! ;) Interesting. Would it be possible to e-mail me the SubversionMonitor.submon file with the special characters in it?

    Thanks for your effort on this one.

    Nick

    ReplyDelete
  8. The issue has been fixed. It is related to revision comments that contain Unicode characters. A future release of the extension will fix this issue. Contact me if you want the new release of the extension earlier.

    ReplyDelete
  9. Hi Nick,
    I know it's only a couple of days since jdev11.1.2.0.0 arrived but are you working on an update of your really useful extension for 11.1.2?

    Timo

    ReplyDelete
  10. Hi Timo,

    At this point I am not sure what is involved in porting it to 11.1.2.0.0. It seems that the whole extensions model in JDeveloper 11.1.2.0.0 has been revamped. I will need to access it and get back to you. Would you be interested in helping out?

    ReplyDelete
  11. Hi Nick,
    I like to give it a try. Only problem is that I'm short of time right now.
    Can you send me the sources (you should have my mail address)? I'll see if I can send some time on the new extension SDK.

    Timo

    ReplyDelete
  12. Hi Nick,

    How can I uninstall the subversion monitor?

    Thanks in advanced.

    ReplyDelete
  13. Hi Betino,

    just go to the jdeveloper\jdev\extensions directory and delete the extension jar and folder.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...