Examples of IDecorator


Examples of org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator

              new Runnable() {

                public void run() {
                  for (Iterator it = decorators.iterator(); it
                      .hasNext();) {
                    IDecorator decorator = (IDecorator) it
                        .next();
                    decorator.refresh();
                  }
                }
              });
        } catch (Exception e) {
          OntoUML.diagram.part.OntoUMLDiagramEditorPlugin
View Full Code Here

Examples of org.eclipse.graphiti.tb.IDecorator

      AbstractNode node = (AbstractNode) bo;

      ValidationResult res = ValidationFactory.getInstance().validate(node);
      if (res.getInformationCount() > 0) {
        for (String message : res.getInformations()) {
          IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_INFORMATION_TSK);
          imageRenderingDecorator.setMessage(message);
          decorators.add(imageRenderingDecorator);
        }
      }
      if (res.getWarningCount() > 0) {
        for (String message : res.getWarnings()) {
          IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_WARNING_TSK);
          imageRenderingDecorator.setMessage(message);
          decorators.add(imageRenderingDecorator);
        }
      }
      if (res.getErrorCount() > 0) {
        for (String message : res.getErrors()) {
          IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_ERROR_TSK);
          imageRenderingDecorator.setMessage(message);
          decorators.add(imageRenderingDecorator);
        }
      }
     
      // decorate breakpoints on endpoints
      if (getDiagramTypeProvider().getDiagramBehavior().getDiagramContainer() != null && getDiagramTypeProvider().getDiagramBehavior().getDiagramContainer() instanceof RiderDesignEditor) {
        RiderDesignEditor editor = (RiderDesignEditor)getDiagramTypeProvider().getDiagramBehavior().getDiagramContainer();
        IFile activeFile = editor.getCamelContextFile();
        String projectName = activeFile.getProject().getName();
        IBreakpoint bp = CamelDebugUtils.getBreakpointForSelection(node.getId(), activeFile.getName(), projectName);
        if (bp != null && bp instanceof CamelEndpointBreakpoint) {
          CamelEndpointBreakpoint cep = (CamelEndpointBreakpoint)bp;

          // we only want to decorate breakpoints which belong to this project
          if (cep.getProjectName().equals(activeFile.getProject().getName())) {
            try {
              if (cep.isEnabled() && bp instanceof CamelConditionalBreakpoint) {
                // show enabled breakpoint decorator
                IDecorator imageRenderingDecorator = new ImageDecorator(ImageProvider.IMG_YELLOWDOT);
                imageRenderingDecorator.setMessage("");
                decorators.add(imageRenderingDecorator);
              } else if (cep.isEnabled() && bp instanceof CamelEndpointBreakpoint) {
                // show enabled breakpoint decorator
                IDecorator imageRenderingDecorator = new ImageDecorator(ImageProvider.IMG_REDDOT);
                imageRenderingDecorator.setMessage("");
                decorators.add(imageRenderingDecorator);
              } else {
                // show disabled breakpoint decorator
                IDecorator imageRenderingDecorator = new ImageDecorator(ImageProvider.IMG_GRAYDOT);
                imageRenderingDecorator.setMessage("");
                decorators.add(imageRenderingDecorator);
             
            } catch (CoreException e) {
              Activator.getLogger().error(e);
            }         
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.