This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 147734 - Test automation APIs
Summary: Test automation APIs
Status: NEW
Alias: None
Product: uml
Classification: Unclassified
Component: General (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-19 15:22 UTC by George Vasick
Modified: 2008-09-23 21:39 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Vasick 2008-09-19 15:22:17 UTC
API wish list 

  Existing APIs migration
The APIs listed below are from Tom Sawyer. In order to migrate 6.0 uml automation tests, we need dev team provides
following APIs or provides instruction to get the information

APIS from org.netbeans.modules.uml.core.support.umlsupport.ETRect:
   contains(),
   getBottonLeft()
   getBottonRight()
   inflate()
   getCenterPoint();

From Trey: I need more details of how you are using the rect. However in Meteora we are trying reuse existing Java and
Graph Library constructs. Therefore we have not implemented our own rectangle class. We are using the Java Rectangle
class. So you should be able to use the Rectangles contains method. The getButtonLeft, getBottomeRight and
getCenterPoint by getting the x, y, and width and height. The believe the inflate method is simply adding a little to
the width and height and moving the x,y a little. The reason we do not have to have our own rectangle implementation is
because the graph library does not use a much simpler coordinate system than Tom Saywer.

APIs from org.netbeans.modules.uml.ui.swing.drawingarea.IDrawAreaControl
   deviceToLogicalPoint(x, y)
   logicalToDevicePoint()
   getAllEdgesViaRect()
   centerPointInWindow()
   getHasSelected()
   getHasSelectedEdges()

From Trey: Each widget has a method called convertLocalToScene, and convertSceneToLocal. In addition Scene objects also
have the methods convertSceneToView and convertViewToScene. These methods are the same as deviceToLogicalPoint and
localToDevicePoint. From the scene you can also retrieve all of the selected objects. The selected objects will include
both the nodes and edges. We will have to look at getting the centerPointInWindow. I am also wondering how you use the
getAllEdgetsViaRect?

APIs from  org.netbeans.modules.uml.ui.support.viewfactorysupport.IDrawingEngine
   getLogicalBoundingRect()
   getElementType()

From Trey: Each widget as a method called getBounds which returns a rectangle in the coordinate system of its parent.
This is what I believe getLogicalBounds would do. The method getBounds will return the bounds including the borders
(which will also include the selection border). The method getClientBounds will return the bounds minus the borders. A
node and edge are associated with a IPresentationElement?. The IPresentationElement? has a method called
getFirstSubjectType that will return the type of the element associated with the presentation element. To get the
presentation element you must first get the from a widget and cast it to an ObjectScene?. The object scene has a method
called findObject(Widget). The object that will be returned is an IPresentationElement? instance.

org.netbeans.modules.uml.ui.products.ad.graphobjects.ETEdge(or TSEEdge)
   bendPoints()
   hasBends(
   getSourceClippingPoint()
   getTargetClippingPoint()

From Trey: The ConnectionWidget? has a method called getControlPoints which is the same as bendPoints. Obviously if the
getControlPoints returns a list that has 1 or more points, then that satisifies the hasBends interface method. I do not
know that getSourceClippingPoint and getTargetClippingPoint was used to do. Can you give me more details about your needs.

org.netbeans.modules.uml.ui.products.ad.drawengines.ETNodeDrawEngine
   getBorderColor()
   getFillColor()
   getLightGradientFillColor()

From Trey We are just starting to implement the color implementation. On Thursday we will have a design review, and this
is something that we are discussing. I would be interested in what the test is accomplishing and why it needs these
interfaces.

APIs from org.netbeans.modules.uml.ui.swing.drawingarea.ADGraphWindow (or TSEGraphWindow)
   setZoomLever()
   centerPointInWindow()
   centerPresentationElement()
   getVisibleRect()

From Trey:

To set the zoom level you can use the UMLDiagramTopComponent?'s lookup to retrieve a ZoomManager?. The ZoomManager? can
then manipulate the scenes zoom. We still need to implement the center methods.

IETGraphObject
   isSelected()

From Trey:

The Widget class has a method called getState. The getState returns an ObjectState? instance that can be checked if the
widget is selected.

 org.netbeans.modules.uml.ui.support.viewfactorysupport.IETLabel
      getLabelKind()  (DiagramLabelOperator.java/isLinkName()

New API request

    * Allow user to specify a parameter at startup to not hide link palette
    * Assign each palette button a name
    * Expose model in expose model in aletteButton class, so test can get ContextPaletteButtonModel in order call
getName(), getToolTip()