import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.layer0.Layer0;
import org.simantics.modeling.ModelingResources;
-import org.simantics.modeling.adapters.Removers.ValidationResult;
+import org.simantics.modeling.utils.RemoverUtils;
+import org.simantics.modeling.utils.RemoverUtils.ValidationResult;
/**
* @author Tuukka Lehtonen
diagramConnectionRelation = resource;
else
connectionRelation = resource;
- ValidationResult result = Removers.validateConnectionRelationRemoval(graph, connectionRelation, diagramConnectionRelation);
+ ValidationResult result = RemoverUtils.validateConnectionRelationRemoval(graph, connectionRelation, diagramConnectionRelation);
if (result.inUse())
- return Removers.formatError(graph, result);
+ return RemoverUtils.formatError(graph, result);
return null;
}
import org.simantics.db.exception.DatabaseException;
import org.simantics.diagram.flag.FlagUtil;
import org.simantics.diagram.stubs.DiagramResource;
-import org.simantics.modeling.adapters.Removers.ValidationResult;
+import org.simantics.modeling.utils.RemoverUtils;
+import org.simantics.modeling.utils.RemoverUtils.ValidationResult;
/**
* @author Tuukka Lehtonen
public String canRemove(ReadGraph graph, Map<Object, Object> aux) throws DatabaseException {
boolean lifted = FlagUtil.isLifted(graph, resource);
if (lifted) {
- ValidationResult result = Removers.validateFlagRemoval(graph, resource);
+ ValidationResult result = RemoverUtils.validateFlagRemoval(graph, resource);
if (result.inUse()) {
- return Removers.formatError(graph, result);
+ return RemoverUtils.formatError(graph, result);
}
}
return null;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.layer0.Layer0;
import org.simantics.modeling.ModelingResources;
-import org.simantics.modeling.adapters.Removers.ValidationResult;
+import org.simantics.modeling.utils.RemoverUtils;
+import org.simantics.modeling.utils.RemoverUtils.ValidationResult;
/**
* A remover implementation for symbol terminals.
for (Resource diagramConnectionRelation : graph.getObjects(resource, DIA.HasConnectionPoint)) {
for (Resource connectionRelation : graph.getObjects(diagramConnectionRelation, MOD.DiagramConnectionRelationToConnectionRelation)) {
- ValidationResult result = Removers.validateConnectionRelationRemoval(graph, connectionRelation, diagramConnectionRelation);
+ ValidationResult result = RemoverUtils.validateConnectionRelationRemoval(graph, connectionRelation, diagramConnectionRelation);
if (result.inUse())
- return Removers.formatError(graph, result);
+ return RemoverUtils.formatError(graph, result);
}
}
* Contributors:
* VTT Technical Research Centre of Finland - initial API and implementation
*******************************************************************************/
-package org.simantics.modeling.adapters;
+package org.simantics.modeling.utils;
import java.util.ArrayList;
import java.util.Collection;
/**
* @author Tuukka Lehtonen
*/
-final class Removers {
+final public class RemoverUtils {
public static ValidationResult validateFlagRemoval(ReadGraph graph, Resource flag) throws DatabaseException {
DiagramResource DIA = DiagramResource.getInstance(graph);