Best way to configure Eclipse Target-Platform? - eclipse

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

Related

Eclipse RCP: build.properties for multiple platforms

I'm developing an Eclipse RCP application. The application should run on Windows and Linux.
There are several plugins in this application that contain native artifacts. To contain these artifacts in a binary build (jar), one should specify them in build.properties file.
Currently I include both Linux and Windows native artifacts in build.properties and then in runtime I choose which one to load. However, I don't like this approach as it causes unnecessary files to present in both Linux and Windows builds.
Is there a way to specify target platform in build.properties? So that for Linux build it would include Linux artifacts and for Windows build it would include Windows artifacts?
Alternatively, is there a way to maintain two copies of build.properties - one for Linux build and second for Windows build?
The usual way to do this is to have separate plugins (or plugin fragments) for each platform with a platform filter which restricts when the plugin is available:
For example, in the MANIFEST.MF
Eclipse-PlatformFilter: (& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )
restricts the plugin to only Mac OS X 64 bit, Cocoa.
This is what SWT does. There is a base org.eclipse.swt plugin which doesn't contain any code and then multiple plugin fragments extending that plugin (such as org.eclipse.swt.cocoa.macosx.x86_64). Each fragment contains the SWT code for a platform, all implementing the same classes.
Eclipse only loads the plugin for the current platform so you don't have to do any work choosing what to use.

How can I use an existing .target file in Eclipse?

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.

Install Eclipse without any Features

The standard/class edition of eclipse still includes JDT, CVS, GIT and various other features.
Is there a way to install it with only 'resource' management/project tools.
Essentially a version of eclipse built without any language or environment in mind.
A lot like an operating system without any programs installed other than what it needs to run itself and provide the means to install programs entirely at the user's discretion.
Post Answer:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.3-201306052000/
The eclipse-platform section contains no-frills, just raw eclipse.
try this link (http://www.eclipse.org/downloads/moreinfo/custom.php) It should contain what is called a Eclipse Platform Runtime Binaries which is the most minimalist package available.
Same answer I wrote in: Eclipse without plugins for windows
You can download it from here: http://download.eclipse.org/eclipse/downloads/index.html. There you can find 'clean' builds of Eclipse, which do not ship with common development tools.
You still can uninstall the plugins you don't want this way :
Menu > Help > About eclipse SDK > Installation details
Install software tab
Select the plugin you don't want
Uninstall button
Goto https://download.eclipse.org/eclipse/downloads/
Choose a release
e.g. "Latest Release : 4.10" --> https://download.eclipse.org/eclipse/downloads/drops4/R-4.10-201812060815/
On this new page choose "Platform Runtime Binary"
It contains the Eclipse Rich Client Platform base bundles and do not contain source or programmer documentation.

Is there a way to develop OSGi bundles without opening or importing the dependent bundles in Eclipse?

When you develop OSGi bundles using eclipse, there are many denpendent bundles to be imported and opened. When there're many bundles, setting up projects is time-comsuming and difficult, especially to newbies .
I've tried the Tycho plugin and m2e; it seems that they are not for this goal.
You can use Eclipse Target Platform concept.
Moreover, with some luck and persistence, you can use remote P2 site as a Target Platform definition in Eclipse. Since you can export Target Platform definition as a file, that means the whole setup for developers will be importing project with that file and selecting this target platform in Eclipse preferences. The Eclipse will download the whole bunch of dependencies itself. For more details see the blog post here.
Also, since you can use that P2 site as a repository for Tycho builds, that allows you to make Tycho use the same set of dependencies as you use in Eclipse making the build more stable. You can host P2 site as a static web content or use repository, like Nexus (however, only commercial version supports P2 repositories, so I have not tried that myself).

Where should Eclipse third-party plugins be stored?

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.