Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Opening an editor on a non workspace file
Opening an editor on a non workspace file [message #99170] Thu, 24 July 2003 14:24 Go to next message
Eclipse UserFriend
Originally posted by: bob.donovan.eds.com

Hello,

I have a requirement to be able to open a source file that is not a member
of the workspace (not managed by the workspace). The file is read as a
part of initialization of my internal model and I would like to give the
user the opportunity to review the customizations contained therein.

Thanks, Bob
Re: Opening an editor on a non workspace file [message #99422 is a reply to message #99170] Thu, 24 July 2003 18:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

> I have a requirement to be able to open a source file that is not a member
> of the workspace (not managed by the workspace). The file is read as a
> part of initialization of my internal model and I would like to give the
> user the opportunity to review the customizations contained therein.

How do you want to open it? In an editor, a view, a dialog? It makes a
difference.

Bob Foster
Re: Opening an editor on a non workspace file [message #99483 is a reply to message #99422] Thu, 24 July 2003 20:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.donovan.eds.com

Bob,

I want to open it into an Editor.

Since I sent this email, I did some research into the eclipse source and
found that if I subclass IStorageEditorInput, I might be able to get this
to work. Basically I plan to use IStorageEditorInput as a wrapper to an
java.io.File so that I can display it in an Editor.

Since I only want the user to view the file and not edit it, I will have
to turn the editing off. But I still want the file to use the syntax
coloring, outline, etc available for the file extension.

Bob

Bob Foster wrote:

> > I have a requirement to be able to open a source file that is not a member
> > of the workspace (not managed by the workspace). The file is read as a
> > part of initialization of my internal model and I would like to give the
> > user the opportunity to review the customizations contained therein.

> How do you want to open it? In an editor, a view, a dialog? It makes a
> difference.

> Bob Foster
Re: Opening an editor on a non workspace file [message #99498 is a reply to message #99483] Thu, 24 July 2003 20:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.donovan.eds.com

Bob,

Ideally I would like to take a java.io.File and "register" it in Eclipse
as an IFile so that I can take advantage of aspects of using an IFile.

Is this possible?

Bob

Bob Donovan wrote:

> Bob,

> I want to open it into an Editor.

> Since I sent this email, I did some research into the eclipse source and
> found that if I subclass IStorageEditorInput, I might be able to get this
> to work. Basically I plan to use IStorageEditorInput as a wrapper to an
> java.io.File so that I can display it in an Editor.

> Since I only want the user to view the file and not edit it, I will have
> to turn the editing off. But I still want the file to use the syntax
> coloring, outline, etc available for the file extension.

> Bob

> Bob Foster wrote:

> > > I have a requirement to be able to open a source file that is not a
member
> > > of the workspace (not managed by the workspace). The file is read as a
> > > part of initialization of my internal model and I would like to give the
> > > user the opportunity to review the customizations contained therein.

> > How do you want to open it? In an editor, a view, a dialog? It makes a
> > difference.

> > Bob Foster
Re: Opening an editor on a non workspace file [message #99510 is a reply to message #99483] Thu, 24 July 2003 20:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.donovan.eds.com

Bob,

Ideally I would like to take a java.io.File and "register" it in Eclipse
as an IFile so that I can take advantage of aspects of using an IFile.

Is this possible?

Bob

Bob Donovan wrote:

> Bob,

> I want to open it into an Editor.

> Since I sent this email, I did some research into the eclipse source and
> found that if I subclass IStorageEditorInput, I might be able to get this
> to work. Basically I plan to use IStorageEditorInput as a wrapper to an
> java.io.File so that I can display it in an Editor.

> Since I only want the user to view the file and not edit it, I will have
> to turn the editing off. But I still want the file to use the syntax
> coloring, outline, etc available for the file extension.

> Bob

> Bob Foster wrote:

> > > I have a requirement to be able to open a source file that is not a
member
> > > of the workspace (not managed by the workspace). The file is read as a
> > > part of initialization of my internal model and I would like to give the
> > > user the opportunity to review the customizations contained therein.

> > How do you want to open it? In an editor, a view, a dialog? It makes a
> > difference.

> > Bob Foster
Re: Opening an editor on a non workspace file [message #99523 is a reply to message #99483] Thu, 24 July 2003 20:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.donovan.eds.com

Bob,

Ideally I would like to take a java.io.File and "register" it in Eclipse
as an IFile so that I can take advantage of aspects of using an IFile.

Is this possible?

Bob

Bob Donovan wrote:

> Bob,

> I want to open it into an Editor.

> Since I sent this email, I did some research into the eclipse source and
> found that if I subclass IStorageEditorInput, I might be able to get this
> to work. Basically I plan to use IStorageEditorInput as a wrapper to an
> java.io.File so that I can display it in an Editor.

> Since I only want the user to view the file and not edit it, I will have
> to turn the editing off. But I still want the file to use the syntax
> coloring, outline, etc available for the file extension.

> Bob

> Bob Foster wrote:

> > > I have a requirement to be able to open a source file that is not a
member
> > > of the workspace (not managed by the workspace). The file is read as a
> > > part of initialization of my internal model and I would like to give the
> > > user the opportunity to review the customizations contained therein.

> > How do you want to open it? In an editor, a view, a dialog? It makes a
> > difference.

> > Bob Foster
Re: Opening an editor on a non workspace file [message #100659 is a reply to message #99483] Sun, 27 July 2003 01:47 Go to previous message
Eclipse UserFriend
Originally posted by: ed.burnette.REMOVE.THIS.sas.com

I wrote a plugin that does something like this; see the Fileopen plugin at
www.eclipsepowered.org (open source on sourceforge). Since you don't want to
save the file it's even easier, see the sample code posted for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=2869 . Basically it's the same
idea used by the CVS plugin to view source code on an arbitrary revision, so
that's another place to look. HTH.

--
Ed Burnette, co-author Eclipse in Action (www.manning.com/gallardo)


"Bob Donovan" <bob.donovan@eds.com> wrote in message
news:bfpfbn$r2b$1@eclipse.org...
> Bob,
>
> I want to open it into an Editor.
>
> Since I sent this email, I did some research into the eclipse source and
> found that if I subclass IStorageEditorInput, I might be able to get this
> to work. Basically I plan to use IStorageEditorInput as a wrapper to an
> java.io.File so that I can display it in an Editor.
>
> Since I only want the user to view the file and not edit it, I will have
> to turn the editing off. But I still want the file to use the syntax
> coloring, outline, etc available for the file extension.
>
> Bob
>
Previous Topic:Adding a plugin from the wizard problem
Next Topic:any other way to remove nls package?
Goto Forum:
  


Current Time: Thu Dec 26 13:52:08 GMT 2024

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

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

Back to the top