Custom Artifact Metadata

From Eclipsepedia

Jump to: navigation, search

< To: Tigerstripe Extension Points

  • Full name : org.eclipse.tigerstripe.metamodel.customArtifactMetadata

Purpose : This extension point is designed to allow users to override or specify additional metadata that is used by the Tigerstripe explorer and other components of the UI.

  • Usage :

There are three separate elements that can be provided :

artifactIcon : Here you can override the icon that is used for a "standard" artifact. For each artifactType, eg "IEnumArtifact", you can specify the "normal" icon, and the "greyed out" icon (these are used when an artifact is outsode the scope of a facet). The "new" Icon that can be specified is ignored by the platform as this has been superceded by the creationPatterns extension point.

modelComponentIconProvider : Here you can define a custom dynamic icon provider for a specific type of Artifact. For example this can be used to change the appearance of an artifact icon based on annotations. For each artifact type, eg "IEnumArtifact", you can specify a provider. The provider must implement the Interface :

org.eclipse.tigerstripe.repository.metamodel.providers.IModelComponentIconProvider

Only two methods need to be implmemented : getIconURL(Object context), and getGreyedoutIconURL(Object context). The methods refering to creationTool are obsolete (as above). The implementation of these methods would typically cast the object to the appropriate artifactType and examine the structure of the artifact (eg examine sterotypes) to determine the icon to use. If any method returns null, then the default icon will be used. In this case the default may alreday have been overriden if the above part of the ext pt is used.

(You could use this part of the ext point to achieve the same ends as the previous "artifactIcon" section, but this should only be used if the behaviour is complex as there is a (small) overhead involved in examining the structure of the artifact.)

artifactMetadata : This element is for future use and is not currently implemented.