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.
HOWTO: Shared Code Plugin
This is a description of how to install and run the Shared Code plugin (SCP). It should guide you to having a working SCP demo in minutes.
- Eclipse 3.1 or higher
- [ECF] 0.8 or higher
- Download and install the plug-in from ECF's CVS repository. Verify that they are all available in your Eclipse environment.
Repository Path: /cvsroot/technology
Module: org.eclipse.ecf/examples/plugins/org.eclipse.ecf.example.sharecode Connection Type: pserver
User name: anonymous
Starting ECF Local Server.
- Start a shell.
- CD to the Eclipse features directory.
- CD to org.eclipse.ecf.serverfeature_X.X.X\bin directory (X.X.X is the ecf version number).
- Run startserver.sh for OS X/Linux (.bat for windows)
- The default settings are fine for now.
Config Project on workspace
- Config general information
- Config Itacare instace Projects
- Config Trancoso instance Projects
- Config preferences (It doesn't work yet)
- For this demo, it's necessary to use two or more Eclipse instances. I will use only two Eclipse instance(Itacare and Trancoso).
- Make sure to use different workspaces, because this demo is on the same machine.
- Click on the Run->Run, change the launcher name to "Itacare"
- Click on the Run->Run, change the launcher name to "Trancoso"
- Adjust workspace data as necessary. You need to setup different "Location" to each Eclipse instance, and each instance needs to point to the same ECF server.
Connect SCP to ECF Local Server
- In the Trancoso launched workbench, click on the in toolbar
- After this actions, you are able to search for remote source code.
Searching for Java files on Itacare
- SCP will search for Java files in the Itacare instance.
- If it matches on the search term, it sends the match to Trancoso instance and shows the result in the Share Code view.
- Now you need to make a double click on any row to see the Java file on the Eclipse Java Editor, or if you prefer, you can drag a table row to the editor area will open the associated Java file in the editor.
Putting Shared Code metadata to Java files
A Shared Code metadata is like a yellow sticky note stuck to a Java file. On the Shared Code metadata you can record information about a Java file(See Candidate_Metadata).
Users can use Shared Code metadata to search Java files. These Shared Code metadata can also be shown as items in Shared Code metadata view.