Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaged Elaasar2018-04-21 23:52:58 +0000
committerPatrick Tessier2018-05-04 09:41:54 +0000
commit578fb333f206cda65807d98c5b991bb7a0f6fd56 (patch)
treede2d94313d715e6de7a79f3b2ec328d2f97c6822 /plugins
parent4459589b1b8c10ff365482233900b175d792aa78 (diff)
downloadorg.eclipse.papyrus-578fb333f206cda65807d98c5b991bb7a0f6fd56.tar.gz
org.eclipse.papyrus-578fb333f206cda65807d98c5b991bb7a0f6fd56.tar.xz
org.eclipse.papyrus-578fb333f206cda65807d98c5b991bb7a0f6fd56.zip
Bug 529840 - [AFViewpoints] ArchitectureDescriptionListener not called
if a model is copied from another workspace or filesystem Change the ArchitectureDescriptionAdapter to forward notifications to listeners when the AF objects are created, deleted, or modified. Change-Id: I11cb453cd942fa1888a3eb196742635e764a494d Signed-off-by: Maged Elaasar <melaasar@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionAdapter.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionAdapter.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionAdapter.java
index 6acaa9220a0..da98970ce64 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionAdapter.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionAdapter.java
@@ -30,12 +30,13 @@ public class ArchitectureDescriptionAdapter extends EContentAdapter {
*/
@Override
public void notifyChanged(Notification notification) {
- if (notification.getEventType() == Notification.REMOVING_ADAPTER)
- return;
- Object notifier = notification.getNotifier();
- if (notifier instanceof ArchitectureDescription) {
+ if (notification.getNotifier() instanceof ArchitectureDescription ||
+ notification.getNewValue() instanceof ArchitectureDescription ||
+ notification.getOldValue() instanceof ArchitectureDescription) {
ArchitectureDescriptionNotifier.getInstance().fireArchitectureContextChanged(notification);
- } else if (notifier instanceof ArchitectureDescriptionPreferences) {
+ } else if (notification.getNotifier() instanceof ArchitectureDescriptionPreferences ||
+ notification.getNewValue() instanceof ArchitectureDescriptionPreferences ||
+ notification.getOldValue() instanceof ArchitectureDescriptionPreferences) {
ArchitectureDescriptionNotifier.getInstance().fireArchitectureViewpointsChanged(notification);
}
}

Back to the top