Skip to content
Snippets Groups Projects
Commit 7724f45f authored by Florian Hölzl's avatar Florian Hölzl
Browse files

marker service operating properly in microAF3 data dictionary editor

parent c247686f
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,13 @@
id="org.fortiss.tooling.kernel.ui.internal.marker.MarkerDecorator"
label="Marker Decorator"
lightweight="true"
location="BOTTOM_LEFT">
location="BOTTOM_LEFT"
state="true">
<enablement>
<objectClass
name="org.eclipse.emf.ecore.EObject">
</objectClass>
</enablement>
</decorator>
</extension>
......
......@@ -28,6 +28,7 @@ import org.fortiss.tooling.kernel.extension.data.IConstraintViolation;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.listener.IPersistencyServiceListener;
import org.fortiss.tooling.kernel.service.IConstraintCheckerService;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.ui.service.IMarkerService;
import org.fortiss.tooling.kernel.ui.service.INavigatorService;
......@@ -45,6 +46,15 @@ public class MarkerService implements IMarkerService,
/** Stores the markers for each {@link EObject}. */
private final HashMap<EObject, Collection<IConstraintViolation<EObject>>> markerCache = new HashMap<EObject, Collection<IConstraintViolation<EObject>>>();
/** Constructor. */
public MarkerService() {
for (ITopLevelElement element : IPersistencyService.INSTANCE
.getTopLevelElementContexts()) {
topLevelElementChanged(element);
}
IPersistencyService.INSTANCE.addTopLevelElementListener(this);
}
/** {@inheritDoc} */
@Override
public synchronized Collection<IConstraintViolation<EObject>> getMarkersForElement(
......
......@@ -59,10 +59,10 @@ public class NavigatorService implements INavigatorService,
/** Constructor. */
public NavigatorService() {
for (ITopLevelElement context : IPersistencyService.INSTANCE
for (ITopLevelElement element : IPersistencyService.INSTANCE
.getTopLevelElementContexts()) {
context.addCommandStackListener(this);
saveables.put(context, new TopLevelElementSaveable(context));
element.addCommandStackListener(this);
saveables.put(element, new TopLevelElementSaveable(element));
}
IPersistencyService.INSTANCE.addTopLevelElementListener(this);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment