File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -407,15 +407,15 @@ public BuildPathBasePage switchToTab(Class<? extends BuildPathBasePage> tabClass
407407 JavaPlugin .logErrorMessage ("Page does not support tab switching: " +this .getClass ()); //$NON-NLS-1$
408408 return null ;
409409 }
410- if (fSWTControl .getParent () instanceof TabFolder tabFolder ) {
410+ Composite parent = fSWTControl .getParent ();
411+ if (parent instanceof TabFolder tabFolder ) {
411412 for (TabItem tabItem : tabFolder .getItems ()) {
412413 if (tabClass .isInstance (tabItem .getData ())) {
413414 tabFolder .setSelection (tabItem );
414415 return (BuildPathBasePage ) tabItem .getData ();
415416 }
416417 }
417- }
418- if (fSWTControl .getParent () instanceof CTabFolder cTabFolder ) {
418+ } else if (parent instanceof CTabFolder cTabFolder ) {
419419 for (CTabItem ctabItem : cTabFolder .getItems ()) {
420420 if (tabClass .isInstance (ctabItem .getData ())) {
421421 cTabFolder .setSelection (ctabItem );
You can’t perform that action at this time.
0 commit comments