Skip to main content



      Home
Home » Newcomers » Newcomers » launching eclipse from windows as default java editor
launching eclipse from windows as default java editor [message #231172] Thu, 06 September 2007 04:18 Go to next message
Eclipse UserFriend
Originally posted by: tim.fulcher.bt.com

OK

A two pronged question really. I'm running e3.3 on windows XP. I'd like to
make eclipse the default editor for Java programs (regardless of whether
the file is in a project). When I click on a .java file it brings up
eclipse but doesn't actually bring the selected file up in an editor
window - why is that? Furthermore if I did this to a second file it spawns
a whole new eclipse which I would then have to select a different
workspace. Is there no way to just invoke a new window for the same
process?

The second aspect is related but subtlely different. We have a CMS system
which has a web client, that upon check out of a file, copies it to a
local folder and calls an arbitrary command to launch a program (Notepad,
Xemacs etc) to edit the file.
I can make the folder the src dir of an eclipse project but similar to
above, I'd want to merely trigger the opening of an editor window for the
file *in the running eclipse app*. I've looked at the eclipse startup
options and there seems to be no flag for specifying the file to open.


Tim
Re: launching eclipse from windows as default java editor [message #231181 is a reply to message #231172] Thu, 06 September 2007 06:58 Go to previous messageGo to next message
Eclipse UserFriend
tim wrote:

> OK
>
> A two pronged question really. I'm running e3.3 on windows XP. I'd
> like to make eclipse the default editor for Java programs (regardless
> of whether the file is in a project). When I click on a .java file it
> brings up eclipse but doesn't actually bring the selected file up in
> an editor window - why is that? Furthermore if I did this to a second
> file it spawns a whole new eclipse which I would then have to select a
> different workspace. Is there no way to just invoke a new window for
> the same process?

No. There's a bug for it in bugzilla.

Dani

>
> The second aspect is related but subtlely different. We have a CMS
> system which has a web client, that upon check out of a file, copies
> it to a local folder and calls an arbitrary command to launch a
> program (Notepad, Xemacs etc) to edit the file.
> I can make the folder the src dir of an eclipse project but similar to
> above, I'd want to merely trigger the opening of an editor window for
> the file *in the running eclipse app*. I've looked at the eclipse
> startup options and there seems to be no flag for specifying the file
> to open.
>
>
> Tim
>
>
>
Re: launching eclipse from windows as default java editor [message #231366 is a reply to message #231172] Thu, 06 September 2007 15:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"tim" <tim.fulcher@bt.com> wrote in message
news:95cda5f70ded006da2a97df669fc9947$1@www.eclipse.org...
> OK
>
> A two pronged question really. I'm running e3.3 on windows XP. I'd like to
> make eclipse the default editor for Java programs (regardless of whether
> the file is in a project). When I click on a .java file it brings up
> eclipse but doesn't actually bring the selected file up in an editor
> window - why is that?

As you think through the behavior you'd like to see, keep in mind that
Eclipse is an Integrated Development Environment (IDE), not a text editor.
So, in order for it to do its thing, it needs workspaces, projects, etc.,
not just .java files. An isolated .java file, to Eclipse, is sort of
worthless: it can parse the Java text and identify keywords and tokens, but
for instance without a classpath (contained in the project) it has no idea
what the types are, it can't tell whether method invocations are valid, and
so forth.

And the way projects work, the .java files they "contain" aren't necessarily
in a subdirectory under the project root; they can be linked to from
somewhere else.

So, there's no way for Eclipse to know, given a .java file, what project it
belongs to and what workspace to open that project in. There's no context.

This doesn't mean there's never anything reasonable for Eclipse to do, but
it does mean that the problem is not completely solvable in the general
case, and it means that it is harder to get it right than you might
initially think.
Re: launching eclipse from windows as default java editor [message #231518 is a reply to message #231366] Fri, 07 September 2007 03:27 Go to previous message
Eclipse UserFriend
Originally posted by: tim.fulcher.bt.com

Walter Harley wrote:

> And the way projects work, the .java files they "contain" aren't necessarily
> in a subdirectory under the project root; they can be linked to from
> somewhere else.

> So, there's no way for Eclipse to know, given a .java file, what project it
> belongs to and what workspace to open that project in. There's no context.

Sure I understand where you are coming from. I suppose my initial
questions were to glean an understanding of how to get a single eclipse
app to respond to external stimuli once running, i.e. open a particular
file in an editor.

With regard to my second point, our CMS implements its own version control
but the client will check out into a particular directory, so this *can*
be an eclipse project. The issue above remains though.
I can envisage a potential plugin to embded the CMS client in eclipse
itself (then the problem goes away!) but that kind of effort is beyond
both my current knowledge and availability right now

Tim
Previous Topic:Although I use 2 groups Instead of 1 row I get 4 rows. Due to IF STATMENTS ?
Next Topic:can not update europa 3.3
Goto Forum:
  


Current Time: Sun May 11 11:36:20 EDT 2025

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

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

Back to the top