Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "RCPTT/Contribution Guide"

(Unformatted draft)
 
m
Line 1: Line 1:
Prerequisites
+
=Prerequisites=
 +
* Oracle JDK 1.7
  
    SSH-access to cvs.xored.com and write permissions for git/rcptt
+
=Source=
    Oracle JDK 1.6/1.7
+
<pre>git clone ssh://<your_username>@cvs.xored.com/git/rcptt</pre>
 +
See also https://git.eclipse.org/c/rcptt/org.eclipse.rcptt.git/
  
Get sources
+
=Git configuration=
 
+
Use Git to clone repositories:
+
git clone ssh://<your_username>@cvs.xored.com/git/rcptt
+
Configure Git
+
  
 
Use these commands in your Git Bash / Terminal window:
 
Use these commands in your Git Bash / Terminal window:
 +
<pre>
 
$ git config --global user.name "<Your Full Name here>"
 
$ git config --global user.name "<Your Full Name here>"
 
$ git config --global user.email "<username>@xored.com"
 
$ git config --global user.email "<username>@xored.com"
Line 20: Line 19:
 
   
 
   
 
$ git config --global color.ui true  # colorful Git output in Mac's Terminal (don't need it on Windows, as Git Bash is already colorful)
 
$ git config --global color.ui true  # colorful Git output in Mac's Terminal (don't need it on Windows, as Git Bash is already colorful)
Install Eclipse SDK
+
</pre>
  
 +
=Eclipse PDE=
 
Install Eclipse Luna IDE for Eclipse Committers form https://www.eclipse.org/downloads/
 
Install Eclipse Luna IDE for Eclipse Committers form https://www.eclipse.org/downloads/
  
 
Install features from repos:
 
Install features from repos:
 +
* AspectJ Development Tools: http://download.eclipse.org/tools/ajdt/44/dev/update
 +
* Eclipse Modeling Framework SDK: http://download.eclipse.org/releases/luna
  
    AspectJ Development Tools: http://download.eclipse.org/tools/ajdt/44/dev/update
+
=Formatter=
    Eclipse Modeling Framework SDK: http://download.eclipse.org/releases/luna
+
 
+
Formatter settings
+
 
+
 
Once you imported the projects, you should import formatter settings:
 
Once you imported the projects, you should import formatter settings:
 +
*    open Preferences window, go to Java -> Code Style -> Formatter
 +
*    import formatter.xml profile from rcptt working directory
 +
*    go to Java -> Editor -> Save Actions
 +
*    select Format source code (Format edited lines) and Organize imports
 +
* set Window/Preferences/General/Workspace/Encoding to utf-8
 +
* set Window/Preferences/General/Workspace/Line delimiter to Unix
  
    open Preferences window, go to Java -> Code Style -> Formatter
+
=Workspace layout=
    import formatter.xml profile from rcptt working directory
+
    go to Java -> Editor -> Save Actions
+
    select Format source code (Format edited lines) and Organize imports
+
 
+
Set Window/Preferences/General/Workspace/Encoding to utf-8
+
Set Window/Preferences/General/Workspace/Line delimiter to Unix
+
Import sources
+
 
+
 
Import projects into workspace (it is recommended to create a java working set per repository).
 
Import projects into workspace (it is recommended to create a java working set per repository).
  
Line 47: Line 43:
  
 
Main RCPTT working sets:
 
Main RCPTT working sets:
 
 
     ecl: /ecl
 
     ecl: /ecl
 
     core: /core
 
     core: /core
Line 54: Line 49:
 
     ide: /rcp
 
     ide: /rcp
 
     watson: /watson
 
     watson: /watson
 +
    build: /repository/full, /releng/target-platforms
  
If youll experience OutOfMemoryErrors during development
+
=Target platform=
Target platform
+
Use target definition from releng/target-platforms project
 
+
Create directory "tools" and go there. Next:
+
git clone ssh://<your_username>@cvs.xored.com/git/rcptt -b tools
+
 
+
Then add this repo at Git Repositories, next, select from Git Repositories > Working directory > target-platforms. Choose "import projects".
+
 
+
Open ide.target with target editor from this project, then wait until the plugins will be collected for this target definition.
+
Product configuration
+
Import project repository/full/.
+
Launching RCPTT
+
 
+
Create new debug configuration "RCPTT". Set "Run a product" and choose "org.eclipse.rcptt.platform.product". Set program arguments:
+
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -showsplash org.eclipse.rcptt.platform
+
  
Set VM arguments:
+
=Launching=
-Xms128m -Xmx768m -XX:PermSize=128M -XX:MaxPermSize=192M
+
  
On the plugins tab should all look like in the screenshot below:
 
  
 
Then try debug.
 
Then try debug.

Revision as of 06:36, 3 December 2014

Prerequisites

  • Oracle JDK 1.7

Source

git clone ssh://<your_username>@cvs.xored.com/git/rcptt

