In the past days I have been using many different text editors in Windows XP. But I missed a couple of things which I’m used from Eclipse: shortcuts to move, to duplicate or to delete lines, the possibility to jump to the last edit location (Ctrl+Q), the possibility to compare the selected text with the clipboard, and many other things. Of course you can open external files with Eclipse by File > Open File… or drag-and-drop the files into the editor area but this is too complicated especially if Eclipse has not been started yet. By the way, does anybody remember Padclipse?
Since Eclipse 3.6 M5 it has been possible to open files from the command line but you have to tweak the Windows registry yourself to have a menu item Open with Eclipse in the context menu of files. Surprisingly, I didn’t find a plug-in which does the registry tweaking for me. Probably, some other people have this done manually or written a plug-in without sharing it or adding it to the Marketplace. So I asked myself, is it possible to write such a plug-in myself and share it within one day?
- Update site: http://openwitheclipse.sf.net/update
or download: http://sf.net/projects/openwitheclipse/files - Home page: http://openwitheclipse.sf.net/
- Metrics at Ohloh: http://www.ohloh.net/p/openwitheclipse
- Marketplace: http://marketplace.eclipse.org/content/open-eclipse
The short answer: yes, it is. It was really easy going. The great tooling support of Eclipse, jRegistryKey, SourceForge and all the shared knowledge of others make it possible to do all these things in a very short time: write a plug-in, integrate a non OSGi framework, find a public location for the project and the source code, build a website and provide an update site URL so that everybody can install the plug-in with only some mouse clicks. Enjoy and many thanks to Eclipse & Co for being so open.

May 6, 2010 at 15:05 |
Any chance you can set it up to use an open instance of eclipse rather than always starting a new instance? I know this works with some windows apps but not sure it would be possible in eclipse.
May 6, 2010 at 15:15 |
It reuses an open instance. Try it!
May 6, 2010 at 15:26 |
Sounds like a great idea, but I could not install it :
– via the Eclipse update site I got this message :
Cannot complete the install because one or more required items could not be found.
Software being installed: Open With Eclipse Feature 0.9.0 (de.agilantis.open_with_eclipse.feature.feature.group 0.9.0)
Missing requirement: Open With Eclipse Feature 0.9.0 (de.agilantis.open_with_eclipse.feature.feature.group 0.9.0) requires ‘de.agilantis.open_with_eclipse [0.9.0]‘ but it could not be found
– I tried the other way (extracting the zip in my eclipse installation) but I don’t see any “Windows Context Menu” entry in Preferences/General
I’m using Eclipse 3.6M7.
May 6, 2010 at 15:35 |
Do you use Windows XP? And what’s in the error log? Please fill a ticket at SourceForge (log in required) with more information.
May 6, 2010 at 15:42 |
Looks like jregistrykey only supports 32-bit CPUs, but I’m running 64-bit. I’ll see if I can find any solution…
May 6, 2010 at 15:59
Maybe only both plug-in configurations are too restrective (see Eclipse-PlatformFilter in MANIFEST.MF). Patches are welcome.
May 6, 2010 at 16:06
I imported the 2 plugins and started tinkering with the platform filters and jRegistryKey 64-bit suggestions : http://sourceforge.net/tracker/index.php?func=detail&aid=2966672&group_id=104321&atid=641035
no luck so far, I think it’ll be easier and faster for to add the registry key manually
May 6, 2010 at 16:08
btw what registry key is OpenWithEclipse adding? I saw that you’re adding “*\\shell\\” to HKEY_CLASSES_ROOT, but I couldn’t find such a key in regedit
May 6, 2010 at 16:16
You have to import something like this:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Open with Eclipse]
[HKEY_CLASSES_ROOT\*\shell\Open with Eclipse\command]
@="\"C:\\path_to_your_eclipse\\eclipse.exe\" \"%1\""
May 6, 2010 at 16:00 |
Maybe you could use JNA (which is bundled with Eclipse anyway) instead of JRegistry. Its pretty easy to use and should work on 32bit and 64 bit Windows.
May 6, 2010 at 16:20 |
Thank you for the information.
Which bundle do you mean? I can not find it…
June 30, 2010 at 12:53 |
2 problems:
[Enter License Description here.]
Workspace in use when eclipse is alredy open
try this: page.openEditor(new FileEditorInput(file), desc.getId());
somehow when eclipse is alreddy open
you probeply nead to register a command line argument or patch eclipse
June 30, 2010 at 13:23 |
Hi Michel,
does your eclipse.ini contain the two lines “–launcher.defaultAction” and “openFile”? Which version and Eclipse download package do you use?
May 27, 2011 at 10:59 |
[...] year, I tried to write and publish an Eclipse plug-in within one day (read here if successfully or not). Now, one year later, I proudly present an update of Open with Eclipse which adds Open with [...]