marook / eclipse-remote-control Goto Github PK
View Code? Open in Web Editor NEWEclipse plug-in project which adds remote control features to eclipse.
License: GNU General Public License v3.0
Eclipse plug-in project which adds remote control features to eclipse.
License: GNU General Public License v3.0
erc - eclipse remote control 1) Introduction 2) Security Warning 3) Distribution / Eclipse Update Site 4) Build 5) Usage 6) Commands 6.1) Open File 6.2) Execute Command --------------------------------------------------------------------- Introduction Eclipse plug-in project which adds remote control features to eclipse. Commands can be sent via the eclipse remote control client to a running eclipse instance. --------------------------------------------------------------------- Security Warning Eclipse remote control doesen't implement authentication. So you should make sure that the eclipse remote control port can not be reached by people you don't trust. I recommend using eclipse remote control only locally on your PC and not over an open network. --------------------------------------------------------------------- Distribution / Eclipse Update Site This project is licenses under the GPL license. See the file COPYING for details. The following builds have been tested with eclipse helios which is based on eclipse platform 3.6. The eclipse update site is available here: https://github.com/marook/eclipse-remote-control/raw/master/workspaces/erc/update_site/site.xml The eclipse remote control client can be downloaded here: https://github.com/marook/eclipse-remote-control/raw/master/workspaces/erc/release/eclipse_remote_control_client_1.3.0.jar --------------------------------------------------------------------- Build To build the eclipse remote control client use the ant build.xml file in the client project. The following ant targets are available: * clean: Removes all temporary resources required for the ant build. * compile: Compiles the sources for the eclipse remote control client. * package: Creates a jar file with the client application. Use the default target package to build the client application. --------------------------------------------------------------------- Usage Requirements are: * You have installed the eclipse remote control eclipse plugins. * You have downloaded the eclipse remote control client jar. Launch your eclipse with the eclipse remote control pluging installed. After eclipse has started you can send commands via the eclipse remote control client application. The syntax is: $ java -jar eclipse_remote_control.jar [command] [command args] --------------------------------------------------------------------- Commands Currently the following commands are supported: --------------------------------------------------------------------- Commands - Open File This command opens a file in the running eclipse instance. The file is first looked up in the eclipse workspace. If the file can't be found in the eclipse workspace then the file is opened from the operating system's file system. So the example path /myproject/file.txt will open the file 'file.txt' below the eclipse project myproject. If there is no such file in the myproject project then the path will be looked up below the file system root. An optional line number can be specified for files which are opened from the eclipse workspace. After opening the file the specified line will be selected. If you try to open a absolute file system path the line number will be ignored. Syntax: $ java -jar eclipse_remote_control.jar open_file [workspace file path] <line number> $ java -jar eclipse_remote_control.jar open_file [absolute path to file] Example: $ java -jar eclipse_remote_control.jar open_file /tmp/file.txt 2 $ java -jar eclipse_remote_control.jar open_file C:\tmp\file.txt --------------------------------------------------------------------- Commands - Execute Command This command is used to execute run configurations or external tool configurations. This includes ant builds for example. You have to specify the name of the executed run configuration. To find out the run configuration name open Run -> Run Configurations... in eclipse. Select the run configuration in tree on the left. Then the name is displayed in the first row on the right hand side. As an optional argument you can pass the run mode in which the run configuration is launched. The following alternatives are possible: * RUN * DEBUG * PROFILE Syntax: $ java -jar eclipse_remote_control.jar execute_command [run configuration name] <run mode> Example: $ java -jar eclipse_remote_control.jar execute_command my_ant_config DEBUG
First of all : great plugin!
I have had problems opening files with the remote command. I finally found the cause:
In OpenFileCommandRunner.javaFileToPluginFile the String javaFile can get truncated in one round of the for loop and might then be wrong in all following rounds. I suggest using a temporary string:
private IFile javaFileToPluginFile(String javaFile) {
for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
if (!project.isOpen()) continue; // TODO opening of project ??
String tempFileName = javaFile;
if (javaFile.startsWith('/' + project.getName())) {
tempFileName = javaFile.substring(project.getName().length() + 1);
} else if (javaFile.startsWith("/")) { // absolute system path
final String projectPath = project.getLocation().toOSString();
if (javaFile.length() < projectPath.length()) continue;
tempFileName = javaFile.substring(projectPath.length());
}
IFile file = project.getFile(tempFileName );
if (file.exists()) {
return file;
}
}
return null;
}
Dear Markus,
could you please remove the System.exit() calls!?? They are fatal if one uses the JAR inside another application because it kills the whole VM.
Thanks
Steve
First off this is a handy plugin and works well in general. The open_file and run_command options work in Eclipse Juno the only thing I am having trouble getting to work is going directly to a line number when opening a file.
So something like
$ java -jar eclipse_remote_control.jar open_file /tmp/file.txt 2
will open /tmp/file.txt but it doesn't place the cursor on line 2
I'd imagine the plugin API had changed from eclipse 3.X to 4 but it would be great if this could be updated to jump directly to a line when opening a file.
When calling the execute_command the client should wait until the command has been fully executed within eclipse.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.