[RSS]
WORK IN PROGRESS

Eclipse plugins to NetBeans modules migration cookbook

Introduction

The Eclipse IDE and NetBeans IDE are both modern IDEs with modular architecture. They both support development of functionality that can expand their functionality through the use of well documented APIs and some times not so well documented conventions. Naturally there is a lot of similarity and some differences in the architecture of both IDEs. It should be noted that both IDEs are based on a core Rich Client Platform (Eclipse RCP or NetBeans Platform). It is possible to develop a non-IDE like application based on these platform that enjoy the benefits of underlying modular architectur. Thus it follows that the possibility of extnetion of functinality also applies to such applications using the same development support in both IDEs.

Here I will document and clarify the similarities and differences in the two architectures and provide a starting point for a person intending to migrate their Eclipse plugins to NetBeans modules. I will show how to migrate a completely functional Eclipse plugin to a NetBeans module. I will explain the NetBeans concepts that are equivalent to concepts from the world of Eclipse plugins.

Concepts and Mechanisms

This section will discuss the concepts and mechanisms that are analogous in Eclipse PDE and NetBeans Module development support aka apisupport.

EclipseNetBeansDescription
Plugin Development Environment (PDE)NetBeans Module development support (apisupport)The support for developing plugins and modules
FAQsFAQsModule Developer FAQs
APIsNetBeans 6.0 API JavaDocThe API Javadoc
TutorialsTutorialsThe tutorials
Rich Client Platform (RCP)NetBeans PlatformThe core platform on which both IDEs based on. Other applications can be developed on top of the platform as well.
OSGIModule System and Module ClassLoadersThe modular system at the heart of both IDEs.
-Module project secrets This README file describes the working of module projects
Extensions and Extension Pointslayer file, manifest file, META-INF/services, System File SystemThe mechanisms of extesion
WorkspaceOS FilesystemThe managed storage
ResourceFileObjectA unit of persistance
ProjectProjectThe project
Project NaturesDifferent project types J2seProject, WebProject etc and their lookupsThe projects of different kind. See How to write project types?, How Project Build System Works?
WorkbenchWindowManagerThe GUI
PerspectivesWindowing System modes and groupsA layout of GUI
ViewsTopComponent in non-editor modes, ExplorerManager, Explorer ViewsThe views
EditorsCloneableTopComponents in editor modeThe editor tabs
Model objectsDataObjects, DatasystemThe composite objects based on files
NodeNodeA proxy for a model object shown in Views
IStructuredSelectionActivatedNodes (Tutorial series 1 2 3 4)The selection context that all actions are atuned to.
AdaptableLookupA generic mechanism of service provision without inheritance.
ActionSetsActions folder element in layer fileThe place where actions are defined
menubarpath attributeMenu folder element in layer fileThe place where menus are defined
toolbarpath attributeToolbars folder element in layer fileThe place where Toolbars are defined
plugin jarNBM FileNBM is a specially constructed jar file used for delivering NetBeans plugins to the target environment. NBM Technology

Extension point mapping

