- Define your own Resource Markers in some plugin as shown -
- Override the validate action present in the ActionBarContributor class of your EMF editor plugin. By default it points to the "org.eclipse.emf.edit.ui.action.ValidateAction", create your own class extending this one.
- In the extended class, override the method "Diagnostic validate(final IProgressMonitor progressMonitor)" in the following manner -
{
/* Overridden the utility to supply the new Marker ID */
eclipseResourcesUtil = EMFPlugin.IS_RESOURCES_BUNDLE_AVAILABLE ?
new EclipseResourcesUtil() {
@Override
protected String getMarkerID() {
return "New Resource Marker ID" ;
}
} : null;
/*Changes finished*/
}
- When you will now execute the validate action, the custom type specified while defining your own resource marker shall be shown instead of 'EMF Problem'.
0 comments:
Post a Comment