summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-13 03:53:20 (EDT)
committerCarsten Drossel2008-08-13 03:53:20 (EDT)
commitc9081eef653eedc857e117566d8382a755f70810 (patch)
tree1622a2cb2ebc7b0b146da756ffb40a99dbe992fd
parenta7ffb48b4516c7647103b73b0da42a99e1cd058e (diff)
downloadorg.eclipse.riena-c9081eef653eedc857e117566d8382a755f70810.zip
org.eclipse.riena-c9081eef653eedc857e117566d8382a755f70810.tar.gz
org.eclipse.riena-c9081eef653eedc857e117566d8382a755f70810.tar.bz2
setting INavigationNodeId via NavigationNode constructor
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java12
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/CustomerDetailSubModuleController.java2
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java8
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java12
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java13
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java42
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java56
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java15
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java15
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java14
-rw-r--r--org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java10
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java3
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ApplicationModel.java36
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleGroupNode.java36
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleNode.java38
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java44
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubApplicationNode.java38
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubModuleNode.java36
-rw-r--r--org.eclipse.riena.sample.app.client.mail/src/org/eclipse/riena/sample/app/client/mail/Application.java10
-rw-r--r--org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/applications/HelloWorldApplication.java26
-rw-r--r--org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/controllers/CustomerSearchSubModuleController.java2
-rw-r--r--org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/views/CustomerSearchSubModuleView.java2
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ApplicationModelManagerTest.java18
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/NavigationProcessorTest.java18
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondModuleGroupNodeBuilder.java14
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondSubApplicationNodeBuilder.java4
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/controllers/ModuleControllerTest.java2
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManagerTest.java13
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/ApplicationViewAdvisorTest.java2
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java5
30 files changed, 248 insertions, 298 deletions
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java
index c144a50..c6f1b83 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java
@@ -13,7 +13,7 @@ package org.eclipse.riena.example.client.application;
import org.eclipse.riena.core.util.StringUtils;
import org.eclipse.riena.internal.example.client.Activator;
import org.eclipse.riena.navigation.IApplicationModel;
-import org.eclipse.riena.navigation.IModuleGroupNode;
+import org.eclipse.riena.navigation.ISubApplicationNode;
import org.eclipse.riena.navigation.model.ApplicationModel;
import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.navigation.model.SubApplicationNode;
@@ -68,13 +68,12 @@ public class SwtExampleApplication extends SwtApplication {
@Override
protected IApplicationModel createModel() {
- SubApplicationNode subApplication = null;
- IModuleGroupNode moduleGroup = null;
+ ISubApplicationNode subApplication = null;
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- final ApplicationModel applicationModel = new ApplicationModel("Riena Navigation Example"); //$NON-NLS-1$
- applicationModel.setPresentationId(new NavigationNodeId("application")); //$NON-NLS-1$
+ final IApplicationModel applicationModel = new ApplicationModel(
+ new NavigationNodeId("application"), "Riena Navigation Example"); //$NON-NLS-1$ //$NON-NLS-2$
applicationModel.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
// Navigation SubApplication
@@ -83,8 +82,7 @@ public class SwtExampleApplication extends SwtApplication {
applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.navigate")); //$NON-NLS-1$
// Playground SubApplication
- subApplication = new SubApplicationNode("Playground"); //$NON-NLS-1$
- subApplication.setPresentationId(new NavigationNodeId("playground")); //$NON-NLS-1$
+ subApplication = new SubApplicationNode(new NavigationNodeId("playground"), "Playground"); //$NON-NLS-1$ //$NON-NLS-2$
subApplication.setIcon(createIconPath(IExampleIcons.ICON_SAMPLE));
presentation.present(subApplication, "subapplication.2"); //$NON-NLS-1$
applicationModel.addChild(subApplication);
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/CustomerDetailSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/CustomerDetailSubModuleController.java
index 54dda5d..edcde14 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/CustomerDetailSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/CustomerDetailSubModuleController.java
@@ -33,7 +33,7 @@ public class CustomerDetailSubModuleController extends SubModuleController {
* @see org.eclipse.riena.ui.ridgets.IRidgetContainer#configureRidgets()
*/
public void configureRidgets() {
- ISubModuleNode newNode = new SubModuleNode("dynamically added node"); //$NON-NLS-1$
+ ISubModuleNode newNode = new SubModuleNode(null, "dynamically added node"); //$NON-NLS-1$
// TODO do it like swtExampleApplication ..
String iconPath = Activator.PLUGIN_ID.concat(":").concat(IExampleIcons.ICON_FILE); //$NON-NLS-1$
newNode.setIcon(iconPath);
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java
index 6d40ccd..f911ccb 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java
@@ -175,7 +175,7 @@ public class NavigationSubModuleController extends SubModuleController {
*/
private IModuleGroupNode createModuleGroupNode() {
- IModuleGroupNode newModuleGroupNode = new ModuleGroupNode("Added child Module Group to SubApplication"); //$NON-NLS-1$
+ IModuleGroupNode newModuleGroupNode = new ModuleGroupNode(null, "Added child Module Group to SubApplication"); //$NON-NLS-1$
IModuleNode newModuleNode = createModuleNode();
newModuleGroupNode.addChild(newModuleNode);
@@ -189,7 +189,7 @@ public class NavigationSubModuleController extends SubModuleController {
*/
private IModuleNode createModuleNode() {
- IModuleNode newModuleNode = new ModuleNode("Added child Module to Module Group"); //$NON-NLS-1$
+ IModuleNode newModuleNode = new ModuleNode(null, "Added child Module to Module Group"); //$NON-NLS-1$
ISubModuleNode newSubModuleNode = createSubModuleNode("Added child SubModule to Module"); //$NON-NLS-1$
newModuleNode.addChild(newSubModuleNode);
@@ -205,8 +205,8 @@ public class NavigationSubModuleController extends SubModuleController {
*/
private ISubModuleNode createSubModuleNode(String label) {
- SubModuleNode newSubModuleNode = new SubModuleNode(label);
- newSubModuleNode.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigation")); //$NON-NLS-1$
+ ISubModuleNode newSubModuleNode = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.navigation"), label); //$NON-NLS-1$
return newSubModuleNode;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java
index 1c5f210..f66996a 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java
@@ -11,6 +11,7 @@ import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -25,15 +26,12 @@ public class ComboAndListNodeBuilder implements INavigationNodeBuilder {
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode()
*/
public IModuleGroupNode buildNode(INavigationNodeId presentationId) {
- ModuleGroupNode node = new ModuleGroupNode("Combo&List"); //$NON-NLS-1$
- node.setPresentationId(presentationId);
- IModuleNode module = new ModuleNode("Combo&List"); //$NON-NLS-1$
+ IModuleGroupNode node = new ModuleGroupNode(presentationId, "Combo&List"); //$NON-NLS-1$
+ IModuleNode module = new ModuleNode(null, "Combo&List"); //$NON-NLS-1$
node.addChild(module);
- SubModuleNode subModule = new SubModuleNode("Combo"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.combo")); //$NON-NLS-1$
+ ISubModuleNode subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.combo"), "Combo"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
- subModule = new SubModuleNode("List"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.list")); //$NON-NLS-1$
+ subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.list"), "List"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
return node;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java
index f8463c9..bfcb7bf 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java
@@ -11,8 +11,11 @@
package org.eclipse.riena.example.client.navigation.model;
import org.eclipse.riena.example.client.application.IExampleIcons;
+import org.eclipse.riena.navigation.IModuleGroupNode;
+import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -26,14 +29,14 @@ public class NavigateNodeBuilder extends NavigationNodeBuilder {
/**
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
*/
- public INavigationNode<?> buildNode(INavigationNodeId INavigationNodeId) {
- ModuleGroupNode moduleGroup = new ModuleGroupNode("Navigate"); //$NON-NLS-1$
+ public INavigationNode<?> buildNode(INavigationNodeId nodeId) {
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(nodeId, "Navigate"); //$NON-NLS-1$
moduleGroup.setPresentWithSingleModule(false);
- ModuleNode module = new ModuleNode("Navigate"); //$NON-NLS-1$
+ IModuleNode module = new ModuleNode(null, "Navigate"); //$NON-NLS-1$
module.setIcon(createIconPath(IExampleIcons.ICON_GREEN_LED));
moduleGroup.addChild(module);
- SubModuleNode subModule = new SubModuleNode("Navigate"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigate.form")); //$NON-NLS-1$
+ ISubModuleNode subModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.navigate.form"), "Navigate"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
return moduleGroup;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
index 0bdb59e..049de60 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
@@ -15,6 +15,8 @@ import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubApplicationNode;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -31,52 +33,50 @@ public class NavigationSubApplicationNodeBuilder extends NavigationNodeBuilder {
public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- SubApplicationNode subApplication = new SubApplicationNode("Navigation"); //$NON-NLS-1$
- subApplication.setPresentationId(navigationNodeId);
+ ISubApplicationNode subApplication = new SubApplicationNode(navigationNodeId, "Navigation"); //$NON-NLS-1$
subApplication.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
presentation.present(subApplication, "subapplication.1"); //$NON-NLS-1$
subApplication.setSelected(true);
- IModuleGroupNode moduleGroup = new ModuleGroupNode("Group 1.1"); //$NON-NLS-1$
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(null, "Group 1.1"); //$NON-NLS-1$
subApplication.addChild(moduleGroup);
- IModuleNode module = new ModuleNode("Module 1.1.1"); //$NON-NLS-1$
+ IModuleNode module = new ModuleNode(null, "Module 1.1.1"); //$NON-NLS-1$
module.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
moduleGroup.addChild(module);
- SubModuleNode subModule = new SubModuleNode("SubModule 1.1.1.1"); //$NON-NLS-1$
+ ISubModuleNode subModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.customerDetail"), "SubModule 1.1.1.1"); //$NON-NLS-1$ //$NON-NLS-2$
subModule.setIcon(createIconPath(IExampleIcons.ICON_FILE));
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
module.addChild(subModule);
- SubModuleNode subModule2 = new SubModuleNode("SubModule 1.1.1.1"); //$NON-NLS-1$
- subModule2.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ ISubModuleNode subModule2 = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.customerDetail"), "SubModule 1.1.1.1"); //$NON-NLS-1$ //$NON-NLS-2$
subModule.addChild(subModule2);
- subModule = new SubModuleNode("SubModule 1.1.1.2"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ subModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.customerDetail"), "SubModule 1.1.1.2"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
- module = new ModuleNode("Module 1.1.2 (closeable)"); //$NON-NLS-1$
+ module = new ModuleNode(null, "Module 1.1.2 (closeable)"); //$NON-NLS-1$
module.setIcon(createIconPath(IExampleIcons.ICON_HOMEFOLDER));
moduleGroup.addChild(module);
- subModule = new SubModuleNode("SubModule 1.1.2.1"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ subModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.customerDetail"), "SubModule 1.1.2.1"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
/* NEW */
- subModule = new SubModuleNode("Navigation"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigation")); //$NON-NLS-1$
+ subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.navigation"), "Navigation"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
- moduleGroup = new ModuleGroupNode("Group 1.2"); //$NON-NLS-1$
+ moduleGroup = new ModuleGroupNode(null, "Group 1.2"); //$NON-NLS-1$
moduleGroup.setPresentWithSingleModule(false);
subApplication.addChild(moduleGroup);
- module = new ModuleNode("Module 1.2.1 (not closeable)"); //$NON-NLS-1$
+ module = new ModuleNode(null, "Module 1.2.1 (not closeable)"); //$NON-NLS-1$
module.setCloseable(false);
module.setIcon(createIconPath(IExampleIcons.ICON_RED_LED));
moduleGroup.addChild(module);
- subModule = new SubModuleNode("SubModule 1.2.1.1"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ subModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.customerDetail"), "SubModule 1.2.1.1"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
- subModule = new SubModuleNode("SubModule 1.2.1.2"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ subModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.customerDetail"), "SubModule 1.2.1.2"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
return subApplication;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java
index 1b8f46a..e5b4052 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java
@@ -10,10 +10,12 @@
*******************************************************************************/
package org.eclipse.riena.example.client.navigation.model;
+import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -29,62 +31,58 @@ public class PlaygroundNodeBuilder implements INavigationNodeBuilder {
*/
public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
- ModuleGroupNode moduleGroup = new ModuleGroupNode("Playground"); //$NON-NLS-1$
- moduleGroup.setPresentationId(navigationNodeId);
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(navigationNodeId, "Playground"); //$NON-NLS-1$
- IModuleNode playgroundModule = new ModuleNode("Playground"); //$NON-NLS-1$
+ IModuleNode playgroundModule = new ModuleNode(null, "Playground"); //$NON-NLS-1$
moduleGroup.addChild(playgroundModule);
- SubModuleNode buttonsSubModule = new SubModuleNode("Buttons"); //$NON-NLS-1$
- buttonsSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.buttons")); //$NON-NLS-1$
+ ISubModuleNode buttonsSubModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.buttons"), "Buttons"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(buttonsSubModule);
- SubModuleNode choiceSubModule = new SubModuleNode("Choice"); //$NON-NLS-1$
- choiceSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.choice")); //$NON-NLS-1$
+ ISubModuleNode choiceSubModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.choice"), "Choice"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(choiceSubModule);
- SubModuleNode comboSubModule = new SubModuleNode("Combo"); //$NON-NLS-1$
- comboSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.combo")); //$NON-NLS-1$
+ ISubModuleNode comboSubModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.combo"), "Combo"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(comboSubModule);
- SubModuleNode listSubModule = new SubModuleNode("List"); //$NON-NLS-1$
- listSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.list")); //$NON-NLS-1$
+ ISubModuleNode listSubModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.list"), "List"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(listSubModule);
- SubModuleNode textSubModule = new SubModuleNode("Text"); //$NON-NLS-1$
- textSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.text")); //$NON-NLS-1$
+ ISubModuleNode textSubModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.text"), "Text"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(textSubModule);
- SubModuleNode markerSubModule = new SubModuleNode("Marker"); //$NON-NLS-1$
- markerSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.marker")); //$NON-NLS-1$
+ ISubModuleNode markerSubModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.marker"), "Marker"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(markerSubModule);
- SubModuleNode focusableSubModule = new SubModuleNode("Focusable"); //$NON-NLS-1$
- focusableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.focusable")); //$NON-NLS-1$
+ ISubModuleNode focusableSubModule = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.focusable"), "Focusable"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(focusableSubModule);
- SubModuleNode validationSubModule = new SubModuleNode("Validation"); //$NON-NLS-1$
- validationSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.validation")); //$NON-NLS-1$
+ ISubModuleNode validationSubModule = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.validation"), "Validation"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(validationSubModule);
- SubModuleNode treeSubModule = new SubModuleNode("Tree"); //$NON-NLS-1$
- treeSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.tree")); //$NON-NLS-1$
+ ISubModuleNode treeSubModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.tree"), "Tree"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(treeSubModule);
- SubModuleNode treeTableSubModule = new SubModuleNode("Tree Table"); //$NON-NLS-1$
- treeTableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.treeTable")); //$NON-NLS-1$
+ ISubModuleNode treeTableSubModule = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.treeTable"), "Tree Table"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(treeTableSubModule);
- SubModuleNode tableSubModule = new SubModuleNode("Table"); //$NON-NLS-1$
- tableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.table")); //$NON-NLS-1$
+ ISubModuleNode tableSubModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.table"), "Table"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(tableSubModule);
- SubModuleNode systemPropertiesSubModule = new SubModuleNode("System Properties"); //$NON-NLS-1$
- systemPropertiesSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.systemProperties")); //$NON-NLS-1$
+ ISubModuleNode systemPropertiesSubModule = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.systemProperties"), "System Properties"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(systemPropertiesSubModule);
- SubModuleNode statusLineSubModule = new SubModuleNode("Statusline"); //$NON-NLS-1$
- statusLineSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.statusLine")); //$NON-NLS-1$
+ ISubModuleNode statusLineSubModule = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.statusLine"), "Statusline"); //$NON-NLS-1$ //$NON-NLS-2$
playgroundModule.addChild(statusLineSubModule);
return moduleGroup;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java
index 9e71abf..5e6b1b5 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java
@@ -11,9 +11,11 @@
package org.eclipse.riena.example.client.navigation.model;
import org.eclipse.riena.example.client.application.IExampleIcons;
+import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -25,19 +27,18 @@ public class SharedViewsNodeBuilder extends NavigationNodeBuilder {
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
*/
public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
- ModuleGroupNode moduleGroup = new ModuleGroupNode("Shared View Demo"); //$NON-NLS-1$
- moduleGroup.setPresentationId(navigationNodeId);
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(navigationNodeId, "Shared View Demo"); //$NON-NLS-1$
- IModuleNode sharedViewModule = new ModuleNode("Shared View Demo"); //$NON-NLS-1$
+ IModuleNode sharedViewModule = new ModuleNode(null, "Shared View Demo"); //$NON-NLS-1$
sharedViewModule.setIcon(createIconPath(IExampleIcons.ICON_SAMPLE));
moduleGroup.addChild(sharedViewModule);
- SubModuleNode sharedViewSm1 = new SubModuleNode("Node 1"); //$NON-NLS-1$
- sharedViewSm1.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.sharedView")); //$NON-NLS-1$
+ ISubModuleNode sharedViewSm1 = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.sharedView", "1"), "Node 1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
sharedViewModule.addChild(sharedViewSm1);
- SubModuleNode sharedViewSm2 = new SubModuleNode("Node 2"); //$NON-NLS-1$
- sharedViewSm2.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.sharedView")); //$NON-NLS-1$
+ ISubModuleNode sharedViewSm2 = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.example.sharedView", "2"), "Node 2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
sharedViewModule.addChild(sharedViewSm2);
return moduleGroup;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java
index a306b8c..4093940 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java
@@ -11,6 +11,7 @@ import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -25,18 +26,14 @@ public class TableTextAndTreeNodeBuilder implements INavigationNodeBuilder {
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode()
*/
public IModuleGroupNode buildNode(INavigationNodeId presentationId) {
- ModuleGroupNode node = new ModuleGroupNode("Table,Text&Tree"); //$NON-NLS-1$
- node.setPresentationId(presentationId);
- IModuleNode module = new ModuleNode("Table,Text&Tree"); //$NON-NLS-1$
+ IModuleGroupNode node = new ModuleGroupNode(presentationId, "Table,Text&Tree"); //$NON-NLS-1$
+ IModuleNode module = new ModuleNode(null, "Table,Text&Tree"); //$NON-NLS-1$
node.addChild(module);
- SubModuleNode subModule = new SubModuleNode("Table"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.table")); //$NON-NLS-1$
+ ISubModuleNode subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.table"), "Table"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
- subModule = new SubModuleNode("Text"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.text")); //$NON-NLS-1$
+ subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.text"), "Text"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
- subModule = new SubModuleNode("Tree"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.tree")); //$NON-NLS-1$
+ subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.tree"), "Tree"); //$NON-NLS-1$ //$NON-NLS-2$
module.addChild(subModule);
return node;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java
index c4b1551..783da4f 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java
@@ -10,10 +10,12 @@
*******************************************************************************/
package org.eclipse.riena.example.client.navigation.model;
+import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
@@ -28,18 +30,16 @@ public class UIProcessNodeBuilder implements INavigationNodeBuilder {
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
*/
public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
- ModuleGroupNode moduleGroup = new ModuleGroupNode("UIProcess"); //$NON-NLS-1$
- moduleGroup.setPresentationId(navigationNodeId);
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(navigationNodeId, "UIProcess"); //$NON-NLS-1$
- IModuleNode uiProcessModule = new ModuleNode("UIProcess"); //$NON-NLS-1$
+ IModuleNode uiProcessModule = new ModuleNode(null, "UIProcess"); //$NON-NLS-1$
moduleGroup.addChild(uiProcessModule);
- SubModuleNode uiPSubModule = new SubModuleNode("Demo1"); //$NON-NLS-1$
- uiPSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.uiProcess")); //$NON-NLS-1$
+ ISubModuleNode uiPSubModule = new SubModuleNode(
+ new NavigationNodeId("org.eclipse.riena.example.uiProcess"), "Demo1"); //$NON-NLS-1$ //$NON-NLS-2$
uiProcessModule.addChild(uiPSubModule);
- uiPSubModule = new SubModuleNode("Demo2"); //$NON-NLS-1$
- uiPSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.uiProcess")); //$NON-NLS-1$
+ uiPSubModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.example.uiProcess"), "Demo2"); //$NON-NLS-1$ //$NON-NLS-2$
uiProcessModule.addChild(uiPSubModule);
return moduleGroup;
}
diff --git a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java
index 133b700..1346f47 100644
--- a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java
+++ b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.riena.navigation.ui.application;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.riena.internal.navigation.ui.uiprocess.visualizer.VisualizerFactory;
import org.eclipse.riena.navigation.ApplicationModelManager;
import org.eclipse.riena.navigation.IApplicationModel;
@@ -23,10 +26,6 @@ import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.ui.core.resource.IIconManager;
import org.eclipse.riena.ui.core.uiprocess.ProgressProviderBridge;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
/**
* Abstract application defining the basic structure of a Riena application
*/
@@ -53,8 +52,7 @@ public abstract class AbstractApplication implements IApplication {
* model
*/
protected IApplicationModel createModel() {
- ApplicationModel applicationModel = new ApplicationModel();
- applicationModel.setPresentationId(new NavigationNodeId("application")); //$NON-NLS-1$
+ IApplicationModel applicationModel = new ApplicationModel(new NavigationNodeId("application"));
return applicationModel;
}
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 7839f16..e444906 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
@@ -381,6 +381,8 @@ public interface INavigationNode<C extends INavigationNode<?>> extends ITypecast
INavigationNodeId getNodeId();
+ void setNodeId(INavigationNodeId nodeId);
+
/**
* Creates the specified navigation node and adds it to the application
* model it does not already exist.
@@ -417,5 +419,4 @@ public interface INavigationNode<C extends INavigationNode<?>> extends ITypecast
*/
void navigateBack();
- void setPresentationId(INavigationNodeId id);
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ApplicationModel.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ApplicationModel.java
index 2ddf30e..106391a 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ApplicationModel.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ApplicationModel.java
@@ -12,6 +12,7 @@ package org.eclipse.riena.navigation.model;
import org.eclipse.riena.navigation.IApplicationModel;
import org.eclipse.riena.navigation.INavigationHistoryListener;
+import org.eclipse.riena.navigation.INavigationNodeId;
import org.eclipse.riena.navigation.ISubApplicationNode;
import org.eclipse.riena.navigation.listener.IApplicationModelListener;
@@ -22,35 +23,28 @@ public class ApplicationModel extends NavigationNode<IApplicationModel, ISubAppl
implements IApplicationModel {
/**
+ * Creates an ApplicationModel node which is the root of an application
+ * model tree.
*
+ * @param nodeId
+ * Identifies the node in the application model tree.
*/
- public ApplicationModel() {
- super();
- initializeNavigationProcessor();
- }
-
- /**
- * @param children
- */
- public ApplicationModel(ISubApplicationNode... children) {
- super(children);
- initializeNavigationProcessor();
- }
-
- /**
- * @param label
- * @param children
- */
- public ApplicationModel(String label, ISubApplicationNode... children) {
- super(label, children);
+ public ApplicationModel(INavigationNodeId nodeId) {
+ super(nodeId);
initializeNavigationProcessor();
}
/**
+ * Creates an ApplicationModel node which is the root of an application
+ * model tree.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
* @param label
+ * Label of the application displayed in the title bar.
*/
- public ApplicationModel(String label) {
- super(label);
+ public ApplicationModel(INavigationNodeId nodeId, String label) {
+ super(nodeId, label);
initializeNavigationProcessor();
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleGroupNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleGroupNode.java
index 475e811..096b030 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleGroupNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleGroupNode.java
@@ -12,42 +12,38 @@ package org.eclipse.riena.navigation.model;
import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
+import org.eclipse.riena.navigation.INavigationNodeId;
import org.eclipse.riena.navigation.listener.IModuleGroupNodeListener;
/**
* Default implementation for the module group node
*/
-public class ModuleGroupNode extends NavigationNode<IModuleGroupNode, IModuleNode, IModuleGroupNodeListener> implements IModuleGroupNode {
+public class ModuleGroupNode extends NavigationNode<IModuleGroupNode, IModuleNode, IModuleGroupNodeListener> implements
+ IModuleGroupNode {
private boolean presentWithSingleModule;
/**
+ * Creates a ModuleGroupNode.
*
+ * @param nodeId
+ * Identifies the node in the application model tree.
*/
- public ModuleGroupNode() {
- super();
- }
-
- /**
- * @param children
- */
- public ModuleGroupNode(IModuleNode... children) {
- super(children);
- }
-
- /**
- * @param label
- * @param children
- */
- public ModuleGroupNode(String label, IModuleNode... children) {
- super(label, children);
+ public ModuleGroupNode(INavigationNodeId nodeId) {
+ super(nodeId);
}
/**
+ * Creates a ModuleGroupNode.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
* @param label
+ * Label of the module group (not displayed). TODO remove this
+ * constructor.
*/
- public ModuleGroupNode(String label) {
- super(label);
+ public ModuleGroupNode(INavigationNodeId nodeId, String label) {
+ super(nodeId, label);
}
public boolean isPresentWithSingleModule() {
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleNode.java
index 3a207e3..d35723c 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/ModuleNode.java
@@ -12,6 +12,7 @@ package org.eclipse.riena.navigation.model;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
+import org.eclipse.riena.navigation.INavigationNodeId;
import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.listener.IModuleNodeListener;
@@ -24,35 +25,26 @@ public class ModuleNode extends NavigationNode<IModuleNode, ISubModuleNode, IMod
private boolean closeable;
/**
+ * Creates a ModuleNode.
*
+ * @param nodeId
+ * Identifies the node in the application model tree.
*/
- public ModuleNode() {
- super();
- initialize();
- }
-
- /**
- * @param children
- */
- public ModuleNode(ISubModuleNode... children) {
- super(children);
- initialize();
- }
-
- /**
- * @param label
- * @param children
- */
- public ModuleNode(String label, ISubModuleNode... children) {
- super(label, children);
+ public ModuleNode(INavigationNodeId nodeId) {
+ super(nodeId);
initialize();
}
/**
+ * Creates a ModuleNode.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
* @param label
+ * Label of the module displayed in the modules title bar.
*/
- public ModuleNode(String label) {
- super(label);
+ public ModuleNode(INavigationNodeId nodeId, String label) {
+ super(nodeId, label);
initialize();
}
@@ -113,8 +105,8 @@ public class ModuleNode extends NavigationNode<IModuleNode, ISubModuleNode, IMod
* Calculates the number of the visible and expanded children below the
* given node.
*
- * @param node -
- * start node
+ * @param node
+ * - start node
* @return number of children
*/
private int calcDepth(INavigationNode<?> node) {
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 0f051e8..ca73b16 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
@@ -66,10 +66,14 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
private PropertyChangeSupport propertyChangeSupport;
/**
- * Create a new instance with empty children list
+ * Creates a NavigationNode.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
*/
- public NavigationNode() {
+ public NavigationNode(INavigationNodeId nodeId) {
super();
+ setNodeId(nodeId);
listeners = new LinkedList<L>();
propertyChangeSupport = new PropertyChangeSupport(this);
@@ -83,33 +87,18 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
}
/**
- * Create a new instance with empty children list
+ * Creates a NavigationNode.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
+ * @param pLabel
+ * The label of the node.
*/
- public NavigationNode(String pLabel) {
- this();
+ public NavigationNode(INavigationNodeId nodeId, String pLabel) {
+ this(nodeId);
setLabel(pLabel);
}
- /**
- * Create a new instance an initialize the list
- */
- public NavigationNode(C... pChildren) {
- this();
- for (C next : pChildren) {
- addChild(next);
- }
- }
-
- /**
- * Create a new instance an initialize the list
- */
- public NavigationNode(String pLabel, C... pChildren) {
- this(pLabel);
- for (C next : pChildren) {
- addChild(next);
- }
- }
-
public void setPresentation(IPresentation pPresentation) {
presentation = pPresentation;
notifyPresentationChanged();
@@ -934,7 +923,7 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
* @see org.eclipse.riena.navigation.INavigationHistory#historyPrev()
*/
public void historyForward() {
- if (getNavigationProcessor() != null)
+ if (getNavigationProcessor() != null)
getNavigationProcessor().historyForward();
}
@@ -945,8 +934,7 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
return nodeId;
}
- public void setPresentationId(INavigationNodeId nodeId) {
- // TODO set via constructor, remove setter
+ public void setNodeId(INavigationNodeId nodeId) {
this.nodeId = nodeId;
}
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubApplicationNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubApplicationNode.java
index 6823108..8389a1f 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubApplicationNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubApplicationNode.java
@@ -11,42 +11,38 @@
package org.eclipse.riena.navigation.model;
import org.eclipse.riena.navigation.IModuleGroupNode;
+import org.eclipse.riena.navigation.INavigationNodeId;
import org.eclipse.riena.navigation.ISubApplicationNode;
import org.eclipse.riena.navigation.listener.ISubApplicationNodeListener;
/**
* Default implementation for the sub application
*/
-public class SubApplicationNode extends NavigationNode<ISubApplicationNode, IModuleGroupNode, ISubApplicationNodeListener>
- implements ISubApplicationNode {
+public class SubApplicationNode extends
+ NavigationNode<ISubApplicationNode, IModuleGroupNode, ISubApplicationNodeListener> implements
+ ISubApplicationNode {
/**
+ * Creates a SubApplicationNode
*
+ * @param nodeId
+ * Identifies the node in the application model tree.
*/
- public SubApplicationNode() {
- super();
- }
-
- /**
- * @param children
- */
- public SubApplicationNode(IModuleGroupNode... children) {
- super(children);
- }
-
- /**
- * @param label
- * @param children
- */
- public SubApplicationNode(String label, IModuleGroupNode... children) {
- super(label, children);
+ public SubApplicationNode(INavigationNodeId nodeId) {
+ super(nodeId);
}
/**
+ * Creates a SubApplicationNode.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
* @param label
+ * Label of the sub application displayed on the sub applications
+ * tab.
*/
- public SubApplicationNode(String label) {
- super(label);
+ public SubApplicationNode(INavigationNodeId nodeId, String label) {
+ super(nodeId, label);
}
@Override
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubModuleNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubModuleNode.java
index db4f447..69cf4a9 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubModuleNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/SubModuleNode.java
@@ -10,41 +10,37 @@
*******************************************************************************/
package org.eclipse.riena.navigation.model;
+import org.eclipse.riena.navigation.INavigationNodeId;
import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.listener.ISubModuleNodeListener;
/**
* Default implementation for the sub module node
*/
-public class SubModuleNode extends NavigationNode<ISubModuleNode, ISubModuleNode, ISubModuleNodeListener> implements ISubModuleNode {
+public class SubModuleNode extends NavigationNode<ISubModuleNode, ISubModuleNode, ISubModuleNodeListener> implements
+ ISubModuleNode {
/**
+ * Creates a SubModuleNode.
*
+ * @param nodeId
+ * Identifies the node in the application model tree.
*/
- public SubModuleNode() {
- super();
- }
-
- /**
- * @param children
- */
- public SubModuleNode(ISubModuleNode... children) {
- super(children);
- }
-
- /**
- * @param label
- * @param children
- */
- public SubModuleNode(String label, ISubModuleNode... children) {
- super(label, children);
+ public SubModuleNode(INavigationNodeId nodeId) {
+ super(nodeId);
}
/**
+ * Creates a SubModuleNode.
+ *
+ * @param nodeId
+ * Identifies the node in the application model tree.
* @param label
+ * Label of the sub module displayed in the sub modules title
+ * bar.
*/
- public SubModuleNode(String label) {
- super(label);
+ public SubModuleNode(INavigationNodeId nodeId, String label) {
+ super(nodeId, label);
}
}
diff --git a/org.eclipse.riena.sample.app.client.mail/src/org/eclipse/riena/sample/app/client/mail/Application.java b/org.eclipse.riena.sample.app.client.mail/src/org/eclipse/riena/sample/app/client/mail/Application.java
index f02b784..5d9a0e7 100644
--- a/org.eclipse.riena.sample.app.client.mail/src/org/eclipse/riena/sample/app/client/mail/Application.java
+++ b/org.eclipse.riena.sample.app.client.mail/src/org/eclipse/riena/sample/app/client/mail/Application.java
@@ -24,13 +24,13 @@ public class Application extends SwtApplication {
protected IApplicationModel createModel() {
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- ApplicationModel app = new ApplicationModel("Riena Mail");
+ ApplicationModel app = new ApplicationModel(null, "Riena Mail");
- ISubApplicationNode subApp = new SubApplicationNode("Your Mail");
+ ISubApplicationNode subApp = new SubApplicationNode(null, "Your Mail");
app.addChild(subApp);
presentation.present(subApp, "rcp.mail.perspective");
- IModuleGroupNode groupMailboxes = new ModuleGroupNode("Mailboxes");
+ IModuleGroupNode groupMailboxes = new ModuleGroupNode(null, "Mailboxes");
subApp.addChild(groupMailboxes);
IModuleNode moduleAccount1 = createModule("me@this.com", groupMailboxes);
@@ -47,7 +47,7 @@ public class Application extends SwtApplication {
private IModuleNode createModule(String caption,
IModuleGroupNode parent) {
- IModuleNode module = new ModuleNode(caption);
+ IModuleNode module = new ModuleNode(null, caption);
parent.addChild(module);
return module;
}
@@ -55,7 +55,7 @@ public class Application extends SwtApplication {
private ISubModuleNode createSubMobule(String caption,
IModuleNode parent,
String viewId) {
- ISubModuleNode subModule = new SubModuleNode(caption);
+ ISubModuleNode subModule = new SubModuleNode(null, caption);
parent.addChild(subModule);
SwtPresentationManagerAccessor.getManager().present(subModule, viewId);
return subModule;
diff --git a/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/applications/HelloWorldApplication.java b/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/applications/HelloWorldApplication.java
index b9e9c2f..3cfc592 100644
--- a/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/applications/HelloWorldApplication.java
+++ b/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/applications/HelloWorldApplication.java
@@ -49,49 +49,49 @@ public class HelloWorldApplication extends SwtApplication {
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- application = new ApplicationModel("Hello World Application");
- ISubApplicationNode subApplication = new SubApplicationNode("Riena Samples");
+ application = new ApplicationModel(null, "Hello World Application");
+ ISubApplicationNode subApplication = new SubApplicationNode(null, "Riena Samples");
presentation.present(subApplication, "helloWorldSubApplication");
application.addChild(subApplication);
- IModuleGroupNode moduleGroup = new ModuleGroupNode("ModuleGroup 1");
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(null, "ModuleGroup 1");
subApplication.addChild(moduleGroup);
// simple hello world
- IModuleNode helloWorldModule = new ModuleNode("Hello World");
+ IModuleNode helloWorldModule = new ModuleNode(null, "Hello World");
moduleGroup.addChild(helloWorldModule);
- ISubModuleNode helloWorldSubModule = new SubModuleNode("Hello World");
+ ISubModuleNode helloWorldSubModule = new SubModuleNode(null, "Hello World");
presentation.registerView(HelloWorldSubModuleView.ID, false);
presentation.present(helloWorldSubModule, HelloWorldSubModuleView.ID);
helloWorldModule.addChild(helloWorldSubModule);
// hello server
presentation.registerView(HelloServerSubModuleView.ID, false);
- IModuleNode helloServerModule = new ModuleNode("Hello Server");
+ IModuleNode helloServerModule = new ModuleNode(null, "Hello Server");
moduleGroup.addChild(helloServerModule);
- ISubModuleNode helloServerSubModule = new SubModuleNode("Hello Server");
+ ISubModuleNode helloServerSubModule = new SubModuleNode(null, "Hello Server");
presentation.present(helloServerSubModule, HelloServerSubModuleView.ID);
helloServerModule.addChild(helloServerSubModule);
// customer search sample
presentation.registerView(CustomerSearchSubModuleView.ID, false);
- IModuleNode cSearchModule = new ModuleNode("Customer Search");
+ IModuleNode cSearchModule = new ModuleNode(null, "Customer Search");
moduleGroup.addChild(cSearchModule);
- ISubModuleNode cSearchSubModule = new SubModuleNode("Customer Search");
+ ISubModuleNode cSearchSubModule = new SubModuleNode(null, "Customer Search");
presentation.present(cSearchSubModule, CustomerSearchSubModuleView.ID);
cSearchModule.addChild(cSearchSubModule);
- ISubApplicationNode subApplication2 = new SubApplicationNode("Simple Subapplication");
+ ISubApplicationNode subApplication2 = new SubApplicationNode(null, "Simple Subapplication");
presentation.present(subApplication2, "org.eclipse.riena.sample.app.client.second");
application.addChild(subApplication2);
- moduleGroup = new ModuleGroupNode("ModuleGroup 1");
+ moduleGroup = new ModuleGroupNode(null, "ModuleGroup 1");
subApplication2.addChild(moduleGroup);
- IModuleNode module = new ModuleNode("Module 1");
+ IModuleNode module = new ModuleNode(null, "Module 1");
moduleGroup.addChild(module);
- helloWorldSubModule = new SubModuleNode("Hello World");
+ helloWorldSubModule = new SubModuleNode(null, "Hello World");
presentation.registerView(HelloWorldSubModuleView.ID, false);
presentation.present(helloWorldSubModule, HelloWorldSubModuleView.ID);
module.addChild(helloWorldSubModule);
diff --git a/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/controllers/CustomerSearchSubModuleController.java b/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/controllers/CustomerSearchSubModuleController.java
index f58f0ef..96140af 100644
--- a/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/controllers/CustomerSearchSubModuleController.java
+++ b/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/controllers/CustomerSearchSubModuleController.java
@@ -108,7 +108,7 @@ public class CustomerSearchSubModuleController extends SubModuleController {
Customer selected = (Customer) selectedValue;
ISubModuleNode node = getNavigationNode();
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- SubModuleNode cNode = new SubModuleNode(selected.getFirstName());
+ SubModuleNode cNode = new SubModuleNode(null, selected.getFirstName());
cNode.setContext(selected);
presentation.present(cNode, CustomerDetailsSubModuleView.ID);
node.addChild(cNode);
diff --git a/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/views/CustomerSearchSubModuleView.java b/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/views/CustomerSearchSubModuleView.java
index a3cfd76..898aaa8 100644
--- a/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/views/CustomerSearchSubModuleView.java
+++ b/org.eclipse.riena.sample.app.client/src/org/eclipse/riena/sample/app/client/helloworld/views/CustomerSearchSubModuleView.java
@@ -191,7 +191,7 @@ public class CustomerSearchSubModuleView extends SubModuleView<CustomerSearchSub
}
ISubModuleNode node = getNode();
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- SubModuleNode cNode = new SubModuleNode(selected.getFirstName());
+ SubModuleNode cNode = new SubModuleNode(null, selected.getFirstName());
cNode.setContext(selected);
presentation.present(cNode, CustomerDetailsSubModuleView.ID);
node.addChild(cNode);
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ApplicationModelManagerTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ApplicationModelManagerTest.java
index b69a4d2..25e1e5f 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ApplicationModelManagerTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ApplicationModelManagerTest.java
@@ -24,7 +24,7 @@ public class ApplicationModelManagerTest extends TestCase {
@Override
protected void setUp() throws Exception {
ApplicationModelManager.clear();
- model = new ApplicationModel();
+ model = new ApplicationModel(null);
}
@Override
@@ -38,7 +38,7 @@ public class ApplicationModelManagerTest extends TestCase {
}
public void testAddNamedModel() throws Exception {
- ApplicationModelManager.registerApplicationModel(new ApplicationModel("MyModel"));
+ ApplicationModelManager.registerApplicationModel(new ApplicationModel(null, "MyModel"));
IApplicationModel rModel = ApplicationModelManager.getApplicationModel("MyModel");
assertNotNull(rModel);
}
@@ -54,8 +54,8 @@ public class ApplicationModelManagerTest extends TestCase {
assertTrue("duplicate default model registration didn't fire a ApplicationModelFailure", exOk);
exOk = false;
try {
- ApplicationModelManager.registerApplicationModel(new ApplicationModel("MyModel"));
- ApplicationModelManager.registerApplicationModel(new ApplicationModel("MyModel"));
+ ApplicationModelManager.registerApplicationModel(new ApplicationModel(null, "MyModel"));
+ ApplicationModelManager.registerApplicationModel(new ApplicationModel(null, "MyModel"));
} catch (ApplicationModelFailure f) {
exOk = true;
}
@@ -64,14 +64,14 @@ public class ApplicationModelManagerTest extends TestCase {
public void testGetDefaultModel() throws Exception {
ApplicationModelManager.registerApplicationModel(model);
- ApplicationModelManager.registerApplicationModel(new ApplicationModel("MyModel"));
+ ApplicationModelManager.registerApplicationModel(new ApplicationModel(null, "MyModel"));
IApplicationModel rModel = ApplicationModelManager.getApplicationModel();
assertNotNull(rModel);
assertSame(model, rModel);
}
public void testGetDefaultModelWhenNamedAndSingle() throws Exception {
- model = new ApplicationModel("MyModel");
+ model = new ApplicationModel(null, "MyModel");
ApplicationModelManager.registerApplicationModel(model);
IApplicationModel rModel = ApplicationModelManager.getApplicationModel();
assertNotNull(rModel);
@@ -79,10 +79,10 @@ public class ApplicationModelManagerTest extends TestCase {
}
public void testGetNamedModel() throws Exception {
- model = new ApplicationModel("MyModel");
+ model = new ApplicationModel(null, "MyModel");
ApplicationModelManager.registerApplicationModel(model);
- ApplicationModelManager.registerApplicationModel(new ApplicationModel("MyModell"));
- ApplicationModelManager.registerApplicationModel(new ApplicationModel("MyModel2"));
+ ApplicationModelManager.registerApplicationModel(new ApplicationModel(null, "MyModell"));
+ ApplicationModelManager.registerApplicationModel(new ApplicationModel(null, "MyModel2"));
IApplicationModel rModel = ApplicationModelManager.getApplicationModel("MyModel");
assertNotNull(rModel);
assertSame(model, rModel);
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/NavigationProcessorTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/NavigationProcessorTest.java
index 97d853a..6f1e5fc 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/NavigationProcessorTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/NavigationProcessorTest.java
@@ -34,23 +34,19 @@ public class NavigationProcessorTest extends RienaTestCase {
super.setUp();
addPluginXml(NavigationProcessorTest.class, "NavigationProcessorTest.xml");
- applicationModel = new ApplicationModel();
- applicationModel.setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.application"));
+ applicationModel = new ApplicationModel(new NavigationNodeId(
+ "org.eclipse.riena.navigation.model.test.application"));
navigationProcessor = new NavigationProcessor();
applicationModel.setNavigationProcessor(navigationProcessor);
- subApplication = new SubApplicationNode();
- subApplication
- .setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.subApplication"));
+ subApplication = new SubApplicationNode(new NavigationNodeId(
+ "org.eclipse.riena.navigation.model.test.subApplication"));
applicationModel.addChild(subApplication);
- moduleGroup = new ModuleGroupNode();
- moduleGroup.setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.moduleGroup"));
+ moduleGroup = new ModuleGroupNode(new NavigationNodeId("org.eclipse.riena.navigation.model.test.moduleGroup"));
subApplication.addChild(moduleGroup);
- module = new ModuleNode();
- module.setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.module"));
+ module = new ModuleNode(new NavigationNodeId("org.eclipse.riena.navigation.model.test.module"));
moduleGroup.addChild(module);
- subModule = new SubModuleNode();
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.subModule"));
+ subModule = new SubModuleNode(new NavigationNodeId("org.eclipse.riena.navigation.model.test.subModule"));
module.addChild(subModule);
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondModuleGroupNodeBuilder.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondModuleGroupNodeBuilder.java
index c1bc477..54bc2a2 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondModuleGroupNodeBuilder.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondModuleGroupNodeBuilder.java
@@ -10,20 +10,22 @@
*******************************************************************************/
package org.eclipse.riena.navigation.model;
+import org.eclipse.riena.navigation.IModuleGroupNode;
+import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubModuleNode;
public class TestSecondModuleGroupNodeBuilder implements INavigationNodeBuilder {
public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
- ModuleGroupNode moduleGroup = new ModuleGroupNode();
- moduleGroup.setPresentationId(navigationNodeId);
- ModuleNode module = new ModuleNode();
- module.setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.secondModule"));
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(navigationNodeId);
+ IModuleNode module = new ModuleNode(
+ new NavigationNodeId("org.eclipse.riena.navigation.model.test.secondModule"));
moduleGroup.addChild(module);
- SubModuleNode subModule = new SubModuleNode();
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.navigation.model.test.secondSubModule"));
+ ISubModuleNode subModule = new SubModuleNode(new NavigationNodeId(
+ "org.eclipse.riena.navigation.model.test.secondSubModule"));
module.addChild(subModule);
return moduleGroup;
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondSubApplicationNodeBuilder.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondSubApplicationNodeBuilder.java
index f35f644..6955ce6 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondSubApplicationNodeBuilder.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/TestSecondSubApplicationNodeBuilder.java
@@ -13,12 +13,12 @@ package org.eclipse.riena.navigation.model;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.ISubApplicationNode;
public class TestSecondSubApplicationNodeBuilder implements INavigationNodeBuilder {
public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
- SubApplicationNode subApplication = new SubApplicationNode();
- subApplication.setPresentationId(navigationNodeId);
+ ISubApplicationNode subApplication = new SubApplicationNode(navigationNodeId);
return subApplication;
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/controllers/ModuleControllerTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/controllers/ModuleControllerTest.java
index 06ee076..aa06b5d 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/controllers/ModuleControllerTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/controllers/ModuleControllerTest.java
@@ -23,7 +23,7 @@ public class ModuleControllerTest extends TestCase {
public void testAfterBind() throws Exception {
- ModuleNode node = new ModuleNode();
+ ModuleNode node = new ModuleNode(null);
node.setCloseable(true);
node.setLabel("Hello");
ModuleController controller = new ModuleController(node);
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManagerTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManagerTest.java
index 5385071..1976f55 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManagerTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManagerTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.riena.navigation.ui.swt.presentation;
+import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.navigation.model.SubModuleNode;
import org.eclipse.riena.tests.RienaTestCase;
@@ -33,10 +34,8 @@ public class SwtPresentationManagerTest extends RienaTestCase {
public void testGetSwtViewIdSharedView() throws Exception {
- SubModuleNode node1 = new SubModuleNode();
- node1.setPresentationId(new NavigationNodeId("testSharedViewId", "testInstanceId1"));
- SubModuleNode node2 = new SubModuleNode();
- node2.setPresentationId(new NavigationNodeId("testSharedViewId", "testInstanceId2"));
+ ISubModuleNode node1 = new SubModuleNode(new NavigationNodeId("testSharedViewId", "testInstanceId1"));
+ ISubModuleNode node2 = new SubModuleNode(new NavigationNodeId("testSharedViewId", "testInstanceId2"));
SwtViewId swtViewId1 = swtPresentationManager.getSwtViewId(node1);
assertEquals("org.eclipse.riena.navigation.ui.swt.views.TestView", swtViewId1.getId());
@@ -50,10 +49,8 @@ public class SwtPresentationManagerTest extends RienaTestCase {
public void testGetSwtViewIdNotSharedView() throws Exception {
- SubModuleNode node1 = new SubModuleNode();
- node1.setPresentationId(new NavigationNodeId("testNotSharedViewId", "testInstanceId1"));
- SubModuleNode node2 = new SubModuleNode();
- node2.setPresentationId(new NavigationNodeId("testNotSharedViewId", "testInstanceId2"));
+ ISubModuleNode node1 = new SubModuleNode(new NavigationNodeId("testNotSharedViewId", "testInstanceId1"));
+ ISubModuleNode node2 = new SubModuleNode(new NavigationNodeId("testNotSharedViewId", "testInstanceId2"));
SwtViewId swtViewId1 = swtPresentationManager.getSwtViewId(node1);
assertEquals("org.eclipse.riena.navigation.ui.swt.views.TestView", swtViewId1.getId());
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/ApplicationViewAdvisorTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/ApplicationViewAdvisorTest.java
index 5ea5af0..94d0a42 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/ApplicationViewAdvisorTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/ApplicationViewAdvisorTest.java
@@ -44,7 +44,7 @@ public class ApplicationViewAdvisorTest extends TestCase {
@Override
protected void setUp() throws Exception {
winConfig = EasyMock.createNiceMock(IWorkbenchWindowConfigurer.class);
- applicationModel = new ApplicationModel();
+ applicationModel = new ApplicationModel(null);
controller = new ApplicationController(applicationModel);
advisor = new ApplicationViewAdvisor(winConfig, controller);
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java
index 57498d0..d769928 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java
@@ -33,16 +33,15 @@ public class SubModuleViewTest extends RienaTestCase {
addPluginXml(SubModuleViewTest.class, "SubModuleViewTest.xml");
subModuleNodeView = new TestView();
- node = new SubModuleNode() {
+ node = new SubModuleNode(new NavigationNodeId("testId")) {
@Override
public <T> T getTypecastedAdapter(Class<T> clazz) {
if (clazz.equals(IApplicationModel.class)) {
- return (T) new ApplicationModel();
+ return (T) new ApplicationModel(null);
}
return null;
}
};
- node.setPresentationId(new NavigationNodeId("testId"));
node.setLabel("Test");
}