summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-07-25 05:50:59 (EDT)
committerCarsten Drossel2008-07-25 05:50:59 (EDT)
commit3ae239be3a96b12644b039216f72cd4339532694 (patch)
tree7305d4ee20510d89a2ac5fc6fb4f03a21b977a8a
parent5e227692e1849f7f89062528d7192f82b7627ea9 (diff)
downloadorg.eclipse.riena-3ae239be3a96b12644b039216f72cd4339532694.zip
org.eclipse.riena-3ae239be3a96b12644b039216f72cd4339532694.tar.gz
org.eclipse.riena-3ae239be3a96b12644b039216f72cd4339532694.tar.bz2
changed Object... parameter of navigate to optional Object
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java12
-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/IPresentationProviderService.java2
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java13
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java13
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java8
6 files changed, 33 insertions, 17 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 ce97bd2..f5ee3fc 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
@@ -383,6 +383,16 @@ public interface INavigationNode<C extends INavigationNode<?>> extends ITypecast
* Refers to an extension point describing the target node.
* @see INavigationNodeProvider
*/
- void navigate(INavigationNodeId targetId, Object... arguments);
+ void navigate(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, Object argument);
}
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 4ff3bac..1ac4791 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
@@ -25,6 +25,6 @@ public interface INavigationProcessor {
void create(INavigationNode<?> sourceNode, INavigationNodeId targetId);
- void navigate(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object... arguments);
+ void navigate(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object argument);
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationProviderService.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationProviderService.java
index 2c219ec..7b5614c 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationProviderService.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationProviderService.java
@@ -30,7 +30,7 @@ public interface IPresentationProviderService {
* @return
*/
- INavigationNode<?> createNode(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object... arguments);
+ INavigationNode<?> createNode(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object argument);
/**
* Return an instance of a view
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 de13725..0465f46 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
@@ -785,11 +785,18 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
}
/**
+ * @see org.eclipse.riena.navigation.INavigationNode#navigate(org.eclipse.riena.navigation.INavigationNodeId)
+ */
+ public void navigate(INavigationNodeId targetId) {
+ navigate(targetId, null);
+ }
+
+ /**
* @see org.eclipse.riena.navigation.INavigationNode#navigate(org.eclipse.riena.navigation.INavigationNodeId,
- * java.lang.Object[])
+ * java.lang.Object)
*/
- public void navigate(INavigationNodeId targetId, Object... arguments) {
- getNavigationProcessor().navigate(this, targetId, arguments);
+ public void navigate(INavigationNodeId targetId, Object argument) {
+ getNavigationProcessor().navigate(this, targetId, argument);
}
/**
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 5d26df3..8eaec77 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
@@ -108,23 +108,22 @@ public class NavigationProcessor implements INavigationProcessor {
* org.eclipse.riena.navigation.INavigationNodeId)
*/
public void create(INavigationNode<?> sourceNode, INavigationNodeId targetId) {
- createTarget(sourceNode, targetId);
+ createTarget(sourceNode, targetId, null);
}
/**
* @see org.eclipse.riena.navigation.INavigationProcessor#navigate(org.eclipse.riena.navigation.INavigationNode,
- * org.eclipse.riena.navigation.INavigationNodeId, java.lang.Object[])
+ * org.eclipse.riena.navigation.INavigationNodeId, java.lang.Object)
*/
- public void navigate(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object... arguments) {
+ public void navigate(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object argument) {
- INavigationNode<?> targetNode = createTarget(sourceNode, targetId, arguments);
+ INavigationNode<?> targetNode = createTarget(sourceNode, targetId, argument);
targetNode.activate();
}
- private INavigationNode<?> createTarget(INavigationNode<?> sourceNode, INavigationNodeId targetId,
- Object... arguments) {
- INavigationNode<?> targetNode = getPresentationDefinitionService().createNode(sourceNode, targetId, arguments);
+ private INavigationNode<?> createTarget(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object argument) {
+ INavigationNode<?> targetNode = getPresentationDefinitionService().createNode(sourceNode, targetId, argument);
return targetNode;
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java
index 97d5989..5be3052 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java
@@ -58,19 +58,19 @@ public class PresentationProviderService implements IPresentationProviderService
/**
* @see org.eclipse.riena.navigation.IPresentationProviderService#createNode(org.eclipse.riena.navigation.INavigationNode,
- * org.eclipse.riena.navigation.INavigationNodeId, java.lang.Object[])
+ * org.eclipse.riena.navigation.INavigationNodeId, java.lang.Object)
*/
- public INavigationNode<?> createNode(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object... arguments) {
+ public INavigationNode<?> createNode(INavigationNode<?> sourceNode, INavigationNodeId targetId, Object argument) {
INavigationNode<?> targetNode = findNode(getRootNode(sourceNode), targetId);
if (targetNode == null) {
INavigationNodePresentationDefiniton presentationDefinition = getPresentationDefinitionNN(targetId);
if (presentationDefinition != null) {
INavigationNodeProvider builder = presentationDefinition.createNodeProvider();
- targetNode = builder.buildNode(targetId, arguments);
+ targetNode = builder.buildNode(targetId, argument);
INavigationNode parentNode = createNode(sourceNode, new NavigationNodeId(presentationDefinition
- .getParentPresentationId()));
+ .getParentPresentationId()), null);
parentNode.addChild(targetNode);
} else {
// TODO throw some new type of failure