Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317825

Summary: Riena throws ApplicationModelFailure when disposing nodes without viewId or workaredefinition
Product: [RT] Riena Reporter: Christian Campo <christian.campo>
Component: UIAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.campo, steffen.kriese
Version: unspecified   
Target Milestone: 3.0.0   
Hardware: All   
OS: All   
Whiteboard:

Description Christian Campo CLA 2010-06-24 10:10:44 EDT
In a demo application I did not enter values for all nodes of submodules. That worked fine, since I never activated these views. When I close the application an exception is thrown, because the system wants to hide the views and creates the views even though they were never activated and therefore created....

The code that does this is this one:

SubApplicationView:

		@Override
		public void disposed(final ISubModuleNode source) {
			// not selectable SubModules dont't have an associated view and therefore no view has to be hidden
			if (source.isSelectable()) {
				final SwtViewId id = getViewId(source);
				hideView(id);
				final SwtViewProvider viewProvider = SwtViewProvider.getInstance();
				viewProvider.unregisterSwtViewId(source);
			}
		}

The Subapplication is called to dispose all SubModuleNode. The method getViewId(source) resolves the viewId and will actually create the view it may never have been activated. It also fails if there is no such view Id for a specific node is defined in the assembly for Rapid Prototyping.

The exception is this:
org.eclipse.riena.navigation.ApplicationModelFailure: viewId is null for nodeId NavNodeId:riena.demo.Addressescommunication.submodule[null]
	at org.eclipse.riena.navigation.ui.swt.presentation.SwtViewProvider.getViewId(SwtViewProvider.java:132)
	at org.eclipse.riena.navigation.ui.swt.presentation.SwtViewProvider.createAndRegisterSwtViewId(SwtViewProvider.java:91)
	at org.eclipse.riena.navigation.ui.swt.presentation.SwtViewProvider.getSwtViewId(SwtViewProvider.java:62)
	at org.eclipse.riena.navigation.ui.swt.views.SubApplicationView$MySubModuleNodeListener.getViewId(SubApplicationView.java:575)
	at org.eclipse.riena.navigation.ui.swt.views.SubApplicationView$MySubModuleNodeListener.disposed(SubApplicationView.java:530)
	at org.eclipse.riena.navigation.ui.swt.views.SubApplicationView$MySubModuleNodeListener.disposed(SubApplicationView.java:1)
	at org.eclipse.riena.navigation.listener.NavigationTreeObserver$MySubModuleNodeListener.disposed(NavigationTreeObserver.java:1294)
	at org.eclipse.riena.navigation.listener.NavigationTreeObserver$MySubModuleNodeListener.disposed(NavigationTreeObserver.java:1)
	at org.eclipse.riena.navigation.model.NavigationNode.notifyDisposed(NavigationNode.java:1012)
	at org.eclipse.riena.navigation.model.NavigationNode.dispose(NavigationNode.java:1044)
	at org.eclipse.riena.navigation.model.NavigationProcessor.dispose(NavigationProcessor.java:963)
	at org.eclipse.riena.navigation.model.NavigationProcessor.dispose(NavigationProcessor.java:195)
	at org.eclipse.riena.navigation.model.NavigationNode.dispose(NavigationNode.java:1006)
	at org.eclipse.riena.navigation.ui.swt.views.ApplicationAdvisor.preShutdown(ApplicationAdvisor.java:92)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1034)
	at org.eclipse.ui.internal.Workbench.access$15(Workbench.java:1031)
	at org.eclipse.ui.internal.Workbench$25.run(Workbench.java:1275)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1273)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1245)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:731)
	at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:710)
	at org.eclipse.ui.internal.WorkbenchWindow$5.run(WorkbenchWindow.java:826)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:824)
	at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:741)
	at org.eclipse.jface.window.Window$3.shellClosed(Window.java:687)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:308)
	at org.eclipse.swt.widgets.Shell.close(Shell.java:537)
	at org.eclipse.riena.ui.swt.AbstractTitleBarMouseListener.mouseUp(AbstractTitleBarMouseListener.java:237)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.riena.navigation.ui.swt.application.SwtApplication.createView(SwtApplication.java:63)
	at org.eclipse.riena.navigation.ui.application.AbstractApplication.start(AbstractApplication.java:64)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Nobody - feel free to take it CLA 2010-06-25 04:53:27 EDT
In contradiction to the former assumption views don“t get instantiated onDispose of SubModuleNodes.
But onDispose of Nodes we should catch ApplicationModelFailures.
Comment 2 Nobody - feel free to take it CLA 2010-06-25 04:54:13 EDT
ApplicationModuleFailures now get caught and logged onDispose.