Agile Zone is brought to you in partnership with:

Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2577 posts at DZone. You can read more from them at their website. View Full User Profile

Perforce For NetBeans

03.12.2010
| 14647 views |
  • submit to reddit
Until Perforce creates its own VCS client for the NetBeans Platform, Tutuianu Aurelian will continue developing his contribution to the open source community: PerforceNB - a Perforce client for NetBeans.  Aurelian has been developing in NetBeans since its name was Forte.  Using the NetBeans Platform API for integrating a versioning system into the IDE, Aurelian implemented a Perforce client as a NetBeans module.  His open source project, which he started in Q3 2009, is now beta quality, he says.

PerforceNB 1.0.3 beta has many new features added compared to the first release, which Aurelian says was still good enough to use on a daily basis in his normal development.  The 0.1 alpha release didn't include all of Perforce's features but it did include:

  • Automatic integration in Perforce of IDE file operations like create, delete, edit, move, rename
  • Automatic integration in Perforce of file operations outside IDE
  • Connection configuration (basic form, one connection for all opened projects)
  • Colored labels and version information in Project View and Explorer
  • Basic operations including add, delete, checkout, revert
  • Get latest revision (one operation for all projects)
  • File differences
  • Submit selection dialog and action (this only worked with default changeless)



The NetBeans API for VCS helps all VCS clients behave in a similar way.  This was a nice side effect when Aurelian was developing his client.  Although there are several other attempts at a NetBeans client for Perforce, Aurelian says he wasn't thrilled by any of them.  He says all of the other NetBeans plugins that tried to implement Perforce used the p4 command line tool, which forces you to manage the input and output of a command line.  Instead, Aurelian uses the Perforce Java API (P4JAPI).  This allows Aurelian's implementation to work with objects and avoid parsing.  It's also faster than the command line tool, and able to manage external processes.

These are the newest features in PerforceNB

  • Connection configuration, multiple connection, each project can have its own connection
  • Colored labels and version information in Project View, File View (local and depot revision)
  • Implemented actions: Manage / Unmanage by perforce (on projects), Add ,Edit ,Delete, Revert, Revert unchanged, Refresh (don't sync, just refresh the cache below and redraw the interface), Diff against have revision, Submit (works only with default change list), Manage connections (creates, edits multiple connections), Sync action (on selected file/files/folders/project) - You can sync from the latest version or from a specific changelist
  • Out of sync decoration for updated files with different revisions
  • Cache is now persisted on local storage when NetBeans is closed, and is reloaded from local storage when NetBeans open projects. Now there is no need to query Perforce server when NB starts for every project. This is a big improvement when we have many projects, loading is very fast.
  • Ignored files management (rules for all projects). (In the next version will be added support for ignored files based on mask and on absolute paths.)
  • Automated actions (add, edit, delete, move)
  • Option to enable/disable the automated actions
  • Icon marking projects managed by perforce system (enable/disabled depending if there are pending actions or not).
  • a lot of bug fixes

Aurelian welcomes contributions to his open source project.  You can check out his blog to see exactly how he harnessed NetBeans' excellent integration features for making his Perforce client.  Perforce has been improving its plugin architecture and offline capabilities, which could be good for Aurelian's PerforceNB project. 

Comments

Muhammad Danish replied on Thu, 2012/12/27 - 10:57am

If you want to see an example program which uses the library, have a look at rush paper This is a simple command line client which you can use to post a file to S3 and email a link to the file to someone. Useful for sending big files to people without clogging their email inbox with enormous files. It is also intended as a demonstration of how to use the library. Full instructions are included at the top of the file.

Muhammad Danish replied on Thu, 2013/01/10 - 9:01am

I lived in Hastings from custom dissertation, it was so nice to be there again!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.