Exporting a Plugin

Started by Whinard, June 22, 2017, 12:05:16 PM

Previous topic - Next topic

Whinard

Hello,

I am working on a plugin to merge two models. It runs perfectly in the Debug mode through Eclipse, but when I try to export it to a jar file. add it to the plug-in folder, and run it through eclipse, my plug-in does not appear in the popup menu.

Here is my MANIFEST.MF file:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Merge
Bundle-SymbolicName: com.archimatetool.merge;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.archimatetool.editor.ArchiPlugin
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.archimatetool.editor.model.impl,
com.archimatetool.model,
com.archimatetool.model.impl,
org.eclipse.jface.wizard,
org.eclipse.swt
Require-Bundle: org.eclipse.jface;bundle-version="3.12.2",
org.eclipse.ui,
org.eclipse.ui.views;bundle-version="3.8.102",
org.eclipse.core.runtime,
org.eclipse.help;bundle-version="3.7.0",
org.eclipse.emf.ecore;bundle-version="2.12.0",
org.eclipse.emf.common,
com.archimatetool.editor


Here is my plugin.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.commands">
      <command
            defaultHandler="com.archimatetool.merge.MergeFiles"
            id="com.archimatetool.merge.MergeFiles"
            name="Merge Files">
      </command>
      <command
            defaultHandler="com.archimatetool.merge.MergeElements"
            id="com.archimatetool.merge.MergeElements"
            name="Merge Elements">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="popup:com.archimatetool.editor.treeModelView?after=append_extensions">
         <command
               commandId="com.archimatetool.merge.MergeFiles"
               label="Merge Files"
               style="push"
               tooltip="Merge Two Models">
         </command>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="popup:com.archimatetool.editor.treeModelView?after=append_extensions">
         <command
               commandId="com.archimatetool.merge.MergeElements"
               label="Merge Elements"
               style="push">
         </command>
      </menuContribution>
   </extension>

</plugin>


Is there something that I need to add so that my plug-in will be seen? Let me know if you would like to see other parts of my plug-in

Phil Beauvoir

#1
Hi,

I'm a bit confused by this:

> but when I try to export it to a jar file. add it to the plug-in folder, and run it through eclipse

Are you running Archi through Eclipse, or running Archi standalone?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Whinard

Running through Archi* I misspoke. As in I add it to the plugin folder and run Archi.exe

Phil Beauvoir

And you expect to see a popup menu on the tree, right? Sometimes, Eclipse-based apps cache things. Try "Reset to Defaults..." in Archi's Help menu
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Whinard

This did not work.

When I exported the provided import/export example, it appeared in it's proper place in the menu. But when I export my plugin, it does not appear. So I am not sure what I am missing that is preventing mine from appearing.

Phil Beauvoir

I notice there are some Import-Package statements in the manifest. Do you need these? I've never needed them.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Whinard

I took them out and it worked perfectly. Those were there because eclipse added them so that I could use some of the packages functionality. I should have just added them to the required plugins.

THANK YOU!

Phil Beauvoir

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.