Community
Participate
Working Groups
«ERROR "Empty list of labels passed"-»
«ENDIF-»
«LET (gmfgen::GenLabel) labels.first() AS label-»
«REM»FIXME: Refactor. This is a fast copy of getDiagramLabelText template (below) to fix #193178. Need to reuse parts of TextAware.xpt«ENDREM»
«IF label.modelFacet == null-»
org.eclipse.core.runtime.IAdaptable hintAdapter = new «getDiagram().getParserProviderQualifiedClassName()».HintAdapter(
«getDiagram().getElementTypesQualifiedClassName()».«getUniqueIdentifier()»,
(view.getElement() != null ? view.getElement() : view),
«EXPAND xpt::editor::VisualIDRegistry::getTypeMethodCall FOR label.getDiagram()»(«EXPAND xpt::editor::VisualIDRegistry::visualID FOR label»));
org.eclipse.gmf.runtime.common.ui.services.parser.IParser parser = org.eclipse.gmf.runtime.common.ui.services.parser.ParserService.getInstance().getParser(hintAdapter);
if (parser != null) {
return parser.getPrintString(hintAdapter, org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions.NONE.intValue());
} else {
«EXPAND returnEmptyString-»
}
«ELSE-»
«EXPAND getDiagramLabelText(this, label) FOR label.modelFacet-»
«ENDIF»
«ENDLET-»
«ENDDEFINE»