Skip to content
Snippets Groups Projects
Commit 0deacd48 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

ConstraintUtils -> ConstraintUIUtils

refs 2553
parent 46ef19b3
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ import org.eclipse.jface.viewers.ILightweightLabelDecorator; ...@@ -24,7 +24,7 @@ import org.eclipse.jface.viewers.ILightweightLabelDecorator;
import org.fortiss.tooling.kernel.extension.data.IConstraintViolation.ESeverity; import org.fortiss.tooling.kernel.extension.data.IConstraintViolation.ESeverity;
import org.fortiss.tooling.kernel.ui.ESharedImages; import org.fortiss.tooling.kernel.ui.ESharedImages;
import org.fortiss.tooling.kernel.ui.service.IMarkerService; import org.fortiss.tooling.kernel.ui.service.IMarkerService;
import org.fortiss.tooling.kernel.ui.util.ConstraintsUtils; import org.fortiss.tooling.kernel.ui.util.ConstraintsUIUtils;
/** /**
* Label decorator for the {@link IMarkerService} decorations: errors, warnings, etc. * Label decorator for the {@link IMarkerService} decorations: errors, warnings, etc.
...@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.ui.util.ConstraintsUtils; ...@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.ui.util.ConstraintsUtils;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 6F09A7DA3B08A67539BBCF9D027080FE * @ConQAT.Rating YELLOW Hash: 79DD67670D9B7AAA62F3567B3CD0C347
*/ */
public final class ConstraintLabelDecorator extends BaseLabelProvider implements public final class ConstraintLabelDecorator extends BaseLabelProvider implements
ILightweightLabelDecorator { ILightweightLabelDecorator {
...@@ -42,7 +42,7 @@ public final class ConstraintLabelDecorator extends BaseLabelProvider implements ...@@ -42,7 +42,7 @@ public final class ConstraintLabelDecorator extends BaseLabelProvider implements
public void decorate(Object element, IDecoration decoration) { public void decorate(Object element, IDecoration decoration) {
if(element instanceof EObject) { if(element instanceof EObject) {
ESeverity sev = IMarkerService.INSTANCE.getHighestViolationSeverity((EObject)element); ESeverity sev = IMarkerService.INSTANCE.getHighestViolationSeverity((EObject)element);
sev = ConstraintsUtils.augmentSeverityWithConstraintSeverity(sev, (EObject)element); sev = ConstraintsUIUtils.augmentSeverityWithConstraintSeverity(sev, (EObject)element);
switch(sev) { switch(sev) {
case FATAL: case FATAL:
decoration.addOverlay(ESharedImages.FATAL_OVERLAY.getImageDescriptor()); decoration.addOverlay(ESharedImages.FATAL_OVERLAY.getImageDescriptor());
......
...@@ -25,7 +25,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService; ...@@ -25,7 +25,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase; import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
import org.fortiss.tooling.kernel.ui.extension.IConstraintVerifierUI; import org.fortiss.tooling.kernel.ui.extension.IConstraintVerifierUI;
import org.fortiss.tooling.kernel.ui.service.IConstraintVerificationUIService; import org.fortiss.tooling.kernel.ui.service.IConstraintVerificationUIService;
import org.fortiss.tooling.kernel.ui.util.ConstraintsUtils; import org.fortiss.tooling.kernel.ui.util.ConstraintsUIUtils;
import org.fortiss.tooling.kernel.utils.EcoreUtils; import org.fortiss.tooling.kernel.utils.EcoreUtils;
import org.fortiss.tooling.kernel.utils.LoggingUtils; import org.fortiss.tooling.kernel.utils.LoggingUtils;
...@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils; ...@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils;
* @author aravantinos * @author aravantinos
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: FC9CE128FC7A41382D00FDDCC4F2AE52 * @ConQAT.Rating YELLOW Hash: F8F4B58C69F64FE19BEC02DE8D19A220
*/ */
public final class ConstraintVerificationUIService extends public final class ConstraintVerificationUIService extends
EObjectAwareServiceBase<IConstraintVerifierUI<IConstraint>> implements EObjectAwareServiceBase<IConstraintVerifierUI<IConstraint>> implements
...@@ -63,7 +63,7 @@ public final class ConstraintVerificationUIService extends ...@@ -63,7 +63,7 @@ public final class ConstraintVerificationUIService extends
public void openStatus(IConstraintVerificationStatus status) { public void openStatus(IConstraintVerificationStatus status) {
IConstraintVerifierUI<IConstraint> verifier = getFirstVerifier(status.getConstraint()); IConstraintVerifierUI<IConstraint> verifier = getFirstVerifier(status.getConstraint());
verifier.openStatus(status); verifier.openStatus(status);
ConstraintsUtils.triggerMarkersRefresh(status.getConstraint()); ConstraintsUIUtils.triggerMarkersRefresh(status.getConstraint());
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
...@@ -152,10 +152,10 @@ public final class ConstraintVerificationUIService extends ...@@ -152,10 +152,10 @@ public final class ConstraintVerificationUIService extends
} }
}); });
} else if(!(constraint.getVerificationStatus() instanceof OutdatedVerificationStatus)) { } else if(!(constraint.getVerificationStatus() instanceof OutdatedVerificationStatus)) {
ConstraintsUtils.createOutdatedVerificationStatus(constraint); ConstraintsUIUtils.createOutdatedVerificationStatus(constraint);
} }
// Update GUI markers // Update GUI markers
ConstraintsUtils.triggerMarkersRefresh(constraint); ConstraintsUIUtils.triggerMarkersRefresh(constraint);
return true; return true;
} }
return false; return false;
......
...@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService; ...@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.service.listener.IPersistencyServiceListener; import org.fortiss.tooling.kernel.service.listener.IPersistencyServiceListener;
import org.fortiss.tooling.kernel.ui.internal.views.MarkerViewPart; import org.fortiss.tooling.kernel.ui.internal.views.MarkerViewPart;
import org.fortiss.tooling.kernel.ui.service.IMarkerService; import org.fortiss.tooling.kernel.ui.service.IMarkerService;
import org.fortiss.tooling.kernel.ui.util.ConstraintsUtils; import org.fortiss.tooling.kernel.ui.util.ConstraintsUIUtils;
/** /**
* This class implements the {@link IMarkerService} interface. * This class implements the {@link IMarkerService} interface.
...@@ -154,7 +154,7 @@ public class MarkerService implements IMarkerService, IPersistencyServiceListene ...@@ -154,7 +154,7 @@ public class MarkerService implements IMarkerService, IPersistencyServiceListene
} }
ESeverity sev = getCacheEntry(top).getHighestSeverity(element); ESeverity sev = getCacheEntry(top).getHighestSeverity(element);
if(element instanceof IConstrained) { if(element instanceof IConstrained) {
sev = ConstraintsUtils.augmentSeverityWithConstraintSeverity(sev, element); sev = ConstraintsUIUtils.augmentSeverityWithConstraintSeverity(sev, element);
} }
return sev; return sev;
} }
......
...@@ -45,9 +45,9 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils; ...@@ -45,9 +45,9 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author aravantinos * @author aravantinos
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 5F009C359872D3E716E02343F9AFD225 * @ConQAT.Rating YELLOW Hash: 985A54753B82CFBFA82AF1FA54A59124
*/ */
public class ConstraintsUtils { public class ConstraintsUIUtils {
/** /**
* @param constraint * @param constraint
* @return An "outdated" verification status for <code>constraint</code>. * @return An "outdated" verification status for <code>constraint</code>.
...@@ -152,7 +152,7 @@ public class ConstraintsUtils { ...@@ -152,7 +152,7 @@ public class ConstraintsUtils {
public static ESeverity augmentSeverityWithConstraintSeverity(ESeverity sev, public static ESeverity augmentSeverityWithConstraintSeverity(ESeverity sev,
EObject modelElement) { EObject modelElement) {
if(modelElement instanceof IConstrained) { if(modelElement instanceof IConstrained) {
ESeverity sev2 = ConstraintsUtils.getSeverity((IConstrained)modelElement); ESeverity sev2 = ConstraintsUIUtils.getSeverity((IConstrained)modelElement);
if(sev == null || (sev2 != null && SEVERITY_DIRECT_COMPARATOR.compare(sev2, sev) < 0)) { if(sev == null || (sev2 != null && SEVERITY_DIRECT_COMPARATOR.compare(sev2, sev) < 0)) {
sev = sev2; sev = sev2;
} }
......
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