summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-08 07:26:42 (EDT)
committerCarsten Drossel2008-08-08 07:26:42 (EDT)
commit668edbc2b37735c2a3538edd6cdffb4da668d862 (patch)
tree2ac9f4228507ed97cf3bfa363531758b81a83480
parentfd1561ef256a1e6c0f98c4945e0fdfcaa3a6af89 (diff)
downloadorg.eclipse.riena-668edbc2b37735c2a3538edd6cdffb4da668d862.zip
org.eclipse.riena-668edbc2b37735c2a3538edd6cdffb4da668d862.tar.gz
org.eclipse.riena-668edbc2b37735c2a3538edd6cdffb4da668d862.tar.bz2
applying patch for bugzilla entry 243554 - Refactor navigation namings and extension points
-rw-r--r--org.eclipse.riena.example.client/plugin.xml207
-rw-r--r--org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManager.java8
-rw-r--r--org.eclipse.riena.navigation/plugin.xml4
-rw-r--r--org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.NavigationNodeType.exsd (renamed from org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.NavigationNodePresentation.exsd)10
-rw-r--r--org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.SubModuleType.exsd (renamed from org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.WorkAreaPresentation.exsd)10
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ApplicationModelFailure.java5
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNode.java2
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeTypeDefiniton.java (renamed from org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodePresentationDefiniton.java)4
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ISubModuleTypeDefinition.java (renamed from org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IWorkAreaPresentationDefinition.java)20
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ITypeDefinition.java (renamed from org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationDefinition.java)4
-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.java2
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationExtensionInjectionHelper.java4
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationProviderService.java61
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/model/NavigationProcessorTest.java4
15 files changed, 181 insertions, 177 deletions
diff --git a/org.eclipse.riena.example.client/plugin.xml b/org.eclipse.riena.example.client/plugin.xml
index 80a57e6..07abe82 100644
--- a/org.eclipse.riena.example.client/plugin.xml
+++ b/org.eclipse.riena.example.client/plugin.xml
@@ -315,135 +315,134 @@
</renderer>
</extension>
<extension
- point="org.eclipse.riena.navigation.NavigationNodePresentation">
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.navigation"
+ point="org.eclipse.riena.navigation.NavigationNodeType">
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.navigation"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.NavigationSubApplicationNodeBuilder"
- parentPresentationId="application">
- </navigationNodePresentation>
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.navigate"
+ parentTypeId="application">
+ </navigationNodeType>
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.navigate"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.NavigateNodeBuilder"
- parentPresentationId="org.eclipse.riena.example.navigation">
- </navigationNodePresentation>
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.sharedViews"
+ parentTypeId="org.eclipse.riena.example.navigation">
+ </navigationNodeType>
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.sharedViews"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.SharedViewsNodeBuilder"
- parentPresentationId="playground">
- </navigationNodePresentation>
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.uiProcesses"
+ parentTypeId="playground">
+ </navigationNodeType>
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.uiProcesses"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.UIProcessNodeBuilder"
- parentPresentationId="playground">
- </navigationNodePresentation>
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.playground"
+ parentTypeId="playground">
+ </navigationNodeType>
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.playground"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.PlaygroundNodeBuilder"
- parentPresentationId="playground">
- </navigationNodePresentation>
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.navigate.comboAndList"
+ parentTypeId="playground">
+ </navigationNodeType>
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.navigate.comboAndList"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.ComboAndListNodeBuilder"
- parentPresentationId="org.eclipse.riena.example.navigation">
- </navigationNodePresentation>
- <navigationNodePresentation
- presentationId="org.eclipse.riena.example.navigate.tableTextAndTree"
+ parentTypeId="org.eclipse.riena.example.navigation">
+ </navigationNodeType>
+ <navigationNodeType
+ typeId="org.eclipse.riena.example.navigate.tableTextAndTree"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.TableTextAndTreeNodeBuilder"
- parentPresentationId="playground">
- </navigationNodePresentation>
+ parentTypeId="playground">
+ </navigationNodeType>
</extension>
- <extension
- point="org.eclipse.riena.navigation.WorkAreaPresentation">
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.customerDetail"
+ <extension point="org.eclipse.riena.navigation.SubModuleType">
+ <subModuleType
+ typeId="org.eclipse.riena.example.customerDetail"
view="org.eclipse.riena.example.client.views.CustomerDetailSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.CustomerDetailSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.uiProcess"
+ controller="org.eclipse.riena.example.client.controllers.CustomerDetailSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.uiProcess"
view="org.eclipse.riena.example.client.views.UIProcessDemoSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.UIProcessDemoSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.sharedView"
+ controller="org.eclipse.riena.example.client.controllers.UIProcessDemoSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.sharedView"
view="org.eclipse.riena.example.client.views.SharedViewDemoSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.SharedViewDemoSubModuleController"
- viewShared="true">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.navigation"
+ shared="true"
+ controller="org.eclipse.riena.example.client.controllers.SharedViewDemoSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.navigation"
view="org.eclipse.riena.example.client.views.NavigationSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.NavigationSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.buttons"
+ controller="org.eclipse.riena.example.client.controllers.NavigationSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.buttons"
view="org.eclipse.riena.example.client.views.RidgetsSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.RidgetsSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.marker"
+ controller="org.eclipse.riena.example.client.controllers.RidgetsSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.marker"
view="org.eclipse.riena.example.client.views.MarkerSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.MarkerSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.focusable"
+ controller="org.eclipse.riena.example.client.controllers.MarkerSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.focusable"
view="org.eclipse.riena.example.client.views.FocusableSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.FocusableSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.validation"
+ controller="org.eclipse.riena.example.client.controllers.FocusableSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.validation"
view="org.eclipse.riena.example.client.views.ValidationSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.ValidationSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.choice"
+ controller="org.eclipse.riena.example.client.controllers.ValidationSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.choice"
view="org.eclipse.riena.example.client.views.ChoiceSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.ChoiceSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.combo"
+ controller="org.eclipse.riena.example.client.controllers.ChoiceSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.combo"
view="org.eclipse.riena.example.client.views.ComboSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.ComboSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.list"
+ controller="org.eclipse.riena.example.client.controllers.ComboSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.list"
view="org.eclipse.riena.example.client.views.ListSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.ListSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.table"
+ controller="org.eclipse.riena.example.client.controllers.ListSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.table"
view="org.eclipse.riena.example.client.views.TableSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.TableSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.text"
+ controller="org.eclipse.riena.example.client.controllers.TableSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.text"
view="org.eclipse.riena.example.client.views.TextSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.TextSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.tree"
+ controller="org.eclipse.riena.example.client.controllers.TextSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.tree"
view="org.eclipse.riena.example.client.views.TreeSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.TreeSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.treeTable"
+ controller="org.eclipse.riena.example.client.controllers.TreeSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.treeTable"
view="org.eclipse.riena.example.client.views.TreeTableSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.TreeTableSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.systemProperties"
+ controller="org.eclipse.riena.example.client.controllers.TreeTableSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.systemProperties"
view="org.eclipse.riena.example.client.views.SystemPropertiesSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.SystemPropertiesSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.statusLine"
+ controller="org.eclipse.riena.example.client.controllers.SystemPropertiesSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.statusLine"
view="org.eclipse.riena.example.client.views.StatuslineSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.StatuslineSubModuleController">
- </workAreaPresentation>
- <workAreaPresentation
- presentationId="org.eclipse.riena.example.navigate.form"
+ controller="org.eclipse.riena.example.client.controllers.StatuslineSubModuleController">
+ </subModuleType>
+ <subModuleType
+ typeId="org.eclipse.riena.example.navigate.form"
view="org.eclipse.riena.example.client.views.NavigateSubModuleView"
- viewController="org.eclipse.riena.example.client.controllers.NavigateSubModuleController">
- </workAreaPresentation>
+ controller="org.eclipse.riena.example.client.controllers.NavigateSubModuleController">
+ </subModuleType>
</extension>
</plugin>
diff --git a/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManager.java b/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManager.java
index c369fde..8dcd98f 100644
--- a/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManager.java
+++ b/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/presentation/SwtPresentationManager.java
@@ -51,11 +51,11 @@ public class SwtPresentationManager {
public SwtViewId getSwtViewId(INavigationNode<?> pNode) {
SwtViewId swtViewId = views.get(pNode);
if (swtViewId == null) {
- INavigationNodeId presentationId = pNode.getPresentationId();
- if (presentationId != null) {
- String viewId = (String) getPresentationProviderService().provideView(presentationId);
+ INavigationNodeId nodeId = pNode.getNodeId();
+ if (nodeId != null) {
+ String viewId = (String) getPresentationProviderService().provideView(nodeId);
String secondaryId = null;
- if (getPresentationProviderService().isViewShared(presentationId)) {
+ if (getPresentationProviderService().isViewShared(nodeId)) {
secondaryId = "shared"; //$NON-NLS-1$
} else {
secondaryId = getNextSecondaryId(viewId);
diff --git a/org.eclipse.riena.navigation/plugin.xml b/org.eclipse.riena.navigation/plugin.xml
index 827f304..b3f2034 100644
--- a/org.eclipse.riena.navigation/plugin.xml
+++ b/org.eclipse.riena.navigation/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
- <extension-point id="org.eclipse.riena.navigation.NavigationNodePresentation" name="NavigationNodePresentation" schema="schema/org.eclipse.riena.navigation.NavigationNodePresentation.exsd"/>
- <extension-point id="org.eclipse.riena.navigation.WorkAreaPresentation" name="WorkAreaPresentation" schema="schema/org.eclipse.riena.navigation.WorkAreaPresentation.exsd"/>
+ <extension-point id="org.eclipse.riena.navigation.NavigationNodeType" name="NavigationNodeType" schema="schema/org.eclipse.riena.navigation.NavigationNodeType.exsd"/>
+ <extension-point id="org.eclipse.riena.navigation.SubModuleType" name="SubModuleType" schema="schema/org.eclipse.riena.navigation.SubModuleType.exsd"/>
</plugin>
diff --git a/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.NavigationNodePresentation.exsd b/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.NavigationNodeType.exsd
index 84b744f..4f8f83c 100644
--- a/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.NavigationNodePresentation.exsd
+++ b/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.NavigationNodeType.exsd
@@ -18,7 +18,7 @@
</annotation>
<complexType>
<sequence>
- <element ref="navigationNodePresentation" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="navigationNodeType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -47,16 +47,16 @@
</complexType>
</element>
- <element name="navigationNodePresentation">
+ <element name="navigationNodeType">
<complexType>
- <attribute name="presentationId" type="string">
+ <attribute name="typeId" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
- <attribute name="nodeBuilder" type="string">
+ <attribute name="nodeBuilder" type="string" use="required">
<annotation>
<documentation>
@@ -66,7 +66,7 @@
</appinfo>
</annotation>
</attribute>
- <attribute name="parentPresentationId" type="string">
+ <attribute name="parentTypeId" type="string">
<annotation>
<documentation>
diff --git a/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.WorkAreaPresentation.exsd b/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.SubModuleType.exsd
index c32f81c..58acd07 100644
--- a/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.WorkAreaPresentation.exsd
+++ b/org.eclipse.riena.navigation/schema/org.eclipse.riena.navigation.SubModuleType.exsd
@@ -18,7 +18,7 @@
</annotation>
<complexType>
<sequence>
- <element ref="workAreaPresentation" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="subModuleType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -47,23 +47,23 @@
</complexType>
</element>
- <element name="workAreaPresentation">
+ <element name="subModuleType">
<complexType>
- <attribute name="presentationId" type="string">
+ <attribute name="typeId" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
- <attribute name="viewShared" type="boolean">
+ <attribute name="shared" type="boolean" use="default" value="false">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
- <attribute name="viewController" type="string">
+ <attribute name="controller" type="string">
<annotation>
<documentation>
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ApplicationModelFailure.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ApplicationModelFailure.java
index 13d2709..cd2fa16 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ApplicationModelFailure.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ApplicationModelFailure.java
@@ -20,6 +20,11 @@ import org.eclipse.riena.core.exception.Failure;
public class ApplicationModelFailure extends Failure {
/**
+ *
+ */
+ private static final long serialVersionUID = 5195851919605393494L;
+
+ /**
* Creates a new instance of this failure.
*
* @param msg
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 6a0e7a6..7839f16 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
@@ -379,7 +379,7 @@ public interface INavigationNode<C extends INavigationNode<?>> extends ITypecast
*/
boolean isBlocked();
- INavigationNodeId getPresentationId();
+ INavigationNodeId getNodeId();
/**
* Creates the specified navigation node and adds it to the application
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodePresentationDefiniton.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeTypeDefiniton.java
index 41a55bd..2a922da 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodePresentationDefiniton.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeTypeDefiniton.java
@@ -15,7 +15,7 @@ package org.eclipse.riena.navigation;
*
* @author Erich Achilles
*/
-public interface INavigationNodePresentationDefiniton extends IPresentationDefinition {
+public interface INavigationNodeTypeDefiniton extends ITypeDefinition {
/**
* Returns the ModuleComposer for this module presentation
@@ -27,6 +27,6 @@ public interface INavigationNodePresentationDefiniton extends IPresentationDefin
* The id of this presentations parent presentation
*/
- String getParentPresentationId();
+ String getParentTypeId();
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IWorkAreaPresentationDefinition.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ISubModuleTypeDefinition.java
index 4fcc400..e9aefe4 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IWorkAreaPresentationDefinition.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ISubModuleTypeDefinition.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.riena.navigation;
-import org.eclipse.riena.core.extension.MapName;
import org.eclipse.riena.ui.ridgets.viewcontroller.IViewController;
/**
@@ -18,32 +17,33 @@ import org.eclipse.riena.ui.ridgets.viewcontroller.IViewController;
*
* @author Erich Achilles
*/
-public interface IWorkAreaPresentationDefinition extends IPresentationDefinition {
+public interface ISubModuleTypeDefinition extends ITypeDefinition {
/**
- * Returns the view controller for this work area presentation
+ * Returns the view controller for this SubModuleType
*/
+ IViewController createController();
- IViewController createViewController();
+ /**
+ * Returns the view controller name
+ */
+ String getController();
/**
* Return true if the specified view should be a shared view, false
* otherwise
*/
-
- boolean isViewShared();
+ boolean isShared();
/**
* Return an instance of a view
*
*/
-
Object createView();
/**
- * @return The view id.
+ * Return an view name
*/
- @MapName("view")
- String getViewId();
+ String getView();
}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationDefinition.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ITypeDefinition.java
index b4f6ac6..537bc99 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/IPresentationDefinition.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/ITypeDefinition.java
@@ -15,11 +15,11 @@ package org.eclipse.riena.navigation;
*
* @author Erich Achilles
*/
-public interface IPresentationDefinition {
+public interface ITypeDefinition {
/**
* The id of this presentation
*/
- String getPresentationId();
+ String getTypeId();
}
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 2c252ee..7c98213 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
@@ -49,7 +49,7 @@ import org.eclipse.riena.navigation.listener.INavigationNodeListenerable;
public abstract class NavigationNode<S extends INavigationNode<C>, C extends INavigationNode<?>, L extends INavigationNodeListener<S, C>>
extends TypecastingObject implements INavigationNode<C>, INavigationNodeListenerable<S, C, L> {
- private INavigationNodeId presentationId;
+ private INavigationNodeId nodeId;
private State state;
private String label;
private String icon;
@@ -874,6 +874,7 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
/**
* @see org.eclipse.riena.navigation.INavigationNode#getParentOfType(java.lang.Class)
*/
+ @SuppressWarnings("unchecked")
public <N extends INavigationNode<?>> N getParentOfType(Class<N> clazz) {
if (getParent() == null) {
@@ -935,14 +936,14 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
}
/**
- * @see org.eclipse.riena.navigation.INavigationNode#getPresentationId()
+ * @see org.eclipse.riena.navigation.INavigationNode#getNodeId()
*/
- public INavigationNodeId getPresentationId() {
- return presentationId;
+ public INavigationNodeId getNodeId() {
+ return nodeId;
}
- public void setPresentationId(INavigationNodeId presentationId) {
+ public void setPresentationId(INavigationNodeId nodeId) {
// TODO set via constructor, remove setter
- this.presentationId = presentationId;
+ this.nodeId = nodeId;
}
}
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 dd8ee4a..b53800e 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
@@ -805,7 +805,7 @@ public class NavigationProcessor implements INavigationProcessor, INavigationHis
return;
}
}
- navigate(targetNode, sourceNode.getPresentationId(), null);
+ navigate(targetNode, sourceNode.getNodeId(), null);
}
/*
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationExtensionInjectionHelper.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationExtensionInjectionHelper.java
index fbb639e..dbd401f 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationExtensionInjectionHelper.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/PresentationExtensionInjectionHelper.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.riena.navigation.model;
-import org.eclipse.riena.navigation.IPresentationDefinition;
+import org.eclipse.riena.navigation.ITypeDefinition;
-public class PresentationExtensionInjectionHelper<E extends IPresentationDefinition> {
+public class PresentationExtensionInjectionHelper<E extends ITypeDefinition> {
private E[] data;
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 8714a23..192e5aa 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
@@ -17,10 +17,10 @@ import org.eclipse.riena.navigation.ApplicationModelFailure;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
-import org.eclipse.riena.navigation.INavigationNodePresentationDefiniton;
-import org.eclipse.riena.navigation.IPresentationDefinition;
+import org.eclipse.riena.navigation.INavigationNodeTypeDefiniton;
import org.eclipse.riena.navigation.IPresentationProviderService;
-import org.eclipse.riena.navigation.IWorkAreaPresentationDefinition;
+import org.eclipse.riena.navigation.ISubModuleTypeDefinition;
+import org.eclipse.riena.navigation.ITypeDefinition;
import org.eclipse.riena.navigation.NavigationArgument;
import org.eclipse.riena.ui.ridgets.viewcontroller.IViewController;
import org.osgi.service.log.LogService;
@@ -36,17 +36,17 @@ public class PresentationProviderService implements IPresentationProviderService
// TODO: split off ... problem: navigation is gui-less ...
- private static final String EP_WORKAREA = "org.eclipse.riena.navigation.WorkAreaPresentation"; //$NON-NLS-1$
- private static final String EP_NAVNODE = "org.eclipse.riena.navigation.NavigationNodePresentation"; //$NON-NLS-1$
- private PresentationExtensionInjectionHelper<IWorkAreaPresentationDefinition> targetWA;
- private PresentationExtensionInjectionHelper<INavigationNodePresentationDefiniton> targetNN;
+ private static final String EP_WORKAREA = "org.eclipse.riena.navigation.SubModuleType"; //$NON-NLS-1$
+ private static final String EP_NAVNODE = "org.eclipse.riena.navigation.NavigationNodeType"; //$NON-NLS-1$
+ private PresentationExtensionInjectionHelper<ISubModuleTypeDefinition> targetWA;
+ private PresentationExtensionInjectionHelper<INavigationNodeTypeDefiniton> targetNN;
/**
* Injects the extension point into a given target. The target returns a set
* of presentation definitions
*/
- private void inject(Class<? extends IPresentationDefinition> interfaceType, String wpID,
- PresentationExtensionInjectionHelper<? extends IPresentationDefinition> target) {
+ private void inject(Class<? extends ITypeDefinition> interfaceType, String wpID,
+ PresentationExtensionInjectionHelper<? extends ITypeDefinition> target) {
Inject.extension(wpID).useType(interfaceType).into(target).andStart(Activator.getDefault().getContext());
}
@@ -54,10 +54,10 @@ public class PresentationProviderService implements IPresentationProviderService
*
*/
public PresentationProviderService() {
- targetWA = new PresentationExtensionInjectionHelper<IWorkAreaPresentationDefinition>();
- inject(IWorkAreaPresentationDefinition.class, EP_WORKAREA, targetWA);
- targetNN = new PresentationExtensionInjectionHelper<INavigationNodePresentationDefiniton>();
- inject(INavigationNodePresentationDefiniton.class, EP_NAVNODE, targetNN);
+ targetWA = new PresentationExtensionInjectionHelper<ISubModuleTypeDefinition>();
+ inject(ISubModuleTypeDefinition.class, EP_WORKAREA, targetWA);
+ targetNN = new PresentationExtensionInjectionHelper<INavigationNodeTypeDefiniton>();
+ inject(INavigationNodeTypeDefiniton.class, EP_NAVNODE, targetNN);
}
/**
@@ -72,7 +72,7 @@ public class PresentationProviderService implements IPresentationProviderService
if (targetNode == null) {
if (LOGGER.isLoggable(LogService.LOG_DEBUG))
LOGGER.log(LogService.LOG_DEBUG, "createNode: " + targetId); //$NON-NLS-1$
- INavigationNodePresentationDefiniton presentationDefinition = getPresentationDefinitionNN(targetId);
+ INavigationNodeTypeDefiniton presentationDefinition = getPresentationDefinitionNN(targetId);
if (presentationDefinition != null) {
INavigationNodeBuilder builder = presentationDefinition.createNodeBuilder();
prepareNavigationNodeBuilder(targetId, builder);
@@ -81,8 +81,8 @@ public class PresentationProviderService implements IPresentationProviderService
if (argument != null && argument.getParentNodeId() != null) {
parentNode = provideNode(sourceNode, new NavigationNodeId(argument.getParentNodeId()), null);
} else {
- parentNode = provideNode(sourceNode, new NavigationNodeId(presentationDefinition
- .getParentPresentationId()), null);
+ parentNode = provideNode(sourceNode,
+ new NavigationNodeId(presentationDefinition.getParentTypeId()), null);
}
parentNode.addChild(targetNode);
} else {
@@ -106,13 +106,13 @@ public class PresentationProviderService implements IPresentationProviderService
* @param targetId
* @return
*/
- protected IWorkAreaPresentationDefinition getPresentationDefinitionWA(String targetId) {
+ protected ISubModuleTypeDefinition getPresentationDefinitionWA(String targetId) {
if (targetWA == null || targetWA.getData().length == 0) {
return null;
} else {
- IWorkAreaPresentationDefinition[] data = targetWA.getData();
+ ISubModuleTypeDefinition[] data = targetWA.getData();
for (int i = 0; i < data.length; i++) {
- if (data[i].getPresentationId() != null && data[i].getPresentationId().equals(targetId)) {
+ if (data[i].getTypeId() != null && data[i].getTypeId().equals(targetId)) {
return data[i];
}
}
@@ -124,13 +124,13 @@ public class PresentationProviderService implements IPresentationProviderService
* @param targetId
* @return
*/
- protected INavigationNodePresentationDefiniton getPresentationDefinitionNN(INavigationNodeId targetId) {
+ protected INavigationNodeTypeDefiniton getPresentationDefinitionNN(INavigationNodeId targetId) {
if (targetNN == null || targetNN.getData().length == 0 || targetId == null) {
return null;
} else {
- INavigationNodePresentationDefiniton[] data = targetNN.getData();
+ INavigationNodeTypeDefiniton[] data = targetNN.getData();
for (int i = 0; i < data.length; i++) {
- if (data[i].getPresentationId() != null && data[i].getPresentationId().equals(targetId.getTypeId())) {
+ if (data[i].getTypeId() != null && data[i].getTypeId().equals(targetId.getTypeId())) {
return data[i];
}
@@ -159,7 +159,7 @@ public class PresentationProviderService implements IPresentationProviderService
if (targetId == null) {
return null;
}
- if (targetId.equals(node.getPresentationId())) {
+ if (targetId.equals(node.getNodeId())) {
return node;
}
for (INavigationNode<?> child : node.getChildren()) {
@@ -179,11 +179,11 @@ public class PresentationProviderService implements IPresentationProviderService
* (org.eclipse.riena.navigation.INavigationNodeId)
*/
public Object provideView(INavigationNodeId nodeId) {
- IWorkAreaPresentationDefinition presentationDefinition = getPresentationDefinitionWA(nodeId.getTypeId());
+ ISubModuleTypeDefinition presentationDefinition = getPresentationDefinitionWA(nodeId.getTypeId());
if (presentationDefinition != null) {
- return presentationDefinition.getViewId();
+ return presentationDefinition.getView();
} else {
- throw new ApplicationModelFailure("No presentation definition found for node '" + nodeId.getTypeId() + "'."); //$NON-NLS-2$
+ throw new ApplicationModelFailure("No presentation definition found for node '" + nodeId.getTypeId() + "'."); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -191,12 +191,11 @@ public class PresentationProviderService implements IPresentationProviderService
* @see org.eclipse.riena.navigation.IPresentationProviderService#provideController(org.eclipse.riena.navigation.INavigationNode)
*/
public IViewController provideController(INavigationNode<?> node) {
- IWorkAreaPresentationDefinition presentationDefinition = getPresentationDefinitionWA(node.getPresentationId()
- .getTypeId());
+ ISubModuleTypeDefinition presentationDefinition = getPresentationDefinitionWA(node.getNodeId().getTypeId());
IViewController viewController = null;
if (presentationDefinition != null) {
- viewController = presentationDefinition.createViewController();
+ viewController = presentationDefinition.createController();
}
return viewController;
@@ -206,10 +205,10 @@ public class PresentationProviderService implements IPresentationProviderService
* @see org.eclipse.riena.navigation.IPresentationProviderService#isViewShared(org.eclipse.riena.navigation.INavigationNodeId)
*/
public boolean isViewShared(INavigationNodeId targetId) {
- IWorkAreaPresentationDefinition presentationDefinition = getPresentationDefinitionWA(targetId.getTypeId());
+ ISubModuleTypeDefinition presentationDefinition = getPresentationDefinitionWA(targetId.getTypeId());
if (presentationDefinition != null) {
- return presentationDefinition.isViewShared();
+ return presentationDefinition.isShared();
}
return false;
}
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 fbf7628..97d853a 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
@@ -82,12 +82,12 @@ public class NavigationProcessorTest extends RienaTestCase {
assertFalse(subApplication.isActivated());
ISubApplicationNode secondSubApplication = applicationModel.getChild(1);
assertEquals(new NavigationNodeId("org.eclipse.riena.navigation.model.test.secondSubApplication"),
- secondSubApplication.getPresentationId());
+ secondSubApplication.getNodeId());
assertTrue(secondSubApplication.isActivated());
assertEquals(1, secondSubApplication.getChildren().size());
IModuleGroupNode secondModuleGroup = secondSubApplication.getChild(0);
assertEquals(new NavigationNodeId("org.eclipse.riena.navigation.model.test.secondModuleGroup"),
- secondModuleGroup.getPresentationId());
+ secondModuleGroup.getNodeId());
assertTrue(secondModuleGroup.isActivated());
IModuleNode secondModule = secondModuleGroup.getChild(0);
ISubModuleNode secondSubModule = secondModule.getChild(0);