Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Closing and Opening an Editor
Closing and Opening an Editor [message #190215] Tue, 02 August 2005 21:31 Go to next message
Eclipse UserFriend
Originally posted by: cleversons.gmail.com

Hi,

I'm having some problems after closing and re-open an editor on my
application.

The application has a open button which opens my editor by calling:

IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchW indow().getActivePage(),
MyInputEditor, MyEditor.ID);

And a close button which calls:

IEditorPart editor =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().closeEditor(editor,
false);

When the close button is pressed, the editor is closed as expected. But if
the user presses start again, the changes on the model do not take effect
in the editor anymore. It remains empty no matter how many changes are
made on the model.

Is there any kind of finalization I must do when closing the editor?

Thank you
Re: Closing and Opening an Editor [message #190396 is a reply to message #190215] Wed, 03 August 2005 18:04 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

Sounds like you have a stale model in memory.

"Cleverson Schmidt" <cleversons@gmail.com> wrote in message
news:d7a06872070d861d1e2f3beff14a4a4e$1@www.eclipse.org...
> Hi,
>
> I'm having some problems after closing and re-open an editor on my
> application.
>
> The application has a open button which opens my editor by calling:
>
>
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchW indow().getActiv
ePage(),
> MyInputEditor, MyEditor.ID);
>
> And a close button which calls:
>
> IEditorPart editor =
>
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActi
veEditor();
>
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().closeEd
itor(editor,
> false);
>
> When the close button is pressed, the editor is closed as expected. But if
> the user presses start again, the changes on the model do not take effect
> in the editor anymore. It remains empty no matter how many changes are
> made on the model.
>
> Is there any kind of finalization I must do when closing the editor?
>
> Thank you
>
Previous Topic:Generalized Undo Support in Eclipse
Next Topic:showing feedback on connections adjacent to selected element
Goto Forum:
  


Current Time: Tue Dec 10 15:10:29 GMT 2024

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

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

Back to the top