summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2009-01-21 03:51:23 (EST)
committerCarsten Drossel2009-01-21 03:51:23 (EST)
commitd91598306be49814dee5bf9d336e8238a06cd299 (patch)
treec364e92f7f4b89e9404580aaea841cedf24819c7
parent315309ea997ed3d698420a93e64716f1b176764e (diff)
downloadorg.eclipse.riena-d91598306be49814dee5bf9d336e8238a06cd299.zip
org.eclipse.riena-d91598306be49814dee5bf9d336e8238a06cd299.tar.gz
org.eclipse.riena-d91598306be49814dee5bf9d336e8238a06cd299.tar.bz2
handling TODOs: using superclass functionality to check for consistent workarea definitions
-rw-r--r--org.eclipse.riena.ui.workarea/src/org/eclipse/riena/internal/ui/workarea/registry/ExplicitWorkareaDefinitionRegistry.java8
-rw-r--r--org.eclipse.riena.ui.workarea/src/org/eclipse/riena/ui/workarea/spi/AbstractWorkareaDefinitionRegistry.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/internal/ui/workarea/registry/ExplicitWorkareaDefinitionRegistry.java b/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/internal/ui/workarea/registry/ExplicitWorkareaDefinitionRegistry.java
index 94ff710..c0e8249 100644
--- a/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/internal/ui/workarea/registry/ExplicitWorkareaDefinitionRegistry.java
+++ b/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/internal/ui/workarea/registry/ExplicitWorkareaDefinitionRegistry.java
@@ -38,13 +38,9 @@ final class ExplicitWorkareaDefinitionRegistry extends AbstractWorkareaDefinitio
// this may be specific - register with submodule
workareas.put(node, definition);
+
if (node.getNodeId() != null && node.getNodeId().getTypeId() != null) {
- if (getDefinition(node.getNodeId().getTypeId()) == null) {
- // if id is not registered yet register for all potential users
- // TODO use method below?
- workareas.put(node.getNodeId().getTypeId(), definition);
- }
- // TODO throw exception?
+ internalRegister(node.getNodeId().getTypeId(), definition);
}
return definition;
diff --git a/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/ui/workarea/spi/AbstractWorkareaDefinitionRegistry.java b/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/ui/workarea/spi/AbstractWorkareaDefinitionRegistry.java
index f956217..5fbce66 100644
--- a/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/ui/workarea/spi/AbstractWorkareaDefinitionRegistry.java
+++ b/org.eclipse.riena.ui.workarea/src/org/eclipse/riena/ui/workarea/spi/AbstractWorkareaDefinitionRegistry.java
@@ -25,6 +25,10 @@ public abstract class AbstractWorkareaDefinitionRegistry implements IWorkareaDef
}
public IWorkareaDefinition register(Object id, IWorkareaDefinition definition) {
+ return internalRegister(id, definition);
+ }
+
+ protected IWorkareaDefinition internalRegister(Object id, IWorkareaDefinition definition) {
if (getDefinition(id) != null) {
IWorkareaDefinition existingDefinition = getDefinition(id);
if ((existingDefinition.getControllerClass() == null && definition.getControllerClass() != null)