Skip to content

Commit cf4882e

Browse files
committed
fix: fix Check UI tests
chore: bump PMD to v7.17.0 in GitHub actions
1 parent 053b491 commit cf4882e

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

com.avaloq.tools.ddk.check.ui.test/src/com/avaloq/tools/ddk/check/ui/test/CheckCatalogWizardTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
*/
5555
@InjectWith(CheckWizardUiTestInjectorProvider.class)
5656
@RunWith(XtextClassRunner.class)
57+
@SuppressWarnings("nls")
5758
public class CheckCatalogWizardTest {
5859

5960
/** This is the name of the catalog wizard. It's the name SWTBot uses to look up the wizard. */

com.avaloq.tools.ddk.test.ui/src/com/avaloq/tools/ddk/test/ui/swtbot/util/SwtBotWizardUtil.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.eclipse.swt.widgets.Composite;
1515
import org.eclipse.swt.widgets.Tree;
1616
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
17+
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
1718
import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
1819
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
1920
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -26,6 +27,7 @@
2627
/**
2728
* Utility class for selection methods in an eclipse widget for SWTBot testing.
2829
*/
30+
@SuppressWarnings("nls")
2931
public 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);

ddk-target/ddk.target

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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"/>
@@ -14,6 +14,7 @@
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">

0 commit comments

Comments
 (0)