コード例 #1
0
 /** @generated */
 static {
   UMLDiagramEditorPlugin.getInstance()
       .getImageRegistry()
       .put(
           "Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); // $NON-NLS-1$
   UMLDiagramEditorPlugin.getInstance()
       .getImageRegistry()
       .put("Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); // $NON-NLS-1$
 }
コード例 #2
0
 /** @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$
   }
 }
コード例 #3
0
 /** @generated */
 private String getPackage_1000Text(View view) {
   Package domainModelElement = (Package) view.getElement();
   if (domainModelElement != null) {
     return String.valueOf(domainModelElement.getName());
   } else {
     UMLDiagramEditorPlugin.getInstance()
         .logError("No domain element for view with visualID = " + 1000); // $NON-NLS-1$
     return ""; //$NON-NLS-1$
   }
 }
コード例 #4
0
  /** @generated */
  private Image getImage(String key, IElementType elementType) {
    ImageRegistry imageRegistry = UMLDiagramEditorPlugin.getInstance().getImageRegistry();
    Image image = imageRegistry.get(key);
    if (image == null && elementType != null && UMLElementTypes.isKnownElementType(elementType)) {
      image = UMLElementTypes.getImage(elementType);
      imageRegistry.put(key, image);
    }

    if (image == null) {
      image = imageRegistry.get("Navigator?ImageNotFound"); // $NON-NLS-1$
      imageRegistry.put(key, image);
    }
    return image;
  }
コード例 #5
0
 /** @generated */
 private String getPackageImport_4019Text(View view) {
   IParser parser =
       UMLParserProvider.getParser(
           UMLElementTypes.PackageImport_4019,
           view.getElement() != null ? view.getElement() : view,
           UMLVisualIDRegistry.getType(PackageImportVisibilityEditPart.VISUAL_ID));
   if (parser != null) {
     return parser.getPrintString(
         new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
         ParserOptions.NONE.intValue());
   } else {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Parser was not found for label " + 6017); // $NON-NLS-1$
     return ""; //$NON-NLS-1$
   }
 }
コード例 #6
0
 /** @generated */
 private String getGeneralization_4010Text(View view) {
   IParser parser =
       UMLParserProvider.getParser(
           UMLElementTypes.Generalization_4010,
           view.getElement() != null ? view.getElement() : view,
           UMLVisualIDRegistry.getType(GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
   if (parser != null) {
     return parser.getPrintString(
         new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
         ParserOptions.NONE.intValue());
   } else {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Parser was not found for label " + 6032); // $NON-NLS-1$
     return ""; //$NON-NLS-1$
   }
 }
コード例 #7
0
 /** @generated */
 private String getActor_3018Text(View view) {
   IParser parser =
       UMLParserProvider.getParser(
           UMLElementTypes.Actor_3018,
           view.getElement() != null ? view.getElement() : view,
           UMLVisualIDRegistry.getType(ActorInComponentNameEditPart.VISUAL_ID));
   if (parser != null) {
     return parser.getPrintString(
         new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
         ParserOptions.NONE.intValue());
   } else {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Parser was not found for label " + 5031); // $NON-NLS-1$
     return ""; //$NON-NLS-1$
   }
 }
コード例 #8
0
 /** @generated */
 private String getUseCase_2014Text(View view) {
   IParser parser =
       UMLParserProvider.getParser(
           UMLElementTypes.UseCase_2014,
           view.getElement() != null ? view.getElement() : view,
           UMLVisualIDRegistry.getType(UseCaseAsRectangleNameEditPartTN.VISUAL_ID));
   if (parser != null) {
     return parser.getPrintString(
         new EObjectAdapter(view.getElement() != null ? view.getElement() : view),
         ParserOptions.NONE.intValue());
   } else {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Parser was not found for label " + 5017); // $NON-NLS-1$
     return ""; //$NON-NLS-1$
   }
 }
コード例 #9
0
  /** @generated */
  public Image getImage(Object element) {
    if (element instanceof UMLNavigatorGroup) {
      UMLNavigatorGroup group = (UMLNavigatorGroup) element;
      return UMLDiagramEditorPlugin.getInstance().getBundledImage(group.getIcon());
    }

    if (element instanceof UMLNavigatorItem) {
      UMLNavigatorItem navigatorItem = (UMLNavigatorItem) element;
      if (!isOwnView(navigatorItem.getView())) {
        return super.getImage(element);
      }
      return getImage(navigatorItem.getView());
    }

    return super.getImage(element);
  }
コード例 #10
0
 /** @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.ui.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;
 }
コード例 #11
0
 /** @generated */
 public DiagramConnectionsPreferencePage() {
   setPreferenceStore(UMLDiagramEditorPlugin.getInstance().getPreferenceStore());
 }