EclipseCall Eclipse Plug-in
There is one feature for the users installing
eclipsecall for the eclipse IDE
and another one for developers, that want to
include eclipsecall in their own RCP application.
Most users will want to install the first (IDE) feature!
EclipseCall is a plugin that accepts file-open requests on a defined socket port. A specialized client can be used to open a file in Eclipse by command from outside Eclipse, e.g. by double clicking a source file in Windows Explorer. EclipseCall has been tested on Windows XP/Vista using Eclipse Ganymede and Europa and JDK1.4.2 - JDK1.6.10beta. Also tested with Linux (Ubuntu) and Ganymede. It will not work with Eclipse 3.2 (Callisto) or earlier. Important Note: The client implementation(s) provided here (in C and Java), are only sample implementations that won't fit for every system where Eclipse is used. As Eclipse is used chiefly by programmers, anybody is invited to provide an own or improved version of the client. I simply can't give support for that.
- Install the current versionfrom the update-site:
http://www.jaylib.org/eclipsecall - Download eclipsecall.exe or
eclipsecall.jar and optionally
eclipsecall.bat and place it in your programs-folder or in the eclipse folder for example.
Registering a URL-protocol with EclipseCallreg add HKCR\rcp /ve /d "URL:RCP Protocol" reg add HKCR\rcp /v "URL Protocol" reg add HKCR\rcp\Shell\Open\Command /ve /d "eclipsecall.exe %%1"
A detailed description for registering a URL protocol is here.
In the call the (both optional) row and col parameters are supported by just adding '?':
rcp://mydirectory\myfile?row?col-col
The reg file is available for download.
- A file can be opened regularly by calling:
java -jar eclipsecall.jar <filelocation>eclipsecall.bat <filelocation>eclipsecall.exe <filelocation>
- Additional options:
-G<lineno>marks the line-G<lineno,col-col>marks the line from column to column-S<socketno>set the socket to use when connecting to eclipse. Default: 2341. The number can be changed here and in the Preferences of the plugin (Eclipse - Window - Preferences - Callserver preferences).-E<path_to_eclipse.exe>starts Eclipse with the given call (could be a batch), if it is not already running.
The Java version of the client has handles also the environment variables "eclipsecall.socket" and "eclipsecall.call", which are used as default values for the "-S" and "-E" parameters respectively.
Adapting EclipseCall
You can create your own batch or
shell file with -E and your eclipse.exe
and -S and your socket number.
You could also adapt the eclipsecall.jar,
the sources are included.
- Example:
- mark column 10-20 in line 100 of myfile:
> eclipsecall D:\mydir\myfile -G100,10-20
- only show myfile without marking:
> eclipsecall D:\mydir\myfile
- mark column 10-20 in line 100 of myfile:
By assigning source files to eclipsecall.exe in the Windows Explorer (for example: right click, open with...), source files can be loaded directly into (the already running) eclipse. Files that are configured in eclipse to be opened in the system or in-place editor, are opened in the standard text editor, as otherwise an endless calling loop could happen, if the file type is registered to be opened with eclipsecall.exe by the system.
eclipsecall.exe was built with cygwin-gcc on Windows using the option -mwindows and the following C-Code: eclipsecall.c. The MSC version doesn't really seem to work - especially the part that opens eclipse, if it is not already running, will not work with the VC++ compiler.
The source code for the java version of the client is available here.
::history::EclipsePlugins/EclipseCall