...
The parent tag specifies which version of IGB your new App is compatible with. It also enables your project to inherit configurations from the parent pom.xml file, which will save you time and effort.
The version found in the parent tag of the App's pom.xml should match the version tag found in the IGB pom.xml at the top level of your cloned IGB project.
For example, if the IGB pom.xml contains version tag equal to 9.0.0, then the parent tag of the App's pom.xml should match the tag below.
Code Block | ||
---|---|---|
| ||
<parent> <groupId>com.affymetrix</groupId> <artifactId>igb-project</artifactId> <version>9.0.0</version> </parent> |
In the image below, you can see that the IGB version of 9.0.0 is seen in the app's pom.xml.
packaging tag
...
Your newly created class should match the code seen below:
Code Block | ||
---|---|---|
| ||
package org.lorainelab.igb.menu.api.example; import aQute.bnd.annotation.component.Component; import java.util.Arrays; import java.util.List; import java.util.Optional; import javax.swing.JOptionPane; import org.lorainelab.igb.menu.api.MenuBarEntryProvider; import org.lorainelab.igb.menu.api.model.MenuBarParentMenu; import org.lorainelab.igb.menu.api.model.MenuItem; @Component(immediate = true) public class MenuBarExtensionExample implements MenuBarEntryProvider { @Override public Optional<List<MenuItem>> getMenuItems() { MenuItem menuItem = new MenuItem("Hello World App", (Void t) -> { JOptionPane.showMessageDialog(null, "Hello IGB World!"); return t; }); menuItem.setWeight(1000000000); return Optional.ofNullable(Arrays.asList(menuItem)); } @Override public MenuBarParentMenu getMenuExtensionParent() { return MenuBarParentMenu.TOOLS; } } |
Info |
---|
Note that NetBeans adds the package and class declarations automatically. |