Package org.eclipse.gmf.runtime.notation

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


    if (!(operation instanceof CreateDecoratorsOperation)) {
      return false;
    }
    IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation)
        .getDecoratorTarget();
    View view = (View) decoratorTarget.getAdapter(View.class);
    return view != null
        && OntoUML.diagram.edit.parts.ContainerEditPart.MODEL_ID
            .equals(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                .getModelID(view));
  }
View Full Code Here


     * @generated
     */
    public StatusDecorator(IDecoratorTarget decoratorTarget) {
      super(decoratorTarget);
      try {
        final View view = (View) getDecoratorTarget().getAdapter(
            View.class);
        TransactionUtil.getEditingDomain(view).runExclusive(
            new Runnable() {

              public void run() {
View Full Code Here

    /**
     * @generated
     */
    public void refresh() {
      removeDecoration();
      View view = (View) getDecoratorTarget().getAdapter(View.class);
      if (view == null || view.eResource() == null) {
        return;
      }
      EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(
          EditPart.class);
      if (editPart == null || editPart.getViewer() == null) {
View Full Code Here

  /**
   * @generated
   */
  public List getAffectedFiles() {
    View view = (View) edgeAdaptor.getAdapter(View.class);
    if (view != null) {
      return getWorkspaceFiles(view);
    }
    return super.getAffectedFiles();
  }
View Full Code Here

  protected CommandResult doExecuteWithResult(
      IProgressMonitor progressMonitor, IAdaptable info) {
    assert null != edgeAdaptor : "Null child in OntoUMLReorientConnectionViewCommand"; //$NON-NLS-1$
    Edge edge = (Edge) getEdgeAdaptor().getAdapter(Edge.class);
    assert null != edge : "Null edge in OntoUMLReorientConnectionViewCommand"; //$NON-NLS-1$
    View tempView = edge.getSource();
    edge.setSource(edge.getTarget());
    edge.setTarget(tempView);
    return CommandResult.newOKCommandResult();
  }
View Full Code Here

  /**
   * @generated
   */
  public synchronized boolean provides(IOperation operation) {
    if (operation instanceof CreateGraphicEditPartOperation) {
      View view = ((IEditPartOperation) operation).getView();
      if (!OntoUML.diagram.edit.parts.ContainerEditPart.MODEL_ID
          .equals(OntoUML.diagram.part.OntoUMLVisualIDRegistry
              .getModelID(view))) {
        return 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

    Collection result = new ArrayList();
    String type = OntoUML.diagram.part.OntoUMLVisualIDRegistry
        .getType(visualID);
    for (Iterator it = edges.iterator(); it.hasNext();) {
      Edge nextEdge = (Edge) it.next();
      View nextEdgeSource = nextEdge.getSource();
      if (type.equals(nextEdgeSource.getType())
          && isOwnView(nextEdgeSource)) {
        result.add(nextEdgeSource);
      }
    }
    return result;
View Full Code Here

    Collection result = new ArrayList();
    String type = OntoUML.diagram.part.OntoUMLVisualIDRegistry
        .getType(visualID);
    for (Iterator it = edges.iterator(); it.hasNext();) {
      Edge nextEdge = (Edge) it.next();
      View nextEdgeTarget = nextEdge.getTarget();
      if (type.equals(nextEdgeTarget.getType())
          && isOwnView(nextEdgeTarget)) {
        result.add(nextEdgeTarget);
      }
    }
    return result;
View Full Code Here

  private Collection getOutgoingLinksByType(Collection nodes, int visualID) {
    Collection result = new ArrayList();
    String type = OntoUML.diagram.part.OntoUMLVisualIDRegistry
        .getType(visualID);
    for (Iterator it = nodes.iterator(); it.hasNext();) {
      View nextNode = (View) it.next();
      result.addAll(selectViewsByType(nextNode.getSourceEdges(), type));
    }
    return result;
  }
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.