コード例 #1
0
  /** @generated */
  public Object[] getChildren(Object parentElement) {
    if (parentElement instanceof IFile) {
      IFile file = (IFile) parentElement;
      URI fileURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
      Resource resource = myEditingDomain.getResourceSet().getResource(fileURI, true);
      ArrayList<stateAnalysis.diagram.navigator.StateAnalysisNavigatorItem> result =
          new ArrayList<stateAnalysis.diagram.navigator.StateAnalysisNavigatorItem>();
      ArrayList<View> topViews = new ArrayList<View>(resource.getContents().size());
      for (EObject o : resource.getContents()) {
        if (o instanceof View) {
          topViews.add((View) o);
        }
      }
      result.addAll(
          createNavigatorItems(
              selectViewsByType(topViews, stateAnalysis.diagram.edit.parts.SystemEditPart.MODEL_ID),
              file,
              false));
      return result.toArray();
    }

    if (parentElement instanceof stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup) {
      stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup group =
          (stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup) parentElement;
      return group.getChildren();
    }

    if (parentElement instanceof stateAnalysis.diagram.navigator.StateAnalysisNavigatorItem) {
      stateAnalysis.diagram.navigator.StateAnalysisNavigatorItem navigatorItem =
          (stateAnalysis.diagram.navigator.StateAnalysisNavigatorItem) parentElement;
      if (navigatorItem.isLeaf() || !isOwnView(navigatorItem.getView())) {
        return EMPTY_ARRAY;
      }
      return getViewChildren(navigatorItem.getView(), parentElement);
    }

    /*
     * Due to plugin.xml restrictions this code will be called only for views representing
     * shortcuts to this diagram elements created on other diagrams.
     */
    if (parentElement instanceof IAdaptable) {
      View view = (View) ((IAdaptable) parentElement).getAdapter(View.class);
      if (view != null) {
        return getViewChildren(view, parentElement);
      }
    }

    return EMPTY_ARRAY;
  }
