summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-07-21 09:11:11 (EDT)
committerCarsten Drossel2008-07-21 09:11:11 (EDT)
commitb94520c62a336e6980316b9493620b9b0b8183fe (patch)
tree25c048eee0f3b1064806677232a1a83cf60f6277
parent5442fb4c91c5049bbd26e7f91fc476e5b0aa1ee5 (diff)
downloadorg.eclipse.riena-b94520c62a336e6980316b9493620b9b0b8183fe.zip
org.eclipse.riena-b94520c62a336e6980316b9493620b9b0b8183fe.tar.gz
org.eclipse.riena-b94520c62a336e6980316b9493620b9b0b8183fe.tar.bz2
added method create(INavigationNodeId) to INavigationNode to create a target without activating it
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java18
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationProcessor.java2
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java9
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java19
4 files changed, 44 insertions, 4 deletions
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java
index 15df296..2de2f95 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java
@@ -365,6 +365,24 @@ public interface INavigationNode<C extends INavigationNode<?>> extends ITypecast
INavigationNodeId getPresentationId();
+ /**
+ * Creates the specified navigation node and adds it to the application
+ * model it does not already exist.
+ *
+ * @param targetId
+ * Refers to an extension point describing the target node.
+ * @see INavigationNodeProvider
+ */
+ void create(INavigationNodeId targetId);
+
+ /**
+ * Creates the specified navigation node (if it does not already exist) and
+ * navigates to it.
+ *
+ * @param targetId
+ * Refers to an extension point describing the target node.
+ * @see INavigationNodeProvider
+ */
void navigate(INavigationNodeId targetId);
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationProcessor.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationProcessor.java
index 2207446..203f56b 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationProcessor.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationProcessor.java
@@ -23,6 +23,8 @@ public interface INavigationProcessor {
void dispose(INavigationNode<?> toDispose);
+ void create(INavigationNode<?> sourceNode, INavigationNodeId targetId);
+
void navigate(INavigationNode<?> sourceNode, INavigationNodeId targetId);
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java
index 35a4b2b..9cacd38 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java
@@ -778,7 +778,14 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
}
/**
- * @see org.eclipse.riena.navigation.INavigationNode#navigate(java.lang.String)
+ * @see org.eclipse.riena.navigation.INavigationNode#create(org.eclipse.riena.navigation.INavigationNodeId)
+ */
+ public void create(INavigationNodeId targetId) {
+ getNavigationProcessor().create(this, targetId);
+ }
+
+ /**
+ * @see org.eclipse.riena.navigation.INavigationNode#navigate(org.eclipse.riena.navigation.INavigationNodeId)
*/
public void navigate(INavigationNodeId targetId) {
getNavigationProcessor().navigate(this, targetId);
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java
index fbb6a7a..901b8b7 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java
@@ -104,16 +104,29 @@ public class NavigationProcessor implements INavigationProcessor {
}
/**
- * @see org.eclipse.riena.navigation.INavigationProcessor#navigate(org.eclipse
- * .riena.navigation.INavigationNode, java.lang.String)
+ * @see org.eclipse.riena.navigation.INavigationProcessor#create(org.eclipse.riena.navigation.INavigationNode,
+ * org.eclipse.riena.navigation.INavigationNodeId)
+ */
+ public void create(INavigationNode<?> sourceNode, INavigationNodeId targetId) {
+ createTarget(sourceNode, targetId);
+ }
+
+ /**
+ * @see org.eclipse.riena.navigation.INavigationProcessor#navigate(org.eclipse.riena.navigation.INavigationNode,
+ * org.eclipse.riena.navigation.INavigationNodeId)
*/
public void navigate(INavigationNode<?> sourceNode, INavigationNodeId targetId) {
- INavigationNode<?> targetNode = getPresentationDefinitionService().createNode(sourceNode, targetId);
+ INavigationNode<?> targetNode = createTarget(sourceNode, targetId);
targetNode.activate();
}
+ private INavigationNode<?> createTarget(INavigationNode<?> sourceNode, INavigationNodeId targetId) {
+ INavigationNode<?> targetNode = getPresentationDefinitionService().createNode(sourceNode, targetId);
+ return targetNode;
+ }
+
protected IPresentationProviderService getPresentationDefinitionService() {
// TODO: handling if no service found ???