Open with Eclipse

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?

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. 🙂


14 Responses to “Open with Eclipse”

  1. Scott Stanchfield Says:

    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.

  2. Julien Says:

    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 ( 0.9.0)
    Missing requirement: Open With Eclipse Feature 0.9.0 ( 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.

  3. Philipp Kursawe Says:

    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.

  4. michel Says:

    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

    • howlger Says:

      Hi Michel,

      does your eclipse.ini contain the two lines “–launcher.defaultAction” and “openFile”? Which version and Eclipse download package do you use?

  5. Remain Open with Eclipse « eclipse howl Says:

    […] 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 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: