Package org.fusesource.ide.camel.model

Examples of org.fusesource.ide.camel.model.AbstractNode


      return gn.getGraphConnectedTo().toArray();
    } else if (entity instanceof RouteSupport) {
      RouteSupport route = (RouteSupport) entity;
      return route.getRootNodes().toArray();
    } else if (entity instanceof AbstractNode) {
      AbstractNode node = (AbstractNode) entity;
      node.getOutputs().toArray();
    }
    else if (entity instanceof ConnectedNode) {
      ConnectedNode node = (ConnectedNode) entity;
      return node.getConnectedTo().toArray();
    } else if (entity instanceof Node) {
      Node aNode = (Node) entity;
      return aNode.getChildren();
    }
    return EMPTY;
View Full Code Here


  }

  @Override
  public ICreateFeature[] getCreateFeatures() {
    ICreateFeature[] features = ProviderHelper.getCreateFeatures(this);
    AbstractNode selectedNode = null;
    IDiagramTypeProvider dtp = getDiagramTypeProvider();
    IDiagramEditor diagramEditor = dtp.getDiagramEditor();
    if (diagramEditor instanceof RiderDesignEditor) {
      RiderDesignEditor rider = (RiderDesignEditor) diagramEditor;
      selectedNode = rider.getSelectedNode();
View Full Code Here

    PictogramElement _pe = context.getPictogramElements()[0] instanceof Connection ? ((Connection) context.getPictogramElements()[0])
                .getStart().getParent() : context.getPictogramElements()[0];
        final Object bo = getBusinessObjectForPictogramElement(_pe);
      
        if (bo instanceof AbstractNode) {
          AbstractNode _ep = (AbstractNode) bo;
            try {
              IFile contextFile = getContextFile();
              String fileName = contextFile.getName();
              String projectName = contextFile.getProject().getName();
             
              IBreakpoint bp = CamelDebugUtils.getBreakpointForSelection(_ep.getId(), fileName, projectName);
              if (bp != null && bp.isEnabled()) {
                bp.setEnabled(false);
              }
            } catch (CoreException e) {
                final IDiagramContainer container = getDiagramBehavior().getDiagramContainer();
View Full Code Here

    PictogramElement _pe = cc.getPictogramElements()[0] instanceof Connection ? ((Connection) cc.getPictogramElements()[0])
                .getStart().getParent() : cc.getPictogramElements()[0];
        final Object bo = getBusinessObjectForPictogramElement(_pe);
      
        if (bo instanceof AbstractNode) {
          AbstractNode _ep = (AbstractNode) bo;
          IFile contextFile = getContextFile();
          String fileName = contextFile.getName();
          String projectName = contextFile.getProject().getName();
          if (_ep.supportsBreakpoint()) {
            IBreakpoint bp = CamelDebugUtils.getBreakpointForSelection(_ep.getId(), fileName, projectName);
            try {
              return bp != null && bp.isEnabled();
            } catch (CoreException ex) {
              Activator.getLogger().error(ex);
            }
View Full Code Here

         
//          if (firstSelection == null) {
//            setSelectedObjectOnly(null);
//          }
         
          AbstractNode node = AbstractNodes.getSelectedNode(selection);
          if (node != null && !(part instanceof RiderEditor)) {
            //Activator.getLogger().debug("Part is: " + part + " of type : " + part.getClass());
            if (node != DiagramView.this.node) {
              updateGraph(node, part);
            }
View Full Code Here

  protected boolean selectNodeId(String toNode, String endpointUri) {
    if (node != null) {
      RouteContainer parent = getParentContainer();
      if (parent != null) {
        AbstractNode newSelection = parent.getNode(toNode);
        if (newSelection != null) {
          if (newSelection instanceof Route) {
            // okay its the route we want to select, but we dont display the route node itself
            // so instead select the endpoint uri which is the source node of the route
            if (endpointUri != null) {
View Full Code Here

  protected boolean selectEndpointUri(String uri) {
    if (node != null) {
      RouteContainer parent = getParentContainer();
      if (parent instanceof RouteSupport) {
        RouteSupport route = (RouteSupport) parent;
        AbstractNode newSelection = route.findEndpoint(uri);
        if (newSelection == null) {
          // lets try iterate through any children
          List<AbstractNode> children = parent.getChildren();
          for (AbstractNode child : children) {
            if (child instanceof RouteSupport) {
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public static AbstractNodeTreeEditPart findEditPart(AbstractNode node, EditPart part) {
        if (part instanceof AbstractNodeTreeEditPart) {
            AbstractNodeTreeEditPart nodeEditPart = (AbstractNodeTreeEditPart) part;
            AbstractNode modelNode = nodeEditPart.getModelNode();
            if (ObjectHelper.equal(node, modelNode)) {
                return nodeEditPart;
            }
        }
        List<EditPart> children = part.getChildren();
View Full Code Here

     *
     * @see org.eclipse.gef.editparts.AbstractTreeEditPart#refreshVisuals()
     */
    @Override
    public void refreshVisuals() {
        AbstractNode model = getModelNode();
        String displayText = model.getDisplayText();
        if (displayText == null) {
            Activator.getLogger().warning("No display text for " + model + " of type: " + model.getClass().getCanonicalName());
        } else {
            setWidgetText(displayText);
        }
        //setWidgetImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_DEF_VIEW));
        setWidgetImage(getImage());
View Full Code Here

     *
     * @see org.eclipse.gef.editparts.AbstractEditPart#getModelChildren()
     */
    @Override
    protected List<AbstractNode> getModelChildren() {
        AbstractNode node = (AbstractNode) getModel();
        return node.getOutputs();
    }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.camel.model.AbstractNode

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.