Eclipse RCP features install but no plugins show up when i restart eclipse after the installation - eclipse-plugin

I wrote some plugins for an existing Eclipse/Equinox RCP Application. Previously i was able to install them just fine by using an update site.
After the RCP Application updated this is not possible anymore (org.osgi.framework.version from 1.5.0 to 1.6.0, osgi.framework.version from 3.6.1.R36x_v20100806 to 3.7.2.v20120110-1415):
The features are installed (listed in features/, show up in Help->Software Updates->Manage Configuration).
The Feature-Status shows No plug-in: "XY" included at runtime. for all plugins in the feature.
The plugins/ folder contains the .jar files
When i use ss on the OSGI console the bundles are not shown.
The exact same update site works fine in the old version of the RCP Application
When i install the same plugins from the OSGI console with the install command the plugins work fine. (Fresh version of the RCP Application/Using the same jars that were in the Update site)
What can i do to diagnose or solve this problem?
EDIT: If i press the Apply Changes Button instead of the Yes->Restart Button after installing the features they get installed properly...

Related

Plugin Compatibility Issue Eclipse Oxygen (4.7) and Java 9

We upgraded one of our Eclipse 3.x plugins to work with Java 9.
But when we generated the plugin update site content, and used Eclipse Update functionality to install the new version of the plugin, we encountered the following error in Eclipse Oxygen.
Removing part descriptor with the 'pluginxxx.bla.bla' id and the 'bla bla' description. Points to the invalid 'bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView' class.
This error also appears due to some of the bundled plugins of Eclipse Oxygen itself.
After a hard week we had to
Uninstall our plugin
Remove the older versions of the plugin from the Eclipse/plugins folder
Export the plugin as a deployable plugin under the eclipse plugins directory. (Eclipse/plugins/blabla.jar)
Restart Eclipse and it worked.
Right click the eclipse plugin project and Run as "Eclipse Application" works fine, but installing the plugin from an "Update Site" causes the plugin to fail loading.
We could not find a solution yet, but it certainly effects our delivery of the plugin. The plugin is used by almost 500 CS students on their personal computers, and 200 lab computers. So the update should be installed using regular Eclipse Update functionality, not by copying the jar into the plugins directory.
Was there a better way to fix this, or something quicker we could've tried (in case this happens again)?
Update (7 days into the problem)
We have a workaround:
Export the feature project with the following settings in the Export Wizard
Destination/ Directory: Folder of your Plugin Update Site project
Options/ Package as individual JAR archieves (selected)
Options/ Generate p2 repository (selected)
Options/ Allow for binary cycles in target platform (selected)
Options/ Use class files compiled in the workspace (essentially selected)
Install (or update) the plugin from the local (or remote) plugin update site, and the CompatibilityView problem is solved.
In order to have the category listing displayed correctly during install/update new software operations, we added a category.xml file (File/New/Other/Plugin-in Development/Category Definition) in the update site project, defined the categories, and added the feature (versioned as "qualifier").
This is certainly not the way it should be, and we just hope it will be solved in the future Eclipse releases.
By the way current Eclipse Photon integration version has the same problem unfortunately.

how to install ANTLR 4.5.3 tool jar for eclipse-plugin development?

I need to use ST4 for my eclipse plugin development project. As stated by antlr guys, the last version 4.5.3 is osgi ready and have st4 in his tool package.
How can I install it, so it appear in the dependencies list of my plugin manifest ?
Thanks.
Finally, I realized that :
1. only the [ANTLR 4.5.3 Java runtime binaries jar] is OSGI ready. the complete version is not OSGI ready.
2. The StringTemplate-4 is not provided as tool in that binary bundle.
To install the bundle in your plug-in is a matter of target-platform setup :
3. Copy yours osgi bundles a choosen osgi directory. e.g.: ./myProject/libs/osgi
4. Open Eclipse preferences > Plug-in Development > Target Platform.
5. Select your current platform and press , then button.
6. Select 'Directory source', then browse and select your osgi directory.
7. Apply and close the preferences panel.
You can now go to your plug-in dependencies and add those bundles to your project.
Because my main need was to use ST4, I finally choose to add the following packages :
- org.apache.servicemix.bundles.stringtemplate (4.0.8_1)
- org.apache.servicemix.bundles.antlr (3.5.2_1)
and this worked for me.

guice-assistedinject.jar in Eclipse target platform but not addable in plug-in's dependencies

