Home » Eclipse Projects » Eclipse 4 » Menu shows only with -clearPersistedState
| | | | | | |
Re: Menu shows only with -clearPersistedState [message #1003179 is a reply to message #1002959] |
Sun, 20 January 2013 13:55 |
Eclipse User |
|
|
|
Well try putting a breakpoint in the MWindow.setMainMenu method and examine the call stack to see who calls it with the null argument when the workbench closes. If no one calls than it is not in the model at startup in the first place. If so you have to examine the model merging code and see where it is left out.
This may get a bit deep but you will get at it eventually.
|
|
|
Re: Menu shows only with -clearPersistedState [message #1003939 is a reply to message #1003179] |
Tue, 22 January 2013 09:32 |
Frank Benoit Messages: 179 Registered: July 2009 |
Senior Member |
|
|
Hi Sopot,
thanks for the hints. So far I did insert the breakpoint and find that the application break at close.
The MWindowImpl.setMainMenu is called with null, and the workbench.xmi is written afterwards without the main menu element.
At that time, this is the call stack:
Thread [main] (Suspended (breakpoint at line 511 in WindowImpl))
TrimmedWindowImpl(WindowImpl).setMainMenu(MMenu) line: 511
WorkbenchWindow$1.handleEvent(Event) line: 286
UIEventHandler$1.run() line: 41
UISynchronizer(Synchronizer).syncExec(Runnable) line: 180
UISynchronizer.syncExec(Runnable) line: 150
Display.syncExec(Runnable) line: 4687
E4Application$1.syncExec(Runnable) line: 187
UIEventHandler.handleEvent(Event) line: 38
EventHandlerWrapper.handleEvent(Event, Permission) line: 197
EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197
EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1
EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230
ListenerQueue.dispatchEventSynchronous(int, Object) line: 148
EventAdminImpl.dispatchEvent(Event, boolean) line: 135
EventAdminImpl.sendEvent(Event) line: 78
EventComponent.sendEvent(Event) line: 39
EventBroker.send(String, Object) line: 81
UIEventPublisher.notifyChanged(Notification) line: 58
TrimmedWindowImpl(BasicNotifierImpl).eNotify(Notification) line: 374
TrimmedWindowImpl(UIElementImpl).setWidget(Object) line: 248
WBWRenderer(SWTPartRenderer).unbindWidget(MUIElement) line: 114
WBWRenderer(SWTPartRenderer).disposeWidget(MUIElement) line: 135
PartRenderingEngine.safeRemoveGui(MUIElement) line: 847
PartRenderingEngine.access$3(PartRenderingEngine, MUIElement) line: 775
PartRenderingEngine$8.run() line: 770
SafeRunner.run(ISafeRunnable) line: 42
PartRenderingEngine.removeGui(MUIElement) line: 755
PartRenderingEngine.stop() line: 1081
Workbench.busyClose(boolean) line: 1121
Workbench.access$16(Workbench, boolean) line: 1001
Workbench$17.run() line: 1182
BusyIndicator.showWhile(Display, Runnable) line: 70
Workbench.close(int, boolean) line: 1180
Workbench.close() line: 1153
WorkbenchWindow.busyClose(boolean) line: 1164
WorkbenchWindow.access$14(WorkbenchWindow, boolean) line: 1137
WorkbenchWindow$10.run() line: 1193
BusyIndicator.showWhile(Display, Runnable) line: 70
WorkbenchWindow.close(boolean) line: 1191
WorkbenchWindow.close() line: 1203
WorkbenchWindow$6.close(MWindow) line: 446
WBWRenderer$11.shellClosed(ShellEvent) line: 575
TypedListener.handleEvent(Event) line: 98
EventTable.sendEvent(Event) line: 84
Shell(Widget).sendEvent(Event) line: 1053
Shell(Widget).sendEvent(int, Event, boolean) line: 1077
Shell(Widget).sendEvent(int, Event) line: 1062
Shell(Decorations).closeWidget() line: 309
Shell(Decorations).WM_CLOSE(int, int) line: 1694
Shell(Control).windowProc(int, int, int, int) line: 4530
Shell(Canvas).windowProc(int, int, int, int) line: 341
Shell(Decorations).windowProc(int, int, int, int) line: 1627
Shell.windowProc(int, int, int, int) line: 2069
Display.windowProc(int, int, int, int) line: 4976
OS.DefWindowProcW(int, int, int, int) line: not available [native method]
OS.DefWindowProc(int, int, int, int) line: 2541
Shell.callWindowProc(int, int, int, int) line: 498
Shell(Control).windowProc(int, int, int, int) line: 4623
Shell(Canvas).windowProc(int, int, int, int) line: 341
Shell(Decorations).windowProc(int, int, int, int) line: 1627
Shell.windowProc(int, int, int, int) line: 2069
Display.windowProc(int, int, int, int) line: 4976
OS.DefWindowProcW(int, int, int, int) line: not available [native method]
OS.DefWindowProc(int, int, int, int) line: 2541
Shell.callWindowProc(int, int, int, int) line: 498
Shell(Control).windowProc(int, int, int, int) line: 4623
Shell(Canvas).windowProc(int, int, int, int) line: 341
Shell(Decorations).windowProc(int, int, int, int) line: 1627
Shell.windowProc(int, int, int, int) line: 2069
Display.windowProc(int, int, int, int) line: 4976
OS.DispatchMessageW(MSG) line: not available [native method]
OS.DispatchMessage(MSG) line: 2546
Display.readAndDispatch() line: 3756
PartRenderingEngine$9.run() line: 1029
Realm.runWithDefault(Realm, Runnable) line: 332
PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 923
E4Workbench.createAndRunUI(MApplicationElement) line: 86
Workbench$5.run() line: 588
Realm.runWithDefault(Realm, Runnable) line: 332
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 543
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
Application.start(IApplicationContext) line: 48
EclipseAppHandle.run(Object) line: 196
EclipseAppLauncher.runApplication(Object) line: 110
EclipseAppLauncher.start(Object) line: 79
EclipseStarter.run(Object) line: 353
EclipseStarter.run(String[], Runnable) line: 180
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 629
Main.basicRun(String[]) line: 584
Main.run(String[]) line: 1438
Main.main(String[]) line: 1414
The direct calling code in WorkbenchWindow$1.handleEvent(Event) line: 286 looks like this:
MMenu menu = model.getMainMenu();
if (menu != null) {
engine.removeGui(menu);
model.setMainMenu(null);
}
In the debugger, I changed the passed argument (null) to have the value of the existing menu. The result is a workbench.xmi which contains the main menu.
Any further hint how I can make the workbench not to remove the main menu.
Frank
|
|
| | | | | |
Goto Forum:
Current Time: Mon Sep 23 08:14:52 GMT 2024
Powered by FUDForum. Page generated in 0.04499 seconds
|