org.eclipse.swtbot.eclipse.gef.finder.widgets
Class SWTBotGefEditPart

java.lang.Object
  extended by org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart
Direct Known Subclasses:
SWTBotGefConnectionEditPart

public class SWTBotGefEditPart
extends Object

represent an edit part of a graphical viewer.

Author:
David Green
See Also:
SWTBotGefEditor

Field Summary
protected  org.eclipse.gef.EditPart part
           
protected  SWTBotGefViewer viewer
           
 
Method Summary
 SWTBotGefEditPart activateDirectEdit()
           
 SWTBotGefEditPart activateDirectEdit(Object feature)
           
 List<SWTBotGefEditPart> children()
          Get the children of this edit part.
 SWTBotGefEditPart click()
          click on the edit part.
 SWTBotGefEditPart click(org.eclipse.draw2d.geometry.Point location)
          click on the edit part at the specified location
 List<SWTBotGefEditPart> descendants(Matcher<? extends org.eclipse.gef.EditPart> matcher)
          find descendants that match.
 SWTBotGefEditPart doubleClick()
          double click on the edit part.
 void focus()
          focus on this edit part
 SWTBotGefEditPart parent()
          get the parent, or null if this is the root edit part.
 org.eclipse.gef.EditPart part()
          get the underlying wrapped EditPart instance
 void resize(int direction, int width, int height)
          Resize the current edit part from the corner orientation to the new size.
 SWTBotGefEditPart select()
          select this edit part as a single selection
 List<SWTBotGefConnectionEditPart> sourceConnections()
           
 List<SWTBotGefConnectionEditPart> targetConnections()
           
 String toString()
          provide a description of this edit part that is useful for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

part

protected final org.eclipse.gef.EditPart part

viewer

protected final SWTBotGefViewer viewer
Method Detail

parent

public SWTBotGefEditPart parent()
get the parent, or null if this is the root edit part.


children

public List<SWTBotGefEditPart> children()
Get the children of this edit part.

Returns:
the edit part's children

descendants

public List<SWTBotGefEditPart> descendants(Matcher<? extends org.eclipse.gef.EditPart> matcher)
find descendants that match.

Parameters:
matcher - the matcher that matches against EditPart
Returns:
a list of matches or an empty list if there are none

part

public org.eclipse.gef.EditPart part()
get the underlying wrapped EditPart instance

Returns:
the wrapped EditPart.

focus

public void focus()
focus on this edit part


select

public SWTBotGefEditPart select()
select this edit part as a single selection


click

public SWTBotGefEditPart click()
click on the edit part.


click

public SWTBotGefEditPart click(org.eclipse.draw2d.geometry.Point location)
click on the edit part at the specified location


doubleClick

public SWTBotGefEditPart doubleClick()
double click on the edit part.


resize

public void resize(int direction,
                   int width,
                   int height)
Resize the current edit part from the corner orientation to the new size. The direction is specified using using PositionConstants.NORTH, PositionConstants.NORTH_EAST, etc.

Parameters:
direction - the direction
width - the new width
height - the new height

activateDirectEdit

public SWTBotGefEditPart activateDirectEdit()

activateDirectEdit

public SWTBotGefEditPart activateDirectEdit(Object feature)

toString

public String toString()
provide a description of this edit part that is useful for debugging purposes.

Overrides:
toString in class Object

sourceConnections

public List<SWTBotGefConnectionEditPart> sourceConnections()

targetConnections

public List<SWTBotGefConnectionEditPart> targetConnections()