Package org.eclipse.gmf.runtime.notation

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


    EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
    if (annotation != null) {
      return;
    }
    for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
      Node node = (Node) it.next();
      switch (OntoUML.diagram.part.OntoUMLVisualIDRegistry
          .getVisualID(node)) {
      case OntoUML.diagram.edit.parts.RelatorAttributeCompartmentEditPart.VISUAL_ID:
        for (Iterator cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (OntoUML.diagram.part.OntoUMLVisualIDRegistry
              .getVisualID(cnode)) {
          case OntoUML.diagram.edit.parts.Property8EditPart.VISUAL_ID:
            cmd.add(getDestroyElementCommand(cnode));
            break;
View Full Code Here


    EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
    if (annotation != null) {
      return;
    }
    for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
      Node node = (Node) it.next();
      switch (OntoUML.diagram.part.OntoUMLVisualIDRegistry
          .getVisualID(node)) {
      case OntoUML.diagram.edit.parts.KindAttributeCompartmentEditPart.VISUAL_ID:
        for (Iterator cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (OntoUML.diagram.part.OntoUMLVisualIDRegistry
              .getVisualID(cnode)) {
          case OntoUML.diagram.edit.parts.Property3EditPart.VISUAL_ID:
            cmd.add(getDestroyElementCommand(cnode));
            break;
View Full Code Here

  /**
   * @generated
   */
  public Node createNodeType_2001(EObject domainElement, View containerView,
      int index, boolean persisted, PreferencesHint preferencesHint) {
    Node node = NotationFactory.eINSTANCE.createNode();
    node.getStyles()
        .add(NotationFactory.eINSTANCE.createDescriptionStyle());
    node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
    node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
    node
        .setType(eu.admire.visual.pmml.treemodel._40.diagram.part.PMMLVisualIDRegistry
            .getType(eu.admire.visual.pmml.treemodel._40.diagram.edit.parts.NodeTypeEditPart.VISUAL_ID));
    ViewUtil.insertChildView(containerView, node, index, persisted);
    node.setElement(domainElement);
    stampShortcut(containerView, node);
    // initializeFromPreferences
    final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
        .getPreferenceStore();
    FontStyle nodeFontStyle = (FontStyle) node
        .getStyle(NotationPackage.Literals.FONT_STYLE);
    if (nodeFontStyle != null) {
      FontData fontData = PreferenceConverter.getFontData(prefStore,
          IPreferenceConstants.PREF_DEFAULT_FONT);
      nodeFontStyle.setFontName(fontData.getName());
      nodeFontStyle.setFontHeight(fontData.getHeight());
      nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
      nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
      org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
          .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
      nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
          .intValue());
    }
    Node label5001 = createLabel(
        node,
        eu.admire.visual.pmml.treemodel._40.diagram.part.PMMLVisualIDRegistry
            .getType(eu.admire.visual.pmml.treemodel._40.diagram.edit.parts.NodeTypeScoreEditPart.VISUAL_ID));
    Node label5002 = createLabel(
        node,
        eu.admire.visual.pmml.treemodel._40.diagram.part.PMMLVisualIDRegistry
            .getType(eu.admire.visual.pmml.treemodel._40.diagram.edit.parts.NodeTypeRecordCountEditPart.VISUAL_ID));
    return node;
  }
View Full Code Here

    org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
        prefStore, IPreferenceConstants.PREF_FILL_COLOR);
    ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE
        .getFillStyle_FillColor(), FigureUtilities
        .RGBToInteger(fillRGB));
    Node label5003 = createLabel(
        node,
        eu.admire.visual.pmml.treemodel._40.diagram.part.PMMLVisualIDRegistry
            .getType(eu.admire.visual.pmml.treemodel._40.diagram.edit.parts.SimplePredicateTypeFieldEditPart.VISUAL_ID));
    Node label5004 = createLabel(
        node,
        eu.admire.visual.pmml.treemodel._40.diagram.part.PMMLVisualIDRegistry
            .getType(eu.admire.visual.pmml.treemodel._40.diagram.edit.parts.SimplePredicateTypeOperatorEditPart.VISUAL_ID));
    Node label5005 = createLabel(
        node,
        eu.admire.visual.pmml.treemodel._40.diagram.part.PMMLVisualIDRegistry
            .getType(eu.admire.visual.pmml.treemodel._40.diagram.edit.parts.SimplePredicateTypeValueEditPart.VISUAL_ID));
    return node;
  }
View Full Code Here

   * @generated
   */
  private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case ProcessingElementAnonymousDefinitionAnonymousCompartmentEditPart.VISUAL_ID:
        for (Iterator<?> cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (DispelVisualIDRegistry.getVisualID(cnode)) {
          case ProcessingElementAnonymousConstructorEditPart.VISUAL_ID:
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: true
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
          }
        }
View Full Code Here

   * @generated
   */
  private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case ArrayInitializerEditPart.VISUAL_ID:
        cmd.add(new DestroyElementCommand(new DestroyElementRequest(
            getEditingDomain(), node.getElement(), false))); // directlyOwned: true
        // don't need explicit deletion of node as parent's view deletion would clean child views as well
        // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
        break;
      }
    }
