Text Editor - How it works [message #50391] |
Thu, 05 June 2003 10:25  |
Eclipse User |
|
|
|
Hi,
I need to know how the text editor plug-in is able to act as default editor
for the file that has no editor associated with it.
We can open any file with the text editor using "open with" options in the
popup menu but the text editor won't be the default editor for the files
that has some other editor assigned as default editor.
What is the technical procedure that goes with text editor. If text editor
plug-in is able to it then what is the secret formula that they are
following to do this.
Please explain in details.
MorPheus
|
|
|
|
|
|
|
|
Re: Text Editor - How it works [message #54086 is a reply to message #53146] |
Wed, 11 June 2003 03:34  |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
"MorPheus" <rgurupackiam@selectica.com> wrote in message
news:bc1rb7$4lv$1@rogue.oti.com...
> Then How does the text editor achieve this functionality?
It is hard-coded in EditorRegistry getDefaultEditor() to
IWorkbenchConstants.DEFAULT_EDITOR_ID which is set to
"org.eclipse.ui.DefaultTextEditor" which is registered by the org.eclipse.ui
plugin.
(I had to read the source to get this answer. I highly recommend learning
how to do this for yourself.)
Bob
> Morpheus
> "Bob Foster" <bob@objfac.com> wrote in message
> news:bc126o$m0d$1@rogue.oti.com...
> > "MorPheus" <rgurupackiam@selectica.com> wrote in message
> > news:bbstpe$nmr$1@rogue.oti.com...
> > > Hi,
> > > well hope u misunderstand my problem (may be I didn't put in
correct
> > > way).I need my editor to act like default editor for all the files
> > > irrespective of file extensions, provided, if that file doesn't have
any
> > > editor associated with it.Say for example text editor .Text editor
will
> be
> > a
> > > default editor for all the files that don't have editor associated
with
> > > it.If the some other editor is associated for a particular file,then
the
> > > file can be still opened using text editor by using open with menu.How
> to
> > > achieve this kind of functionality.
> >
> > You can't do this reliably. Even if you specify extension as *.* (if
this
> > even works), whenever there are two editors that want to be the default
> > editor for the same extension, Eclipse arbitrarily picks one. No way I
> know
> > of to make sure you're the one.
> >
> > (If there were a way to do this, I wouldn't install your plugin. Is it
> just
> > an ego thing, or what? ;-)
> >
> > Bob
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04171 seconds