Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2025 Google, Inc. and others.
* Copyright (c) 2011, 2026 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -40,6 +40,8 @@
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.texteditor.ChainedPreferenceStore;

import org.apache.commons.lang3.ArrayUtils;

/**
* Helper class for various JDT UI utils.
*
Expand Down Expand Up @@ -190,7 +192,7 @@ public static IType selectType(Shell shell, IJavaSearchScope scope, int style) t
dialog.setMessage(Messages.JdtUiUtils_selectTypeMessage);
// open dialog
if (dialog.open() == Window.OK) {
return (IType) dialog.getResult()[0];
return (IType) ArrayUtils.get(dialog.getResult(), 0);
}
// no type selected
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ public void run() throws Exception {
entry.initialize(m_viewerCanvas, panel);
Tool tool = entry.createTool();
m_viewerCanvas.getEditDomain().setActiveTool(tool);
waitEventLoop(0);
}
}, new FailableConsumer<>() {
@Override
Expand Down
Loading