View Full Code Here

   * @generated
   */
  private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case ProcessingElementReferenceAnonymousCompartment2EditPart.VISUAL_ID:
        for (Iterator<?> cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (DispelVisualIDRegistry.getVisualID(cnode)) {
          case ProcessingElementDefinition2EditPart.VISUAL_ID:
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: false
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
          }
        }
View Full Code Here

   * @generated
   */
  private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case BooleanLiteralEditPart.VISUAL_ID:
        cmd.add(new DestroyElementCommand(new DestroyElementRequest(
            getEditingDomain(), node.getElement(), false))); // directlyOwned: true
        // don't need explicit deletion of node as parent's view deletion would clean child views as well
        // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
        break;
      case DecimalIntegerLiteralEditPart.VISUAL_ID:
        cmd.add(new DestroyElementCommand(new DestroyElementRequest(
            getEditingDomain(), node.getElement(), false))); // directlyOwned: true
        // don't need explicit deletion of node as parent's view deletion would clean child views as well
        // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
        break;
      case DecimalDoubleLiteralEditPart.VISUAL_ID:
        cmd.add(new DestroyElementCommand(new DestroyElementRequest(
            getEditingDomain(), node.getElement(), false))); // directlyOwned: true
        // don't need explicit deletion of node as parent's view deletion would clean child views as well
        // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
        break;
      case LocalVariableLocalVariableCompartmentEditPart.VISUAL_ID:
        for (Iterator<?> cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (DispelVisualIDRegistry.getVisualID(cnode)) {
          case StringReferenceEditPart.VISUAL_ID:
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: true
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
          case ProcessingElementInstanceEditPart.VISUAL_ID:
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: false
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
          }
        }
View Full Code Here

   * @generated
   */
  private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case ProcessingElementMethodDefinitionMethodCompartmentEditPart.VISUAL_ID:
        for (Iterator<?> cit = node.getChildren().iterator(); cit
            .hasNext();) {
          Node cnode = (Node) cit.next();
          switch (DispelVisualIDRegistry.getVisualID(cnode)) {
          case MethodCallEditPart.VISUAL_ID:
            for (Iterator<?> it = cnode.getTargetEdges().iterator(); it
                .hasNext();) {
              Edge incomingLink = (Edge) it.next();
              if (DispelVisualIDRegistry
                  .getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
                DestroyElementRequest r = new DestroyElementRequest(
                    incomingLink.getElement(), false);
                cmd.add(new DestroyElementCommand(r));
                cmd.add(new DeleteCommand(getEditingDomain(),
                    incomingLink));
                continue;
              }
            }
            for (Iterator<?> it = cnode.getSourceEdges().iterator(); it
                .hasNext();) {
              Edge outgoingLink = (Edge) it.next();
              if (DispelVisualIDRegistry
                  .getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
                DestroyElementRequest r = new DestroyElementRequest(
                    outgoingLink.getElement(), false);
                cmd.add(new DestroyElementCommand(r));
                cmd.add(new DeleteCommand(getEditingDomain(),
                    outgoingLink));
                continue;
              }
            }
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: true
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
          }
        }
View Full Code Here

   * @generated
   */
  private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
    View view = (View) getHost().getModel();
    for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
      Node node = (Node) nit.next();
      switch (DispelVisualIDRegistry.getVisualID(node)) {
      case ArrayInitializerEditPart.VISUAL_ID:
        cmd.add(new DestroyElementCommand(new DestroyElementRequest(
            getEditingDomain(), node.getElement(), false))); // directlyOwned: true
        // don't need explicit deletion of node as parent's view deletion would clean child views as well
        // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
        break;
      }
    }
View Full Code Here

TOP

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

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.