Version 29 (modified by 4 years ago) (diff) | ,
---|
Development Environment for GRITS
Development Environment for GRITS
Installing Java and Eclipse
You can download the Java and Eclipse from the corresponding webpage for free. If you want to use the exact same versions as the GRITS core developer group please feel free to contact Rene.
- Java JDK 1.10 - The JDK can be downloaded from the OpenJDK webpage. If your operation system supports 64bit it is recommended to install the 64 bit JDK. If older JRE or JDK are already installed in your system it can cause problems therefore it is a good idea to uninstall them first.
- Eclipse for RCP and RAP Developer (Oxygen 3a) - You can download the IDE from the Eclipse web page please make sure to download the Eclipse for RCP and RAP Developers version. Other versions will work as well but you will have to install additional features. The installation instructions on this page assumes you have chosen this version.
Upgrading to Java 10
After installting Eclipse Oxygen and JDK 10 on your computer, you need to change Java settings in Eclipse.
- Open Eclipse -> Preferences -> Java -> Installed JREs
- Click "Add" to add a new jdk version
- Choose "Standard VM" and click "Next"
- Browse to locate the Java 10 Home. In MacOS, the newly installed version should be under /Library/Java/JavaVirtualMachines/. Browse to the Home directory under the new JDK.
- Enter "JDK 10" as the JRE Name and click Finish.
- Check the newly added JDK as the selected one and click "Apply"
- Now Go to Java->Installed JREs -> Execution Environments and click JavaSe-10 to make sure the new JDK appears as the "Compatible JREs" on the right side and click the checkbox next to it.
- Click "Apply and Close"
Upgrading to Java 11
- Download Java 11
- Download Eclipse for RCP And RAP Developers (Eclipse 2018-12) from https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-rcp-and-rap-developers
- Open Eclipse -> Preferences -> Java -> Installed JREs
- Click "Add" to add a new jdk version
- Choose "Standard VM" and click "Next"
- Browse to locate the Java 11 Home. In MacOS, the newly installed version should be under /Library/Java/JavaVirtualMachines/. Browse to the Home directory under the new JDK.
- Enter "JDK 11" as the JRE Name and click Finish.
- Check the newly added JDK as the selected one and click "Apply"
- Now Go to Java->Installed JREs -> Execution Environments and click JavaSe-11 to make sure the new JDK appears as the "Compatible JREs" on the right side and click the checkbox next to it.
- Click "Apply and Close"
GRITS changes required after Java11 update
- had to change .product file. In the product file, go to "configuration" tab "start levels" and click "add recommended". Otherwise injected services do not work (such as GritsUIService).
- add -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true to "VM arguments" in "Launching" tab. Otherwise JAXB versions collide and the exported product does not work in JDK 8.
- fix all components that use CTabFolder. cTabFolder.setLayoutData (new GridData(.....)) fails with the latest eclipse release. Remove any such setting.
- removed "enable project specific settings" from plugin properties (checking each plugin where is is enabled), need to use workspace default.
Installing missing plugins and features
The following plugins can be installed using the Eclipse Marketplace. A short tutorial can be found in the Eclipse Marketplace chapter.
- Subclipse or Subversive - SVN Team Provider - Only one of them is needed to allow you working with a SVN repository.
All other required plugins need to be installed using the Eclipse Update Manager. A short tutorial can be found in the Eclipse Update Manager chapter below.
Update website | Plugins to install |
---|---|
| |
http://download.eclipse.org/nattable/releases/1.4.0/repository/ |
|
http://download.eclipse.org/tools/gef/updates/legacy/releases/ |
|
http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/releases/ |
|
|
Generating a product
There are two product files in org.grits.toolbox plugin; GRITS.all.dev.product and GRITS.all.product. The first one is used during development and the latter one should be used when exporting your product to generate an executable for the application. You can customize these product files for your own purposes by adding a new plugin or removing the plugins that your application does not need. For example, if you are generating an executable for QrtPCR, you may want to remove MS specific plugins. When you add a new plugin, you have to make sure to add the dependent plugins by clicking "Add required plugins". Please note that each time you click on this button, it will add "org.grits.toolbox.fragment.developers" plugin as one of the required plugins. However leaving this plugin in the product file prevents logs to be written to the log file, therefore you should manually remove this plugin if it ever becomes part of "GRITS.all.product". This plugin should be included in "dev" version since it allows us to see the log messages in the console.
exporting
In the Overview tab of the product file, there is a section titled "Exporting". Click on "Eclipse Product export wizard" link to initiate the exporting process.
Do not change the product configuration section. You should provide a directory for the generated product. You should give a new (empty) folder name for each product generation. If the folder does not exist, it will be created as long as the parent folder exists. If you enable multi-platform build (see next section), you can select "export for multiple platforms" in "Export Options" section and click next to select the platforms. Otherwise, click "Finish" to generate the executable.
After wizard completes execution, go to the directory you've provided. You should see a sub-folder for each platform if you have selected multiple platforms. For Mac, you should see a folder structure similar to the following:
Double clicking on GRITS under "eclipse/MacOS" folder will start the application.
For Windows, it should look like this:
Double clicking on GRITS.exe inside "eclipse" folder will start the application.
Multi-platform Build
GRITS Toolbox is a multi-platform software that can be run on most operation systems. However to incorporate the platform specific libraries it is necessary to create a own product for each platform. The Multi-platform build allows to do this from a single computer and is the recommended way to generate platform specific builds. To enable this module you need to open your workspace and:
- Open Window/Preferences. (MacOS: Eclipse->Preferences)
- Find Target Platform (under Plug-in Development -> Target Platform)
- Select your (active) target platform
- Click Edit
- Click Add
- Select Software Site
- Click Next
- Add a new software site in Work with
- http://download.eclipse.org/eclipse/updates/4.7 (replace 4.7 with your current Eclipse version)
- Check Eclipse RCP Target Components
- Check Equinox Target Components
- Uncheck Include required software
- Check Include all environments
- Press Finish
- Press Finish
- Press OK
- Add a new software site in Work with
Open your product file and select the Export option. You will see that the "Export for multiple platforms" checkbox is available. For first time use you have to press Next and select windows, linux and mac operating systems before export. If you are using a custom product file, you may have to click on "add required plugins" after the above settings are completed to make sure all operation system specific swt fragments are included in dependencies.
Please note: In difference to the installation of the plugins (see above) this configuration is stored in the preferences of your Eclipse workspace. If you create a new workspace you will have to make this changes again.
How To
The following sub-chapters give examples on how to use the Eclipse Marketplace and the Eclipse Update Manager.
Eclipse Marketplace
- Open the Eclipse Marketplace using the main menu Help -> Eclipse Marketplace....
- Use the search feature to find the plugin you wish to install.
Eclipse Update Manager
- Open the update manager using the main menu Help -> Install New Software....
- Select or add the update site URL. Afterwards select the components you wish to install. Click the Finish button and continue installation.
Attachments (10)
- DialogMarketplace.png (68.1 KB) - added by 8 years ago.
- DialogUpdateManager.png (37.3 KB) - added by 8 years ago.
- MenuMarketplace.png (19.0 KB) - added by 8 years ago.
- MenuUpdateManager.png (18.4 KB) - added by 8 years ago.
- ExportFolderWindows.png (44.3 KB) - added by 4 years ago.
- ExportFolderMac.png (35.8 KB) - added by 4 years ago.
- ExportProduct.png (209.7 KB) - added by 4 years ago.
- WindowsProductJRE.png (247.0 KB) - added by 3 years ago.
- MacProductJRE.png (234.3 KB) - added by 3 years ago.
- MacFolderJRE.png (56.9 KB) - added by 3 years ago.
Download all attachments as: .zip