package org.openhealthtools.mdht.uml.hdf.ui.util;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Property;
import org.openhealthtools.mdht.uml.common.notation.INotationProvider;

public class HDFAnnotationProvider implements INotationProvider, IExecutableExtension {

	public final static int HL7_PROPERTY_ANNOTATION = IHL7Appearance.DISP_VOCABULARY | IHL7Appearance.DISP_UPDATE_MODE;

	public String getPrintString(Element element) {
		String printString = null;

		if (element instanceof Property) {
			printString = HDFPropertyNotation.getCustomLabel((Property)element, IHL7Appearance.DEFAULT_HL7_PROPERTY);
		}
		
		return printString;
	}

	public String getAnnotation(Element element) {
		String annotation = null;
		
		if (element instanceof Property) {
			annotation = HDFPropertyNotation.getCustomLabel((Property)element, HL7_PROPERTY_ANNOTATION);
		}
		
		return annotation;
	}

	public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
			throws CoreException {
		// do nothing
	}

}

@@ -1081,32 +1081,181 @@
 otation;%0D%0A%09%7D%0D%0A%0D%0A
+%09public Object getElementImage(Element element) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09public Object getAnnotationImage(Element element) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A
 %09public void set

Add support for notation images.