mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
transfer search query to go to actions
This commit is contained in:
@@ -67,7 +67,9 @@ import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.ui.EmptyIcon;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.CompoundBorder;
|
||||
@@ -307,7 +309,7 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
|
||||
return field;
|
||||
}
|
||||
|
||||
private static class MySearchTextField extends SearchTextField {
|
||||
private static class MySearchTextField extends SearchTextField implements DataProvider {
|
||||
public MySearchTextField() {
|
||||
super(false);
|
||||
setOpaque(false);
|
||||
@@ -317,6 +319,15 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
|
||||
@Override
|
||||
protected void showPopup() {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getData(@NonNls String dataId) {
|
||||
if (PlatformDataKeys.PREDEFINED_TEXT.is(dataId)) {
|
||||
return getTextEditor().getText();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private class MyListRenderer extends ColoredListCellRenderer {
|
||||
|
||||
Reference in New Issue
Block a user