Package org.eclipse.graphiti.features.context

Examples of org.eclipse.graphiti.features.context.ICustomContext


  @Override
  protected void addDefaultMenuGroupRest(IMenuManager manager) {
    addAlignmentSubMenu(manager, GEFActionConstants.GROUP_REST);

    PictogramElement pes[] = getBehavior().getSelectedPictogramElements();
    ICustomContext context = new CustomContext(pes);

    IToolBehaviorProvider tb = getConfigurationProvider().getDiagramTypeProvider().getCurrentToolBehaviorProvider();
    IContextMenuEntry[] contextMenuEntries = tb.getContextMenu(context);

    // the last one is an add menu; lets move it to a different group
View Full Code Here


  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext) context;
    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();
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext) context;
    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();
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext)context;
    PictogramElement _pe = cc.getPictogramElements()[0] instanceof Connection ? ((Connection) cc.getPictogramElements()[0])
                .getStart().getParent() : cc.getPictogramElements()[0];
        final Object bo = getBusinessObjectForPictogramElement(_pe);
        return (bo == null || bo instanceof RouteSupport);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext) context;
    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();
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext) context;
    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();
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext) context;
    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();
View Full Code Here

      String projectName = contextFile.getProject().getName();
      return CamelDebugUtils.getBreakpointsForContext(fileName, projectName).length>0 && isRouteSelected(context);
  }
 
  private boolean isRouteSelected(IContext context) {
    ICustomContext cc = (ICustomContext) context;
    PictogramElement _pe = cc.getPictogramElements()[0] instanceof Connection ? ((Connection) cc.getPictogramElements()[0])
                .getStart().getParent() : cc.getPictogramElements()[0];
        final Object bo = getBusinessObjectForPictogramElement(_pe);
      
        return bo == null || bo instanceof RouteSupport;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext)context;
    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();
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.features.context.ICustomContext

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.