mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
get rid of yellow code
GitOrigin-RevId: bdfaec165ee0c655d2feb4417f9e1cf67ef47270
This commit is contained in:
committed by
intellij-monorepo-bot
parent
56201c31ea
commit
e416ce4c7c
+4
@@ -175,6 +175,7 @@ public final class SearchEverywhereUI extends SearchEverywhereUIBase implements
|
||||
return new JBList<>(myListModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toggleEverywhereFilter() {
|
||||
myEverywhereAutoSet = false;
|
||||
if (mySelectedTab.everywhereAction == null) return;
|
||||
@@ -206,6 +207,7 @@ public final class SearchEverywhereUI extends SearchEverywhereUIBase implements
|
||||
return mySelectedTab.everywhereAction.canToggleEverywhere();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void switchToContributor(@NotNull String contributorID) {
|
||||
SETab selectedTab = myTabs.stream()
|
||||
.filter(tab -> tab.getID().equals(contributorID))
|
||||
@@ -275,10 +277,12 @@ public final class SearchEverywhereUI extends SearchEverywhereUIBase implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectedContributorID() {
|
||||
return mySelectedTab.getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getSelectionIdentity() {
|
||||
Object value = myResultsList.getSelectedValue();
|
||||
|
||||
+4
@@ -174,6 +174,7 @@ public final class SearchEverywhereUIMixedResults extends SearchEverywhereUIBase
|
||||
return new JBList<>(myListModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toggleEverywhereFilter() {
|
||||
myEverywhereAutoSet = false;
|
||||
if (mySelectedTab.everywhereAction == null) return;
|
||||
@@ -201,6 +202,7 @@ public final class SearchEverywhereUIMixedResults extends SearchEverywhereUIBase
|
||||
return mySelectedTab.everywhereAction.canToggleEverywhere();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void switchToContributor(@NotNull String contributorID) {
|
||||
SETab selectedTab = myTabs.stream()
|
||||
.filter(tab -> tab.getID().equals(contributorID))
|
||||
@@ -270,10 +272,12 @@ public final class SearchEverywhereUIMixedResults extends SearchEverywhereUIBase
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSelectedContributorID() {
|
||||
return mySelectedTab.getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getSelectionIdentity() {
|
||||
Object value = myResultsList.getSelectedValue();
|
||||
|
||||
@@ -100,8 +100,8 @@ public class PluginsTableRenderer extends DefaultTableCellRenderer {
|
||||
myCategory.clear();
|
||||
myCategory.setOpaque(false);
|
||||
Object query = table.getClientProperty(SpeedSearchSupply.SEARCH_QUERY_KEY);
|
||||
SimpleTextAttributes attr = new SimpleTextAttributes(UIUtil.getListBackground(isSelected),
|
||||
UIUtil.getListForeground(isSelected),
|
||||
SimpleTextAttributes attr = new SimpleTextAttributes(UIUtil.getListBackground(isSelected, hasFocus),
|
||||
UIUtil.getListForeground(isSelected, hasFocus),
|
||||
JBColor.RED,
|
||||
SimpleTextAttributes.STYLE_PLAIN);
|
||||
Matcher matcher = NameUtil.buildMatcher("*" + query, NameUtil.MatchingCaseSensitivity.NONE);
|
||||
@@ -109,7 +109,7 @@ public class PluginsTableRenderer extends DefaultTableCellRenderer {
|
||||
String category = myPluginDescriptor.getCategory() == null ? null : StringUtil.toUpperCase(myPluginDescriptor.getCategory());
|
||||
if (category != null) {
|
||||
if (query instanceof String) {
|
||||
SpeedSearchUtil.appendColoredFragmentForMatcher(category, myCategory, attr, matcher, UIUtil.getTableBackground(isSelected), true);
|
||||
SpeedSearchUtil.appendColoredFragmentForMatcher(category, myCategory, attr, matcher, UIUtil.getTableBackground(isSelected, hasFocus), true);
|
||||
}
|
||||
else {
|
||||
myCategory.append(category);
|
||||
@@ -193,7 +193,7 @@ public class PluginsTableRenderer extends DefaultTableCellRenderer {
|
||||
if (!Objects.equals(initialNameForeground, myName.getForeground())) {
|
||||
attr = attr.derive(attr.getStyle(), myName.getForeground(), attr.getBgColor(), attr.getWaveColor());
|
||||
}
|
||||
SpeedSearchUtil.appendColoredFragmentForMatcher(pluginName, myName, attr, matcher, UIUtil.getTableBackground(isSelected), true);
|
||||
SpeedSearchUtil.appendColoredFragmentForMatcher(pluginName, myName, attr, matcher, UIUtil.getTableBackground(isSelected, hasFocus), true);
|
||||
}
|
||||
else {
|
||||
myName.append(pluginName);
|
||||
|
||||
+1
-3
@@ -217,7 +217,7 @@ public abstract class FileTextFieldImpl implements FileLookup, Disposable, FileT
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
if (!result.myCompletionBase.equals(getCompletionBase())) return;
|
||||
|
||||
int pos = selectCompletionRemoveText(result, selectReplacedText);
|
||||
selectCompletionRemoveText(result, selectReplacedText);
|
||||
|
||||
showCompletionPopup(result, isExplicitCall);
|
||||
});
|
||||
@@ -758,7 +758,6 @@ public abstract class FileTextFieldImpl implements FileLookup, Disposable, FileT
|
||||
myPathTextField.setText(text);
|
||||
}
|
||||
|
||||
@SuppressWarnings("HardCodedStringLiteral")
|
||||
private void processListSelection(final KeyEvent e) {
|
||||
if (togglePopup(e)) return;
|
||||
|
||||
@@ -820,7 +819,6 @@ public abstract class FileTextFieldImpl implements FileLookup, Disposable, FileT
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("HardCodedStringLiteral")
|
||||
private boolean togglePopup(KeyEvent e) {
|
||||
final KeyStroke stroke = KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers());
|
||||
final Object action = ((InputMap)UIManager.get("ComboBox.ancestorInputMap")).get(stroke);
|
||||
|
||||
Reference in New Issue
Block a user