summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-21 07:52:24 (EDT)
committerCarsten Drossel2008-08-21 07:52:24 (EDT)
commitf1939e4376c637d4c4202f2a6563be28bfdb1111 (patch)
tree0cda4686d2beeb19b62357ff7180009646b5e2dc
parent7d0f79a89ebb4ba7511242d2b8362a1812da95b8 (diff)
downloadorg.eclipse.riena-f1939e4376c637d4c4202f2a6563be28bfdb1111.zip
org.eclipse.riena-f1939e4376c637d4c4202f2a6563be28bfdb1111.tar.gz
org.eclipse.riena-f1939e4376c637d4c4202f2a6563be28bfdb1111.tar.bz2
using new findNode()-method of INavigationNode
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java23
1 files changed, 1 insertions, 22 deletions
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 b41f78c..91b4a09 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
@@ -67,7 +67,7 @@ public class PresentationProviderService implements IPresentationProviderService
@SuppressWarnings("unchecked")
public INavigationNode<?> provideNode(INavigationNode<?> sourceNode, INavigationNodeId targetId,
NavigationArgument argument) {
- INavigationNode<?> targetNode = findNode(getRootNode(sourceNode), targetId);
+ INavigationNode<?> targetNode = getRootNode(sourceNode).findNode(targetId);
if (targetNode == null) {
if (LOGGER.isLoggable(LogService.LOG_DEBUG)) {
LOGGER.log(LogService.LOG_DEBUG, "createNode: " + targetId);
@@ -151,27 +151,6 @@ public class PresentationProviderService implements IPresentationProviderService
}
/**
- * @param node
- * @param targetId
- * @return
- */
- protected INavigationNode<?> findNode(INavigationNode<?> node, INavigationNodeId targetId) {
- if (targetId == null) {
- return null;
- }
- if (targetId.equals(node.getNodeId())) {
- return node;
- }
- for (INavigationNode<?> child : node.getChildren()) {
- INavigationNode<?> foundNode = findNode(child, targetId);
- if (foundNode != null) {
- return foundNode;
- }
- }
- return null;
- }
-
- /**
* This is the basic SWT implementation from Riena. It returns the matching
* view id for the given navigationNodeId
*