mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-64612 Autocasting from completion is not inserted after "assert X instanceof T" (and before another assignment)
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Bar {
|
||||
|
||||
static class CellWrapper {
|
||||
public boolean isSeparator() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static class MyRenderer extends DefaultListCellRenderer {
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean s, boolean focus) {
|
||||
assert value instanceof CellWrapper;
|
||||
|
||||
value.is<caret>
|
||||
|
||||
mySelected = isSelected;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Bar {
|
||||
|
||||
static class CellWrapper {
|
||||
public boolean isSeparator() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static class MyRenderer extends DefaultListCellRenderer {
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean s, boolean focus) {
|
||||
assert value instanceof CellWrapper;
|
||||
|
||||
((CellWrapper) value).isSeparator()<caret>
|
||||
|
||||
mySelected = isSelected;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user