From 543631a6045b9bec154dd1342c92ca5095afd1c1 Mon Sep 17 00:00:00 2001 From: Vincent Aravantinos <aravantinos@fortiss.org> Date: Thu, 14 Jul 2016 14:15:47 +0000 Subject: [PATCH] IConstraint -> Constraint, imagedescriptor, ID refs 2553 --- .../IConstraintVerificationUIService.java | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/service/IConstraintVerificationUIService.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/service/IConstraintVerificationUIService.java index b609e9018..7d5e10410 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/service/IConstraintVerificationUIService.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/service/IConstraintVerificationUIService.java @@ -2,7 +2,8 @@ package org.fortiss.tooling.kernel.ui.service; import java.util.Set; -import org.fortiss.tooling.kernel.model.constraints.IConstraint; +import org.eclipse.jface.resource.ImageDescriptor; +import org.fortiss.tooling.kernel.model.constraints.Constraint; import org.fortiss.tooling.kernel.model.constraints.IConstraintContainer; import org.fortiss.tooling.kernel.model.constraints.IConstraintVerificationStatus; import org.fortiss.tooling.kernel.service.IConstraintVerificationService; @@ -15,7 +16,7 @@ import org.fortiss.tooling.kernel.ui.internal.ConstraintVerificationUIService; * @author aravantinos * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 088353619375F645ACA70AD1C2990CE1 + * @ConQAT.Rating YELLOW Hash: D385AA84897DCC95B76AA13E0A351ED2 */ public interface IConstraintVerificationUIService { /** Returns the service instance. */ @@ -24,17 +25,22 @@ public interface IConstraintVerificationUIService { } /** Action to take when trying to open the (status of the given) constraint. */ - void openStatus(IConstraint c); + void openStatus(Constraint c); /** True if the (status of the) the given constraint can be open. */ - boolean canOpen(IConstraint c); + boolean canOpen(Constraint c); /** Install the given constraint: install notifiers and triggers an "onOutdate" event. */ - void install(IConstraint constraint); + void install(Constraint constraint); /** Registers the verifier UI part with the kernel. */ - <T extends IConstraint> void registerConstraintVerifierUI(IConstraintVerifierUI<T> verifier, - Class<T> constraintElementClass); + void registerConstraintVerifierUI(IConstraintVerifierUI verifier); + + /** + * True if a failure of the given constraint shall be displayed as a warning instead of an + * error. + */ + boolean shallDisplayAsWarning(Constraint constraint); /** * The following features deal with the usage of constraints to drive the process. @@ -46,19 +52,20 @@ public interface IConstraintVerificationUIService { * Returns the status of the constraint, possibly returns <code>null</code> if the constraint is * not activated. */ - IConstraintVerificationStatus getStatus(IConstraint constraint); + IConstraintVerificationStatus getStatus(Constraint constraint); /** Returns a list of all available constraint types. */ - Set<Class<IConstraint>> getAvailableConstraintTypes(); + Set<String> getAvailableConstraintTypes(); /** Activates the constraint type in the context of the given constraints container. */ - <T extends IConstraint> void activate(Class<T> constraintType, - IConstraintContainer cstrContainer); + void activate(String id, IConstraintContainer cstrContainer); /** Deactivates the constraint type in the context of the given constraints container. */ - <T extends IConstraint> void deactivate(Class<T> constraintType, - IConstraintContainer cstrContainer); + void deactivate(String id, IConstraintContainer cstrContainer); /** Returns a description for the given constraint type. */ - <T extends IConstraint> String getDescription(Class<T> constraintType); + String getDescription(String id); + + /** Returns the image descriptor to be used as icon image. */ + ImageDescriptor getIconImageDescriptor(String id); } -- GitLab