Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Editor input without closing.
Editor input without closing. [message #241272] Wed, 06 February 2008 07:16 Go to next message
Eclipse UserFriend
Originally posted by: sushant.sirsikar.gmail.com

Hello all,
Is it necessary to close an editor and again open if the editor input
changes? I have tried the following, but didn't succeed.

1. Invoke setInputWithNotify(new_input) method with the new editor input -
on debugging it was discovered that the listeners list contains a set of
actions and IEditorPart instance.
2. Invoke init()- this does change the editor title to a new one, but no
changes are reflected in the Editor area.
3. Any previous thread where such problems are addressed.

Looking forward for some pointers.
Thanks in advance.
Re: Editor input without closing. [message #241283 is a reply to message #241272] Wed, 06 February 2008 11:40 Go to previous message
Xiang Qinxian is currently offline Xiang QinxianFriend
Messages: 119
Registered: July 2009
Senior Member
Hi,

Sushant 写道:
> Hello all,
> Is it necessary to close an editor and again open if the editor input
> changes? I have tried the following, but didn't succeed.
> 1. Invoke setInputWithNotify(new_input) method with the new editor input
> - on debugging it was discovered that the listeners list contains a set
> of actions and IEditorPart instance. 2. Invoke init()- this does change
> the editor title to a new one, but no changes are reflected in the
> Editor area. 3. Any previous thread where such problems are addressed.
>
> Looking forward for some pointers.
> Thanks in advance.
>
>
If call setInputWithNotify method, a propertychangelistener on
PROP_INPUT should be registered.
But IMO, Editor not design for input change.
For GEF editor(GraphicalEditor) there is model and editpartfactory, like
EditPart's createFigure(), created, then not intend to change.
So, even if handle PROP_INPUT event, there somethings to do.
OK, let's focus on this point, I prefer create model wrapper, which
model related to real model. If need change input, just call
wrapper.setModel(new_input).
EditPartFactory can handle this easy.

Cheers,
Xianya
Previous Topic:Persistence to a database
Next Topic:GEF first "view"
Goto Forum:
  


Current Time: Fri Apr 19 23:01:05 GMT 2024

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

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

Back to the top