Commit 5b84057e authored by Levi Lucio's avatar Levi Lucio

removed circular dependency

refs 3039
parent 986271bb
......@@ -51,4 +51,3 @@ Bundle-ClassPath: .,
lib/de.cau.cs.kieler.klay.force-0.4.0.201602160301.jar,
lib/de.cau.cs.kieler.klay.layered-0.13.0.201602160301.jar,
lib/de.cau.cs.kieler.klay.tree-0.4.0.201602160301.jar
Import-Package: org.fortiss.af3.project.model.development
AdvancedTreeViewerEditorBase.java c1275888a1552dac396d3f2968faca0c33232847 GREEN
AllocationDiagramEditorBase.java 54c21b4c04fdf7bb85cd1b687dcf4b70927f55d1 GREEN
CommonDiagramEditorBase.java 2a380b7dbefef8fb1b50c53d4eb7089d9594e244 RED
ConstraintBasedProcessEditor.java a178fb8d2333b774fcc4db19370e3a5d03ee33f8 YELLOW
ConstraintBasedProcessEditor.java e2d666726fd9639681cee27b2abf4b9801ff5021 YELLOW
DiagramEditorBase.java ffd082dc0572cbde9db536320cd7ff2158bc330c GREEN
DiagramKeyHandler.java 32d7e2713bb34afddf9a826c24663ca16af11c17 GREEN
FormsEditorBase.java e547415effcbba764aebb9f40d827fd1644f803c GREEN
......
......@@ -62,7 +62,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.TreeColumn;
import org.fortiss.af3.project.model.development.ConstraintBasedDevelopmentProcess;
import org.fortiss.tooling.base.model.element.ConstraintConfiguration;
import org.fortiss.tooling.base.model.element.ElementFactory;
import org.fortiss.tooling.base.model.element.IConstraintBasedProcess;
......@@ -90,6 +89,7 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash: E05108EBDA465E0637FAD82A817FE0D6
*/
public class ConstraintBasedProcessEditor<CBP extends IConstraintBasedProcess> extends
EditorBase<CBP> implements ContextMenuContextProvider, ISelectionProvider {
......@@ -561,8 +561,9 @@ public class ConstraintBasedProcessEditor<CBP extends IConstraintBasedProcess> e
// If the constraint is in the active constraint list and the status is true
// than make the background color green
if(activeConstraints.contains(constraintToFind) &&
StatusUtils.areAllInstancesSuccessful(constraintToFind,
(ConstraintBasedDevelopmentProcess)editedObject) == true) {
StatusUtils.areAllInstancesSuccessful(constraintToFind, editedObject
.getConstraintInstanceContainer(), editedObject.getCurrentObjective()
.getActiveConstraints()) == true) {
return getCurrent().getSystemColor(SWT.COLOR_GREEN);
}
// If the constraint doesn't belong to the active list of constrains than let
......@@ -573,8 +574,9 @@ public class ConstraintBasedProcessEditor<CBP extends IConstraintBasedProcess> e
// If the constraint is active and the status is false than make the background
// color red
if(activeConstraints.contains(constraintToFind) &&
StatusUtils.areAllInstancesSuccessful(constraintToFind,
(ConstraintBasedDevelopmentProcess)editedObject) == false) {
StatusUtils.areAllInstancesSuccessful(constraintToFind, editedObject
.getConstraintInstanceContainer(), editedObject.getCurrentObjective()
.getActiveConstraints()) == false) {
return getCurrent().getSystemColor(SWT.COLOR_RED);
}
return null;
......
......@@ -9,7 +9,7 @@ LayoutDataUIUtils.java 784e54b6d1b8014f7819155bf687bfd5ec632955 GREEN
PropertiesViewUtils.java 45f1f3881c045a4c0cc71b6c01a18a1f238e5172 GREEN
RectangleLayoutUIUtils.java 799776189a183e18a09fdf36a54253e23a7fe46d GREEN
SnapToGridUtils.java 680b3d588cd491375f3ca2d798db7e29e7827ffd GREEN
StatusUtils.java 74ffb9c040c4343c70d67575d5530f78f360ad36 YELLOW
StatusUtils.java 5167ec5087f8841cc101621e267d20c23c3b138d YELLOW
TableViewerUtils.java ec3ab989d2301df965a1c2fdca9656f9858dd098 GREEN
ZoomUIUtils.java 5e48ef038f4615e888c8be9ea8c0194cd67e1cf4 YELLOW
package.html 89adfd07995e699e7b8bfd787f7e39a3e5cfca72 GREEN
......@@ -19,15 +19,16 @@ package org.fortiss.tooling.base.ui.utils;
import static org.conqat.ide.commons.ui.ui.WorkbenchUtils.getActiveWorkbenchPage;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.fortiss.af3.project.model.development.ConstraintBasedDevelopmentProcess;
import org.fortiss.tooling.kernel.model.constraints.ConstraintInstance;
import org.fortiss.tooling.kernel.model.constraints.FailedConstraintInstanceStatus;
import org.fortiss.tooling.kernel.model.constraints.IConstraintInstanceContainer;
/**
* Methods for accessing the status line.
......@@ -35,6 +36,7 @@ import org.fortiss.tooling.kernel.model.constraints.FailedConstraintInstanceStat
* @author gareis
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: E85DB1C82F0D19FF3569FE1B5CE19B69
*/
public class StatusUtils {
......@@ -67,7 +69,6 @@ public class StatusUtils {
* @param message
* the message
*/
// TODO(VA) This method is not used -> remove?
public static void setStatusMessage(String message) {
if(getStatusLine() != null) {
getStatusLine().setMessage(message);
......@@ -79,18 +80,19 @@ public class StatusUtils {
*
* @param constraintToFind
* name of the constraint
* @param editedObject
* current constraint
* @param instanceContainer
* contains the instance container for the current constraints that are active
* @param currentActiveConstraints
* contains the names of the current active constraints
* @return true or false based on the status of the constraint (Failed or Success)
*/
public static boolean areAllInstancesSuccessful(String constraintToFind,
ConstraintBasedDevelopmentProcess editedObject) {
for(ConstraintInstance ci : editedObject.getConstraintInstanceContainer()
.getConstraintInstances()) {
IConstraintInstanceContainer instanceContainer, EList<String> currentActiveConstraints) {
for(ConstraintInstance ci : instanceContainer.getConstraintInstances()) {
if(constraintToFind.toString().equalsIgnoreCase(ci.getConstraintName())) {
if(editedObject.getCurrentObjective().getActiveConstraints()
.contains(constraintToFind.toString())) {
if(currentActiveConstraints.contains(constraintToFind.toString())) {
if(ci.getConstraintName().equalsIgnoreCase(constraintToFind.toString())) {
// If the constraint instance has a "failed status"
if(ci.getStatus() instanceof FailedConstraintInstanceStatus) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment