adapt to clean up API (new font management)
diff --git a/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/association/TestAddAssociationFeature.java b/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/association/TestAddAssociationFeature.java
index 7232e8f..218b31f 100644
--- a/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/association/TestAddAssociationFeature.java
+++ b/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/association/TestAddAssociationFeature.java
@@ -48,6 +48,7 @@
super(fp);
}
+ @Override
public PictogramElement add(IAddContext context) {
IAddConnectionContext addConnectionContext = (IAddConnectionContext) context;
@@ -64,7 +65,7 @@
// add dynamic text decorator for the association name
ConnectionDecorator labelDecorator = pecService.createConnectionDecorator(newConnection, true, 0.5, true);
- Text text = gaService.createDefaultText(labelDecorator);
+ Text text = gaService.createDefaultText(getDiagram(), labelDecorator);
text.setForeground(manageColor(IColorConstant.BLACK));
gaService.setLocationAndSize(text, 30, 20, 50, 12);
@@ -82,6 +83,7 @@
return newConnection;
}
+ @Override
public boolean canAdd(IAddContext context) {
// return true if given business object is of instance association
if (context instanceof IAddConnectionContext && context.getNewObject() instanceof EReference) {
diff --git a/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/clazz/TestAddClassFeature.java b/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/clazz/TestAddClassFeature.java
index 1fc25b0..7d2aa2a 100644
--- a/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/clazz/TestAddClassFeature.java
+++ b/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/clazz/TestAddClassFeature.java
@@ -64,6 +64,7 @@
super(fp);
}
+ @Override
public boolean canAdd(IAddContext context) {
// check if user wants to add a EClass
if (context.getNewObject() instanceof EClass) {
@@ -81,6 +82,7 @@
return false;
}
+ @Override
public PictogramElement add(IAddContext context) {
EClass addedClass = (EClass) context.getNewObject();
ContainerShape targetContainer = context.getTargetContainer();
@@ -124,7 +126,7 @@
Shape shape = pecService.createShape(containerShape, false);
// create and set text graphics algorithm
- Text text = gaService.createDefaultText(shape, addedClass.getName());
+ Text text = gaService.createDefaultText(getDiagram(), shape, addedClass.getName());
text.setForeground(manageColor(CLASS_TEXT_FOREGROUND));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
diff --git a/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/pack/TestAddPackageFeature.java b/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/pack/TestAddPackageFeature.java
index bdda323..b29cf6f 100644
--- a/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/pack/TestAddPackageFeature.java
+++ b/tests/org.eclipse.graphiti.testtool.ecore/src/org/eclipse/graphiti/testtool/ecore/features/pack/TestAddPackageFeature.java
@@ -54,6 +54,7 @@
super(fp);
}
+ @Override
public boolean canAdd(IAddContext context) {
// check if user wants to add a package
if (context.getNewObject() instanceof EPackage) {
@@ -66,6 +67,7 @@
return false;
}
+ @Override
public PictogramElement add(IAddContext context) {
EPackage addedPackage = (EPackage) context.getNewObject();
Diagram targetDiagram = (Diagram) context.getTargetContainer();
@@ -109,7 +111,7 @@
Shape shape = pecService.createShape(containerShape, false);
// create and set text graphics algorithm
- Text text = gaService.createDefaultText(shape, addedPackage.getName());
+ Text text = gaService.createDefaultText(getDiagram(), shape, addedPackage.getName());
text.setForeground(manageColor(PACKAGE_TEXT_FOREGROUND));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);