Editor not linked to IFile [message #452723] |
Wed, 23 March 2005 17:46 |
Martin 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 #452726 is a reply to message #452723] |
Wed, 23 March 2005 18:59 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03054 seconds