Eclipse Workbench Extension PointsNetBeans equivalent
org.eclipse.ui.acceleratorConfigurationsThe accelerator or shortcuts are defined under <Shortcuts> folder in layer file.
org.eclipse.ui.acceleratorScopes-
org.eclipse.ui.acceleratorSets-
org.eclipse.ui.actionDefinitions-
org.eclipse.ui.actionSetPartAssociations-
org.eclipse.ui.actionSetsThere is no such thing as action sets in case of NetBeans. Actions are simply defined as <file> nodes under some <Actions> folder node. See or Old mechanism
menubarpath attributeThe menu items for actions are declared under the <folder name="Menu"> folder in layer file. See
toolbarpath attributeThe toolbar button for actions are declared under the <folder name="Toolbars"> folder in layer file. See
org.eclipse.ui.activities-
org.eclipse.ui.activitySupport-
org.eclipse.ui.bindingsThe bindings for global actions are declared under the <folder name="Shortcuts"> folder inside the layer file. See
org.eclipse.ui.browser.browsers-
org.eclipse.ui.browserSupport-
org.eclipse.ui.commandsThere is no concept of commands in NetBeans. There are only actions.
org.eclipse.ui.commandImages-
org.eclipse.ui.contexts-
org.eclipse.ui.decorators-
org.eclipse.ui.dropActions-
org.eclipse.ui.editorActions-
org.eclipse.ui.editors-
org.eclipse.ui.elementFactories-
org.eclipse.ui.encodings-
org.eclipse.ui.exportWizards-
org.eclipse.ui.fontDefinitions-
org.eclipse.ui.handlers-
org.eclipse.ui.helpSupport-
org.eclipse.ui.ide.filesystemSupport-
org.eclipse.ui.ide.markerHelp-
org.eclipse.ui.ide.markerImageProviders-
org.eclipse.ui.ide.markerResolution-
org.eclipse.ui.ide.markerSupport-
org.eclipse.ui.ide.projectNatureImages-
org.eclipse.ui.ide.resourceFilters-
org.eclipse.ui.navigator.linkHelper-
org.eclipse.ui.navigator.navigatorContent-
org.eclipse.ui.navigator.viewer-
org.eclipse.ui.importWizards-
org.eclipse.ui.intro-
org.eclipse.ui.keywords-
org.eclipse.ui.menusThe Menus are declared by the folder nodes under the <folder name="Menu"> inside the layer file.
org.eclipse.ui.newWizards-
org.eclipse.ui.perspectiveExtensions-
org.eclipse.ui.perspectives-
org.eclipse.ui.popupMenus-
org.eclipse.ui.preferencePages-
org.eclipse.ui.preferenceTransfer-
org.eclipse.ui.presentationFactories-
org.eclipse.ui.propertyPages-
org.eclipse.ui.startupAn entry OpenIDE-Module-Install: org/your/module/Install The org/your/module/Install should extend org.openide.modules.ModuleInstall
org.eclipse.ui.statusHandlers-
org.eclipse.ui.systemSummarySections-
org.eclipse.ui.themes-
org.eclipse.ui.viewActions-
org.eclipse.ui.views-
org.eclipse.ui.views.properties.tabbed.propertyContributor.html-
org.eclipse.ui.views.properties.tabbed.propertySections.html-
org.eclipse.ui.views.properties.tabbed.propertyTabs.html-
org.eclipse.ui.workingSets-

The registrations made by various NetBeans modules are ususally documented here.

Classes and APIs

  • TODO

Documentation and References

Project System

If you want to implement a new project type here are some documents that describe how the NetBeans project system works.

Windowing System

LevelsOfCompliance

Converting any application to be fit for a framework like NetBeans can be done on various levels. The integration can be shallow and use just a few integration points, or it can be more deep and tightly follow the paradimes of the NetBeans framework. To capture these differences we have created a LevelsOfCompliance table.

Example 1 -Simple - File Open Server - a sample originally developed as an Eclipse plugin migrated to NetBeans module

File Open Server is a simple plugin that provides a simple, two way integration between an external editor such Emacs and IDE. The user can open a file that is open in the IDE in an external editor at the exactly same line and column. Conversly the user can open a file that is open in the external editor in the IDE at the exactly same line and column.

Eclipse GUI

Eclipse File Open Server Menu Items

Eclipse - File Open Server Menu Items.png

  • Open File in External Editor Action opens the file that is currently open in the IDE at the same line and column number in the external editor specified in preferences.
  • Start File Open Server and Stop File Open Server Actions respectively start and stop the File Open Server which handles the incoming file open requests. The server listens on a TCP port specified in the preferences. Default value of the port number if 4050.

Eclipse File Open Server Toolbar

Eclipse - File Open Server Toolbar.png

Eclipse File Open Server Preferences

Eclipse - File Open Server Preferences.png

NetBeans GUI

NetBeans File Open Server Menu Items

