Package org.eclipse.gmf.runtime.notation

Examples of org.eclipse.gmf.runtime.notation.View


    OntoUML.diagram.part.OntoUMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new OntoUML.diagram.part.OntoUMLDiagramEditorUtil.LazyElement2ViewMap(
        diagramEditPart.getDiagramView(), collectTargetElements(
            rootStatus, new HashSet(), allStatuses));
    for (Iterator it = allStatuses.iterator(); it.hasNext();) {
      IConstraintStatus nextStatus = (IConstraintStatus) it.next();
      View view = OntoUML.diagram.part.OntoUMLDiagramEditorUtil.findView(
          diagramEditPart, nextStatus.getTarget(), element2ViewMap);
      addMarker(diagramEditPart.getViewer(), target, view.eResource()
          .getURIFragment(view), EMFCoreUtil.getQualifiedName(
          nextStatus.getTarget(), true), nextStatus.getMessage(),
          nextStatus.getSeverity());
    }
  }
View Full Code Here


      Diagnostic nextDiagnostic = (Diagnostic) it.next();
      List data = nextDiagnostic.getData();
      if (data != null && !data.isEmpty()
          && data.get(0) instanceof EObject) {
        EObject element = (EObject) data.get(0);
        View view = OntoUML.diagram.part.OntoUMLDiagramEditorUtil
            .findView(diagramEditPart, element, element2ViewMap);
        addMarker(
            diagramEditPart.getViewer(),
            target,
            view.eResource().getURIFragment(view),
            EMFCoreUtil.getQualifiedName(element, true),
            nextDiagnostic.getMessage(),
            diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
      }
    }
View Full Code Here

        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
                    .getDrawerStyle());
            if (drawerStyle != null) { // to refresh the compartment when a new attribute is added.
              drawerStyle.setCollapsed(true);
              drawerStyle.setCollapsed(false);
View Full Code Here

        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
                    .getDrawerStyle());
            if (drawerStyle != null) { // to refresh the compartment when a new attribute is added.
              drawerStyle.setCollapsed(true);
              drawerStyle.setCollapsed(false);
View Full Code Here

  /**
   * Assert that the given edit part is openable, that is, it has an Open Diagram Hint
   */
  public void assertOpenable(ShapeNodeEditPart part) {
    View view = (View) part.getModel();
    Style link = view.getStyle(NotationPackage.eINSTANCE
        .getHintedDiagramLinkStyle());
    if (link == null || !(link instanceof HintedDiagramLinkStyle))
      fail("part '" + part + "' is not a shortcut, it should be (link=" + link + ")");
  }
View Full Code Here

  /**
   * Assert that the given edit part is not openable, that is, it does not have an Open Diagram Hint
   */
  public void assertNotOpenable(ShapeNodeEditPart part) {
    View view = (View) part.getModel();
    Style link = view.getStyle(NotationPackage.eINSTANCE
        .getHintedDiagramLinkStyle());
    if (!(link == null || !(link instanceof HintedDiagramLinkStyle)))
      fail("part '" + part + "' is not a shortcut, it should be (link=" + link + ")");
  }
View Full Code Here

  protected Command getOpenCommand(Request request) {
    EditPart targetEditPart = getTargetEditPart(request);
    if (false == targetEditPart.getModel() instanceof View) {
      return null;
    }
    View view = (View) targetEditPart.getModel();
    Style link = view.getStyle(NotationPackage.eINSTANCE
        .getHintedDiagramLinkStyle());
    if (false == link instanceof HintedDiagramLinkStyle) {
      return null;
    }
    return new ICommandProxy(new OpenDiagramCommand(
View Full Code Here

        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
                    .getDrawerStyle());
            if (drawerStyle != null) { // to refresh the compartment when a new attribute is added.
              drawerStyle.setCollapsed(true);
              drawerStyle.setCollapsed(false);
View Full Code Here

        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
                    .getDrawerStyle());
            if (drawerStyle != null) { // to refresh the compartment when a new attribute is added.
              drawerStyle.setCollapsed(true);
              drawerStyle.setCollapsed(false);
View Full Code Here

        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
                    .getDrawerStyle());
            if (drawerStyle != null) { // to refresh the compartment when a new attribute is added.
              drawerStyle.setCollapsed(true);
              drawerStyle.setCollapsed(false);
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.notation.View

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.