Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraradermache2010-12-15 16:48:12 +0000
committeraradermache2010-12-15 16:48:12 +0000
commitca51dfa17fbbfdaf6a1b53a687687939a1d7c767 (patch)
treebe2db3994fc50ab4ef15b45deddc3cd3414ee275
parentcd180fcf12c4b42749b2deef350daaedc6ed00f8 (diff)
downloadorg.eclipse.papyrus-ca51dfa17fbbfdaf6a1b53a687687939a1d7c767.tar.gz
org.eclipse.papyrus-ca51dfa17fbbfdaf6a1b53a687687939a1d7c767.tar.xz
org.eclipse.papyrus-ca51dfa17fbbfdaf6a1b53a687687939a1d7c767.zip
- Added dependency to org.eclipse.papyrus.validation (related to fix for bug 331787), removed dependency to ValidationTool in core
- Fixed errors due to the (unintended?!) usage of the Activator from org.eclipse.papyrus.wizards (instead of diagrams.common)
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ValidationDecoratorProvider.java2
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java30
5 files changed, 25 insertions, 14 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.diagram.common/META-INF/MANIFEST.MF
index 9ef43f3fd78..3f2435d0b2a 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/META-INF/MANIFEST.MF
@@ -64,7 +64,8 @@ Require-Bundle: org.eclipse.uml2.uml.edit;visibility:=reexport,
org.eclipse.papyrus.preferences;bundle-version="0.7.0",
org.eclipse.gmf.runtime.diagram.ui.actions,
org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.0",
- org.eclipse.core.expressions
+ org.eclipse.core.expressions,
+ org.eclipse.papyrus.validation;bundle-version="0.7.1"
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.7.0
Bundle-ActivationPolicy: lazy
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java
index aa3003669c0..1dc19566aff 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/actions/ShowHideContentsAction.java
@@ -42,12 +42,12 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.papyrus.diagram.common.Messages;
import org.eclipse.papyrus.diagram.common.commands.ShowHideElementsRequest;
import org.eclipse.papyrus.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.diagram.common.providers.EditorLabelProvider;
import org.eclipse.papyrus.diagram.common.util.Util;
-import org.eclipse.papyrus.wizards.Activator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.IWorkbenchWindow;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java
index 06dec9dc243..8229c8b5a2d 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/layout/LinkRepresentationForLayoutAction.java
@@ -30,8 +30,8 @@ import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gef.requests.ReconnectRequest;
import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.common.Activator;
import org.eclipse.papyrus.diagram.common.command.wrappers.EMFtoGEFCommandWrapper;
-import org.eclipse.papyrus.wizards.Activator;
/**
*
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ValidationDecoratorProvider.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ValidationDecoratorProvider.java
index 869a686b27b..22f70264733 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ValidationDecoratorProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/providers/ValidationDecoratorProvider.java
@@ -45,8 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.core.utils.ValidationUtils;
import org.eclipse.papyrus.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.papyrus.validation.ValidationUtils;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java
index db823f77e35..8c449c807b3 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/resourceupdate/ResourceUpdateService.java
@@ -75,21 +75,23 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
lifeCycleEvents.addDoSaveListener(new ISaveEventListener() {
public void doSave(DoSaveEvent event) {
- isActive = false;
+ deactivate();
}
public void doSaveAs(DoSaveEvent event) {
- isActive = false;
+ // isActive = false;
+ deactivate();
}
});
lifeCycleEvents.addPostDoSaveListener(new ISaveEventListener() {
public void doSave(DoSaveEvent event) {
- isActive = true;
+ activate();
}
public void doSaveAs(DoSaveEvent event) {
isActive = true;
+ activate();
}
});
}
@@ -123,10 +125,10 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
* A visitor for resource changes. Detects, whether a changed resource belongs to an opened editor
*/
public boolean visit(IResourceDelta delta) {
- if(!isActive) {
+ // if(!isActive) {
// don't follow resource changes, once inactive (either due to save or due to a pending user dialog)
- return false;
- }
+ // return false;
+ // }
IResource changedResource = delta.getResource();
if(delta.getFlags() == IResourceDelta.MARKERS) {
// only markers have been changed. Refresh their display only (no need to reload resources)
@@ -241,16 +243,24 @@ public class ResourceUpdateService implements IService, IResourceChangeListener,
private ModelSet modelSet;
-
- public void startService() throws ServiceException {
+ // private ILifeCycleEventsProvider lifeCycleEvents;
+
+ private void activate() {
// ... add service to the workspace
ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
+ }
+ private void deactivate() {
+ // remove it from workspace
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ }
+ public void startService() throws ServiceException {
+ activate();
}
public void disposeService() throws ServiceException {
- // remove it from workspace
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ deactivate();
+ // lifeCycleEvents.removeDoSaveListener(listener);
}
}

Back to the top