Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » editorinput questions
editorinput questions [message #256636] Tue, 29 June 2004 08:29 Go to next message
Eclipse UserFriend
Originally posted by: wilken.ultraplex.org

hi all,
Can somebody point me in the right direction concerning editorinputs?

I am not sure i correctly understand them.
I have a multiparteditor that contains two texteditors, that needs to work
on two different parts of a file. Ideally i would like to take the
original editorinput (the original file), and from that create two
editorinputs, one for eact texteditor.
these inputs should be adapters to the original input, so that when i make
changes in either texteditor the original input is updated, and when i
save the file, the entire file is saved.

i think this can be achieved using the getAdapter method on the
IEditorInput but i can find no real documentation on this.

Am i going at it the wrong way?

any help or pointer would be appreciated

sincerely
morten wilken
Re: editorinput questions [message #256668 is a reply to message #256636] Tue, 29 June 2004 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Morten Wilken wrote:

>hi all,
>Can somebody point me in the right direction concerning editorinputs?
>
>I am not sure i correctly understand them.
>I have a multiparteditor that contains two texteditors, that needs to work
>on two different parts of a file. Ideally i would like to take the
>original editorinput (the original file), and from that create two
>editorinputs, one for eact texteditor.
>these inputs should be adapters to the original input, so that when i make
>changes in either texteditor the original input is updated, and when i
>save the file, the entire file is saved.
>
>i think this can be achieved using the getAdapter method on the
>IEditorInput but i can find no real documentation on this.
>
>
I assume you use MultipageEditorPart (MultiPageEditor is deprecated) and
there you can explicitly provide the editor input when adding a page,
see addPage(IEditorPart, IEditorInput). You have two choices: implement
your own IEditorInput covering a part of a file or implement your own
text editor that takes an IFileEditorInput and only shows the desired part.

Dani

>Am i going at it the wrong way?
>
>any help or pointer would be appreciated
>
>sincerely
>morten wilken
>
>
>
Re: editorinput questions [message #257008 is a reply to message #256668] Wed, 30 June 2004 05:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wilken.ultraplex.org

hi daniel,
i do use the MultipageEditorPart as you guessed.

i think my confusion runs a little deeper than that.
Is there any articles describing the relationship between editorinputs and
editorparts?

ideally what i would like is to have an eclipse-agnostic model that can be
represented as both xml (in one editor) and as graphics (in another
editor). disregarding the graphics part for now, i think of the
editorinput as an adapter to the model. if this is so, then i lack some
medthods on the input (such as getting data and setting data - is this
happening through the getAdapter method?)

the general relationship between editorparts and editorinputs confuse me,
so any help is appreciated.

sincerely
morten wilken
Daniel Megert wrote:

> Morten Wilken wrote:

> >hi all,
> >Can somebody point me in the right direction concerning editorinputs?
> >
> >I am not sure i correctly understand them.
> >I have a multiparteditor that contains two texteditors, that needs to work
> >on two different parts of a file. Ideally i would like to take the
> >original editorinput (the original file), and from that create two
> >editorinputs, one for eact texteditor.
> >these inputs should be adapters to the original input, so that when i make
> >changes in either texteditor the original input is updated, and when i
> >save the file, the entire file is saved.
> >
> >i think this can be achieved using the getAdapter method on the
> >IEditorInput but i can find no real documentation on this.
> >
> >
> I assume you use MultipageEditorPart (MultiPageEditor is deprecated) and
> there you can explicitly provide the editor input when adding a page,
> see addPage(IEditorPart, IEditorInput). You have two choices: implement
> your own IEditorInput covering a part of a file or implement your own
> text editor that takes an IFileEditorInput and only shows the desired part.

> Dani

> >Am i going at it the wrong way?
> >
> >any help or pointer would be appreciated
> >
> >sincerely
> >morten wilken
> >
> >
> >
Re: editorinput questions [message #257068 is a reply to message #257008] Wed, 30 June 2004 08:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Morten Wilken wrote:

>hi daniel,
>i do use the MultipageEditorPart as you guessed.
>
>i think my confusion runs a little deeper than that.
>Is there any articles describing the relationship between editorinputs and
>editorparts?
>
>ideally what i would like is to have an eclipse-agnostic model that can be
>represented as both xml (in one editor) and as graphics (in another
>editor). disregarding the graphics part for now, i think of the
>editorinput as an adapter to the model.
>
Well that's wrong. It is rather a description of how/where the input is
persisted/coming from. The Java editor's input for example can be file
editor input or storage editor input among others and not the Java
model element.

Dani

> if this is so, then i lack some
>medthods on the input (such as getting data and setting data - is this
>happening through the getAdapter method?)
>
>the general relationship between editorparts and editorinputs confuse me,
>so any help is appreciated.
>
>sincerely
>morten wilken
>Daniel Megert wrote:
>
>
>
>>Morten Wilken wrote:
>>
>>
>
>
>
>>>hi all,
>>>Can somebody point me in the right direction concerning editorinputs?
>>>
>>>I am not sure i correctly understand them.
>>>I have a multiparteditor that contains two texteditors, that needs to work
>>>on two different parts of a file. Ideally i would like to take the
>>>original editorinput (the original file), and from that create two
>>>editorinputs, one for eact texteditor.
>>>these inputs should be adapters to the original input, so that when i make
>>>changes in either texteditor the original input is updated, and when i
>>>save the file, the entire file is saved.
>>>
>>>i think this can be achieved using the getAdapter method on the
>>>IEditorInput but i can find no real documentation on this.
>>>
>>>
>>>
>>>
>>I assume you use MultipageEditorPart (MultiPageEditor is deprecated) and
>>there you can explicitly provide the editor input when adding a page,
>>see addPage(IEditorPart, IEditorInput). You have two choices: implement
>>your own IEditorInput covering a part of a file or implement your own
>>text editor that takes an IFileEditorInput and only shows the desired part.
>>
>>
>
>
>
>>Dani
>>
>>
>
>
>
>>>Am i going at it the wrong way?
>>>
>>>any help or pointer would be appreciated
>>>
>>>sincerely
>>>morten wilken
>>>
>>>
>>>
>>>
>>>
>
>
>
>
Re: editorinput questions [message #257098 is a reply to message #257068] Wed, 30 June 2004 09:49 Go to previous message
Eclipse UserFriend
Originally posted by: wilken.ultraplex.org

hi daniel,
thanks for the reply, i think i'll have to look closer at this before i
progess.

sincerely
morten wilken

Daniel Megert wrote:

> Morten Wilken wrote:

> >hi daniel,
> >i do use the MultipageEditorPart as you guessed.
> >
> >i think my confusion runs a little deeper than that.
> >Is there any articles describing the relationship between editorinputs and
> >editorparts?
> >
> >ideally what i would like is to have an eclipse-agnostic model that can be
> >represented as both xml (in one editor) and as graphics (in another
> >editor). disregarding the graphics part for now, i think of the
> >editorinput as an adapter to the model.
> >
> Well that's wrong. It is rather a description of how/where the input is
> persisted/coming from. The Java editor's input for example can be file
> editor input or storage editor input among others and not the Java
> model element.

> Dani

> > if this is so, then i lack some
> >medthods on the input (such as getting data and setting data - is this
> >happening through the getAdapter method?)
> >
> >the general relationship between editorparts and editorinputs confuse me,
> >so any help is appreciated.
> >
> >sincerely
> >morten wilken
> >Daniel Megert wrote:
> >
> >
> >
> >>Morten Wilken wrote:
> >>
> >>
> >
> >
> >
> >>>hi all,
> >>>Can somebody point me in the right direction concerning editorinputs?
> >>>
> >>>I am not sure i correctly understand them.
> >>>I have a multiparteditor that contains two texteditors, that needs to work
> >>>on two different parts of a file. Ideally i would like to take the
> >>>original editorinput (the original file), and from that create two
> >>>editorinputs, one for eact texteditor.
> >>>these inputs should be adapters to the original input, so that when i make
> >>>changes in either texteditor the original input is updated, and when i
> >>>save the file, the entire file is saved.
> >>>
> >>>i think this can be achieved using the getAdapter method on the
> >>>IEditorInput but i can find no real documentation on this.
> >>>
> >>>
> >>>
> >>>
> >>I assume you use MultipageEditorPart (MultiPageEditor is deprecated) and
> >>there you can explicitly provide the editor input when adding a page,
> >>see addPage(IEditorPart, IEditorInput). You have two choices: implement
> >>your own IEditorInput covering a part of a file or implement your own
> >>text editor that takes an IFileEditorInput and only shows the desired part.
> >>
> >>
> >
> >
> >
> >>Dani
> >>
> >>
> >
> >
> >
> >>>Am i going at it the wrong way?
> >>>
> >>>any help or pointer would be appreciated
> >>>
> >>>sincerely
> >>>morten wilken
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
> >
Previous Topic:Corba + Eclipse: VerifyError exception
Next Topic:OLE in Eclipse
Goto Forum:
  


Current Time: Tue Jun 10 03:34:08 EDT 2025

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

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

Back to the top