Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » how to unstick "Open With" setting per-file
how to unstick "Open With" setting per-file [message #851414] Sat, 21 April 2012 00:19 Go to next message
Alan Bram is currently offline Alan BramFriend
Messages: 3
Registered: July 2009
Junior Member
While working on Java code, sometimes I like to edit source code in an external editor, like emacsclient. So, I right-click, and choose "Open With", and then select "emacsclient" from the list. (I previously set it up so that "emacsclient" appears in the list.)

However, I don't always want to edit these source files in emacsclient; often I'd like to view them in the regular Eclipse Java editor. But Eclipse seems to remember that I previously chose "emacsclient" for particular source files. Now, by default Eclipse still tries to use emacsclient. This is inconvenient in some contexts: for example, in the Open Type dialog (Cntrl-Shift-T); or if I highlight a method call and press F3 (Open Declaration). These contexts don't give me a way to right-click and select which editor I want; they just automatically take me to whatever Eclipse thinks is the target file's default editor.

When this happens, I have to manually click through the package naming hierarchy in the Package Explorer to find the desired source file name. From there I can of course do the right-click and choose the Eclipse editor, but this is tedious.

Is there a way to make Eclipse reset, or "forget" that I previously wanted to edit certain files with an external editor?
Re: how to unstick "Open With" setting per-file [message #869791 is a reply to message #851414] Fri, 04 May 2012 10:10 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 21.04.2012 02:19, Alan Bram wrote:
> While working on Java code, sometimes I like to edit source code in an
> external editor, like emacsclient. So, I right-click, and choose
> "Open With", and then select "emacsclient" from the list. (I
> previously set it up so that "emacsclient" appears in the list.)
>
> However, I don't always want to edit these source files in
> emacsclient; often I'd like to view them in the regular Eclipse Java
> editor. But Eclipse seems to remember that I previously chose
> "emacsclient" for particular source files. Now, by default Eclipse
> still tries to use emacsclient. This is inconvenient in some
> contexts: for example, in the Open Type dialog (Cntrl-Shift-T); or if
> I highlight a method call and press F3 (Open Declaration). These
> contexts don't give me a way to right-click and select which editor I
> want; they just automatically take me to whatever Eclipse thinks is
> the target file's default editor.
>
> When this happens, I have to manually click through the package naming
> hierarchy in the Package Explorer to find the desired source file
> name. From there I can of course do the right-click and choose the
> Eclipse editor, but this is tedious.
>
> Is there a way to make Eclipse reset, or "forget" that I previously
> wanted to edit certain files with an external editor?
No.

Dani
Re: how to unstick "Open With" setting per-file [message #869865 is a reply to message #869791] Fri, 04 May 2012 15:13 Go to previous messageGo to next message
Alan Bram is currently offline Alan BramFriend
Messages: 3
Registered: July 2009
Junior Member
Quote:
> Is there a way to make Eclipse reset, or "forget" that I previously
> wanted to edit certain files with an external editor?
No.


What I do now is, (1) right-click -> "Open With..." -> emacsclient (2) the file pops up in an Emacs frame; (3) then I immediately go back to the Eclipse window and again right-click -> "Open With..." -> Java Editor. At this point, I still have the file in the Emacs frame and can edit it there; yet Eclipse has been reset to default to the Java Editor again (albeit I did so manually).

It's not ideal, but it's the best workaround I've figured out so far.
Re: how to unstick "Open With" setting per-file [message #869892 is a reply to message #869865] Fri, 04 May 2012 16:38 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 04.05.2012 17:13, Alan Bram wrote:
> Quote:
>> > Is there a way to make Eclipse reset, or "forget" that I previously
>> > wanted to edit certain files with an external editor?
>> No.
>
>
> What I do now is, (1) right-click -> "Open With..." -> emacsclient (2)
> the file pops up in an Emacs frame; (3) then I immediately go back to
> the Eclipse window and again right-click -> "Open With..." -> Java
> Editor. At this point, I still have the file in the Emacs frame and
> can edit it there; yet Eclipse has been reset to default to the Java
> Editor again (albeit I did so manually).
>
> It's not ideal, but it's the best workaround I've figured out so far.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=378488

Dani
Re: how to unstick "Open With" setting per-file [message #869895 is a reply to message #869892] Fri, 04 May 2012 16:52 Go to previous message
Alan Bram is currently offline Alan BramFriend
Messages: 3
Registered: July 2009
Junior Member
Quote:
> It's not ideal, but it's the best workaround I've figured out so far.
See [bug 378488]



Wow! That's great; thanks!
Previous Topic:GWT+Maven web.xml showing errors
Next Topic:Need JFrame? Come Here.
Goto Forum:
  


Current Time: Thu Apr 25 22:17:20 GMT 2024

Powered by FUDForum. Page generated in 0.07582 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top