Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 193178
Collapse All | Expand All

(-)templates/xpt/navigator/NavigatorLabelProvider.xpt (+14 lines)
Lines 272-278 Link Here
272
		«ERROR "Empty list of labels passed"-»
272
		«ERROR "Empty list of labels passed"-»
273
	«ENDIF-»
273
	«ENDIF-»
274
	«LET (gmfgen::GenLabel) labels.first() AS label-»
274
	«LET (gmfgen::GenLabel) labels.first() AS label-»
275
	«REM»FIXME: Refactor. This is a fast copy of getDiagramLabelText template (below) to fix #193178. Need to reuse parts of TextAware.xpt«ENDREM»
276
	«IF label.modelFacet == null-»
277
		org.eclipse.core.runtime.IAdaptable hintAdapter = new «getDiagram().getParserProviderQualifiedClassName()».HintAdapter(
278
			«getDiagram().getElementTypesQualifiedClassName()».«getUniqueIdentifier()», 
279
			(view.getElement() != null ? view.getElement() : view), 
280
			«EXPAND xpt::editor::VisualIDRegistry::getTypeMethodCall FOR label.getDiagram()»(«EXPAND xpt::editor::VisualIDRegistry::visualID FOR label»));
281
		org.eclipse.gmf.runtime.common.ui.services.parser.IParser parser = org.eclipse.gmf.runtime.common.ui.services.parser.ParserService.getInstance().getParser(hintAdapter);
282
		if (parser != null) {
283
			return parser.getPrintString(hintAdapter, org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions.NONE.intValue());
284
		} else {
285
			«EXPAND returnEmptyString-»
286
		}
287
	«ELSE-»
275
		«EXPAND getDiagramLabelText(this, label) FOR label.modelFacet-»
288
		«EXPAND getDiagramLabelText(this, label) FOR label.modelFacet-»
289
	«ENDIF»
276
	«ENDLET-»
290
	«ENDLET-»
277
«ENDDEFINE»
291
«ENDDEFINE»
278
292

Return to bug 193178