Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Editor not linked to IFile
Editor not linked to IFile [message #452723] Wed, 23 March 2005 17:46 Go to next message
Martin is currently offline MartinFriend
Messages: 35
Registered: July 2009
Member
Hi,

I have created a new perspective and project creator. When a new project
of this type is created, certain folders and files are automaticlly placed
in the project folder. What I now want to do is create an Editor, not one
that is linked to a certain file extension, but one that can only be
accessed from one place and can appear only once in the context of the
project. This will be similar to the plugin.xml file in a Plug-in
project. Is it possible to create one file at creation time, e.g.
"resource.bla", such that not every file with ".bla" extension will link
to this Editor?

I was also thinking to maybe use an action instead of a file. i.e. in my
new perspective have a workbence action, that opens the editor when
pressed.

Is there any examples out there of
IWorkbenchPage.openEditor(IEditorInput input, String editorId)
where the IEditorInput is not an IFile?

Thanks for any suggestions,
Martin
Re: Editor not linked to IFile [message #452724 is a reply to message #452723] Wed, 23 March 2005 19:53 Go to previous message
shane is currently offline shaneFriend
Messages: 11
Registered: July 2009
Junior Member
ok you crazy kids, i figured it out:

"Editors not tied to the resources framework"

http://www.jroller.com/page/Zhou/20040215

Eugene Ostroukhov's Weblog

Explains it all and is a brilliant downloadable example!
Re: Editor not linked to IFile [message #452726 is a reply to message #452723] Wed, 23 March 2005 18:59 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Martin wrote:
> Hi,
>
> I have created a new perspective and project creator. When a new
> project of this type is created, certain folders and files are
> automaticlly placed in the project folder. What I now want to do is
> create an Editor, not one that is linked to a certain file extension,
> but one that can only be accessed from one place and can appear only
> once in the context of the project. This will be similar to the
> plugin.xml file in a Plug-in project. Is it possible to create one file
> at creation time, e.g. "resource.bla", such that not every file with
> ".bla" extension will link to this Editor?
>

If its a resource, you can add a 'Nature' to it. and you can make your
editor only open 'IResources' that have that particular Nature. You can
also add other properties of your choosing to any IResource. So your
editor and/or your whole plugin and key on these properties or the nature.


> I was also thinking to maybe use an action instead of a file. i.e. in
> my new perspective have a workbence action, that opens the editor when
> pressed.
>
> Is there any examples out there of
> IWorkbenchPage.openEditor(IEditorInput input, String editorId)
> where the IEditorInput is not an IFile?
>
> Thanks for any suggestions,
> Martin
>
Previous Topic:Tooltips for Table cells
Next Topic:Open Editor with particular resource, e.g. 'plugin.xml'
Goto Forum:
  


Current Time: Sat Jul 20 22:03:34 GMT 2019

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

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

Back to the top