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

1

5

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.

Huxham answered 27/10, 2015 at 13:8 Comment(0)
B
7

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.

Bipack answered 27/10, 2015 at 13:54 Comment(4)
okay, I have the Eclipse for RCP and RAP. The workspace is still empty (I used to import my projects via egit-import but it is not yet done. Would I just have to put that target file into the empty workspace?Huxham
The workspace cannot hold files directly. You need to have a project where you can put the target file into. If there is no suitable project yet, create a simple project to hold the target file.Knowing
I am not really happy with creating a dummy project to put that file into... Or would I have to add it to my plugin projects? Is that the correct place?Huxham
If you have just one plug-in project, that would be the place. I usually use a separate 'targets' project. Often you'll have more than one target, e.g. the current release version, the previous version and the upcoming version. If you have a project that holds release enginerring artifacts (e.g. p2 category files, features, etc.) that would also be a good place for target files in my opinion. But from a technical POV it doesn't matter as long as the file is accessible from the workspace.Knowing

© 2022 - 2024 — McMap. All rights reserved.