Gregg's Netbeans Page

This is my netbeans page. I've placed source an .NBM files for some simple modules that I've written here.

If you have any questions or comments please send them to me at

Perforce SCM Access in Netbeans

This page is now deprecated. Please go to my Netbeans-Perforce project on for the latest release.

This module provides the basics for using perforce in netbeans. It provides a toolbar on the editor for .java files, and a global menu for access to the same functions on other file types.

Perforce Netbeans-7.0 Plugin v2.0.9 - 04/27/2011

You can download the zip of the Module sources and the netbeans 7.0 module binary.

Some people need to use p4merge instead of p4diff as the "executable" name to perform diffs with. This version still uses p4diff because that will not break existing users. If you need to use p4merge instead, I recommend that you create a p4merge script/batch file in a directory that the PATH variable points at on your system (the PATH that netbeans sees in particilar). Put the appropriate command for using p4merge into that p4diff script/batch file and you should be good to go. This is not a new issue, it's been necessary to do this for all versions.

Old News for Version 2.0.9

This version corrects the problem of cancelled submit still submitting from v2.0.8.

This version finishes the work on the options dialog to make it now possible to set the perforce configuration options there, globally. If you need separate options, per project, then you need to use P4CONFIG (see the perforce web site information on P4CONFIG). There is probably still some bugs I haven't seen yet, so feel free to report them to me, or better yet, download the source and fix them and send me a diff that I can apply and update the distribution here with.

Older Netbeans Versions Builds

Perforce Netbeans-6.9 Plugin v2.0.9 - 08/18/2010
You can download the zip of the Module sources and the netbeans 6.9 module binary.
Perforce Netbeans-6.7 Plugin v2.0.5 - 06/05/2009
You can download the zip of the Module sources and the netbeans 6.7 module binary.
Perforce Netbeans-6.5 Plugin v2.0.5 - 05/11/2009
You can download the zip of the Module sources and the netbeans 6.5 module binary.
Perforce Netbeans-6.1 Plugin v2.0.5 - 05/11/2009
You can download the zip of the Module sources and the netbeans 6.1 module binary.
Perforce Netbeans-6.0 Plugin v1.0.2 - 12/05/2007
Project zip for Module and the netbeans 6.0 module binary.
Perforce Netbeans-5.0 Plugin v1.0.2 - 4/15/2006
Source zip for Module I don't have a built binary for this version. You should be able to download the zip, unpacket it, add a project and build and deploy it into your 5.x netbeans.

Older Source Versions

Checkout Action in Editor

The Checkout action shown in the editor toolbar below will allow you to quickly check out a file for edit.

Diff Action in Editor

The diff action in the editor toolbar provides access to the graphical diff displayed through the p4merge tool.

The p4merge tool shows graphical diffs as depicted below.

Submit Action in Editor

The submit action submits the single file corresponding to the file currently being edited.

Add Action in Editor

The add action will add the currently edited file to perforce.

Revert Action in Editor

The revert action prompts the user for confirmation of the revert, and provides the ability to view the edits that have occured via the p4merge based differences viewed as shown above.

Global Versioning->Perforce Sub-Menu

The global Versioning menu has a Perforce submenu which provides access to the perforce operations on all other file types that can be shown in the editor.

File Context Perforce Menu

The popup, editor context menu also includes a perforce menu to show the perforce operations there as well.

This is a simple module without a lot of flare, and it certainly won't be helpful in renaming and other refactoring operations at this time. But, hopefully it will be extended over time to be more fully integrated with netbeans.

v2.0.6 Notes

This version has some changes and fixes in it since the v2.0.5 which may still need some more work, but I wanted to get a version out for the people that are asking and unable to figure out how to build from the old sources. I will update the sources sometime in the future to be current with this build. If you have problems under 6.9, then take the old module sources and download and expand them. Open the project properties in netbeans and go to the Libraries page. Delete the "Editor" and "Editor Library" entries and re-add them to fix the dependency problem that netbeans developers have still not addressed. Then built it, and install it into your development IDE using the project menu items.

v2.0.3 Notes

This version adds the use of the -d argument to the p4 command line so that the P4CONFIG environment variable can be set, for example to P4CONFIG=.p4context, and that file, can be placed at roots of repositories to target depot operations at specific instances, clients etc associated with a particular depot. Look at
P4CONFIG docs for more information if you are not familar with this facility.

v2.0.1 Notes

This version was a bug fix to a 2.0 EventThread usage issue.

v2.0.0 Notes

  • Some general code reorganization to eliminate some duplicate code.
  • layer.xml changes to move some things around and expose some things that disappeared when menus and toolbar naming/structure changed.
  • added a "p4 reopen -t +w" command to allow me to make some files, such as netbeans conf files checkin as writeable so I don't have to futz with netbeans changes to config files failing all the time because some are readonly.

v1.0.2 Notes

This version contains some new functionality:

Splitable output window
The output window now has two panes that can be shown together, or separately. The splitting can be selected as either horizontal or vertical as well. Use the context menu in the output window to select the options you want.
Three new actions for project add, edit and submit.
These three new actions function on the "project" node in the navigator tree to allow you to do bulk checkout, add or submit.

v1.0.0 Notes

This was the first release that I posted information on netbeans mailing lists about. It's primative, but provides some help in managing simple, operations.