Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SMILA/Documentation/HowTo/Howto set up dev environment"
(→Get the source code: added link to .PSF) |
(→Define target platform: target def. file) |
||
Line 33: | Line 33: | ||
==== Define target platform ==== | ==== Define target platform ==== | ||
− | The | + | The target platform defines the set of bundles and features that you are developing against. |
− | + | ||
+ | ===== The easy way ===== | ||
+ | |||
+ | SMILA ships a target definition file at http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/releng/devenv/SMILA.target that you can open in your IDE (after downloading it or even importing the releng project). This file contains all the references needed for developing SMILA. After opening it, eclipse starts to download the referenced bundles/features which it tells you by stating "resolving target platform" in the status bar. This takes a good while. After it is done you can hit the link "Set as Target Platform" on the top left of the editor. Doing so will cause eclipse to start re-compiling the sources and all error markers should be gone. | ||
+ | |||
+ | ===== Doing it manually ===== | ||
+ | |||
+ | Instead of using the target definition file you can manually set your own target platform like so: | ||
+ | |||
::*Click Window --> Preferences --> Plug-in Development --> Target Platform | ::*Click Window --> Preferences --> Plug-in Development --> Target Platform | ||
::*Click Add... --> Select "Default" for target initialization and click "Next" | ::*Click Add... --> Select "Default" for target initialization and click "Next" | ||
Line 45: | Line 53: | ||
::Change to page "Environment" and select "JavaSE-1.6" as Execution Environment | ::Change to page "Environment" and select "JavaSE-1.6" as Execution Environment | ||
::Click "Finish" and activate the new target platform. | ::Click "Finish" and activate the new target platform. | ||
+ | |||
+ | {{Note|Note| | ||
+ | * this example is somewhat outdated as it uses the host IDE installation which is not recommended anymore | ||
+ | * instead of defining the target platform in the preferences you can also create your own target definition file and go from there which is more convenient. | ||
+ | }} | ||
==== Launch SMILA in Eclipse IDE ==== | ==== Launch SMILA in Eclipse IDE ==== |
Revision as of 03:18, 21 April 2011
This how-to describes the necessary steps for setting up SMILA development environment. Normally this setup is only interesting for SMILA committers and contributors. SMILA integrators should work with another setup described at How to set up the integration environment.
Contents
Preconditions
Here is the list of things that you will definitely need for developing SMILA components:
- JDK 1.6
- current Eclipse SDK - This how-to was tested with Eclipse Classic SDK 3.6.2 (Helios)
- The source code
Get the source code
Use your favorite SVN client to check out SMILA's source code from repository located at:
http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/core
Hint:
- We recommend you to check out the whole trunk/core folder of the repository. By doing so you can easily get new projects just by updating the trunk and reimporting the sources. But you also may just import the projects into your workspace with our SMILA-core.psf file.
Import sources into Eclipse IDE
After you have checked out the source code you need to import it in your IDE:
Click File --> Import --> General --> Existing Projects into Workspace --> Next --> Select root folder of local trunk --> Finish
Define target platform
The target platform defines the set of bundles and features that you are developing against.
The easy way
SMILA ships a target definition file at http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/releng/devenv/SMILA.target that you can open in your IDE (after downloading it or even importing the releng project). This file contains all the references needed for developing SMILA. After opening it, eclipse starts to download the referenced bundles/features which it tells you by stating "resolving target platform" in the status bar. This takes a good while. After it is done you can hit the link "Set as Target Platform" on the top left of the editor. Doing so will cause eclipse to start re-compiling the sources and all error markers should be gone.
Doing it manually
Instead of using the target definition file you can manually set your own target platform like so:
- Click Window --> Preferences --> Plug-in Development --> Target Platform
- Click Add... --> Select "Default" for target initialization and click "Next"
- Rename the new target, e.g. to "Running target + SMILA.Extension"
- Click "Add..." --> Select "Directory" --> Click Next --> Select SMILA.extension/eclipse/plugins folder under local trunk as the location --> Click Finish
- The target definition dialog should now look like this:
- Change to page "Environment" and select "JavaSE-1.6" as Execution Environment
- Click "Finish" and activate the new target platform.
Launch SMILA in Eclipse IDE
If you've checked out SMILA's trunk correctly, than you should have a project called SMILA.launch in your workspace. This project contains the SMILA's launch configuration for Eclipse IDE. To start SMILA directly in your Eclipse IDE just follow the steps below:
- Click Debug --> Debug Configurations and expand OSGI Framework
- Select launch file for your environment and press Debug
-
- If everything is started correctly, you will get an output in the Console view like below:
-