Commit ac223352 authored by Filip Reaboi's avatar Filip Reaboi
Browse files

GREEN

parent 15207263
ComponentArchitectureTransformationMenuBase.java 0078fa26e8f604bf05730ab18299ea645558a709 YELLOW
ComponentArchitectureTransformationMenuBase.java 5127d5a36635461b255b482ae161473686170610 GREEN
......@@ -17,7 +17,9 @@ package org.fortiss.af3.component.ui.commands;
import static java.util.Collections.emptyList;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.swt.widgets.Display.getCurrent;
import static org.fortiss.af3.project.utils.ProjectUtils.getFileProject;
import static org.fortiss.tooling.kernel.service.IElementCompositorService.getInstance;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstChildWithType;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.fixMissingIDs;
......@@ -30,7 +32,6 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Display;
import org.fortiss.af3.allocation.model.AllocationTable;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.utils.IComponentArchitectureTransformation;
......@@ -103,7 +104,7 @@ public abstract class ComponentArchitectureTransformationMenuBase<A extends IPro
IPersistencyService.getInstance().getTopLevelElementFor(fileProject);
topLevelElement.runAsCommand(() -> {
IElementCompositorService cs = IElementCompositorService.getInstance();
IElementCompositorService cs = getInstance();
if(isDeleteExistingArchitectures(fileProject)) {
List<AllocationTable> caAllocations =
new ArrayList<AllocationTable>(getChildrenWithType(fileProject,
......@@ -134,7 +135,7 @@ public abstract class ComponentArchitectureTransformationMenuBase<A extends IPro
" already exist for selected Component Architecture. Hit:\n - OK to delete them.\n - Cancel to keep them and create another " +
getGeneratedArchitectureTypeName() + ".";
deleteExisting = openConfirm(Display.getCurrent().getActiveShell(), title, message);
deleteExisting = openConfirm(getCurrent().getActiveShell(), title, message);
}
return deleteExisting;
}
......
ConstraintsTree.java 0e1be032628e920486e27fc9d9f7b93f2d283305 GREEN
OCRAContractTree.java 098284afad45d5cbdfceabbfad89855bed7c2f73 YELLOW
OCRAContractTree.java aa0a14212dea90e5cc3a96beac2f42f8ce136f68 GREEN
TLTree.java 3045679032306d81cc1dd38b84cd957a188c175c GREEN
TestTree.java ef7cb6f5c27460211baeea8686b6088e76cf386d GREEN
......@@ -16,6 +16,7 @@
package org.fortiss.af3.specification.ui.editor.trees;
import static org.fortiss.af3.ocra.utils.OCRAContractFactory.createNewContractContainerAndContract;
import static org.fortiss.tooling.kernel.service.IConstraintService.getInstance;
import static org.fortiss.tooling.kernel.utils.ConstraintsUtils.getFirstConstrained;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
......@@ -38,7 +39,6 @@ import org.fortiss.af3.specification.constraint.ContractConstraint;
import org.fortiss.tooling.base.model.element.IModelElementSpecification;
import org.fortiss.tooling.kernel.model.constraints.ConstraintInstance;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.service.IConstraintService;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.presentation.ConstraintViolationAwareLabelProviderBase;
......@@ -62,7 +62,7 @@ public class OCRAContractTree extends ConstraintsTree {
return null;
}
ContractContainer cc = (ContractContainer)o;
String tlCstrName = IConstraintService.getInstance().getName(ContractConstraint.class);
String tlCstrName = getInstance().getName(ContractConstraint.class);
for(ConstraintInstance ci : cc.getConstraintInstances()) {
if(tlCstrName.equals(ci.getConstraintName())) {
// The component might be null if the method is called during
......
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