File tree Expand file tree Collapse file tree
com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test
com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454 */
5555@ InjectWith (CheckWizardUiTestInjectorProvider .class )
5656@ RunWith (XtextClassRunner .class )
57+ @ SuppressWarnings ("nls" )
5758public class CheckCatalogWizardTest {
5859
5960 /** This is the name of the catalog wizard. It's the name SWTBot uses to look up the wizard. */
Original file line number Diff line number Diff line change 1414import org .eclipse .swt .widgets .Composite ;
1515import org .eclipse .swt .widgets .Tree ;
1616import org .eclipse .swtbot .eclipse .finder .widgets .SWTBotView ;
17+ import org .eclipse .swtbot .swt .finder .exceptions .WidgetNotFoundException ;
1718import org .eclipse .swtbot .swt .finder .matchers .WidgetMatcherFactory ;
1819import org .eclipse .swtbot .swt .finder .widgets .SWTBotTree ;
1920import org .eclipse .swtbot .swt .finder .widgets .SWTBotTreeItem ;
2627/**
2728 * Utility class for selection methods in an eclipse widget for SWTBot testing.
2829 */
30+ @ SuppressWarnings ("nls" )
2931public final class SwtBotWizardUtil {
3032
3133 private SwtBotWizardUtil () {
@@ -41,7 +43,13 @@ private SwtBotWizardUtil() {
4143 * the folder name
4244 */
4345 public static void selectProjectFolder (final SwtWorkbenchBot bot , final String folderName ) {
44- SWTBotView packageExplorer = bot .viewByTitle ("Project Explorer" );
46+ try {
47+ bot .viewById ("org.eclipse.jdt.ui.PackageExplorer" );
48+ } catch (WidgetNotFoundException e ) {
49+ // If view not found, open it via menu
50+ bot .menu ("Window" ).menu ("Show View" ).menu ("Package Explorer" ).click ();
51+ }
52+ SWTBotView packageExplorer = bot .viewById ("org.eclipse.jdt.ui.PackageExplorer" );
4553 packageExplorer .show ();
4654 Composite comp = (Composite ) packageExplorer .getWidget ();
4755 final Tree tree = bot .widget (WidgetMatcherFactory .widgetOfType (Tree .class ), comp );
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" standalone =" no" ?>
22<?pde version =" 3.8" ?>
3- <target name =" DDK Target" sequenceNumber =" 24 " >
3+ <target name =" DDK Target" sequenceNumber =" 25 " >
44<locations >
55 <location includeAllPlatforms =" false" includeConfigurePhase =" true" includeMode =" planner" includeSource =" true" type =" InstallableUnit" >
66 <unit id =" org.eclipse.swtbot.eclipse.feature.group" version =" 0.0.0" />
1414 <unit id =" org.eclipse.jdt.source.feature.group" version =" 0.0.0" />
1515 <unit id =" org.eclipse.platform.feature.group" version =" 0.0.0" />
1616 <unit id =" org.eclipse.platform.source.feature.group" version =" 0.0.0" />
17+ <unit id =" org.eclipse.sdk.feature.group" version =" 0.0.0" />
1718 <repository location =" https://download.eclipse.org/eclipse/updates/4.34/" />
1819 </location >
1920 <location includeAllPlatforms =" false" includeConfigurePhase =" false" includeMode =" planner" includeSource =" true" type =" InstallableUnit" >
You can’t perform that action at this time.
0 commit comments