NetBeans - File Open Server Menu Items.png

  • Open File in External Editor Action opens the file that is currently open in the IDE at the same line and column number in the external editor specified in preferences.
  • Start File Open Server and Stop File Open Server Actions respectively start and stop the File Open Server which handles the incoming file open requests. The server listens on a TCP port specified in the preferences. Default value of the port number if 4051.

It turns out, starting with in NetBeans 3.6 there is no need for the File Open Server. Instead you can invoke the NetBeans launcher with --open Filepath:line command line option. If the NetBeans IDE is not already running it is started and the specified file is opened ate the specified line numbers. This mechanism avoids the inherent security risks of listening on a TCP port. The only drawback of --open command line option is that it does not support the column number. I may add that some time soon.

NetBeans File Open Server Toolbar

NetBeans - File Open Server Toolbar.png

NetBeans File Open Server Options

NetBeans - File Open Server Options.png

Ecliplse File Open Server module project directory structure

TODO

NetBeans File Open Server plugin project directory structure

FileOpenServer/manifest.mf
FileOpenServer/src/org/netbeans/modules/fileopenserver/StartFileOpenServerAction.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenRequestListenerImpl.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/layer.xml
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerSettings.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerConstants.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerOptionsPanelController.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/OpenFileInExternalEditorAction.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerInstaller.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenRequestListener.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/resources
FileOpenServer/src/org/netbeans/modules/fileopenserver/resources/StopFileOpenServerIcon.gif
FileOpenServer/src/org/netbeans/modules/fileopenserver/resources/OpenFileInExternalEditorIcon.gif
FileOpenServer/src/org/netbeans/modules/fileopenserver/resources/StartFileOpenServerIcon.gif
FileOpenServer/src/org/netbeans/modules/fileopenserver/resources/OpenFileInExternalEditorIcon32x32.gif
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenRequestEvent.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/Bundle.properties
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerPanel.form
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerPanel.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServer.java
FileOpenServer/src/org/netbeans/modules/fileopenserver/FileOpenServerOptionsCategory.java
FileOpenServer/test
FileOpenServer/test/unit
FileOpenServer/test/unit/src
FileOpenServer/build.xml
FileOpenServer/nbproject
FileOpenServer/nbproject/project.properties
FileOpenServer/nbproject/project.xml
FileOpenServer/nbproject/private
FileOpenServer/nbproject/private/private.xml
FileOpenServer/nbproject/private/private.properties

Eclipse File Open Server installed structure

<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/icons/startserver.gif
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/icons/opentypeinexternaleditor.gif
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/icons/stopserver.gif
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/icons/openfileinexternaleditor.gif
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenRequestListenerImpl.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/StopFileOpenServerAction.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/StartFileOpenServerAction.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenRequestListener.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenRequestListenerImpl$1.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenServer.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenRequestEvent.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/OpenTypeInExternalEditorAction.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/OpenFileInExternalEditorAction.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenServerConstants.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenServerStartup.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenServerPlugin.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/classes/FileOpenServer/FileOpenServerWorkbenchPreferencePage.class
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/META-INF/MANIFEST.MF
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/plugin.xml
<eclipse-install-dir>/plugins/FileOpenServer_1.0.0/FileOpenServer.jar

NetBeans File Open Server installed structure

<netbeans-install-dir>/extra/modules/org-netbeans-modules-fileopenserver.jar
<netbeans-install-dir>/extra/modules/el/find-file-ide.el
<netbeans-install-dir>/extra/update_tracking/org-netbeans-modules-fileopenserver.xml
<netbeans-install-dir>/extra/config/Modules/org-netbeans-modules-fileopenserver.xml

Eclipse Plugin configuration files

plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>

<extension
         id="FileOpenServerStartup" 
         name="FileOpenServerStartup"
         point="org.eclipse.ui.startup">
      <startup
            class="FileOpenServer.FileOpenServerStartup"> <!-- This corresponds to org.netbeans.modules.fileopenserver.FileOpenServerInstaller in NetBeans project.
      </startup>
   </extension> <!-- This corresponds to the OpenIDE-Module-Install: org/netbeans/modules/fileopenserver/FileOpenServerInstaller.class in NetBeans manifest.mf. Methods of this class are executed at startup.-->
   <extension
         id="FileOpenServerPreferecesExtensionId"
         name="FileOpenServerPrefereces Extension"
         point="org.eclipse.ui.preferencePages">
      <page
            name="File Open Server"
            class="FileOpenServer.FileOpenServerWorkbenchPreferencePage"
            id="FileOpenServer.FileOpenServerWorkbenchPreferencePage">
      </page>
   </extension> <!-- This corresponds to the 

                     <folder name="OptionsDialog">
                         <file name="org-netbeans-modules-fileopenserver-FileOpenServerOptionsCategory.instance"/>
                     </folder>

                     section in FileOpenServer/src/org/netbeans/modules/fileopenserver/layer.xml file. It specifies the Options page in Tools:Options dialog where the module's preferences are edited.
                 -->
   <extension
         id="FileOpenServerActionSetExtensionId"
         name="FileOpenServer ActionSet Extension"
         point="org.eclipse.ui.actionSets">
      <actionSet                               <!-- This corresponds to the <folder name="Actions"> section in FileOpenServer/src/org/netbeans/modules/fileopenserver/layer.xml -->
            label="FileOpenServer Action Set"
            id="FileOpenServer.actionSet">
         <action
               toolbarPath="Normal/additions"
               label="Stop File Open Server"
               class="FileOpenServer.StopFileOpenServerAction"
               icon="icons/stopserver.gif"
               menubarPath="file/additions"
               id="FileOpenServer.StopFileOpenServerAction">
         </action>
         <action
               toolbarPath="Normal/additions"
               label="Start File Open Server"
               class="FileOpenServer.StartFileOpenServerAction"
               icon="icons/startserver.gif"
               menubarPath="file/additions"
               id="FileOpenServer.StartFileOpenServerAction">
         </action>
         <action
               toolbarPath="Normal/additions"
               label="Open file in External Editor"
               class="FileOpenServer.OpenFileInExternalEditorAction"
               tooltip="Open file in external editor"
               icon="icons/openfileinexternaleditor.gif"
               definitionId="FileOpenServer.OpenFileInExternalEditorCommand"
               menubarPath="file/additions"
               id="OpenFileInExternalEditor.action">
         </action>
         <action
               toolbarPath="Normal/additions"
               label="Open type in External Editor"
               class="FileOpenServer.OpenTypeInExternalEditorAction"
               tooltip="Open type in external editor"
               icon="icons/opentypeinexternaleditor.gif"
               definitionId="FileOpenServer.OpenTypeInExternalEditorCommand" <-- This has not been implmented in the NetBeans module yet. -->
               menubarPath="file/additions"
               id="OpenTypeInExternalEditor.action">
         </action>
      </actionSet>
   </extension>
   <extension <!-- This section configures in which perspectives the actions are visible. There is no 100% equivalent of this in NetBeans. --> 
         point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension
            targetID="org.eclipse.ui.resourcePerspective">
         <actionSet
               id="FileOpenServer.actionSet">
         </actionSet>
      </perspectiveExtension>
      <perspectiveExtension
            targetID="org.eclipse.jdt.ui.JavaPerspective">
         <actionSet
               id="FileOpenServer.actionSet">
         </actionSet>
      </perspectiveExtension>
      <perspectiveExtension
            targetID="org.eclipse.jdt.ui.JavaBrowsingPerspective">
         <actionSet
               id="FileOpenServer.actionSet">
         </actionSet>
      </perspectiveExtension>
      <perspectiveExtension
            targetID="org.eclipse.jdt.ui.JavaHierarchyPerspective">
         <actionSet
               id="FileOpenServer.actionSet">
         </actionSet>
      </perspectiveExtension>
      <perspectiveExtension
            targetID="org.eclipse.debug.ui.DebugPerspective">
         <actionSet
               id="FileOpenServer.actionSet">
         </actionSet>
      </perspectiveExtension>
      <perspectiveExtension
            targetID="org.eclipse.pde.ui.PDEPerspective">
         <actionSet
               id="FileOpenServer.actionSet">
         </actionSet>
      </perspectiveExtension>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            description="Open file in External Editor"
            categoryId="org.eclipse.ui.category.file"
            name="Open file in External Editor"
            id="FileOpenServer.OpenFileInExternalEditorCommand">
      </command>
      <keyBinding
            commandId="FileOpenServer.OpenFileInExternalEditorCommand"
            keySequence="Ctrl+E"
            keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </keyBinding> <!-- This corresponds to the <folder name="Shortcuts"> section in FileOpenServer/src/org/netbeans/modules/fileopenserver/layer.xml file. -->
      <command
            description="Open type in External Editor"
            categoryId="org.eclipse.ui.category.file"
            name="Open type in External Editor"
            id="FileOpenServer.OpenTypeInExternalEditorCommand"> <-- This has not been implmented in the NetBeans module yet. -->
      </command>
      <keyBinding
            commandId="FileOpenServer.OpenTypeInExternalEditorCommand"
            keySequence="Ctrl+T"
            keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </keyBinding> <-- This has not been implmented in the NetBeans module yet. -->
   </extension>

