Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Replace Contents of Editor
Replace Contents of Editor [message #463554] Tue, 13 February 2007 09:57 Go to next message
Eclipse UserFriend
I have an editor open. A choice list exists in the view on the left side
of the perspective. As I navigate the choice list I want to replace the
contents of the editor. I cannot find in the API how this is done. Help!



Thanks


John

PS if this is the wrong forum forgive and redirect.
Re: Replace Contents of Editor [message #463556 is a reply to message #463554] Tue, 13 February 2007 11:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter_ossipov.mail.ru

In my opinion you are going the wrong way. Views have that behavior of
changing what they have in them that way, but not editors. An example is
a property sheet view org.eclipse.ui.views.properties.PropertySheet.
What that one does is like this (within your editor, of course):
getSite().getPage().addSelectionListener(ISelectionListener) ;
then you will be notified.
Do not forget to remove the listener in dispose method.

John wrote:
> I have an editor open. A choice list exists in the view on the left
> side of the perspective. As I navigate the choice list I want to
> replace the contents of the editor. I cannot find in the API how this
> is done. Help!
>
>
>
> Thanks
>
>
> John
>
> PS if this is the wrong forum forgive and redirect.
>
Re: Replace Contents of Editor [message #463622 is a reply to message #463554] Tue, 13 February 2007 14:42 Go to previous message
Eclipse UserFriend
for a text editor you would probably do it by using the editor
IEditorInput and the text editor document provider to get an IDocument
(which is the text document model). When you update the IDocument, that
should replace the text for everybody that watches that model.

maybe ....

Later,
PW
Previous Topic:Close editor area
Next Topic:Wizards
Goto Forum:
  


Current Time: Fri Mar 21 11:14:23 EDT 2025

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

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

Back to the top