コード例 #2
0
  /** @generated */
  private Object[] getViewChildren(View view, Object parentElement) {
    switch (stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getVisualID(view)) {
      case stateAnalysis.diagram.edit.parts.SystemEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          result.addAll(getForeignShortcuts((Diagram) view, parentElement));
          Diagram sv = (Diagram) view;
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup links =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis.diagram.part.Messages.NavigatorGroupName_System_1000_links,
                  "icons/linksNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.SubsystemEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getDiagramLinksByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.ControllerDelegatesEditPart.VISUAL_ID));
          links.addChildren(createNavigatorItems(connectedViews, links, false));
          connectedViews =
              getDiagramLinksByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .EstimatorDistilledMeasurementsEditPart
                          .VISUAL_ID));
          links.addChildren(createNavigatorItems(connectedViews, links, false));
          if (!links.isEmpty()) {
            result.add(links);
          }
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.SubsystemEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .SubsystemSubsystemDeploymentSetsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DeploymentSetEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.DeploymentSetEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeploymentSetDeploymentSetDeploymentsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DeploymentEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.DeploymentEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeploymentDeploymentComponentsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateVariableEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeploymentDeploymentComponentsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeploymentDeploymentComponentsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeploymentDeploymentComponentsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.HardwareAdapterEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeploymentDeploymentCatalogsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DataCollectionEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.DataCollectionEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DataCollectionDataCollectionPoliciesCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.QosPolicyEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DataCollectionDataCollectionProductsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DataProductEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableInfluencedByCompartment2EditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableInStateConstraintsCompartment2EditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateConstraintEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableOutStateConstraintsCompartment2EditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateConstraint2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableStateUpdatesCompartment2EditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateUpdateEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.DeviceEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeviceDeviceDeviceCommandsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DeviceCommandEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .DeviceDeviceDeviceMeasurementsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DeviceMeasurementEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.StateVariableEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableInfluencedByCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateVariable2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableInStateConstraintsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateConstraintEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableOutStateConstraintsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateConstraint2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .StateVariableStateVariableStateUpdatesCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateUpdateEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup incominglinks =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_Controller_3028_incominglinks,
                  "icons/incomingLinksNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup outgoinglinks =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_Controller_3028_outgoinglinks,
                  "icons/outgoingLinksNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .ControllerControllerStateConstraintCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateConstraint3EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .ControllerControllerHardwareCommandCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.HardwareCommandEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getIncomingLinksByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.ControllerDelegatesEditPart.VISUAL_ID));
          incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
          connectedViews =
              getOutgoingLinksByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.ControllerDelegatesEditPart.VISUAL_ID));
          outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
          if (!incominglinks.isEmpty()) {
            result.add(incominglinks);
          }
          if (!outgoinglinks.isEmpty()) {
            result.add(outgoinglinks);
          }
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup incominglinks =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_Estimator_3029_incominglinks,
                  "icons/incomingLinksNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup outgoinglinks =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_Estimator_3029_outgoinglinks,
                  "icons/outgoingLinksNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .EstimatorEstimatorStateConstraintsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateConstraint4EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .EstimatorEstimatorStateUpdatesCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.StateUpdate2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .EstimatorEstimatorHardwareMeasurementCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.HardwareMeasurementEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getIncomingLinksByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .EstimatorDistilledMeasurementsEditPart
                          .VISUAL_ID));
          incominglinks.addChildren(createNavigatorItems(connectedViews, incominglinks, true));
          connectedViews =
              getOutgoingLinksByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .EstimatorDistilledMeasurementsEditPart
                          .VISUAL_ID));
          outgoinglinks.addChildren(createNavigatorItems(connectedViews, outgoinglinks, true));
          if (!incominglinks.isEmpty()) {
            result.add(incominglinks);
          }
          if (!outgoinglinks.isEmpty()) {
            result.add(outgoinglinks);
          }
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.HardwareAdapterEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Node sv = (Node) view;
          Collection<View> connectedViews;
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .HardwareAdapterHardwareAdapterHardwareCommandsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.HardwareCommand2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .HardwareAdapterHardwareAdapterHardwareMeasurementsCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.HardwareMeasurement2EditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          connectedViews =
              getChildrenByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis
                          .diagram
                          .edit
                          .parts
                          .HardwareAdapterHardwareAdapterDevicesCompartmentEditPart
                          .VISUAL_ID));
          connectedViews =
              getChildrenByType(
                  connectedViews,
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.DeviceEditPart.VISUAL_ID));
          result.addAll(createNavigatorItems(connectedViews, parentElement, false));
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.ControllerDelegatesEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Edge sv = (Edge) view;
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup target =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_ControllerDelegates_4001_target,
                  "icons/linkTargetNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup source =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_ControllerDelegates_4001_source,
                  "icons/linkSourceNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          Collection<View> connectedViews;
          connectedViews =
              getLinksTargetByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID));
          target.addChildren(createNavigatorItems(connectedViews, target, true));
          connectedViews =
              getLinksSourceByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.ControllerEditPart.VISUAL_ID));
          source.addChildren(createNavigatorItems(connectedViews, source, true));
          if (!target.isEmpty()) {
            result.add(target);
          }
          if (!source.isEmpty()) {
            result.add(source);
          }
          return result.toArray();
        }

      case stateAnalysis.diagram.edit.parts.EstimatorDistilledMeasurementsEditPart.VISUAL_ID:
        {
          LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem> result =
              new LinkedList<stateAnalysis.diagram.navigator.StateAnalysisAbstractNavigatorItem>();
          Edge sv = (Edge) view;
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup target =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_EstimatorDistilledMeasurements_4002_target,
                  "icons/linkTargetNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup source =
              new stateAnalysis.diagram.navigator.StateAnalysisNavigatorGroup(
                  stateAnalysis
                      .diagram
                      .part
                      .Messages
                      .NavigatorGroupName_EstimatorDistilledMeasurements_4002_source,
                  "icons/linkSourceNavigatorGroup.gif",
                  parentElement); //$NON-NLS-1$
          Collection<View> connectedViews;
          connectedViews =
              getLinksTargetByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID));
          target.addChildren(createNavigatorItems(connectedViews, target, true));
          connectedViews =
              getLinksSourceByType(
                  Collections.singleton(sv),
                  stateAnalysis.diagram.part.StateAnalysisVisualIDRegistry.getType(
                      stateAnalysis.diagram.edit.parts.EstimatorEditPart.VISUAL_ID));
          source.addChildren(createNavigatorItems(connectedViews, source, true));
          if (!target.isEmpty()) {
            result.add(target);
          }
          if (!source.isEmpty()) {
            result.add(source);
          }
          return result.toArray();
        }
    }
    return EMPTY_ARRAY;
  }