Author: jpeterka
Date: 2010-12-21 04:19:27 -0500 (Tue, 21 Dec 2010)
New Revision: 27627
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTArranger.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefEditorExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefViewerExt.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFigure.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFinder.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefMouse.java
Log:
SWTBotGef extensions added/updated:
Added SWTArranger for rectangular objects
GefEditorExt added
SWTBotGeffigure redesigned to have less dependencies
SWTBotGefMouse updated
SWTBotGefViewerExt added
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTArranger.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTArranger.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTArranger.java 2010-12-21
09:19:27 UTC (rev 27627)
@@ -0,0 +1,271 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.gef;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Arranger can help to arrange rectangular shapes on the given area
+ * @author jpeterka
+ *
+ */
+public class SWTArranger {
+
+ private List<Block> blocks = new ArrayList<Block>();
+
+ private void addDifferent(List<Block> nb) {
+ for (Block n : nb ) {
+ boolean found = false;
+ for (Block b : blocks) {
+ if (b.x == n.x && b.y == n.y && b.width == n.width &&
b.height == n.height) {
+ found = true;
+ System.out.println(String.format("ignored: %d,%d,%d,%d", b.x, b.y,b.width,
b.height));
+ break;
+ }
+ }
+ if (!found)
+ blocks.add(n);
+ System.out.println(String.format("added: %d,%d,%d,%d", n.x, n.y,n.width,
n.height));
+ }
+ }
+
+ /**
+ * Set origin canvas size
+ * @param x
+ * @param y
+ * @param width
+ * @param height
+ */
+ public void setOrigin(Rectangle rect) {
+ setOrigin(rect.x, rect.y, rect.width, rect.height);
+ }
+
+ public void setOrigin(int x, int y, int width, int height) {
+ blocks.clear();
+ blocks.add(new Block(x,y,width, height));
+ }
+
+ /**
+ * Put rectangle with border
+ * @param width
+ * @param height
+ */
+ public void put(int width, int height) {
+ put(width, height, 0);
+ }
+
+ /**
+ * Put rectangle on empty space
+ * @param width
+ * @param height
+ * @param border
+ */
+ public void put(int width, int height, int border) {
+ boolean found = false;
+ for (Block b : blocks) {
+ if ((b.width >= width) && (b.height >= height)) {
+ addRect(b.x + border, b.y + border, width, height);
+ System.out.println(width + "," + height + " yep, i can arrange "
+ b.x + "," + b.y);
+ found = true;
+ break;
+ }
+ }
+ if (!found) System.out.println("there is no free location, sorry");
+ }
+
+ /**
+ * Add rectangle manually (be sure not to overlapp another)
+ * @param x
+ * @param y
+ * @param width
+ * @param height
+ */
+ public void addRect(int x, int y, int width, int height) {
+ Point p1 = new Point();
+ Point p2 = new Point();
+
+ List<Block> nb = new ArrayList<Block>();
+
+ for (int i = 0; i < blocks.size(); i++) {
+ Block r = blocks.get(i);
+ System.out.println(String.format("Trying to add: %d,%d,%d,%d", r.x,
r.y,r.width, r.height));
+
+ // full cover
+ if (x <= r.x && y <= r.y && (x + width) >= (r.x + r.width)
&& (y + height) >= (r.y + r.height)) {
+ r.invalid = true;
+ System.out.println(String.format("full invalid: %d,%d,%d,%d", r.x, r.y,r.x
+ r.width, r.y - r.height));
+ }
+ // upper
+ if (((y > r.y) && (y < (r.y + r.height))) && penetrateCheck(x,
x+width, r.x, r.x + r.width))
+ {
+ p1.x = r.x;
+ p1.y = r.y;
+ p2.x = r.x + r.width;
+ p2.y = y;
+ nb.add(new Block(p1.x, p1.y,p2.x - p1.x, p2.y - p1.y));
+ r.invalid = true;
+ System.out.println(String.format("upper: %d,%d,%d,%d", p1.x, p1.y,p2.x -
p1.x, p2.y - p1.y));
+ assertTrue(p1.x != p2.x );
+ }
+ // lower
+ if ((((y + height) < (r.y + r.height)) && ((y + height) > r.y ))
&& penetrateCheck(x, x+width, r.x, r.x + r.width)) {
+ p1.x = r.x;
+ p1.y = y + height;
+ p2.x = r.x + r.width;
+ p2.y = r.y + r.height;
+ nb.add(new Block(p1.x, p1.y,p2.x - p1.x, p2.y - p1.y));
+ r.invalid = true;
+ System.out.println(String.format("lower: %d,%d,%d,%d", p1.x, p1.y,p2.x -
p1.x, p2.y - p1.y));
+ assertTrue(p1.x != p2.x );
+ }
+ // left
+ if ((((x < (r.x + r.width)) && (x > r.x)) && penetrateCheck(y,
y+height, r.y, r.y + r.height))){
+ p1.x = r.x;
+ p1.y = r.y;
+ p2.x = x;
+ p2.y = r.y + r.height;
+ nb.add(new Block(p1.x, p1.y,p2.x - p1.x, p2.y - p1.y));
+ r.invalid = true;
+ System.out.println(String.format("left: %d,%d,%d,%d", p1.x, p1.y,p2.x -
p1.x, p2.y - p1.y));
+ assertTrue(p1.x != p2.x );
+ }
+ // right
+ if ((((x + width) < (r.x + r.width)) && ((x + width) > r.x)) &&
penetrateCheck(y, y+height, r.y, r.y + r.height)) {
+ p1.x = x + width;
+ p1.y = r.y;
+ p2.x = r.x + r.width;
+ p2.y = r.y + r.height;
+ nb.add(new Block(p1.x, p1.y,p2.x - p1.x, p2.y - p1.y));
+ r.invalid = true;
+ System.out.println(String.format("right: %d,%d,%d,%d", p1.x, p1.y,p2.x -
p1.x, p2.y - p1.y));
+ assertTrue(p1.x != p2.x );
+ }
+ }
+
+ for (int i = blocks.size() - 1; i >= 0; i--) {
+ if (blocks.get(i).invalid) blocks.remove(i);
+ }
+ addDifferent(nb);
+ nb.clear();
+ }
+
+ private boolean penetrateCheck(int min, int max, int min2, int max2 ) {
+ if (min < max2 && (max > min2)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * For debug purposes
+ */
+ public void printBlocks() {
+ System.out.println("Details");
+ for (Block r: blocks) {
+ System.out.println(String.format("P: %d,%d,%d,%d", r.x,r.y,r.x + r.width,r.y
+ r.height));
+ }
+ }
+
+ /**
+ * Debug only
+ */
+ public static void main(String[] args) {
+
+ final SWTArranger a = new SWTArranger();
+ a.setOrigin(0,0,200,200);
+ for (int i = 0; i < 10; i++)
+ a.addRect(i*10, i*10, 10, 10);
+ a.addRect(40,40,40,40);
+ a.addRect(50,50,40,40);
+ a.put(40, 60);
+ a.put(100, 100);
+ System.out.println("Done");
+
+ drawModel(a);
+
+ System.out.println("Done-SWT");
+ }
+
+ /**
+ * Debug only
+ */
+ private static void drawModel(final SWTArranger a) {
+ final Display d = new Display();
+ Shell s = new Shell(d);
+ s.setSize(500,500);
+
+ s.setLayout(new FillLayout());
+
+ Canvas canvas = new Canvas(s, SWT.NONE);
+ canvas.setSize(500,500);
+ canvas.setLocation(20,20);
+ canvas.addPaintListener(new PaintListener() {
+
+ @Override
+ public void paintControl(PaintEvent e) {
+ Color c = new Color(d,0x00, 0x00, 0x00);
+ GC gc = e.gc;
+ gc.setBackground(c);
+ int i = 0;
+ for (Block r : a.blocks) {
+ i += 10;
+ gc.fillRectangle(r.x, r.y, r.width, r.height);
+ }
+ c.dispose();
+ gc.dispose();
+ }
+ });
+ s.pack();
+ s.open();
+
+ while (!s.isDisposed()) {
+ if (!d.readAndDispatch()) {
+ d.sleep();
+ }
+ }
+ d.dispose();
+ }
+
+ /**
+ * Block, just a simple rectangle
+ * @author jpeterka
+ *
+ */
+ class Block {
+ public boolean invalid = false;
+
+ public int x,y,width,height;
+
+ public Block(int x, int y, int width, int height) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTArranger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefEditorExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefEditorExt.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefEditorExt.java 2010-12-21
09:19:27 UTC (rev 27627)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.gef;
+
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefFigureCanvas;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+
+/**
+ * Extended version of gef editor, it wraps SWTBotGefEditor and provides api
+ * needed for gef tests which are hardly reached from standard gef editor
+ * @author jpeterka
+ *
+ */
+public class SWTBotGefEditorExt {
+ SWTGefBot bot;
+ SWTBotGefEditor editor;
+ SWTBotGefMouse mouse;
+
+ /**
+ * Default constructor
+ */
+ public SWTBotGefEditorExt(String title) {
+ this.bot = new SWTGefBot();
+ this.editor = bot.gefEditor(title);
+ this.mouse = new SWTBotGefMouse(editor.bot(),
+ SWTBotGefFinder.findCanvas(editor));
+ }
+
+
+ /**
+ * Insert entity from tool bar on given position
+ */
+ public void insertEntity(String title, int x, int y) {
+ editor.activateTool(title);
+ editor.click(x, y);
+ }
+
+ /**
+ * get label figure
+ */
+ public SWTBotGefFigure labelFigure(String label) {
+ SWTBotGefFigure rf = getRootFigure();
+ SWTBotGefFigure lf = rf.labelFigure(label);
+ return lf;
+ }
+
+ /**
+ * set text to label figure
+ */
+ public void setLabelText(SWTBotGefFigure figure, String str) {
+ editor.select(figure.getText());
+ mouse.moveAndClick(figure);
+ SWTBotGefFigureCanvas canvas = SWTBotGefFinder.findCanvas(editor);
+ SWTBotText text = bot.text(0);
+ canvas.typeText(text.widget, str);
+ }
+
+ /**
+ * return root figure
+ */
+ public SWTBotGefFigure getRootFigure() {
+ SWTBotGefViewerExt viewer = new SWTBotGefViewerExt(editor);
+ SWTBotGefFigure rf = viewer.getRootFigure();
+ return rf;
+ }
+
+ /**
+ * returns canvas bounds
+ */
+ public Rectangle getCanvasBounds() {
+ Rectangle ret = UIThreadRunnable.syncExec(new Result<Rectangle>() {
+ @Override
+ public Rectangle run() {
+ GraphicalViewer viewer = SWTBotGefFinder.getViewer(editor);
+ FigureCanvas fc = (FigureCanvas) viewer.getControl();
+ Rectangle r = fc.getBounds();
+ return r;
+ }
+ });
+ return ret;
+ }
+
+ // ---- Wrappers
+ /**
+ * saves editor
+ */
+ public void save() {
+ editor.save();
+ }
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefEditorExt.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFigure.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFigure.java 2010-12-21
09:12:49 UTC (rev 27626)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFigure.java 2010-12-21
09:19:27 UTC (rev 27627)
@@ -18,13 +18,7 @@
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
-import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
-import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefFigureCanvas;
-import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
/**
* Gef figure bot controler. It performs actions which are missing or works
@@ -37,31 +31,12 @@
private IFigure figure;
private Logger log = Logger.getLogger(SWTBotGefFigure.class);
- private SWTBotGefEditor editor;
- private SWTBot bot;
- private SWTBotGefFigureCanvas canvas;
- private SWTBotGefEditPart part;
- private SWTBotGefFigure(SWTBotGefEditor editor, SWTBotGefEditPart part,
- IFigure figure) {
- this.editor = editor;
- this.bot = editor.bot();
- this.canvas = SWTBotGefFinder.findCanvas(editor);
- this.part = part;
+ public SWTBotGefFigure(IFigure figure) {
this.figure = figure;
}
/**
- * Default Constructor, requires gef editor and gef part
- *
- * @param editor
- * @param part
- */
- public SWTBotGefFigure(SWTBotGefEditor editor, SWTBotGefEditPart part) {
- this(editor, part, ((GraphicalEditPart) part.part()).getFigure());
- }
-
- /**
* Return figures bounds
*/
public Rectangle getBounds() {
@@ -135,7 +110,7 @@
Label label = (Label) figure;
log.info(label.getText());
if (label.getText().equalsIgnoreCase(string))
- return new SWTBotGefFigure(editor, part, label);
+ return new SWTBotGefFigure(figure);
}
}
throw new WidgetNotFoundException("No Label with " + string + "
found");
@@ -153,18 +128,6 @@
throw new WidgetNotFoundException("Widget is not Label type");
}
- /**
- * Performs setText action for Label figure in GEF editor
- *
- * @param str
- */
- public void setText(String str) {
- part.select();
- SWTBotGefMouse mouse = new SWTBotGefMouse(bot, canvas);
- mouse.moveAndClick(this);
- SWTBotText text = bot.text(0);
- canvas.typeText(text.widget, str);
- }
private void getSubFigures(IFigure figure, List<IFigure> figures) {
@SuppressWarnings("unchecked")
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFinder.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFinder.java 2010-12-21
09:12:49 UTC (rev 27626)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefFinder.java 2010-12-21
09:19:27 UTC (rev 27627)
@@ -19,6 +19,7 @@
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
/**
* SWTBotGefProvider provides some often conversion tasks for getting
@@ -57,5 +58,21 @@
}
return canvas;
}
+
+ /**
+ * Returns graphical viewer from editor
+ */
+ public static GraphicalViewer getViewer(final SWTBotGefEditor editor)
+ {
+ GraphicalViewer graphicalViewer = UIThreadRunnable.syncExec(new
Result<GraphicalViewer>() {
+ public GraphicalViewer run() {
+ IEditorReference partReference = editor.getReference();
+ final IEditorPart editor = partReference.getEditor(true);
+ return (GraphicalViewer) editor.getAdapter(GraphicalViewer.class);
+ }
+ });
+
+ return graphicalViewer;
+ }
}
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefMouse.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefMouse.java 2010-12-21
09:12:49 UTC (rev 27626)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefMouse.java 2010-12-21
09:19:27 UTC (rev 27627)
@@ -61,6 +61,7 @@
canvas().getDisplay().post(event);
}
});
+ bot.sleep(SLEEP);
}
/**
@@ -83,8 +84,16 @@
move(figure);
click();
}
-
+
/**
+ * Moves and left mouse click on given position
+ */
+ public void moveAndClick(int x, int y) {
+ move(x,y);
+ click();
+ }
+
+ /**
* Calculates element position to display, call it from UI thread
*/
private void getDisplayPosition(final Point point,
@@ -104,6 +113,24 @@
}
/**
+ * Moves on position related to canvas position
+ */
+ public void moveCanvas(int x, int y) {
+
+ final Point p = new Point();
+ UIThreadRunnable.syncExec(new VoidResult() {
+ public void run() {
+ p.x = canvas().toDisplay(0,0).x;
+ p.y = canvas().toDisplay(0,0).y;
+
+ log.info("Canvas position on display is :" + p.x + "," + p.y);
+ }
+ });
+
+ move(p.x + x, p.y + y);
+ }
+
+ /**
* Left click on give position
*/
public void click() {
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefViewerExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefViewerExt.java
(rev 0)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefViewerExt.java 2010-12-21
09:19:27 UTC (rev 27627)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.gef;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
+
+/**
+ * Provides SWTBot Gef support related to Gef Viewer
+ * @author jpeterka
+ *
+ */
+public class SWTBotGefViewerExt {
+
+ GraphicalViewer graphicalViewer;
+
+ public SWTBotGefViewerExt(SWTBotGefEditor editor) {
+ graphicalViewer = SWTBotGefFinder.getViewer(editor);
+ }
+
+ /**
+ * Returns root figure
+ * @return
+ */
+ public SWTBotGefFigure getRootFigure() {
+ SWTBotGefFigure ret = UIThreadRunnable.syncExec(new Result<SWTBotGefFigure>() {
+
+ @Override
+ public SWTBotGefFigure run() {
+ RootEditPart root = graphicalViewer.getRootEditPart().getRoot();
+ if (root instanceof GraphicalEditPart) {
+ GraphicalEditPart gep = (GraphicalEditPart)root;
+ SWTBotGefFigure figure = new SWTBotGefFigure(gep.getFigure());
+ return figure;
+ }
+ else {
+ throw new WidgetNotFoundException("Can't get root figure");
+ }
+ }
+ });
+ return ret;
+ }
+
+}
Property changes on:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gef/SWTBotGefViewerExt.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain