Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SWT/Devel/Workflow

< SWT‎ | Devel
Revision as of 16:49, 25 June 2018 by Ericwill.redhat.com (Talk | contribs) (Backporting Patches)

Launching Eclipse with SWT source code

To test SWT snippets, it's useful to launch a child Eclipse with your patch to see how it looks and feels. To do so, under run-configurations, right click on "Eclipse Application" and select "new".

Eclipse Application

Common troubleshooting

Often Eclipse won't launch with various errors. Below are common steps to troubleshoot.

  • API Baseline: Make sure API Base line is set. If you updated Eclipse (e.g Luna to Mars), you may need to re-create the baseline.
  • Enable Execution Environments: Make sure that relevant Execution Environments are enabled. (1.5, 1.6 etc..)
Eclipse Execution Environments
  • Target Platform: Make sure to have an Target Platform set. Try re-creating it with Default for running platform.
  • Validate Plugins: In the run-time configuration for a Child Eclipse, under the 'Plug-ins' tab, instead of launching all plugins, try to select only SWT and it's binaries. Try to Validate the setup to see if there are missing dependencies.
  • re-create new run-time configuration: Often after updating Eclipse version, I have to create new "Eclipse Application" run time configurations for the child Eclipse to launch propertly

Tips

  • Choice of child Eclipse Workspace: Instead of using a blank workspace, copy your exiting workspace, append '-runtime' and use that for your child Eclipse.

Preserving run configurations across workspaces

If you are using the same major version of Eclipse across workspaces, you can copy your run configurations across to prevent losing them. It's highly recommended that you backup your workspace before copying, in case something goes awry.

To find your current launch configurations, navigate to:

 <workspace directory>/.metadata/.plugins/org.eclipse.debug.core/.launches

In this folder, there should be a .launch file for every run configuration created within Eclipse. Copy all these files to:

  <new workspace directory>/.metadata/.plugins/org.eclipse.debug.core/.launches

Launch Eclipse using the new workspace. Open the run configurations dialog, all the old run configurations should be there.

Using Gerrit

Gerrit is used to review your patches. For further information, please see gerrit.

Adding API to SWT

SWT API has to be backwards compatible, meaning changing existing API is basically not an option (except in a few cases). However it's very common to add new API -- to do so, follow the steps below.

  1. Add the API. If you are doing this in a common class, you only have to add it once. Otherwise, be sure to add the constant/method to all platforms' classes.
  2. If this is the first time you are adding API in this release cycle, bump the minor "version" fields in the pom.xml and MANIFEST.mf files. For example, 3.107.100 -> 3.108.0
  3. Write the Javadocs, and be sure to include @since tags, indicating the API is available since the API version you just bumped in step 2.


Mylyn

Nice Video tutorials:

 Note, you need to install the 'Gerrit' connector inside mylyn.

Back to the top