get rid of warnings in CompPanel, EMS

This commit is contained in:
Manindra Moharana
2014-08-07 15:39:18 +05:30
parent f220c3d500
commit db19953232
2 changed files with 7 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ public class CompletionPanel {
/**
* The completion list generated by ASTGenerator
*/
private JList completionList;
private JList<CompletionCandidate> completionList;
/**
* The popup menu in which the suggestion list is shown
@@ -202,10 +202,10 @@ public class CompletionPanel {
* @param items
* @return
*/
private JList createSuggestionList(final int position,
final DefaultListModel items) {
private JList<CompletionCandidate> createSuggestionList(final int position,
final DefaultListModel<CompletionCandidate> items) {
JList list = new JList(items);
JList<CompletionCandidate> list = new JList<CompletionCandidate>(items);
//list.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 1));
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.setSelectedIndex(0);
@@ -224,7 +224,7 @@ public class CompletionPanel {
}
// possibly defunct
public boolean updateList(final DefaultListModel items, String newSubword,
public boolean updateList(final DefaultListModel<CompletionCandidate> items, String newSubword,
final Point location, int position) {
this.subWord = new String(newSubword);
if (subWord.indexOf('.') != -1)
@@ -456,7 +456,7 @@ public class CompletionPanel {
javax.swing.DefaultListCellRenderer {
//protected final ImageIcon classIcon, fieldIcon, methodIcon;
public Component getListCellRendererComponent(JList list, Object value,
public Component getListCellRendererComponent(JList<?> list, Object value,
int index,
boolean isSelected,
boolean cellHasFocus) {