Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-03-05 17:15:31 +0000
committercletavernie2013-03-05 17:15:31 +0000
commit6fba62a50bf139c4584bba1dbca40ba307865d33 (patch)
tree888842f81a76457684d2908c7413ae648cf50c1f /plugins/infra/services/org.eclipse.papyrus.infra.services.decoration
parent2b3f54be65436eb1edd5fe299ce6172ad23bb020 (diff)
downloadorg.eclipse.papyrus-6fba62a50bf139c4584bba1dbca40ba307865d33.tar.gz
org.eclipse.papyrus-6fba62a50bf139c4584bba1dbca40ba307865d33.tar.xz
org.eclipse.papyrus-6fba62a50bf139c4584bba1dbca40ba307865d33.zip
290952: [CDO] Support for CDO model repository
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290952 Merged the cdo_kepler branch to the trunk (r9967 -> r10355)
Diffstat (limited to 'plugins/infra/services/org.eclipse.papyrus.infra.services.decoration')
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/DecorationService.java8
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/IDecorationSpecificFunctions.java15
2 files changed, 14 insertions, 9 deletions
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/DecorationService.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/DecorationService.java
index 8596816ef7e..8627ca404d6 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/DecorationService.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/DecorationService.java
@@ -12,6 +12,8 @@
* Ansgar Radermacher (CEA LIST) - ansgar.radermacher@cea.fr (major revision in context of bug 400593)
*
* Arnaud Cuccuru (CEA LIST) - arnaud.cuccuru@cea.fr
+ * Christian W. Damus (CEA) - refactor for non-workspace abstraction of problem markers (CDO)
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.services.decoration;
@@ -21,7 +23,6 @@ import java.util.Map;
import java.util.Observable;
import java.util.Observer;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -34,6 +35,7 @@ import org.eclipse.papyrus.infra.services.decoration.util.DecorationSpecificFunc
import org.eclipse.papyrus.infra.services.decoration.util.DecorationUtils;
import org.eclipse.papyrus.infra.services.decoration.util.IPapyrusDecoration;
import org.eclipse.papyrus.infra.services.markerlistener.IMarkerEventListener;
+import org.eclipse.papyrus.infra.services.markerlistener.IPapyrusMarker;
/**
* The Class DecorationService.
@@ -175,7 +177,7 @@ public class DecorationService extends Observable implements IDecorationService
* @see org.eclipse.papyrus.infra.services.decoration.IDecorationService#addDecoration(java.lang.String, org.eclipse.emf.ecore.EObject,
* org.eclipse.jface.resource.ImageDescriptor, java.lang.String)
*/
- public synchronized IPapyrusDecoration addDecoration(IMarker marker, EObject element) {
+ public synchronized IPapyrusDecoration addDecoration(IPapyrusMarker marker, EObject element) {
try {
// obtain marker type specific function
@@ -258,7 +260,7 @@ public class DecorationService extends Observable implements IDecorationService
/* (non-Javadoc)
* @see org.eclipse.papyrus.infra.services.markerlistener.IMarkerEventListener#notifyMarkerChange(org.eclipse.emf.ecore.EObject, org.eclipse.core.resources.IMarker, int)
*/
- public void notifyMarkerChange(EObject eObjectOfMarker, IMarker marker, int addedOrRemoved) {
+ public void notifyMarkerChange(EObject eObjectOfMarker, IPapyrusMarker marker, int addedOrRemoved) {
if (addedOrRemoved == IMarkerEventListener.MARKER_ADDED) {
this.addDecoration(marker, eObjectOfMarker) ;
}
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/IDecorationSpecificFunctions.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/IDecorationSpecificFunctions.java
index eae60345b8c..3c4b9519d53 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/IDecorationSpecificFunctions.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.decoration/src/org/eclipse/papyrus/infra/services/decoration/IDecorationSpecificFunctions.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2013 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,8 @@
*
* Contributors:
* Ansgar Radermacher (CEA LIST) - ansgar.radermacher@cea.fr
+ * Christian W. Damus (CEA) - refactor for non-workspace abstraction of problem markers (CDO)
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.services.decoration;
@@ -18,6 +20,7 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.services.decoration.util.Decoration.PreferedPosition;
import org.eclipse.papyrus.infra.services.decoration.util.IPapyrusDecoration;
+import org.eclipse.papyrus.infra.services.markerlistener.IPapyrusMarker;
/**
* This interface allows to access a set of functions that depend on the decorator type.
@@ -57,7 +60,7 @@ public interface IDecorationSpecificFunctions {
* @param marker
* @return the image descriptor
*/
- public ImageDescriptor getImageDescriptorForGE(IMarker marker);
+ public ImageDescriptor getImageDescriptorForGE(IPapyrusMarker marker);
/**
* Get the image descriptor for model explorer. May be identical to the image for a graphical editor
@@ -65,13 +68,13 @@ public interface IDecorationSpecificFunctions {
* @param marker
* @return the image descriptor
*/
- public ImageDescriptor getImageDescriptorForME(IMarker marker);
+ public ImageDescriptor getImageDescriptorForME(IPapyrusMarker marker);
/**
* @return the preferred position for markers within the model explorer
*
*/
- public PreferedPosition getPreferedPosition(IMarker marker);
+ public PreferedPosition getPreferedPosition(IPapyrusMarker marker);
/**
* Return a textual information for the marker (used for fixed messages that do not need to
@@ -80,13 +83,13 @@ public interface IDecorationSpecificFunctions {
* @param marker
* @return
*/
- public String getMessage(IMarker marker);
+ public String getMessage(IPapyrusMarker marker);
/**
* return the priority of a decoration. This enables to select a marker with a high priority, if multiple markers for the
* same model element and the same position exist. See also bug 392724
*/
- public int getPriority(IMarker marker);
+ public int getPriority(IPapyrusMarker marker);
/**
* does the decoration type support a propagation from child to parent, e.g. in case of a problem marker

Back to the top