From 593200f6dbe9c06acbf56c1f415edf2e58d8bbd5 Mon Sep 17 00:00:00 2001 From: Federico Bond Date: Mon, 13 Oct 2014 13:02:41 -0300 Subject: [PATCH] Add missing generic type parameters --- app/src/processing/app/PreferencesFrame.java | 22 +++++++++---------- .../app/contrib/ContributionListPanel.java | 2 +- .../contrib/ContributionManagerDialog.java | 4 ++-- app/src/processing/app/tools/CreateFont.java | 12 +++++----- app/src/processing/mode/java/Compiler.java | 8 +++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/app/src/processing/app/PreferencesFrame.java b/app/src/processing/app/PreferencesFrame.java index 25d41aa95..7064e3e6e 100644 --- a/app/src/processing/app/PreferencesFrame.java +++ b/app/src/processing/app/PreferencesFrame.java @@ -60,8 +60,8 @@ public class PreferencesFrame { JCheckBox memoryOverrideBox; JTextField memoryField; JCheckBox checkUpdatesBox; - JComboBox fontSizeField; - JComboBox consoleSizeField; + JComboBox fontSizeField; + JComboBox consoleSizeField; JCheckBox inputMethodBox; JCheckBox autoAssociateBox; @@ -73,13 +73,13 @@ public class PreferencesFrame { JCheckBox importSuggestionsBox; JCheckBox codeCompletionTriggerBox; - JComboBox displaySelectionBox; - JComboBox languageSelectionBox; + JComboBox displaySelectionBox; + JComboBox languageSelectionBox; int displayCount; String[] monoFontFamilies; - JComboBox fontSelectionBox; + JComboBox fontSelectionBox; /** Base object so that updates can be applied to the list of editors. */ Base base; @@ -152,7 +152,7 @@ public class PreferencesFrame { Container languageBox = Box.createHorizontalBox(); JLabel languageLabel = new JLabel(Language.text("preferences.language")+": "); languageBox.add(languageLabel); - languageSelectionBox = new JComboBox(); + languageSelectionBox = new JComboBox(); Map languages = Language.getLanguages(); String[] languageSelection = new String[languages.size()]; @@ -163,7 +163,7 @@ public class PreferencesFrame { languageSelection[i++] = lang.getValue(); } } - languageSelectionBox.setModel(new DefaultComboBoxModel(languageSelection)); + languageSelectionBox.setModel(new DefaultComboBoxModel(languageSelection)); languageBox.add(languageSelectionBox); label = new JLabel(" ("+Language.text("preferences.requires_restart")+")"); languageBox.add(label); @@ -189,7 +189,7 @@ public class PreferencesFrame { fontLabel.setToolTipText(fontTip); fontBox.add(fontLabel); // get a wide name in there before getPreferredSize() is called - fontSelectionBox = new JComboBox(new Object[] { Toolkit.getMonoFontName() }); + fontSelectionBox = new JComboBox(new String[] { Toolkit.getMonoFontName() }); fontSelectionBox.setToolTipText(fontTip); // fontSelectionBox.addItem(Toolkit.getMonoFont(size, style)); //updateDisplayList(); @@ -492,7 +492,7 @@ public class PreferencesFrame { final String tip = "" + Language.text("preferences.run_sketches_on_display.tip"); displayLabel.setToolTipText(tip); displayBox.add(displayLabel); - displaySelectionBox = new JComboBox(); + displaySelectionBox = new JComboBox(); updateDisplayList(); // needs to happen here for getPreferredSize() displayBox.add(displaySelectionBox); pain.add(displayBox); @@ -845,7 +845,7 @@ public class PreferencesFrame { void initFontList() { if (monoFontFamilies == null) { monoFontFamilies = Toolkit.getMonoFontFamilies(); - fontSelectionBox.setModel(new DefaultComboBoxModel(monoFontFamilies)); + fontSelectionBox.setModel(new DefaultComboBoxModel(monoFontFamilies)); String family = Preferences.get("editor.font.family"); // Set a reasonable default, in case selecting the family fails @@ -866,7 +866,7 @@ public class PreferencesFrame { // displaySelectionBox.add(String.valueOf(i + 1)); } // PApplet.println(items); - displaySelectionBox.setModel(new DefaultComboBoxModel(items)); + displaySelectionBox.setModel(new DefaultComboBoxModel(items)); // displaySelectionBox = new JComboBox(items); } } diff --git a/app/src/processing/app/contrib/ContributionListPanel.java b/app/src/processing/app/contrib/ContributionListPanel.java index 0a4c0ed8a..b5fa561ea 100644 --- a/app/src/processing/app/contrib/ContributionListPanel.java +++ b/app/src/processing/app/contrib/ContributionListPanel.java @@ -179,7 +179,7 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib public void filterLibraries(List filteredContributions) { synchronized (panelByContribution) { - Set hiddenPanels = new TreeSet(contribListing.getComparator()); + Set hiddenPanels = new TreeSet(contribListing.getComparator()); hiddenPanels.addAll(panelByContribution.keySet()); for (Contribution info : filteredContributions) { diff --git a/app/src/processing/app/contrib/ContributionManagerDialog.java b/app/src/processing/app/contrib/ContributionManagerDialog.java index cab598c51..ce28a939f 100644 --- a/app/src/processing/app/contrib/ContributionManagerDialog.java +++ b/app/src/processing/app/contrib/ContributionManagerDialog.java @@ -46,7 +46,7 @@ public class ContributionManagerDialog { JFrame dialog; String title; ContributionFilter filter; - JComboBox categoryChooser; + JComboBox categoryChooser; JScrollPane scrollPane; ContributionListPanel contributionListPanel; StatusPanel status; @@ -219,7 +219,7 @@ public class ContributionManagerDialog { filterPanel.add(Box.createHorizontalStrut(5)); - categoryChooser = new JComboBox(); + categoryChooser = new JComboBox(); categoryChooser.setMaximumRowCount(20); updateCategoryChooser(); // filterPanel.add(categoryChooser, c); diff --git a/app/src/processing/app/tools/CreateFont.java b/app/src/processing/app/tools/CreateFont.java index 7d8f0427d..22fb0bf80 100644 --- a/app/src/processing/app/tools/CreateFont.java +++ b/app/src/processing/app/tools/CreateFont.java @@ -54,7 +54,7 @@ public class CreateFont extends JFrame implements Tool { // Dimension windowSize; - JList fontSelector; + JList fontSelector; JTextField sizeSelector; JButton charsetButton; JCheckBox smoothBox; @@ -175,7 +175,7 @@ public class CreateFont extends JFrame implements Tool { list = new String[index]; System.arraycopy(flist, 0, list, 0, index); - fontSelector = new JList(list); + fontSelector = new JList(list); fontSelector.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting() == false) { @@ -499,14 +499,14 @@ class CharacterSelector extends JFrame { JRadioButton allCharsButton; JRadioButton unicodeCharsButton; JScrollPane unicodeBlockScroller; - JList charsetList; + JList charsetList; public CharacterSelector() { super("Character Selector"); charsetList = new CheckBoxList(); - DefaultListModel model = new DefaultListModel(); + DefaultListModel model = new DefaultListModel(); charsetList.setModel(model); for (String item : blockNames) { model.addElement(new JCheckBox(item)); @@ -824,7 +824,7 @@ class CharacterSelector extends JFrame { // collection, but it seems to have been picked up so many places with others // placing their copyright on it, that I haven't been able to determine the // original author. [fry 20100216] -class CheckBoxList extends JList { +class CheckBoxList extends JList { protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1); public CheckBoxList() { @@ -864,4 +864,4 @@ class CheckBoxList extends JList { return checkbox; } } -} \ No newline at end of file +} diff --git a/app/src/processing/mode/java/Compiler.java b/app/src/processing/mode/java/Compiler.java index 30d1b0e1a..d82d7864f 100644 --- a/app/src/processing/mode/java/Compiler.java +++ b/app/src/processing/mode/java/Compiler.java @@ -131,12 +131,12 @@ public class Compiler { // so that it can grab the compiler JAR files from it. ClassLoader loader = build.mode.getClassLoader(); try { - Class batchClass = + Class batchClass = Class.forName("org.eclipse.jdt.core.compiler.batch.BatchCompiler", false, loader); - Class progressClass = + Class progressClass = Class.forName("org.eclipse.jdt.core.compiler.CompilationProgress", false, loader); - Class[] compileArgs = - new Class[] { String[].class, PrintWriter.class, PrintWriter.class, progressClass }; + Class[] compileArgs = + new Class[] { String[].class, PrintWriter.class, PrintWriter.class, progressClass }; Method compileMethod = batchClass.getMethod("compile", compileArgs); success = (Boolean) compileMethod.invoke(null, new Object[] { command, outWriter, writer, null });