diff --git a/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/HintContentSection.java b/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/HintContentSection.java index a102ab331..4ad5016a7 100644 --- a/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/HintContentSection.java +++ b/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/HintContentSection.java @@ -122,14 +122,12 @@ protected void textChanged(String oldText, String newText) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == ICanvasPackage.Literals.HINT_PROVIDER__HINT_TITLE || - feature == ICanvasPackage.Literals.HINT_PROVIDER__HINT_CONTENT || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == ICanvasPackage.Literals.HINT_PROVIDER__HINT_TITLE || + feature == ICanvasPackage.Literals.HINT_PROVIDER__HINT_CONTENT || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/NotesSection.java b/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/NotesSection.java index 4faf2b902..40a877554 100644 --- a/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/NotesSection.java +++ b/com.archimatetool.canvas/src/com/archimatetool/canvas/propertysections/NotesSection.java @@ -86,13 +86,11 @@ protected void textChanged(String oldText, String newText) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - // Model event - if(feature == ICanvasPackage.Literals.NOTES_CONTENT__NOTES - || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == ICanvasPackage.Literals.NOTES_CONTENT__NOTES + || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractDocumentationSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractDocumentationSection.java index 5a84225ea..6b6b96c52 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractDocumentationSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractDocumentationSection.java @@ -34,13 +34,11 @@ protected void createControls(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameDocumentationSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameDocumentationSection.java index 29d5980a1..88d3ac11b 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameDocumentationSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameDocumentationSection.java @@ -36,22 +36,20 @@ protected void createControls(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - // Name event - if(feature == IArchimatePackage.Literals.NAMEABLE__NAME) { - refreshNameField(); - updatePropertiesLabel(); - } - // Documentation event - else if(feature == IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION) { - refreshDocumentationField(); - } - // Locked - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + // Name event + if(feature == IArchimatePackage.Literals.NAMEABLE__NAME) { + refreshNameField(); + updatePropertiesLabel(); + } + // Documentation event + else if(feature == IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION) { + refreshDocumentationField(); + } + // Locked + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameSection.java index 4d21804e4..e52f44376 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AbstractNameSection.java @@ -34,14 +34,12 @@ protected void createControls(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.NAMEABLE__NAME || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - updatePropertiesLabel(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.NAMEABLE__NAME || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); + updatePropertiesLabel(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AccessRelationshipSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AccessRelationshipSection.java index 161389820..9cc3245a6 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AccessRelationshipSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AccessRelationshipSection.java @@ -98,11 +98,9 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - if(feature == IArchimatePackage.Literals.ACCESS_RELATIONSHIP__ACCESS_TYPE) { - update(); - } + Object feature = msg.getFeature(); + if(feature == IArchimatePackage.Literals.ACCESS_RELATIONSHIP__ACCESS_TYPE) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ArchimateModelSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ArchimateModelSection.java index 417c2f4e2..14f3aab38 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ArchimateModelSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ArchimateModelSection.java @@ -94,22 +94,20 @@ protected void textChanged(String oldText, String newText) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - // Model Name - if(feature == IArchimatePackage.Literals.NAMEABLE__NAME) { - refreshNameField(); - updatePropertiesLabel(); // Update Main label - } - // Model File - else if(feature == IArchimatePackage.Literals.ARCHIMATE_MODEL__FILE) { - refreshFileField(); - } - // Model Purpose - else if(feature == IArchimatePackage.Literals.ARCHIMATE_MODEL__PURPOSE) { - refreshPurposeField(); - } + Object feature = msg.getFeature(); + + // Model Name + if(feature == IArchimatePackage.Literals.NAMEABLE__NAME) { + refreshNameField(); + updatePropertiesLabel(); // Update Main label + } + // Model File + else if(feature == IArchimatePackage.Literals.ARCHIMATE_MODEL__FILE) { + refreshFileField(); + } + // Model Purpose + else if(feature == IArchimatePackage.Literals.ARCHIMATE_MODEL__PURPOSE) { + refreshPurposeField(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AssociationRelationshipSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AssociationRelationshipSection.java index 547a3c1b8..b04a17a63 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AssociationRelationshipSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/AssociationRelationshipSection.java @@ -50,12 +50,10 @@ public Class getAdaptableType() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.ASSOCIATION_RELATIONSHIP__DIRECTED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.ASSOCIATION_RELATIONSHIP__DIRECTED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderColorSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderColorSection.java index cf8a3082f..b3bbd7d9a 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderColorSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderColorSection.java @@ -119,12 +119,10 @@ public void run() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.BORDER_OBJECT__BORDER_COLOR || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.BORDER_OBJECT__BORDER_COLOR || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderTypeSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderTypeSection.java index 70a018115..acf76c970 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderTypeSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/BorderTypeSection.java @@ -67,13 +67,11 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.BORDER_TYPE__BORDER_TYPE || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.BORDER_TYPE__BORDER_TYPE || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionLineStyleSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionLineStyleSection.java index 70a4e232f..fb02ec376 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionLineStyleSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionLineStyleSection.java @@ -84,13 +84,11 @@ protected int getLineTypeValue() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_CONNECTION__TYPE || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_CONNECTION__TYPE || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionSection.java index 558e19db2..44e625b43 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramConnectionSection.java @@ -124,19 +124,15 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_CONNECTION__TEXT_POSITION) { - refreshTextPositionCombo(); - } - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_CONNECTION__TEXT_POSITION) { + refreshTextPositionCombo(); } - - // Notifier is the Feature - if(isFeatureNotification(msg, IDiagramModelConnection.FEATURE_NAME_VISIBLE)) { + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); + } + else if(isFeatureNotification(msg, IDiagramModelConnection.FEATURE_NAME_VISIBLE)) { refreshNameVisibleButton(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramFigureTypeSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramFigureTypeSection.java index 89682ae70..76f367162 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramFigureTypeSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramFigureTypeSection.java @@ -112,12 +112,10 @@ protected IObjectFilter getFilter() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_ARCHIMATE_OBJECT__TYPE) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_ARCHIMATE_OBJECT__TYPE) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelConnectionSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelConnectionSection.java index 62ad6225c..ef8dff4b5 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelConnectionSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelConnectionSection.java @@ -112,12 +112,10 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); + Object feature = msg.getFeature(); - if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL__CONNECTION_ROUTER_TYPE) { - update(); - } + if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL__CONNECTION_ROUTER_TYPE) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelImageSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelImageSection.java index 002a83adb..f90c115d0 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelImageSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/DiagramModelImageSection.java @@ -71,13 +71,11 @@ protected void refreshDocumentationField() { protected void notifyChanged(Notification msg) { super.notifyChanged(msg); - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - refreshDocumentationField(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DOCUMENTABLE__DOCUMENTATION || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + refreshDocumentationField(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillColorSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillColorSection.java index 99f84a3db..aa0085861 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillColorSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillColorSection.java @@ -58,21 +58,19 @@ protected void createControls(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_OBJECT__FILL_COLOR) { - updateColorControl(); // update also when executing command in case "default" is chosen - } - else if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_GRADIENT)) { - if(!fIsExecutingCommand) { - updateGradientControl(); - } - } - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_OBJECT__FILL_COLOR) { + updateColorControl(); // update also when executing command in case "default" is chosen + } + else if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_GRADIENT)) { + if(!fIsExecutingCommand) { + updateGradientControl(); } } + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); + } } @Override @@ -99,7 +97,6 @@ private void updateColorControl() { else if(fillColorComposite != null) { fillColorComposite.dispose(); fillColorComposite = null; - return; } } @@ -115,7 +112,6 @@ private void updateGradientControl() { else if(gradientComposite != null) { gradientComposite.dispose(); gradientComposite = null; - return; } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillOpacitySection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillOpacitySection.java index 51eebab59..bb6e3adb2 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillOpacitySection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FillOpacitySection.java @@ -63,18 +63,16 @@ int getValue() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_OBJECT__ALPHA) { - if(!fIsExecutingCommand) { - update(); - } - } - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.DIAGRAM_MODEL_OBJECT__ALPHA) { + if(!fIsExecutingCommand) { update(); } } + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); + } } @Override diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FontSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FontSection.java index 1db332a2a..c0dd26401 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FontSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/FontSection.java @@ -179,14 +179,12 @@ private void createColorControl(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.FONT_ATTRIBUTE__FONT || - feature == IArchimatePackage.Literals.FONT_ATTRIBUTE__FONT_COLOR || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.FONT_ATTRIBUTE__FONT || + feature == IArchimatePackage.Literals.FONT_ATTRIBUTE__FONT_COLOR || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconColorSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconColorSection.java index eea419529..f30d6b2fe 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconColorSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconColorSection.java @@ -95,12 +95,10 @@ private void createColorControl(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_ICON_COLOR) || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); // Update in all cases - } + Object feature = msg.getFeature(); + + if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_ICON_COLOR) || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); // Update in all cases } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconSection.java index 63f24de10..398cca088 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconSection.java @@ -225,12 +225,10 @@ protected void notifyChanged(Notification msg) { refreshPreviewImage(); } - if(msg.getNotifier() == getFirstSelectedObject()) { - if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED - || feature == IArchimatePackage.Literals.ICONIC__IMAGE_POSITION - || isFeatureNotification(msg, IDiagramModelArchimateObject.FEATURE_IMAGE_SOURCE)) { - refreshButton(); - } + if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED + || feature == IArchimatePackage.Literals.ICONIC__IMAGE_POSITION + || isFeatureNotification(msg, IDiagramModelArchimateObject.FEATURE_IMAGE_SOURCE)) { + refreshButton(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconVisibleSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconVisibleSection.java index 5c2970066..3fae4381e 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconVisibleSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/IconVisibleSection.java @@ -100,10 +100,8 @@ protected IObjectFilter getFilter() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_ICON_VISIBLE)) { - refreshButton(); - } + if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_ICON_VISIBLE)) { + refreshButton(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageChooserSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageChooserSection.java index 2843a34aa..e1aa8a9df 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageChooserSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageChooserSection.java @@ -98,11 +98,9 @@ public void run() { protected void notifyChanged(Notification msg) { super.notifyChanged(msg); - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - refreshButton(); - } + Object feature = msg.getFeature(); + if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + refreshButton(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageSourceSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageSourceSection.java index 9c979f15d..c4781c56f 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageSourceSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ImageSourceSection.java @@ -93,10 +93,8 @@ protected IObjectFilter getFilter() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - if(isFeatureNotification(msg, IDiagramModelArchimateObject.FEATURE_IMAGE_SOURCE)) { - refreshCombo(); - } + if(isFeatureNotification(msg, IDiagramModelArchimateObject.FEATURE_IMAGE_SOURCE)) { + refreshCombo(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/InfluenceRelationshipSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/InfluenceRelationshipSection.java index c8cb6c8d4..c4b5e395f 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/InfluenceRelationshipSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/InfluenceRelationshipSection.java @@ -46,12 +46,10 @@ public Class getAdaptableType() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.INFLUENCE_RELATIONSHIP__STRENGTH) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.INFLUENCE_RELATIONSHIP__STRENGTH) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/JunctionTypeSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/JunctionTypeSection.java index 7449b6c29..6e8c5e9ce 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/JunctionTypeSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/JunctionTypeSection.java @@ -96,12 +96,10 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.JUNCTION__TYPE) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.JUNCTION__TYPE) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LabelRendererSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LabelRendererSection.java index 5eeaaa648..51fcec556 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LabelRendererSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LabelRendererSection.java @@ -48,14 +48,9 @@ public Class getAdaptableType() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } - } - - if(isFeatureNotification(msg, TextRenderer.FEATURE_NAME)) { + Object feature = msg.getFeature(); + + if(isFeatureNotification(msg, TextRenderer.FEATURE_NAME) || feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineOpacitySection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineOpacitySection.java index d0f8e0d11..209cec0c6 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineOpacitySection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineOpacitySection.java @@ -63,18 +63,16 @@ int getValue() { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_LINE_ALPHA)) { - if(!fIsExecutingCommand) { - update(); - } - } - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + Object feature = msg.getFeature(); + + if(isFeatureNotification(msg, IDiagramModelObject.FEATURE_LINE_ALPHA)) { + if(!fIsExecutingCommand) { update(); } } + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); + } } @Override diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineSection.java index ff3915ac8..85ded6582 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LineSection.java @@ -17,7 +17,7 @@ /** - * Property Section for a Line + * Property Section for a Line Color and Width * * @author Phillip Beauvoir */ @@ -59,21 +59,19 @@ protected void createControls(Composite parent) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.LINE_OBJECT__LINE_COLOR || isFeatureNotification(msg, IDiagramModelObject.FEATURE_DERIVE_ELEMENT_LINE_COLOR)) { - updateColorControl(); // update also when executing command in case "default" or "derive from fill color" is chosen - } - else if(feature == IArchimatePackage.Literals.LINE_OBJECT__LINE_WIDTH) { - if(!fIsExecutingCommand) { - updateLineWidthControl(); - } - } - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.LINE_OBJECT__LINE_COLOR || isFeatureNotification(msg, IDiagramModelObject.FEATURE_DERIVE_ELEMENT_LINE_COLOR)) { + updateColorControl(); // update also when executing command in case "default" or "derive from fill color" is chosen + } + else if(feature == IArchimatePackage.Literals.LINE_OBJECT__LINE_WIDTH) { + if(!fIsExecutingCommand) { + updateLineWidthControl(); } } + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); + } } @Override @@ -100,7 +98,6 @@ private void updateColorControl() { else if(lineColorComposite != null) { lineColorComposite.dispose(); lineColorComposite = null; - return; } } @@ -116,7 +113,6 @@ private void updateLineWidthControl() { else if(lineWidthComposite != null) { lineWidthComposite.dispose(); lineWidthComposite = null; - return; } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LockedSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LockedSection.java index 6ca6ae402..9277cdd4c 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LockedSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/LockedSection.java @@ -78,11 +78,9 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/SketchModelBackgroundSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/SketchModelBackgroundSection.java index 7dfb0adba..c7daa4f43 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/SketchModelBackgroundSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/SketchModelBackgroundSection.java @@ -107,12 +107,10 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.SKETCH_MODEL__BACKGROUND) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.SKETCH_MODEL__BACKGROUND) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextAlignmentSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextAlignmentSection.java index f98c045d1..9c62e0ed5 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextAlignmentSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextAlignmentSection.java @@ -192,18 +192,16 @@ public void widgetSelected(SelectionEvent e) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); + Object feature = msg.getFeature(); - if(feature == IArchimatePackage.Literals.TEXT_ALIGNMENT__TEXT_ALIGNMENT) { - updateTextAlignmentControls(); - } - else if(feature == IArchimatePackage.Literals.TEXT_POSITION__TEXT_POSITION) { - updateTextPositionControls(); - } - else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + if(feature == IArchimatePackage.Literals.TEXT_ALIGNMENT__TEXT_ALIGNMENT) { + updateTextAlignmentControls(); + } + else if(feature == IArchimatePackage.Literals.TEXT_POSITION__TEXT_POSITION) { + updateTextPositionControls(); + } + else if(feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextContentSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextContentSection.java index 4bfd13e37..058e0e63b 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextContentSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/TextContentSection.java @@ -79,13 +79,11 @@ protected void textChanged(String oldText, String newText) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.TEXT_CONTENT__CONTENT || - feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.TEXT_CONTENT__CONTENT || + feature == IArchimatePackage.Literals.LOCKABLE__LOCKED) { + update(); } } diff --git a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ViewpointSection.java b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ViewpointSection.java index c703310b5..accead410 100644 --- a/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ViewpointSection.java +++ b/com.archimatetool.editor/src/com/archimatetool/editor/propertysections/ViewpointSection.java @@ -140,12 +140,10 @@ public String getText(Object element) { @Override protected void notifyChanged(Notification msg) { - if(msg.getNotifier() == getFirstSelectedObject()) { - Object feature = msg.getFeature(); - - if(feature == IArchimatePackage.Literals.ARCHIMATE_DIAGRAM_MODEL__VIEWPOINT) { - update(); - } + Object feature = msg.getFeature(); + + if(feature == IArchimatePackage.Literals.ARCHIMATE_DIAGRAM_MODEL__VIEWPOINT) { + update(); } }