</plugin>

Runtime Manifest file

Manifest-Version: 1.0
Bundle-Name: File Open Server Plug-in # This corresponds to the display name of the NetBeans module that is specified in the src/org/netbeans/modules/fileopenserver/Bundle.properties using OpenIDE-Module-Name= entry. The bundle file itself is specified in the
                                      # manifest.mf file using OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/fileopenserver/Bundle.properties entry.
Bundle-SymbolicName: FileOpenServer   # This corresponds to the unique of the NetBeans module aka code name base specified by the OpenIDE-Module:entry in the manifest.mf file.
Bundle-Version: 1.0.0                 # This partly corresponds to the OpenIDE-Module-Specification-Version: entry in the manifest.mf file.
Bundle-ClassPath: FileOpenServer.jar  # The jar file name of the NetBeans module is derived from the NetBeans module's code name base e.g. org-netbeans-modules-fileopenserver.jar and lives (when installed globally) in the <cluster>/modules/ directory of the NetBeans installation.
Bundle-Activator: FileOpenServer.FileOpenServerPlugin
Bundle-Localization: plugin           # This corresponds to the bundle file specification in the manifest.mf file using OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/fileopenserver/Bundle.properties entry.
Require-Bundle: org.eclipse.ui,       # This declares the Eclipse API dependencies of this plug-in. This corresponds to the OpenIDE-Module-Module-Dependencies: section of NetBeans module manifest file.
 org.eclipse.core.runtime,
 org.eclipse.core.resources,
 org.eclipse.jface.text,
 org.eclipse.ui.editors,
 org.eclipse.ui.workbench.texteditor,
 org.eclipse.ui.ide,
 org.eclipse.jdt,
 org.eclipse.jdt.core,
 org.eclipse.jdt.ui
Eclipse-AutoStart: true              # This corresponds to the way the NetBeans modules are instantiated and started. 
                                     # A NetBeans module can be exclusively autoload, eager or regular and is specified by is.autoload=true, is.eager=true or non properties in nbproject/project.properties file.
                                     # This results in <param name="autoload">true</param> or <param name="eager">true</param>

NetBeans Module configuration files

Manifest file

Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.fileopenserver
OpenIDE-Module-Install: org/netbeans/modules/fileopenserver/FileOpenServerInstaller.class
OpenIDE-Module-Layer: org/netbeans/modules/fileopenserver/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/fileopenserver/Bundle.properties
OpenIDE-Module-Specification-Version: 1.1

