mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Redundant casts removed
This commit is contained in:
+1
-2
@@ -81,7 +81,6 @@ import com.intellij.openapi.project.DumbServiceImpl;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.project.ex.ProjectManagerEx;
|
||||
import com.intellij.openapi.project.impl.ProjectManagerImpl;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.ProperTextRange;
|
||||
import com.intellij.openapi.util.Segment;
|
||||
@@ -148,7 +147,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
||||
Project project = getProject();
|
||||
if (project != null) {
|
||||
doPostponedFormatting(project);
|
||||
((ProjectManagerImpl)ProjectManagerEx.getInstanceEx()).forceCloseProject(project, false);
|
||||
ProjectManagerEx.getInstanceEx().forceCloseProject(project, false);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
|
||||
+1
-1
@@ -518,7 +518,7 @@ public abstract class AbstractProjectViewPane implements DataProvider, Disposabl
|
||||
}
|
||||
|
||||
protected void installComparator(AbstractTreeBuilder builder, @NotNull Comparator<? super NodeDescriptor> comparator) {
|
||||
if (builder != null) builder.setNodeDescriptorComparator((Comparator)comparator);
|
||||
if (builder != null) builder.setNodeDescriptorComparator(comparator);
|
||||
}
|
||||
|
||||
public JTree getTree() {
|
||||
|
||||
@@ -8,7 +8,6 @@ package com.intellij.ui.speedSearch;
|
||||
import com.intellij.openapi.actionSystem.DataProvider;
|
||||
import com.intellij.openapi.ui.popup.JBPopup;
|
||||
import com.intellij.openapi.ui.popup.util.PopupUtil;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.ui.DocumentAdapter;
|
||||
import com.intellij.ui.LightColors;
|
||||
@@ -76,7 +75,7 @@ public class ListWithFilter<T> extends JPanel implements DataProvider {
|
||||
myList.addKeyListener(mySpeedSearch);
|
||||
int selectedIndex = myList.getSelectedIndex();
|
||||
int modelSize = myList.getModel().getSize();
|
||||
myModel = new NameFilteringListModel<T>(myList, (Function<T, String>)namer, s -> mySpeedSearch.shouldBeShowing(s), mySpeedSearch);
|
||||
myModel = new NameFilteringListModel<T>(myList, namer, mySpeedSearch::shouldBeShowing, mySpeedSearch);
|
||||
if (myModel.getSize() == modelSize) {
|
||||
myList.setSelectedIndex(selectedIndex);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class JBTreeTraverser<T> extends FilteredTraverserBase<T, JBTreeTraverser
|
||||
|
||||
@NotNull
|
||||
public static <T> JBTreeTraverser<T> from(@NotNull Function<? super T, ? extends Iterable<? extends T>> treeStructure) {
|
||||
return new JBTreeTraverser<T>((Function<T, ? extends Iterable<? extends T>>)treeStructure);
|
||||
return new JBTreeTraverser<T>(treeStructure);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -81,7 +81,7 @@ public class TransferToEDTQueue<T> {
|
||||
};
|
||||
|
||||
public TransferToEDTQueue(@NotNull @NonNls String name, @NotNull Processor<? super T> processor, @NotNull Condition<?> shutUpCondition) {
|
||||
this(name, (Processor)processor, shutUpCondition, DEFAULT_THRESHOLD);
|
||||
this(name, processor, shutUpCondition, DEFAULT_THRESHOLD);
|
||||
}
|
||||
|
||||
public TransferToEDTQueue(@NotNull @NonNls String name,
|
||||
|
||||
Reference in New Issue
Block a user