See also https://git.eclipse.org/c/rcptt/org.eclipse.rcptt.git/

Git configuration

Use these commands in your Git Bash / Terminal window:

$ git config --global user.name "<Your Full Name here>"
$ git config --global user.email "<username>@xored.com"
 
$ git config --global core.autocrlf true    # on Windows, or
$ git config --global core.autocrlf input   # on Mac; see [https://help.github.com/articles/dealing-with-line-endings] for details
 
$ git config --global branch.autosetuprebase always   # [http://stevenharman.net/git-pull-with-automatic-rebase] for details
 
$ git config --global color.ui true   # colorful Git output in Mac's Terminal (don't need it on Windows, as Git Bash is already colorful)

Eclipse PDE

Install Eclipse Luna IDE for Eclipse Committers form https://www.eclipse.org/downloads/

Install features from repos:

Formatter

Once you imported the projects, you should import formatter settings:

  • open Preferences window, go to Java -> Code Style -> Formatter
  • import formatter.xml profile from rcptt working directory
  • go to Java -> Editor -> Save Actions
  • select Format source code (Format edited lines) and Organize imports
  • set Window/Preferences/General/Workspace/Encoding to utf-8
  • set Window/Preferences/General/Workspace/Line delimiter to Unix

Workspace layout

Import projects into workspace (it is recommended to create a java working set per repository).

For this, add "Git" perspective, then switch to git perspective and click to rcptt > Working Directory > Import projects > Import existing project > add project to working set > select. Next, create the desired working sets.

Main RCPTT working sets:

   ecl: /ecl
   core: /core
   launching: /launching
   runtime: /runtime, /testing/org.eclipse.rcptt.testing.ecl
   ide: /rcp
   watson: /watson
   build: /repository/full, /releng/target-platforms

Target platform

Use target definition from releng/target-platforms project

Launching

Then try debug. Launching issues If you have error "java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM"

Sometimes, when product is not used to create launch configuration or due to target platform updates, selected plug-ins are lost from launch configuration. When you restore them, take a note that following plug-ins are required (by RCPTT launchers) but are not covered by direct dependencies:

   org.eclipse.equinox.p2.touchpoint.natives
   org.eclipse.equinox.ds
   org.eclipse.equinox.p2.transport.ecf
   org.aspectj.weaver

Common launching problems Create RCPTT application under test

To create RCP-based AUT, you also need to add a set of plugins to configuration. Copy debug configuration "RCPTT" and rename it to "RCPTT AUT".

Then change workspace data to another location.

Additionally, you need to set the following VM arguments: -Xms128m -Xmx768m -XX:PermSize=128M -XX:MaxPermSize=192M -DteslaPort=7926 -DeclPort=5378 -Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook

After that you need to add the following plugins:

   org.eclipse.rcptt.ecl.platform plugin,
   add working set 'runtime' of RCPTT repo,
   add all plugins containing 'aspectj' from the target platform tree. Note that required plugin org.aspectj.weaver is not added automatically by dependency,
   remove all plugins containing 'mylyn'.

Don't forget to click 'Add required plug-ins' button.

Also, set Auto-start to true for the org.eclipse.equinox.weaving.aspectj plugin:

Then try debug.

If RCPTT AUT start, you should return to RCPTT and import existing project into workspace of RCPTT, choose rcptt/rcpttTests. Then click on rcpttTests > Run as > Run configurations > Remote application under tests > new:

If all is well, you should see a green triangle in the AOT:

Create self RCPTT AUT

Copy "RCPT AUT" and rename it to "SELF RCPT AUT".

Then change workspace data to another location.

Additionally, you need to set the following VM arguments with different ports: -Xms128m -Xmx768m -XX:PermSize=128M -XX:MaxPermSize=192M -DteslaPort=7927 -DeclPort=5379 -Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook

If SELF RCPT AUT start, you should return to RCPTT AUT and import existing project into workspace of RCPTT, choose rcptt/rcpttTests.

Then click on rcpttTests > Run as > Run configurations > Remote application under tests > new.

   Set name "selfQ7",
   Change ELC port to 5379 and Tesla port to 7927 and run.

Create configuration for testing not the RCPTT app itself

If you are testing not the RCPTT app itself, copy "RCPT AUT" and rename it to "AUT APP". Then change workspace data to another location. Next, go to plugins:

   remove all plugins that contain 'update' substring.
   add 'org.eclipse.ui.ide.application' plugin
   add all plugins containing 'aspectj' from the target platform tree. Note that required plugin org.aspectj.weaver is not added automatically by dependency.
   add org.eclipse.rcptt.ecl.interop, 'org.eclipse.rcptt.ecl.operations' and 'org.eclipse.rcptt.ecl.filesystem' plugins
   add org.eclipse.rcptt.updates.runtime

Don't forget to click 'Add required plug-ins' button.

Back to the top