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

Difference between revisions of "Equinox/dev"

m (Gtk Specific Code)
m (Explained how to run compiled units.)
Line 29: Line 29:
 
To test what you've build, you need to find a regular eclipse and replace it's files with those that you compiled.  
 
To test what you've build, you need to find a regular eclipse and replace it's files with those that you compiled.  
  
'''Replace files'''
+
'''Replace files:'''
 +
 
 
1) Download some build of eclipse:  [http://download.eclipse.org/eclipse/downloads/ Eclipse Download site]
 
1) Download some build of eclipse:  [http://download.eclipse.org/eclipse/downloads/ Eclipse Download site]
 +
 
2) Navigate to <code>/eclipse</code> folder that should contain your 'eclipse' executable. Rename the original executable to 'eclipseOLD' and copy your newly compiled one into it.
 
2) Navigate to <code>/eclipse</code> folder that should contain your 'eclipse' executable. Rename the original executable to 'eclipseOLD' and copy your newly compiled one into it.
 +
 
3) For the 'so' file, in the downloaded eclipse, navigate to the plugin folder, into the equinox launcher gtk folder. It should be something like:
 
3) For the 'so' file, in the downloaded eclipse, navigate to the plugin folder, into the equinox launcher gtk folder. It should be something like:
 
   ~/Downloads/eclipse-SDK-N20150719-2000-linux-gtk-x86_64/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.N20150719-2000
 
   ~/Downloads/eclipse-SDK-N20150719-2000-linux-gtk-x86_64/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.N20150719-2000
Line 38: Line 41:
 
Inside it, you should find an so like: <code> eclipse_1632.so </code>. Move the file, or rename it such that it doesn't contain an 'so' (e.g eclipse_old_1632). (eclipse will load the first found 'so' file, and it might confuse them if both are present). Now move your newly compiled <code>eclipse_1632.so</code> into that folder.
 
Inside it, you should find an so like: <code> eclipse_1632.so </code>. Move the file, or rename it such that it doesn't contain an 'so' (e.g eclipse_old_1632). (eclipse will load the first found 'so' file, and it might confuse them if both are present). Now move your newly compiled <code>eclipse_1632.so</code> into that folder.
  
'''Verify'''
+
'''Verify:'''
 +
 
 
To make sure that eclipse launches with the files that you've actually replaced:  
 
To make sure that eclipse launches with the files that you've actually replaced:  
 +
 
1) I personally put some print statement into the code, so when I run it, it is printed.
 
1) I personally put some print statement into the code, so when I run it, it is printed.
 
   eclipseGtkInit.c:  
 
   eclipseGtkInit.c:  
 
       int loadGtk() {
 
       int loadGtk() {
puts("Hello World\n");
+
      puts("Hello World\n");
 +
 
 
2) Alternatively, launch eclipse and note the pid:  
 
2) Alternatively, launch eclipse and note the pid:  
 
   ./eclipse & echo $!
 
   ./eclipse & echo $!
 
Or use <code>jps</code> after it is launched.
 
Or use <code>jps</code> after it is launched.
 +
 
3) Navigate to /proc/PID/
 
3) Navigate to /proc/PID/
 +
 
4) execute
 
4) execute
 
   cat maps | grep eclipse_
 
   cat maps | grep eclipse_
 
This should list the eclipse_xyzz.so file that you copied to the plugin folder.
 
This should list the eclipse_xyzz.so file that you copied to the plugin folder.

Revision as of 11:16, 4 August 2015

About

This page is info for developers interested in contributing to the actual Equinox source code.

Part of Equinox is launching Eclipse. It's like bootstrap code that get's the main jvm going.

Gtk Specific Code

about

The gtk specific code of Equinox handles the splash screen and workspace file chooser.

location

 ./features/org.eclipse.equinox.executable.feature/library/gtk

building Eclipse executable

inside the gtk folder, run:

 sh build.sh 

To start a build. It will produce an executable 'eclipse'.

When you first launch make, it may complain about missing java:

 ../eclipseJNI.h:15:17: fatal error: jni.h: No such file or directory

In this case, you need to specify your java path. Usually this can be done via:

 export JAVA_HOME=/usr/lib/jvm/java/
 sh build.sh   #then run your bulid.

Once build, you should see the following file in the gtk directory:

 eclipse
 eclipse_xyzz.so    #where xyzz is something like 1613

running compiled units

To test what you've build, you need to find a regular eclipse and replace it's files with those that you compiled.

Replace files:

1) Download some build of eclipse: Eclipse Download site

2) Navigate to /eclipse folder that should contain your 'eclipse' executable. Rename the original executable to 'eclipseOLD' and copy your newly compiled one into it.

3) For the 'so' file, in the downloaded eclipse, navigate to the plugin folder, into the equinox launcher gtk folder. It should be something like:

  ~/Downloads/eclipse-SDK-N20150719-2000-linux-gtk-x86_64/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.N20150719-2000

You can also find it via:

  find . | grep "eclipse_.*so"

Inside it, you should find an so like: eclipse_1632.so . Move the file, or rename it such that it doesn't contain an 'so' (e.g eclipse_old_1632). (eclipse will load the first found 'so' file, and it might confuse them if both are present). Now move your newly compiled eclipse_1632.so into that folder.

Verify:

To make sure that eclipse launches with the files that you've actually replaced:

1) I personally put some print statement into the code, so when I run it, it is printed.

  eclipseGtkInit.c: 
     int loadGtk() {
     puts("Hello World\n");

2) Alternatively, launch eclipse and note the pid:

  ./eclipse & echo $!

Or use jps after it is launched.

3) Navigate to /proc/PID/

4) execute

  cat maps | grep eclipse_

This should list the eclipse_xyzz.so file that you copied to the plugin folder.

Back to the top