2727import java .util .Iterator ;
2828import java .util .List ;
2929
30- import org .eclipse .core .runtime .Platform ;
3130import org .eclipse .swt .SWT ;
3231import org .eclipse .swt .widgets .Button ;
3332import org .eclipse .swt .widgets .Combo ;
6059import org .eclipse .swtbot .swt .finder .widgets .SWTBotTree ;
6160import org .eclipse .swtbot .swt .finder .widgets .SWTBotTreeItem ;
6261import org .eclipse .ui .IWorkbench ;
62+ import org .eclipse .ui .IWorkbenchWindow ;
6363import org .eclipse .ui .PlatformUI ;
6464import org .eclipse .ui .WorkbenchException ;
6565import org .eclipse .ui .part .ViewPart ;
@@ -239,11 +239,11 @@ public static void openJavaPerspectiveViaMenu() {
239239
240240 public static SWTBotTable getDashboardTable () {
241241 openDashboardUsingToolbar ();
242-
242+
243243 // Ensure the dashboard view is actually shown and has focus
244244 // This prevents finding the wrong view (like ConsoleView) when the console takes focus after server start
245245 Object dashboardView = findGlobal (DASHBOARD_VIEW_TITLE , Option .factory ().widgetClass (ViewPart .class ).build ());
246-
246+
247247 // Explicitly show and activate the dashboard view to ensure it has focus
248248 if (dashboardView instanceof ViewPart ) {
249249 final ViewPart vp = (ViewPart ) dashboardView ;
@@ -261,11 +261,11 @@ public void run() {
261261 }
262262 }
263263 });
264-
264+
265265 // Give the UI a moment to update after activation
266- pause (500 );
266+ MagicWidgetFinder . pause (500 );
267267 }
268-
268+
269269 Table table = ((DashboardView ) dashboardView ).getTable ();
270270 return new SWTBotTable (table );
271271 }
@@ -417,22 +417,21 @@ public static SWTBotMenu getAppDebugAsMenu(SWTWorkbenchBot bot, String item) {
417417 public static void setBuildCmdPathInPreferences (SWTWorkbenchBot bot , String buildTool ) {
418418 // Use Eclipse preference store API directly instead of UI navigation
419419 // This avoids issues with menu accessibility in headless CI environments
420-
420+
421421 String finalMvnExecutableLoc = AbstractLibertyPluginSWTBotTest .getMvnCmdPath ();
422422 String finalGradleExecutableLoc = AbstractLibertyPluginSWTBotTest .getGradleCmdPath ();
423-
423+
424424 // Get the preference store for the Liberty Tools plugin
425- org .eclipse .jface .preference .IPreferenceStore prefStore =
426- new org .eclipse .ui .preferences .ScopedPreferenceStore (
425+ org .eclipse .jface .preference .IPreferenceStore prefStore = new org .eclipse .ui .preferences .ScopedPreferenceStore (
427426 org .eclipse .core .runtime .preferences .InstanceScope .INSTANCE ,
428427 "io.openliberty.tools.eclipse.ui" );
429-
428+
430429 if ("Maven" .equals (buildTool )) {
431430 prefStore .setValue ("MVNPATH" , finalMvnExecutableLoc );
432431 } else if ("Gradle" .equals (buildTool )) {
433432 prefStore .setValue ("GRADLEPATH" , finalGradleExecutableLoc );
434433 }
435-
434+
436435 // Save the preference store
437436 if (prefStore instanceof org .eclipse .ui .preferences .ScopedPreferenceStore ) {
438437 try {
@@ -447,20 +446,19 @@ public static void setBuildCmdPathInPreferences(SWTWorkbenchBot bot, String buil
447446 public static void unsetBuildCmdPathInPreferences (SWTWorkbenchBot bot , String buildTool ) {
448447 // Use Eclipse preference store API directly instead of UI navigation
449448 // This avoids issues with menu accessibility in headless CI environments
450-
449+
451450 // Get the preference store for the Liberty Tools plugin
452- org .eclipse .jface .preference .IPreferenceStore prefStore =
453- new org .eclipse .ui .preferences .ScopedPreferenceStore (
451+ org .eclipse .jface .preference .IPreferenceStore prefStore = new org .eclipse .ui .preferences .ScopedPreferenceStore (
454452 org .eclipse .core .runtime .preferences .InstanceScope .INSTANCE ,
455453 "io.openliberty.tools.eclipse.ui" );
456-
454+
457455 // Reset to default values (empty strings)
458456 if ("Maven" .equals (buildTool )) {
459457 prefStore .setToDefault ("MVNPATH" );
460458 } else if ("Gradle" .equals (buildTool )) {
461459 prefStore .setToDefault ("GRADLEPATH" );
462460 }
463-
461+
464462 // Save the preference store
465463 if (prefStore instanceof org .eclipse .ui .preferences .ScopedPreferenceStore ) {
466464 try {
0 commit comments