/** @generated */
 public static void deleteMarkers(IResource resource) {
   try {
     resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
   } catch (CoreException e) {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Failed to delete validation markers", e); // $NON-NLS-1$
   }
 }
 /**
  * Create a new dialog to initialize an ActivityParameterNode.
  *
  * @param shell parent shell
  * @param owner the activity that owns the action
  * @param defaultDirectionKind the parameter direction kind to select by default (or null)
  */
 public CreateParameterDialog(
     Shell shell, NamedElement owner, ParameterDirectionKind defaultDirectionKind) {
   super(shell);
   parameterOwner = owner;
   labelProvider =
       new AdapterFactoryLabelProvider(
           UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory());
   defaultDirection = defaultDirectionKind;
 }
 /** @generated */
 protected NodeFigure createNodePlate() {
   String prefElementId = "ShapeNamedElement";
   IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
   String preferenceConstantWitdh =
       PreferenceInitializerForElementHelper.getpreferenceKey(
           getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
   String preferenceConstantHeight =
       PreferenceInitializerForElementHelper.getpreferenceKey(
           getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
   DefaultSizeNodeFigure result =
       new DefaultSizeNodeFigure(
           store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
   return result;
 }
 /** @generated */
 protected NodeFigure createNodePlate() {
   String prefElementId = "OutputPin";
   IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
   String preferenceConstantWitdh =
       PreferenceInitializerForElementHelper.getpreferenceKey(
           getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
   String preferenceConstantHeight =
       PreferenceInitializerForElementHelper.getpreferenceKey(
           getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
   DefaultSizeNodeFigure result =
       new DefaultSizeNodeFigure(
           store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
   // FIXME: workaround for #154536
   result.getBounds().setSize(result.getPreferredSize());
   return result;
 }
  /** @generated NOT Add the property listener */
  public LoopNodeKeywordEditPart(View view) {
    super(view);
    UMLDiagramEditorPlugin.getInstance()
        .getPreferenceStore()
        .addPropertyChangeListener(
            new IPropertyChangeListener() {

              public void propertyChange(PropertyChangeEvent event) {
                if (IActivityPreferenceConstants.PREF_STRUCTURED_SPECIFIC_KEYWORD_DISPLAY_LOOP_NODE
                    .equals(event.getProperty())) {
                  if (getFigure() != null) {
                    refreshLabel();
                  }
                }
              }
            });
  }
 /** @generated */
 public static IMarker addMarker(
     IFile file, String elementId, String location, String message, int statusSeverity) {
   IMarker marker = null;
   try {
     marker = file.createMarker(MARKER_TYPE);
     marker.setAttribute(IMarker.MESSAGE, message);
     marker.setAttribute(IMarker.LOCATION, location);
     marker.setAttribute(
         org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, elementId);
     int markerSeverity = IMarker.SEVERITY_INFO;
     if (statusSeverity == IStatus.WARNING) {
       markerSeverity = IMarker.SEVERITY_WARNING;
     } else if (statusSeverity == IStatus.ERROR || statusSeverity == IStatus.CANCEL) {
       markerSeverity = IMarker.SEVERITY_ERROR;
     }
     marker.setAttribute(IMarker.SEVERITY, markerSeverity);
   } catch (CoreException e) {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Failed to create validation marker", e); // $NON-NLS-1$
   }
   return marker;
 }
 /** @generated */
 @Override
 protected String getBundleId() {
   return UMLDiagramEditorPlugin.getInstance().ID;
 }