I'm developing an Eclipse RCP application with Eclipse 4.4 Luna M5 and I'm using Guice 3.0.
So I added guice.jar to my target platform and for every plug-in I'm developing I can add bundle com.google.inject to the plug-in's dependencies using the plug-in manifest editor of Eclipse. So far, everything works fine.
Now the problem: I want to use guice assisted injects (#Assisted).
So I added guice-assistedinject.jar to my target platform. (I'm using a .target file = Eclipse Target definition file).
In then "Content" tab of the .target file editor Eclipse correctly shows me the fragment bundle com.google.inject.assistinject 3.0 from guice-assistedinject.jar, but I cannot add this bundle or an exported package of this bundle to the dependencies of the plug-in projects I'm developing.
When I press "Add" in the plug-in manifest editor, com.google.inject.assistedinject is not in the list of addable dependencies? What's wrong?
Here my comment as answer again:
OK, found the solution: it's a PDE problem, see accepted answer in Eclipse OSGi bundle reqiure another bundle's fragment
After changing the manifest of my guice-3.0.jar in the target platform like described in the link above, I needed to do the following:
Reload the target platform (Windows -> Preferences -> Plug-in development -> Target platform) and restart eclipse.
Remove the bundle com.google.inject from the required bundles of my plug-in.
Add all needed com.google.inject packages to "imported packages" of my plug-in. Now in the list of packages I can see com.google.inject.assistedinject.Assisted and import it!

How do I install a plugin from a local .zip or .jar file in Aptana Studio 3?

I have a locally packaged plugin that isn't available from any update server (I built and exported it from source code, using Eclipse.) The plugin installs and works in the Eclipse environment.
Now I'd like to use it in my standalone Aptana Studio 3 installation. Is there a documented method of installing a .ZIP or .JAR file containing a working Eclipse plugin into Aptana Studio 3?
If this is well-documented elsewhere, a URL is all I need! :D
Edit: I realize there may be many reasons why the plugin doesn't work in Aptana; the issue here is that I can't find a simple way to install the plugin from within Aptana. I've tried "Add Repository -> Local" and "Add Repository -> Archive" but neither method recognizes the packaged plugin. I've also tried dropping the jar file into the Aptana 3 'plugins' dir and restarting -- no love. But there are no error messages or log entries to help understand why I can't install the plugin.
Might be a dependency issue. In some cases, a plugin may depend on another plugin that is missing from the product (e.g. Aptana Studio, in this case).
What I suggest is to install Aptana Studio as a plugin into a classic Eclipse 3.7 installation. Then, install your plugin just like you tried before.
Hope that helps.

Eclipse plugin view does not show up after install

I created a sample plugin which includes a simple view in eclipse and ran the plugin from inside the workbench, my plugin is installed and I get my view showing up in Window/Show View/Other... . I packaged the plugin as a jar file and installed it under the plugins directory of eclipse and restarted my eclipse workbench. I am not able to find my plugin view. I dont know whats is wrong
I am using eclipse RCP SR2 (3.6) for developing plugins and my packaged jar file includes the code, META-INF/MANIFEST.MF and plugin.xml files.
I created the plugin from the book 'Eclipse Plug-ins, 3rd Edition'. I followed the steps outright and am not able to set up the plugin as a jar file.
I got it to work somehow? The plug-in project was created using Execution Environment JavaSE-1.6. 'It was given in the book I referred'. Now the manifest editor had the entry 'Bundle-RequiredExecutionEnvironment: JavaSE-1.6'. Now I ran the application with-in eclipse, it was working. But when I bundled the plugin as jar and copied the plug-in jar under plugins folder and restarted eclipse the plugin was not working, I dont know why, I thought my eclipse is not running under JRE1.6, but I checked my Windows->Preferences->Java->Installed JREs-> I have only jdk1.6.0_27 checked (So I assume that the eclipse is running under JavaSE1.6). This is bit confusing for me! I removed the Execution Environment entry in the Manifest editor Overview tab. Now there is no 'Bundle-RequiredExecutionEnvironment' entry in my Manifest, I created the bundle jar again and installed in eclipse plugins folder and restarted eclipse using -clean option. It started working in my eclipse. I got it to work somehow but with no understanding! I am still looking for answers from some one who can help me figure out what went wrong?
Open an OSGI console and type 'ss'. It should list all of the plugins. Can you see it? What is the state of it.
You can use Preferences/plug-in development/target platform edit running 'running platform' content tab to list and check/uncheck plugins. I hope it helps.
You could try copying your jar file to the eclipse/dropins folder.