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.
PTP/rdt-setup
Contents
Get more RSE
The default install for RDT will automatically retrieve RSE From the Ganymede update site. But it doesn't get all of the UI, so creating a new connection in the RSE Perspective doesn't populate the server types. To remedy this,
- go to update manager,
- open up 'Ganymede',
- open 'Remote Access and Device Development'
- Check "Remote System Explorer End User Runtime" and "RSE User Actions"
- Complete the install.
How to install and run RDT (Remote Development Tools) from the Milestone builds
As of 9/19/08, Milestone builds of RDT server are available.
This describes now to configure the remote server, so you can talk to the remote server from the local client. The "local client" is the machine that Eclipse, PTP, RDT client, etc. are installed on.
- Get the RDT build from the PTP builds page, for your platform (Linux, Unix/AIX, Mac, Windows, etc.)
- Untar and cd to the rdt-server directory that is created.
- Change permissions to make the server script executable, if applicable for your platform.
- Start the server by executing the server script with an argument of the port number. The server script is named server.sh or server.bat on other platforms.
- ./server.pl 4242
- or use another argument to specify the port number, as long as it matches what you set up in RDT on the client.
- you may want to wait to start the server until you are ready to interact from the client, or it will time out. See below.
Back on your local (eclipse) client ...
- Launch a runtime workbench with CDT and RDT
- Create a connection to the remote machine:
- Open the Remote System Explorer Perspective
- In Remote Systems view, right mouse and select New Connection...
- Select Linux (or whatever...) for type of connection and select a hostname/IP address, and give the connection a name, select Next
- Note: for AIX use 'Unix' for type of connection
- Click Finish to accept the defaults.
- Now expand the connection item, you will see Files, Processes, etc.
- Rightmouse on Files, choose Properties
- On left, select Server Launcher Settings and select "Connect to running server"
- On left, select Subsystem and change the port number to what you will use on remote system, e.g. 4242
- Note: to type in the port number field, click the triangle next to it to enable text entry.
- Click OK to close the Files Properties dialog
- [Remote] Now start the server on the remote machine with an argument indicating the port number
- Example: > ./server.pl 4242
- Note: you now have only about a minute to connect from the local machine, or it will time out, so postpone this if you want
- Server messages should include: Extended schema from CDTMiner
- If this doesn't look right, confirm the CLASSPATH is set correctly in the server script so it can find all the jars
- Now back on the local eclipse workbench, Create a project
- Switch to the Remote C/C++ Development Perspective
- New, Project, New Remote C/C++ Project click Next
- In the New Remote C++ Project dialog:
- Give the project a name e.g. MyRemoteProject
- Uncheck 'Use default location'
- Choose file system: RSE
- Location: Browse ... which opens the Browse for Folder dialog
- For Connection, select the connection appropriate for your remote machine (the one you created above)
- Expand home directory to find location for remote project
- [First time] You will be prompted to login with User ID and password -- Make sure remote server is started before you do this
- Select folder which will hold the files for the remote project [For now, choose an empty folder] - or type it into the text field. If the directory doesn't exist it will be created.
- Back in 'New Remote C++ project' dialog, you should see the project name, location and file system indicating the selections you just made.
- Under project types, choose Remote Makefile Project
- Select Next... until you get to the "Configure Services" page to set up the Remote Services.
- Click on Build, and Configure..
- Select Provider: RSE and Connection: your connection; Hit OK
- Click on C/C++ Indexing, and Configure... and choose the remote host (your connection name)
- [Note: if you select Configure... again the dialogs may default back to initial state, but your selections are there.]
- Click Finish to end the 'New Remote C++ Project' Wizard
- Note: You can also set up the Remote Services in the Properties of the project.
- Click on Build, and Configure..
- Now you can create files in that project, including copy and paste from other (local or remote) projects or other places on your local filesystem.
.. need to complete to show remote indexing: basically, the outline works for a source file, and a call hierarchy view too.
FAQs
- Editor acting weird
- Be sure to close all editors when exiting Eclipse, due to a current bug in RSE.
- Rebuild the index manually - suggested
- If you get something like the following in the server command window:
- java.lang.UnsupportedClassVersionError: org/eclipse/ptp/internal/rdt/core/miners/CDTMiner (Unsupported major.minor version 49.0)
- then assure you have at least java 1.5
- 9/26/08: Remote build requires a fix in CDT, does not work in CDT 5.0.1. Get the latest build of CDT 5.0.2
How to build and run RDT (Remote Development Tools)
Now that milestone builds include the server code, you shouldn't need to do this unless you want something not available in the builds.
RDT, Remote Development Tools, allows the use of CDT on remote projects and files. In this discussion, the local machine is the one running eclipse, the remote machine (indicated by [Remote] below) is the one to connect to for remote files, etc.
Here is how to set it up and run.
Note that much of this will be automated soon, so it's a bit tedious here.
- Get Eclipse 3.4 (Ganymede) and CDT 5.0.2
- Get the latest build of CDT 5.0.2
- Get RSE Server
- From RSE download page at http://download.eclipse.org/dsdp/tm/downloads/ - click on version 3.0
- on the "TM Release Build:3.0" page, scroll down to "DStore Server Runtime" section and get rseserver-3.0-<platform> file, zip or tar, for your remote machine's platform.
- [Remote] Untar it on the remote machine, for example in a directory named 'rseserver'
- Go to org.eclipse.ptp.rdt.core.remotejars project and use the .jardesc files to build all the jars
- In CVS Repository exploring perspective, connect to dev.eclipse.org:/cvsroot/tools
- Under HEAD, expand org.eclipse.ptp project, and expand 'rdt' folder
- Check out all the rdt projects if you like - for this step you need the remotejars project - you don't need projects ending in 'test' or 'tests' however.
- Expand the org.eclipse.ptp.rdt.core.remotejars project
- Rightmouse on one of the *.jardesc files, and select "Open JAR Packager" - in here, select the export destination - where it will write the jar file.
- Click 'Finish' and it will generate the jar file. It will also prompt you to save/overwrite the .jardesc file.
- After setting this up, later you can rightmouse on the .jardesc file and just select "Create JAR" if you don't need to change anything.
- It should build these jars:
- cdtminer.jar
- cdtmodel.jar
- cdtparser.jar
- stubs.jar
- [Remote] Copy those jars to remote machine, e.g. in the 'rseserver' directory as in the example above
- [Remote] Copy the eclipse jars for org.eclipse.equinox.common, org.eclipse.core.runtime, and org.eclipse.core.filesystem to remote machine, again into the 'rseserver' directory
- They should be in your <eclipse-install>/eclipse/plugins directory (either on the local machine, or if eclipse SDK is on remote machine, can copy them from there. They are not platform-specific.)
- for example
- cp eclipse/plugins/org.eclipse.equinox.common_*.jar ~/rseserver
- cp eclipse/plugins/org.eclipse.core.runtime_*.jar ~/rseserver
- cp eclipse/plugins/org.eclipse.core.filesystem_*.jar ~/rseserver
- [Remote] In the rseserver directory:
- Add a line to minerFile.dat that has org.eclipse.ptp.internal.rdt.core.miners.CDTMiner in it
- Edit the server script file (e.g. server.sh or server.pl) to add all the jars you copied over to the CLASSPATH. So the CLASSPATH line looks something like:
- CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:cdtminer.jar:cdtmodel.jar:cdtparser.jar:org.eclipse.core.runtime_3.4.0.v20080421-1805.jar:org.eclipse.equinox.common_3.4.0.v20080421-2006.jar:org.eclipse.core.filesystem_1.2.0.v20080421-1805.jar:stubs.jar:$CLASSPATH;
- where the qualifier in the names of the eclipse jars matches what you copied in the previous step (the version/date/timestamp info in the filename)
- Back on your local (eclipse) development workbench, get the RDT plugins from CVS as described in a previous step.
- Launch a runtime workbench with CDT and RDT
- Create a connection to the remote machine:
- Open the Remote System Explorer Perspective
- In Remote Systems view, right mouse and select New Connection...
- Select Linux for type of connection and select a hostname/IP address, and give the connection a name, select Next
- Note: for AIX use 'Unix' for type of connection
- Click Finish to accept the defaults.
- Now expand the connection item, you will see Files, Processes, etc.
- Rightmouse on Files, choose Properties
- On left, select Server Launcher Settings and select "Connect to running server"
- On left, select Subsystem and change the port number to what you will use on remote system, e.g. 4242
- Note: to type in the port number field, click the triangle next to it to enable text entry.
- Click OK to close the Files Properties dialog
- [Remote] Now start the server on the remote machine with an argument indicating the port number
- Example: > ./server.pl 4242
- Note: you now have only about a minute to connect from the local machine, or it will time out, so postpone this if you want
- Server messages should include: Extended schema from CDTMiner
- If this doesn't look right, confirm the CLASSPATH is set correctly in the server script so it can find all the jars
- Now back on the local eclipse workbench, Create a project
- Switch to the C/C++ Perspective
- New, Project, New Remote C/C++ Project click Next
- In the New Remote C++ Project dialog:
- Give the project a name e.g. MyRemoteProject
- Uncheck 'Use default location'
- Choose file system: RSE
- Location: Browse ... which opens the Browse for Folder dialog
- For Connection, select the connection appropriate for your remote machine (the one you created above)
- Expand home directory to find location for remote project
- [First time] You will be prompted to login with User ID and password -- Make sure remote server is started before you do this
- Select folder which will hold the files for the remote project [For now, choose an empty folder]
- Back in 'New Remote C++ project' dialog, you should see the project name, location and file system indicating the selections you just made.
- Under project types, choose Remote Makefile Project
- Select Next, Next, Next until you get to the "Configure Services" page to set up the Remote Services.
- Click on Build, and Configure..
- Select Provider: RSE and Connection: your connection; Hit OK
- Click on C/C++ Indexing, and Configure... and choose the remote host (your connection name)
- [Note: if you select Configure... again the dialogs may default back to initial state, but your selections are there.]
- Click Finish to end the 'New Remote C++ Project' Wizard
- Note: You can also set up the Remote Services in the Properties of the project.
- Click on Build, and Configure..
- Now you can create files in that project, including copy and paste from other (local or remote) projects or other places on your local filesystem.
.. need to complete to show remote indexing: basically, the outline works for a source file, and a call hierarchy view too.