|
|
|
|
|
Re: Delete Feature does not work in MPE [message #698858 is a reply to message #698849] |
Wed, 20 July 2011 11:33 |
Michael Wenz Messages: 1931 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
Great, thanks for posting the solution as well :-)
What you are doing sounds fine, at least there are no immediate issues I can
see.
Michael
"Murthybhat" schrieb im Newsbeitrag news:j06d77$9hu$1@news.eclipse.org...
Hello,
I was able to figure out the solution. My problem was in
"DiagramEditorInternal.java" and specifically the "selectionChanged" method.
The "selectionChanged(IWorkbenchPart part, ISelection selection)" method
called its "super.selectionChanged(...)" method. That method checked if the
active editor was current editor(graphical editor) and only then the actions
would get updated(enabled).
But the ".getPage().getActiveEditor()" always returned my multipageEditor
instance.
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
// If not the active editor, ignore selection changed.
if (this.equals(getSite().getPage().getActiveEditor()))
updateActions(selectionActions);
}
I had to hence make a change in "DiagramEditorInternal.java"
selectionChanged method. Instead of calling super.selectionChanged, i check
when multipageeditor, if selectedPage is same as the
current(graphicalEditor), then call update actions.
Hope I am not violating any intended behavior of graphiti.
Best Regards,
Murthy
|
|
|
|
Powered by
FUDForum. Page generated in 0.05146 seconds