summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-07-10 04:54:28 (EDT)
committerCarsten Drossel2008-07-10 04:54:28 (EDT)
commit26ba2d810c6f603f4c62d6c2192b499ca44def2b (patch)
tree80c67ec77f90be5093cf6c7409759099d7b7aaf0
parent66796ded3f8ea45f59c657735b61128642257b5a (diff)
downloadorg.eclipse.riena-26ba2d810c6f603f4c62d6c2192b499ca44def2b.zip
org.eclipse.riena-26ba2d810c6f603f4c62d6c2192b499ca44def2b.tar.gz
org.eclipse.riena-26ba2d810c6f603f4c62d6c2192b499ca44def2b.tar.bz2
navigation to some dummy nodes while the navigation node provider is not yet implemented
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodePresentationFactory.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodePresentationFactory.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodePresentationFactory.java
index 8af3a08..6916e63 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodePresentationFactory.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodePresentationFactory.java
@@ -12,9 +12,12 @@ package org.eclipse.riena.navigation.model;
import org.eclipse.riena.core.injector.Inject;
import org.eclipse.riena.internal.navigation.Activator;
+import org.eclipse.riena.navigation.IApplicationModel;
+import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodePresentationDefiniton;
import org.eclipse.riena.navigation.INavigationNodePresentationFactory;
+import org.eclipse.riena.navigation.ISubModuleNode;
/**
*
@@ -54,6 +57,20 @@ public class NavigationNodePresentationFactory implements INavigationNodePresent
// parentNode.addChild(targetNode);
// }
+ // TODO: ... und dann diese Dummy nodes entfernen:
+ if (targetNode == null) {
+ targetNode = new ModuleGroupNode("New Group");
+ IModuleNode module = new ModuleNode("New Module");
+ targetNode.addChild(module);
+ ISubModuleNode messageBoxSubModule = new SubModuleNode("New SubModule 1");
+ module.addChild(messageBoxSubModule);
+ ISubModuleNode messageMarkerSubModule = new SubModuleNode("New SubModule 2");
+ module.addChild(messageMarkerSubModule);
+ // add to app1
+ INavigationNode parentNode = sourceNode.getParentOfType(IApplicationModel.class).getChild(0);
+ parentNode.addChild(targetNode);
+ }
+
return targetNode;
}
@@ -83,6 +100,9 @@ public class NavigationNodePresentationFactory implements INavigationNodePresent
private INavigationNode<?> findNode(INavigationNode<?> node, String targetId) {
+ if (targetId == null) {
+ return null;
+ }
if (targetId.equals(node.getPresentationId())) {
return node;
}