We have an Eclipse RCP product, which means it depends on a number of Eclipse plugins (for the UI etc). We have set up a reference Eclipse ("target") to supply the latter.
Our product also depends on a number of third party plugins. Is there a standard location for these to be put?
We have a few of our third-party plugins in the /plugins of the target Eclipse, but this seems wrong to me. The third party plugins change more frequently than, or at least in a different timeframe to, our reference Eclipse.
I tried putting some third party plugins in a separate project in the workspace (under version control), but the PDE headless build did not seem to find them - even though I used the pluginPath property in the headless build.properties.
This is Eclipse 3.4.2. I am aware than the handling of target platforms has changed somewhat in 3.5.
Most of the comments I've seen see on the web about this seem to assume that you're writing a plugin to be added to a standard Eclipse installation. We're not, it's a completely separate product.
For my RCP applications I created a customized target platform directory for it to use (e.g. rcpapptarget). Under that directory I unzip the following packages:
eclipse-RCP-SDK-3.4.2-win32.zip
eclipse-3.4.2-delta-pack.zip
Then I add what ever other eclipse or third party plug-ins that my application will need. For example:
the latest GEF all .zip file
jay libs EclipseCallBasic_1.1.0 plug-in
derby distributed plug-in
additional eclipse plug-ins needed for help support, cheatsheets, updates etc.
I then setup a workspace for developing that RCP application and point the workspace's "Target Platform" to use that customized target platform directory. I do all my development using that target platform and my headless builds use it too.
To set the target platform choose the Window | Preferences command and then select Plug-in Development | Target Platform from the preference tree. Set the "Location" to point to the directory you created.
There isn't a standard that I know of for where 3rd part plugins should go. You can define an external extension location and store your party plugins/features there. This also allows you to reuse the plugins in multiple Eclipse installs if you wish.
You add an Extension location by going to
Ganymede onwards: Help->Software Updates->Available Software->Add Site->Local
Older versions: Help->Software Updates->Manage Configuration->Add Extension Location
For Ganymede onwards, the extension locations work a bit differently (IIRC the plugins are copied to the standard Eclipse install, which kind of defeats the point),there is however a new concept called dropins that you might find useful.
Related
I would like to develop plugins for an RCP Applicaction. Now, they provide a .target file for development.
I tried to read on several Eclipse pages but I could not find out how to use that file. Do I have to load it somewhere? Do I have to add it at a specific location?
I'm sure, I missed something...
Please give me a hint.
Use the target definition editor to open the target file.
You will need to have the Plug-in development tools (PDE) installed to develop plug-ins for RCP applications. PDE can be installed into an existing IDE from the projects download page.
Or you can download an Eclipse package that contains PDE. This page gives an overview which package contains what. However, I recommend to choose the Eclipse for RCP and RAP develoipers
If you have PDE installed and the target file is located in the workspace, it is the default editor (i.e. you can simply doiuble click the respective entry in the package explorer).
Use the Set as target platform in the top right corner of the target editor to make it the current target platform.
The current target platform constitutes the plug-ins which your workspace will be built and run against. It describes the platform that you are developing for.
Once a target platform is known to the IDE it can also the changed through the Plug-in Development > Target Platform preference page.
There is also an option to show the name of the current target platform in the status bar on the Plug-in Development preference page.
What is the best way to configure target platform to develop Eclipse RCP application? Download 'pure' Eclipse and add only needed plug-ins in project or download Eclipse for RCP and RAP Developers? And what is better solution to add plugins? Open Eclipse-TP and download from eclipse-marketplace or manually copy jars to appropriate folders?
It depends on the set of plug-ins your RCP application depends on.
"RCP SDK" provides a minimal target platform, with source code.
"Platform SDK" provided more plug-ins, with source code. It includes more plug-ins than RCP SDK, without including the developer-oriented plug-ins of Eclipse IDEs. Unfortunately, this platform is not currently provided.
"Platform Runtime Binary" provides the same thing as Platform SDK -- without source code.
If you want to release on multiple platforms, also download the DeltaPack, which contains platform-specific resources for multiple platforms.
By the way, if you're adding the target platform to version control, use binary type for the following files in plugins/*/META-INF:
eclipse.inf -- line endings should be NL
MANIFEST.MF, ECLIPSE_.SF, and ECLIPSEF.SF (note the spelling) -- line endings
should be CR/NL
I have implemented a graph editor with Eclipse EMF and GMF frameworks. After completing my project, I realized that this plugin shows dependencies (not explicitly added by me) on some OS-specific plugins.i.e:org.eclipse.ui.win32, org.eclipse.swt.win32.win32.x86. And whenever I have tried to bypass this dependency at my update site something went wrong with the installation process of the plugin.
As such it is impossible to run my plugin in *nix environment or even win64 machines.This seems a very heavy constraint dependency to me. Am I doing something in a wrong way? Or is there no other way of building Eclipse plugins which are cross-platform other than building the project from scratch at each different OSs?
We created a similar style of plug-in in my project. Under "Plug-in Dependencies" in Package Explorer I can see org.eclipse.swt.win32 listed, but it is not listed in required plug-ins in plugin.xml.
We also successfully created an update site which works for Mac users without issue.
So, yes it is possible to have a cross-platform plug-in.
I would suggest you first try to to use "Export..." -> "Deployable plug-ins and fragments" to create a bunch of jar files for your plug-in. See if these can be successfully installed by copying into the drop-ins folder of a fresh eclipse installation. Do this first on a Win32 install, then try on another platform. Once you have that working, use the new Eclipse installation to create the Update site.
According to the Red5 plugin for eclipse,
You must use the Java EE distribution of Eclipse. The standard Java distribution will not work.
But what part exacty of the Java EE distribution is needed. This way I can bring my current distribution of Eclipse to the level needed for Red5 without having to install an entirely new distribution just for Red5.
If you don't have an answer, but can point me to a way I can find it out for myself somehow what that dependency could be, that would be good enough too.
Every eclipse plugin has an (unique) identifier and a list with identifier it depends upon. If you unzip the jar file you will find a directory "META-INF" with a textfile "MANIFEST.MF". There will be an entry "Require-Bundle:" with a list of bundles (e.g. org.junit4;bundle-version="4.5.0"). This list tells you what you have to install for the plugin to work.
The id of the plugin is the entry "Bundle-SymbolicName:". With the ids on hand you should be able to determine what plugins exactly you have to install.
The installation processed described in this page is through an old pre-P2 area with eclipse3.3
(source: red5.org)
You could try the same update site, with an basic eclipse3.5.1: the P2 provisioning mechanism should list for you all the missing components.
You can then compare the missing packages with the different eclipse distros and see for yourself exactly what part if the J2EE distro you actually need for the Red5 eclipse plugin.
You mainly need the JST and WST plugins available from Eclipse themselves.
I am preparing windows installer for my Eclipse plugin. I want install it into target eclipse product using P2 director. I am targetting only Eclipse 3.5 for now.
Installer should check that prerequisite features/plugins are already installed. I am not sure how to do this check. (Other reason for this check is to choose what other features to install, as I will bundle some prerequisites in the installer).
Easy solution is to look into eclipse/features/ and eclipse/plugins/ directories, but plugins may be installed elsewhere too: dropins directory and linked via links directory.
I would like to get list of installed fetures and plugins from P2 (profile?), if possible. Is there any way to do this? Any better solutions?
Have a look at the P2 agent, it does what you are after. Browse the source code to see how it interacts with the repository. You can use the p2 director to streamline the actual installation.
The Equinox Incubator also has a number of useful links
At http://wiki.eclipse.org/Equinox_p2_Getting_Started, they talk about eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info file:
The file bundles.info contains a list of all the plug-ins installed in the current system. On startup, all the plug-ins listed in this file are given to OSGi as the exact set of plug-ins to run with. Any extra plug-ins in the plugins directory or elsewhere are ignored. ... However, it's useful to know about this file so you can see exactly what is installed in the system you are running.
Well, it's not list of features, but list of plugins is good too.