Runtime Manifest file

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_13-b05 (Sun Microsystems Inc.)
OpenIDE-Module-Public-Packages: -
OpenIDE-Module-Module-Dependencies: org.jdesktop.layout/1 > 1.4, org.n  # This is runtime form of the <module-dependencies> section in the NetBeans module's project.xml file.
 etbeans.modules.editor.lib/1 > 1.20, org.netbeans.modules.editor.lib2
 /1 > 1.5, org.netbeans.modules.options.api/0-1 > 1.5, org.openide.awt
  > 6.11, org.openide.filesystems > 7.3, org.openide.io > 1.11, org.op
 enide.loaders > 6.7, org.openide.modules > 7.3, org.openide.nodes > 7
 .2, org.openide.text > 6.16, org.openide.util > 7.10, org.openide.win
 dows > 6.18
OpenIDE-Module-Java-Dependencies: Java > 1.5
OpenIDE-Module-Implementation-Version: 071029
AutoUpdate-Show-In-Client: true
OpenIDE-Module: org.netbeans.modules.fileopenserver
OpenIDE-Module-Install: org/netbeans/modules/fileopenserver/FileOpenSe
 rverInstaller.class
OpenIDE-Module-Layer: org/netbeans/modules/fileopenserver/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/fileopenserver/
 Bundle.properties
OpenIDE-Module-Specification-Version: 1.0
OpenIDE-Module-Requires: org.openide.modules.ModuleFormat1

nbproject/project.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.apisupport.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
            <code-name-base>org.netbeans.modules.fileopenserver</code-name-base>
            <module-dependencies>
                <dependency>
                    <code-name-base>org.jdesktop.layout</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.4</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.modules.editor.lib</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.20</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.modules.editor.lib2</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>1</release-version>
                        <specification-version>1.5</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <release-version>0-1</release-version>
                        <specification-version>1.5</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.awt</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>6.11</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.filesystems</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.3</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.io</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>1.11</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.loaders</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>6.7</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.modules</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.3</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.nodes</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.2</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.text</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>6.16</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.util</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>7.10</specification-version>
                    </run-dependency>
                </dependency>
                <dependency>
                    <code-name-base>org.openide.windows</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>6.18</specification-version>
                    </run-dependency>
                </dependency>
            </module-dependencies>
            <public-packages/>
        </data>
    </configuration>
</project>

Layer File

<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
<filesystem>
    <folder name="Actions">
        <folder name="Edit">
            <file name="org-netbeans-modules-fileopenserver-OpenFileInExternalEditorAction.instance"/>
            <file name="org-netbeans-modules-fileopenserver-StartFileOpenServerAction.instance"/>
            </folder>
    </folder>
    <folder name="Menu">
        <folder name="File">
            <file name="org-netbeans-modules-fileopenserver-OpenFileInExternalEditorAction.shadow">
                <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-fileopenserver-OpenFileInExternalEditorAction.instance"/>
                <attr name="position" intvalue="2587"/>
            </file>
            <file name="org-netbeans-modules-fileopenserver-StartFileOpenServerAction.shadow">
                <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-fileopenserver-StartFileOpenServerAction.instance"/>
                <attr name="position" intvalue="2550"/>
            </file>
            <file name="org-netbeans-modules-fileopenserver-separatorAfter.instance">
                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
                <attr name="position" intvalue="2593"/>
            </file>
        </folder>
    </folder>
    <folder name="OptionsDialog">
        <file name="org-netbeans-modules-fileopenserver-FileOpenServerOptionsCategory.instance"/>
    </folder>
    <folder name="Toolbars">
        <folder name="File">
            <file name="org-netbeans-modules-fileopenserver-OpenFileInExternalEditorAction.shadow">
                <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-fileopenserver-OpenFileInExternalEditorAction.instance"/>
                <attr name="position" intvalue="700"/>
            </file>
            <file name="org-netbeans-modules-fileopenserver-StartFileOpenServerAction.shadow">
                <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-fileopenserver-StartFileOpenServerAction.instance"/>
                <attr name="position" intvalue="500"/>
            </file>
            </folder>
    </folder>
    <folder name="Shortcuts">
        <file name="O-E.shadow">
            <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-fileopenserver-OpenFileInExternalEditorAction.instance"/>
        </file>
    </folder>
</filesystem>

Example 2 - Complex - TODO

Additional help with NetBeans Module development

NetBeans Related BLOGS

  • TODO