summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-07-10 05:59:34 (EDT)
committerCarsten Drossel2008-07-10 05:59:34 (EDT)
commit83060b4f30cc460a3123db47ebcd082474799157 (patch)
tree2bc05bd2a34273145cb5fc5181475e309aaae8e3
parent26ba2d810c6f603f4c62d6c2192b499ca44def2b (diff)
downloadorg.eclipse.riena-83060b4f30cc460a3123db47ebcd082474799157.zip
org.eclipse.riena-83060b4f30cc460a3123db47ebcd082474799157.tar.gz
org.eclipse.riena-83060b4f30cc460a3123db47ebcd082474799157.tar.bz2
added buildNode-method to INavigationNodeProvider(Builder)
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeProvider.java2
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodePresentationFactory.java22
2 files changed, 17 insertions, 7 deletions
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeProvider.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeProvider.java
index c0cb511..2bc33a5 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeProvider.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeProvider.java
@@ -18,4 +18,6 @@ package org.eclipse.riena.navigation;
*/
public interface INavigationNodeProvider {
+ INavigationNode<?> buildNode();
+
}
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 6916e63..9ae711d 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
@@ -17,6 +17,7 @@ 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.INavigationNodeProvider;
import org.eclipse.riena.navigation.ISubModuleNode;
/**
@@ -59,15 +60,22 @@ public class NavigationNodePresentationFactory implements INavigationNodePresent
// 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);
+ INavigationNodeProvider nodeProvider = new INavigationNodeProvider() {
+ public INavigationNode<?> buildNode() {
+ INavigationNode node = new ModuleGroupNode("New Group");
+ IModuleNode module = new ModuleNode("New Module");
+ node.addChild(module);
+ ISubModuleNode messageBoxSubModule = new SubModuleNode("New SubModule 1");
+ module.addChild(messageBoxSubModule);
+ ISubModuleNode messageMarkerSubModule = new SubModuleNode("New SubModule 2");
+ module.addChild(messageMarkerSubModule);
+ return node;
+ }
+ };
// add to app1
INavigationNode parentNode = sourceNode.getParentOfType(IApplicationModel.class).getChild(0);
+
+ targetNode = nodeProvider.buildNode();
parentNode.addChild(targetNode);
}