final String styleId = "FUSE-CAMEL-NODE-TEXT"; //$NON-NLS-1$
IGaService gaService = Graphiti.getGaService();
// this is a child style of the e-class-style
Style parentStyle = getStyleForEClass(diagram);
Style style = null;
if (parentStyle == null) {
style = gaService.createStyle(diagram, styleId);
} else {
style = findStyle(parentStyle, styleId);
}
if (style == null) { // style not found - create new style
style = gaService.createStyle(getStyleForEClass(diagram), styleId);
// "overwrites" values from parent style
style.setForeground(gaService.manageColor(diagram, E_CLASS_TEXT_FOREGROUND));
}
style.setFont(gaService.manageFont(diagram, DEFAULT_FONT, DEFAULT_FONT_SIZE, false, true));
return style;
}