de.cau.cs.kieler.ksbase.ui.test
Class ModelObjectTester
java.lang.Object
org.eclipse.core.expressions.PropertyTester
de.cau.cs.kieler.ksbase.ui.test.ModelObjectTester
- All Implemented Interfaces:
- IPropertyTester
public class ModelObjectTester
- extends PropertyTester
A property tester which checks if a selected diagram object matches a given
model element.
- Rating

- (2009-12-15)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelObjectTester
public ModelObjectTester()
test
public boolean test(Object receiver,
String property,
Object[] args,
Object expectedValue)
- Test method called by the eclipse menu framework when checking for menu
visibility. This is kind of hacky, because we are ignoring the given
items and using the PlatformUI class to get the current selection object.
This results in multiple calls for all selected objects but it is working
fast enough. Maybe this can be improved somehow.
- Parameters:
receiver
- The receiver objectproperty
- The property to checkargs
- The arguments, in this case this has to be the
array[Editor,Transformation]expectedValue
- The expected value
- Returns:
- True if all selected objects are matching to the current
selection.
evaluateTransformation
public static boolean evaluateTransformation(EditorTransformationSettings editor,
String transformation,
String[] parameterTypes,
List<EObject> parameter,
boolean execute)
- Evaluates the given transformation.
- Parameters:
editor
- The editor to usetransformation
- The transformation to validateparameterTypes
- The parameter typesparameter
- The parameter valuesexecute
- Should the transformation actually be executed?
- Returns:
- True If the transformation could be initialized and if the
execute parameter is set, the transformation returned true.