use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class UnboundedPart method createFigure.
public IFigure createFigure() {
EntityLabel label = LabelFactory.createContent();
label.setText("*");
return label;
}
use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class SmallContentTextualEntityPart method createFigure.
protected IFigure createFigure() {
EntityLabel label = LabelFactory.createMonospaceSmall();
label.setForegroundColor(FigureConstants.contentColor);
return new TextualFigure(label);
}
use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class GrammarBasedUIUtils method createEntityLabel.
public static EntityLabel createEntityLabel(IEntity entity) {
String category = DataTypeUtils.getAsPresentationString(entity);
EntityLabel label = null;
if ("KEYWORD".equals(category))
label = LabelFactory.createKeyword();
else if ("DELIMITER".equals(category))
label = LabelFactory.createLiteral();
else if ("IDENTIFIER".equals(category))
label = LabelFactory.createIdentifier();
else if ("LITERAL".equals(category))
label = LabelFactory.createContent();
else if ("OPERATOR".equals(category))
label = LabelFactory.createContentLight();
else if ("PARENTHESIS".equals(category))
label = LabelFactory.createContentLighter();
else if ("SEPARATOR".equals(category))
// FIXME missing label category
label = LabelFactory.createLiteral();
return label;
}
use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class GrammarBasedUIUtils method createTerminalFigure.
public static IEntityFigure createTerminalFigure(IEntity entity) {
FeatureDescriptorEnum fdEnum = entity.wGetLanguageKit().getFeatureDescriptorEnum();
IEntity category = entity.wGet(fdEnum.valueOf("category"));
IEntity literal = entity.wGet(fdEnum.valueOf("literal"));
EntityLabel label = createEntityLabel(category);
label.setText(StringUtils.unescapeString(DataTypeUtils.getAsPresentationString(literal)));
return label;
}
use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class XsiDataElementPart method createLabel.
protected EntityLabel createLabel() {
String tagName = MappingStrategyUtils.getElementNCName(getModelEntity());
EntityLabel label = LabelFactory.createContent(tagName);
label.setIcon(NotationImages.XML_TAG16);
return label;
}
Aggregations