Examples of part()


Examples of org.eclipse.sapphire.ui.PartFunctionContext.part()

    public FunctionResult evaluate( final FunctionContext context )
    {
        if( context instanceof PartFunctionContext )
        {
            final PartFunctionContext fc = (PartFunctionContext) context;
            final SapphirePart part = fc.part();
           
            if( part instanceof PropertyEditorPart )
            {
                final Property property = ( (PropertyEditorPart) part ).property();
               
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.presentation.DiagramNodePresentation.part()

        DiagramNodePresentation nodePresentation = (DiagramNodePresentation)context;
        SapphireDiagramEditor diagramEditor = nodePresentation.getConfigurationManager().getDiagramEditor();

        if( diagramEditor != null )
        {
          GraphicalEditPart sourceEditPart = diagramEditor.getGraphicalEditPart(nodePresentation.part());
        DefaultEditDomain editDomain = diagramEditor.getEditDomain();
        DiagramNodeConnectionCreationTool connectionTool = new DiagramNodeConnectionCreationTool();
        connectionTool.setEditDomain(editDomain);
        editDomain.setActiveTool(connectionTool);
       
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.presentation.DiagramPresentation.part()

      else
      {
          throw new IllegalStateException();
      }
     
      part = presentation.part();
    }
    else if( selection.size() > 1 )
    {
      if (isMouseOnEditParts(selection))
      {
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefConnectionEditPart.part()

    editor.drag(100, 20, 130, 20);
    editor.click(130, 20);

    final SWTBotGefEditPart circuitPart = editor.editParts(instanceOf(CircuitEditPart.class)).get(0);
    final SWTBotGefConnectionEditPart wirePart = circuitPart.sourceConnections().get(0);
    final Wire wire = (Wire) (wirePart.part()).getModel();
    final Connection connection = (Connection) wirePart.part().getFigure();

    editor.activateTool("Select");
    assertEquals("Select", getActiveToolLabel());
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefConnectionEditPart.part()

    editor.click(130, 20);

    final SWTBotGefEditPart circuitPart = editor.editParts(instanceOf(CircuitEditPart.class)).get(0);
    final SWTBotGefConnectionEditPart wirePart = circuitPart.sourceConnections().get(0);
    final Wire wire = (Wire) (wirePart.part()).getModel();
    final Connection connection = (Connection) wirePart.part().getFigure();

    editor.activateTool("Select");
    assertEquals("Select", getActiveToolLabel());

    Point startMove = connection.getPoints().getMidpoint().getCopy();
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefConnectionEditPart.part()

    editor.activateTool("Select");
    assertEquals("Select", getActiveToolLabel());

    final SWTBotGefEditPart circuitPart = editor.editParts(instanceOf(CircuitEditPart.class)).get(0);
    final SWTBotGefConnectionEditPart wirePart = circuitPart.sourceConnections().get(0);
    final Wire wire = (Wire) wirePart.part().getModel();

    assertEquals(0, wire.getBendpoints().size());
    wirePart.createBenpoint(130, 250);
    /* we need to wait the drag operates */
    syncWithUIThread();
 
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart.part()

  public void doubleClick() throws Exception {
    editor.activateTool(TOOL_CIRCUIT);
    editor.click(10, 10);

    SWTBotGefEditPart circuitEditPart = editor.editParts(instanceOf(CircuitEditPart.class)).get(0);
    Circuit circuit = (Circuit) circuitEditPart.part().getModel();
    final String nameBeforeDoubleClick = circuit.getName();
    editor.select(circuitEditPart).doubleClick(15, 15);   
   
    /* we need to wait that double click  have been executed */
    syncWithUIThread();
 
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart.part()

  public void getEditPartWithLabelOnCanvas() throws Exception {
    editor.activateTool(TOOL_LABEL);
    editor.click(10, 10);
    SWTBotGefEditPart botPart = editor.getEditPart("Label");
    assertNotNull(botPart);
    assertTrue(botPart.part() instanceof LogicLabelEditPart);
  }

  @Test
  public void getEditPartWithLabelInsideNode() throws Exception {
    editor.activateTool(TOOL_CIRCUIT);
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart.part()

    editor.activateTool(TOOL_LABEL);
    editor.click(10 + 3, 10 + 3);

    SWTBotGefEditPart botPart = editor.getEditPart("Label");
    assertNotNull(botPart);
    assertTrue(botPart.part() instanceof LogicLabelEditPart);
  }

  @Test
  public void drag() throws Exception {
    editor.activateTool(TOOL_LABEL);
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart.part()

  public void deprecatedGetEditPartWithLabelOnCanvas() throws Exception {
    editor.activateTool(TOOL_LABEL);
    editor.mouseMoveLeftClick(10, 10);
    SWTBotGefEditPart botPart = editor.getEditPart("Label");
    assertNotNull(botPart);
    assertTrue(botPart.part() instanceof LogicLabelEditPart);
  }

  @Test
  public void deprecatedGetEditPartWithLabelInsideNode() throws Exception {
    editor.activateTool(TOOL_CIRCUIT);
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.