adapt to clean up API (new font management)
diff --git a/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/AddAnythingFeature.java b/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/AddAnythingFeature.java
index e063e93..a142650 100644
--- a/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/AddAnythingFeature.java
+++ b/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/AddAnythingFeature.java
@@ -41,6 +41,7 @@
super(fp);
}
+ @Override
public PictogramElement add(IAddContext context) {
Object newObject = context.getNewObject();
Shape shape = Graphiti.getPeCreateService().createShape(context.getTargetContainer(), true);
@@ -51,13 +52,14 @@
r.setBackground(gaService.manageColor(getDiagram(), IColorConstant.WHITE));
String text = newObject.getClass().getName() + " - " + newObject.toString();
- Text textGa = gaService.createDefaultText(r, text);
+ Text textGa = gaService.createDefaultText(getDiagram(), r, text);
gaService.setLocationAndSize(textGa, 0, 0, 400, 100);
textGa.setAngle(-1);
return shape;
}
+ @Override
public boolean canAdd(IAddContext context) {
return context.getTargetContainer() != null;
}
diff --git a/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/create/SketchCreateGaFeature.java b/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/create/SketchCreateGaFeature.java
index 4296701..ab6e039 100644
--- a/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/create/SketchCreateGaFeature.java
+++ b/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/features/create/SketchCreateGaFeature.java
@@ -94,7 +94,7 @@
AbstractText label;
if (isMultiLineText()) {
- label = gaService.createDefaultMultiText(newGa, NEW_ELEMENT);
+ label = gaService.createDefaultMultiText(getDiagram(), newGa, NEW_ELEMENT);
} else {
label = gaService.createText(newGa, NEW_ELEMENT);
}