summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2011-06-20 03:41:28 (EDT)
committerSteffen Kriese2011-06-20 03:41:28 (EDT)
commit74b698c1d7836ee3bd0a5164d6ce9b0238f3a10e (patch)
treeed4505c5ed8791f187495ab9b5e9dadfd6806b66
parent9dfff43e52ce8bccd6b9b0d945352f40336ce219 (diff)
downloadorg.eclipse.riena.toolbox-74b698c1d7836ee3bd0a5164d6ce9b0238f3a10e.zip
org.eclipse.riena.toolbox-74b698c1d7836ee3bd0a5164d6ce9b0238f3a10e.tar.gz
org.eclipse.riena.toolbox-74b698c1d7836ee3bd0a5164d6ce9b0238f3a10e.tar.bz2
fixed NPE in generated code from cs wizard
-rw-r--r--org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/applications/CustomersApplication.java9
-rw-r--r--org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/controllers/CustomerSearchSubModuleController.java3
2 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/applications/CustomersApplication.java b/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/applications/CustomersApplication.java
index 09609a7..4bc0478 100644
--- a/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/applications/CustomersApplication.java
+++ b/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/applications/CustomersApplication.java
@@ -1,5 +1,6 @@
package ${package}.applications;
+import org.eclipse.riena.navigation.NavigationNodeId;
import org.eclipse.riena.navigation.IApplicationNode;
import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
@@ -21,19 +22,19 @@ public class CustomersApplication extends SwtApplication {
protected IApplicationNode createModel() {
application = new ApplicationNode("${project}");
- ISubApplicationNode subApplication = new SubApplicationNode("Customers");
+ ISubApplicationNode subApplication = new SubApplicationNode(new NavigationNodeId("customers.subapp"), "Customers");
WorkareaManager.getInstance().registerDefinition(subApplication, "subApplication");
application.addChild(subApplication);
- IModuleGroupNode moduleGroup = new ModuleGroupNode();
+ IModuleGroupNode moduleGroup = new ModuleGroupNode(new NavigationNodeId("customer.modulegroup"));
subApplication.addChild(moduleGroup);
- IModuleNode cSearchModule = new ModuleNode("Customer Search");
+ IModuleNode cSearchModule = new ModuleNode(new NavigationNodeId("customer.module"),"Customer Search");
moduleGroup.addChild(cSearchModule);
- ISubModuleNode cSearchSubModule = new SubModuleNode("Customer Search");
+ ISubModuleNode cSearchSubModule = new SubModuleNode(new NavigationNodeId("customersearch.submodule"),"Customer Search");
WorkareaManager.getInstance().registerDefinition(cSearchSubModule, CustomerSearchSubModuleView.ID);
cSearchModule.addChild(cSearchSubModule);
diff --git a/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/controllers/CustomerSearchSubModuleController.java b/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/controllers/CustomerSearchSubModuleController.java
index 1e9a8aa..b8282cb 100644
--- a/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/controllers/CustomerSearchSubModuleController.java
+++ b/org.eclipse.riena.ui.wizard.cs/templates/client/gui/src/controllers/CustomerSearchSubModuleController.java
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.eclipse.riena.navigation.NavigationNodeId;
import org.eclipse.core.databinding.observable.value.WritableValue;
import org.eclipse.core.runtime.Assert;
import org.eclipse.riena.core.wire.InjectService;
@@ -90,7 +91,7 @@ public class CustomerSearchSubModuleController extends SubModuleController {
Customer selected = (Customer) selectedValue;
- SubModuleNode child = new SubModuleNode(null, selected.getFirstName());
+ SubModuleNode child = new SubModuleNode(new NavigationNodeId("customer.submodule"), selected.getFirstName());
child.setContext(Customer.class.getName(), selected);