Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
239b738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance to add this for Eclipse? I've been seaching for such an URL for Eclipse but was unable to find it. Maybe support was added via http://symfony.dubture.com plugins.
239b738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, this should be asked to the eclipse team to know whether they support such way to open files through a custom protocol. It is not something implemented in Symfony but in emacs/sublime/macvim/textmate
239b738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eclipse URL handler (from an old EverNote note of mine)
While support for opening files from CLI was introduced in 02-2010 (9 years after the original request) ...
... Eclipse does not (yet) support opening files at a certain line number - see this bug which has been open for 4+ years now.
Opening files with Eclipse from CLI works like this:
You can add
--launcher.timeout 10
and eclipse will try to open the file in an exisiting instance for 10 seconds - after the timeout it opens the file in a new instance ( default: 60 ).... or if you have
--launcher.defaultAction openFile
as a default launch option in eclipse.ini you can ommit the--launcher.openFile
flag like thisRegistering the URL handler
Linux
Instructions for registering URL handlers / custom schemes on Linux can be found here.
Windows
Registering the
eclipse://
scheme / url handler can be done like this - more information can be found hereYou either have to have eclipse.exe in your PATH or prepend the complete path to the third command.
OSX
For completeness - instructions for OSX can be found here.
Other solutions?
There is a wrapper tool / plugin called EclipseCall from 2008 that supports opening files at a certain line and highlighting lines via sockets.
Eclipse Remote Control can open files in existing workspaces at line xy (but not absolute paths to files).
Eclipse Java Development Tools (JDT) has an
openFromClipboard
command that can open files from clipboard and jump to a line number according to this comment.239b738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After you have enabled the eclipse scheme, you can define it as described in the docs
239b738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Good idea to leave the link to the docs here. @wouterj.
btw. the most common syntax is i.e.
vim +21 /etc/hosts
- works for: