From 6b7b359f921af6ef3270217397168617bcfb56b2 Mon Sep 17 00:00:00 2001 From: bvosburgh Date: Fri, 26 Mar 2010 04:02:36 +0000 Subject: fix compiler warnings --- .../src/org/eclipse/jpt/utility/internal/JDBCTools.java | 6 +++--- .../org/eclipse/jpt/utility/internal/SimpleFilter.java | 4 ++-- .../internal/model/value/swing/ComboBoxModelAdapter.java | 6 +++--- .../model/value/swing/DateSpinnerModelAdapter.java | 4 ++-- .../model/value/swing/ListSpinnerModelAdapter.java | 4 ++-- .../internal/model/value/swing/SpinnerModelAdapter.java | 6 +++--- .../model/value/swing/ToggleButtonModelAdapter.java | 4 ++-- .../internal/model/value/swing/TreeModelAdapter.java | 6 +++--- .../jpt/utility/internal/node/PluggableValidator.java | 8 ++++---- .../internal/swing/CheckBoxTableCellRenderer.java | 16 ++++++++-------- .../internal/swing/ComboBoxTableCellRenderer.java | 16 ++++++++-------- .../jpt/utility/internal/swing/FilteringListBrowser.java | 16 ++++++++-------- .../jpt/utility/internal/swing/FilteringListPanel.java | 6 +++--- .../jpt/utility/internal/swing/SimpleListBrowser.java | 10 +++++----- .../utility/internal/swing/SimpleListCellRenderer.java | 16 ++++++++-------- 15 files changed, 64 insertions(+), 64 deletions(-) (limited to 'jpa/plugins/org.eclipse.jpt.utility/src') diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/JDBCTools.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/JDBCTools.java index d3899eeae4..f8e92adcab 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/JDBCTools.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/JDBCTools.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 Oracle. All rights reserved. + * Copyright (c) 2005, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -249,7 +249,7 @@ public final class JDBCTools { /** * JDBC => Java */ - private static class JDBCToJavaTypeMapping { + static class JDBCToJavaTypeMapping { private final JDBCType jdbcType; private final JavaType javaType; @@ -297,7 +297,7 @@ public final class JDBCTools { /** * Java => JDBC */ - private static class JavaToJDBCTypeMapping { + static class JavaToJDBCTypeMapping { private final JavaType javaType; private final JDBCType jdbcType; diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleFilter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleFilter.java index 80e21f939b..9477c0f7fe 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleFilter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 Oracle. All rights reserved. + * Copyright (c) 2005, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -86,7 +86,7 @@ public abstract class SimpleFilter @Override public boolean equals(Object o) { - if ( ! (o instanceof SimpleFilter)) { + if ( ! (o instanceof SimpleFilter)) { return false; } SimpleFilter other = (SimpleFilter) o; diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java index b3e0c9269c..8675f43035 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -87,7 +87,7 @@ public class ComboBoxModelAdapter } @Override public String toString() { - return "selection listener"; + return "selection listener"; //$NON-NLS-1$ } }; } @@ -134,7 +134,7 @@ public class ComboBoxModelAdapter @Override public String toString() { - return StringTools.buildToStringFor(this, this.selectionHolder + ":" + this.listHolder); + return StringTools.buildToStringFor(this, this.selectionHolder + ":" + this.listHolder); //$NON-NLS-1$ } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java index 66d09d23ca..710834c0e3 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -101,7 +101,7 @@ public class DateSpinnerModelAdapter } @Override public String toString() { - return "date listener"; + return "date listener"; //$NON-NLS-1$ } }; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java index 527120367b..3a90616ebe 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -121,7 +121,7 @@ public class ListSpinnerModelAdapter } @Override public String toString() { - return "value listener"; + return "value listener"; //$NON-NLS-1$ } }; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java index c26f18fc90..20896e6b5f 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -91,7 +91,7 @@ public class SpinnerModelAdapter } @Override public String toString() { - return "value listener"; + return "value listener"; //$NON-NLS-1$ } }; } @@ -112,7 +112,7 @@ public class SpinnerModelAdapter } @Override public String toString() { - return "delegate listener"; + return "delegate listener"; //$NON-NLS-1$ } }; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java index 7c0e742f33..eb9aa3b617 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -83,7 +83,7 @@ public class ToggleButtonModelAdapter } @Override public String toString() { - return "boolean listener"; + return "boolean listener"; //$NON-NLS-1$ } }; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java index 777006885c..ba0868f044 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -435,13 +435,13 @@ public class TreeModelAdapter */ private void removeNode(int index, TreeNodeValueModel node) { new NodeChangePolicy(node).removeChildren(); - this.removeNodeFromInternalTree(node.parent(), index, node, node.childrenModel()); + this.removeNodeFromInternalTree(node.parent(), index, node.childrenModel()); } /** * Remove the specified node from our internal tree. */ - private void removeNodeFromInternalTree(TreeNodeValueModel parent, int index, TreeNodeValueModel node, ListValueModel> childrenModel) { + private void removeNodeFromInternalTree(TreeNodeValueModel parent, int index, ListValueModel> childrenModel) { this.parents.remove(childrenModel); List> siblings = this.childrenLists.get(parent); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/node/PluggableValidator.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/node/PluggableValidator.java index c44f8aab43..247387b173 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/node/PluggableValidator.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/node/PluggableValidator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -59,14 +59,14 @@ public class PluggableValidator public synchronized void pause() { if (this.pause) { - throw new IllegalStateException("already paused"); + throw new IllegalStateException("already paused"); //$NON-NLS-1$ } this.pause = true; } public synchronized void resume() { if ( ! this.pause) { - throw new IllegalStateException("not paused"); + throw new IllegalStateException("not paused"); //$NON-NLS-1$ } this.pause = false; // validate any changes that occurred while the validation was paused @@ -112,7 +112,7 @@ public class PluggableValidator } @Override public String toString() { - return "PluggableValidator.Delegate.Null"; + return "PluggableValidator.Delegate.Null"; //$NON-NLS-1$ } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/CheckBoxTableCellRenderer.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/CheckBoxTableCellRenderer.java index 45ec6be9e2..51ce1a83e9 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/CheckBoxTableCellRenderer.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/CheckBoxTableCellRenderer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -113,10 +113,10 @@ public class CheckBoxTableCellRenderer implements TableCellEditorAdapter.Rendere /** * Return the cell's foreground color. */ - protected Color foregroundColor(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) { + protected Color foregroundColor(JTable table, @SuppressWarnings("unused") Object value, boolean selected, boolean hasFocus, int row, int column) { if (selected) { if (hasFocus && table.isCellEditable(row, column)) { - return UIManager.getColor("Table.focusCellForeground"); + return UIManager.getColor("Table.focusCellForeground"); //$NON-NLS-1$ } return table.getSelectionForeground(); } @@ -126,10 +126,10 @@ public class CheckBoxTableCellRenderer implements TableCellEditorAdapter.Rendere /** * Return the cell's background color. */ - protected Color backgroundColor(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) { + protected Color backgroundColor(JTable table, @SuppressWarnings("unused") Object value, boolean selected, boolean hasFocus, int row, int column) { if (selected) { if (hasFocus && table.isCellEditable(row, column)) { - return UIManager.getColor("Table.focusCellBackground"); + return UIManager.getColor("Table.focusCellBackground"); //$NON-NLS-1$ } return table.getSelectionBackground(); } @@ -139,8 +139,8 @@ public class CheckBoxTableCellRenderer implements TableCellEditorAdapter.Rendere /** * Return the cell's border. */ - protected Border border(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) { - return hasFocus ? UIManager.getBorder("Table.focusCellHighlightBorder") : NO_FOCUS_BORDER; + protected Border border(@SuppressWarnings("unused") JTable table, @SuppressWarnings("unused") Object value, @SuppressWarnings("unused") boolean selected, boolean hasFocus, @SuppressWarnings("unused") int row, @SuppressWarnings("unused") int column) { + return hasFocus ? UIManager.getBorder("Table.focusCellHighlightBorder") : NO_FOCUS_BORDER; //$NON-NLS-1$ } /** @@ -149,7 +149,7 @@ public class CheckBoxTableCellRenderer implements TableCellEditorAdapter.Rendere * and table is opaque, we don't need to paint the background - * the table will do it. */ - protected boolean cellIsOpaqueIn(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) { + protected boolean cellIsOpaqueIn(JTable table, @SuppressWarnings("unused") Object value, @SuppressWarnings("unused") boolean selected, @SuppressWarnings("unused") boolean hasFocus, @SuppressWarnings("unused") int row, @SuppressWarnings("unused") int column) { Color cellBackground = this.checkBox.getBackground(); Color tableBackground = table.getBackground(); return ! (table.isOpaque() && cellBackground.equals(tableBackground)); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/ComboBoxTableCellRenderer.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/ComboBoxTableCellRenderer.java index 622ed6d10e..149b7fd098 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/ComboBoxTableCellRenderer.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/ComboBoxTableCellRenderer.java @@ -107,7 +107,7 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere // can use them to paint non-selected cells if (height == -1) { JComboBox cb = new JComboBox(); - cb.addItem("m"); + cb.addItem("m"); //$NON-NLS-1$ // add in space for the border top and bottom height = cb.getPreferredSize().height + 2; @@ -117,7 +117,7 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere } } - static JLabel prototypeLabel = new JLabel("Prototype", new EmptyIcon(16), SwingConstants.LEADING); + static JLabel prototypeLabel = new JLabel("Prototype", new EmptyIcon(16), SwingConstants.LEADING); //$NON-NLS-1$ protected JComboBox buildComboBox() { @@ -162,7 +162,7 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere }; // stole this code from javax.swing.DefaultCellEditor - result.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE); + result.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE); //$NON-NLS-1$ result.addActionListener(this.buildActionListener()); result.addPopupMenuListener(this.buildPopupMenuListener()); @@ -176,7 +176,7 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere private JList getListBox(JComboBox result) { - return (JList) ReflectionTools.getFieldValue(result.getUI(), "listBox"); + return (JList) ReflectionTools.getFieldValue(result.getUI(), "listBox"); //$NON-NLS-1$ } @@ -270,7 +270,7 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere /** * Return the cell's foreground color. */ - protected Color foregroundColor(JTable table, Object val, boolean selected, boolean hasFocus, int row, int column) { + protected Color foregroundColor(JTable table, @SuppressWarnings("unused") Object val, boolean selected, boolean hasFocus, int row, int column) { if (selected) { if (hasFocus && table.isCellEditable(row, column)) { return defaultForeground; @@ -283,7 +283,7 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere /** * Return the cell's background color. */ - protected Color backgroundColor(JTable table, Object val, boolean selected, boolean hasFocus, int row, int column) { + protected Color backgroundColor(JTable table, @SuppressWarnings("unused") Object val, boolean selected, boolean hasFocus, int row, int column) { if (selected) { if (hasFocus && table.isCellEditable(row, column)) { return defaultBackground; @@ -296,9 +296,9 @@ public class ComboBoxTableCellRenderer implements TableCellEditorAdapter.Rendere /** * Return the cell's border. */ - protected Border border(JTable table, Object val, boolean selected, boolean hasFocus, int row, int column) { + protected Border border(@SuppressWarnings("unused") JTable table, @SuppressWarnings("unused") Object val, @SuppressWarnings("unused") boolean selected, boolean hasFocus, @SuppressWarnings("unused") int row, @SuppressWarnings("unused") int column) { return hasFocus ? - UIManager.getBorder("Table.focusCellHighlightBorder") + UIManager.getBorder("Table.focusCellHighlightBorder") //$NON-NLS-1$ : NO_FOCUS_BORDER; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListBrowser.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListBrowser.java index d59f3e04d3..f175164ba6 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListBrowser.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListBrowser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -61,7 +61,7 @@ public class FilteringListBrowser } // clear the text field so the list box is re-filtered - this.panel.textField().setText(""); + this.panel.textField().setText(""); //$NON-NLS-1$ } protected void initializeCellRenderer(JComboBox comboBox) { @@ -78,27 +78,27 @@ public class FilteringListBrowser return this.panel; } - protected String title(JComboBox comboBox) { + protected String title(@SuppressWarnings("unused") JComboBox comboBox) { return null; } - protected int optionType(JComboBox comboBox) { + protected int optionType(@SuppressWarnings("unused") JComboBox comboBox) { return JOptionPane.OK_CANCEL_OPTION; } - protected int messageType(JComboBox comboBox) { + protected int messageType(@SuppressWarnings("unused") JComboBox comboBox) { return JOptionPane.QUESTION_MESSAGE; } - protected Icon icon(JComboBox comboBox) { + protected Icon icon(@SuppressWarnings("unused") JComboBox comboBox) { return null; } - protected Object[] selectionValues(JComboBox comboBox) { + protected Object[] selectionValues(@SuppressWarnings("unused") JComboBox comboBox) { return null; } - protected Object initialSelectionValue(JComboBox comboBox) { + protected Object initialSelectionValue(@SuppressWarnings("unused") JComboBox comboBox) { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListPanel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListPanel.java index ff17df3305..8b62ab6dd0 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListPanel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/FilteringListPanel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -178,7 +178,7 @@ public class FilteringListPanel extends JPanel { } @Override public String toString() { - return "text field listener"; + return "text field listener"; //$NON-NLS-1$ } }; } @@ -367,7 +367,7 @@ public class FilteringListPanel extends JPanel { * by returning null here. */ protected String prototypeCellValue() { - return "==========> A_STRING_THAT_IS_DEFINITELY_LONGER_THAN_EVERY_STRING_IN_THE_LIST <=========="; + return "==========> A_STRING_THAT_IS_DEFINITELY_LONGER_THAN_EVERY_STRING_IN_THE_LIST <=========="; //$NON-NLS-1$ } /** diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListBrowser.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListBrowser.java index 7215c6a387..b61c557adf 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListBrowser.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListBrowser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -47,19 +47,19 @@ public class SimpleListBrowser } } - protected Object message(JComboBox comboBox) { + protected Object message(@SuppressWarnings("unused") JComboBox comboBox) { return null; } - protected String title(JComboBox comboBox) { + protected String title(@SuppressWarnings("unused") JComboBox comboBox) { return null; } - protected int messageType(JComboBox comboBox) { + protected int messageType(@SuppressWarnings("unused") JComboBox comboBox) { return JOptionPane.QUESTION_MESSAGE; } - protected Icon icon(JComboBox comboBox) { + protected Icon icon(@SuppressWarnings("unused") JComboBox comboBox) { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListCellRenderer.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListCellRenderer.java index 40e94f080f..56a609a6cc 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListCellRenderer.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/swing/SimpleListCellRenderer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Oracle. All rights reserved. + * Copyright (c) 2007, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -60,7 +60,7 @@ public class SimpleListCellRenderer * value and other settings. (Even more settings are * accessible via inherited getters: hasFocus, isEnabled, etc.) */ - protected Icon buildIcon(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + protected Icon buildIcon(@SuppressWarnings("unused") JList list, Object value, @SuppressWarnings("unused") int index, @SuppressWarnings("unused") boolean isSelected, @SuppressWarnings("unused") boolean cellHasFocus) { return this.buildIcon(value); } @@ -79,7 +79,7 @@ public class SimpleListCellRenderer * value and other settings. (Even more settings are * accessible via inherited getters: hasFocus, isEnabled, etc.) */ - protected String buildText(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + protected String buildText(@SuppressWarnings("unused") JList list, Object value, @SuppressWarnings("unused") int index, @SuppressWarnings("unused") boolean isSelected, @SuppressWarnings("unused") boolean cellHasFocus) { return this.buildText(value); } @@ -90,21 +90,21 @@ public class SimpleListCellRenderer * value itself is an icon, in which case no text is displayed. */ protected String buildText(Object value) { - return (value instanceof Icon) ? "" : ((value == null) ? "" : value.toString()); + return (value instanceof Icon) ? "" : ((value == null) ? "" : value.toString()); //$NON-NLS-1$ //$NON-NLS-2$ } /** * Return the text displayed when the cursor lingers over the specified cell. * (Even more settings are accessible via inherited getters: hasFocus, isEnabled, etc.) */ - protected String buildToolTipText(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + protected String buildToolTipText(@SuppressWarnings("unused") JList list, Object value, @SuppressWarnings("unused") int index, @SuppressWarnings("unused") boolean isSelected, @SuppressWarnings("unused") boolean cellHasFocus) { return this.buildToolTipText(value); } /** * Return the text displayed when the cursor lingers over the specified cell. */ - protected String buildToolTipText(Object value) { + protected String buildToolTipText(@SuppressWarnings("unused") Object value) { return null; } @@ -113,7 +113,7 @@ public class SimpleListCellRenderer * the given value and other settings. (Even more settings are accessible via * inherited getters: hasFocus, isEnabled, etc.) */ - protected String buildAccessibleName(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + protected String buildAccessibleName(@SuppressWarnings("unused") JList list, Object value, @SuppressWarnings("unused") int index, @SuppressWarnings("unused") boolean isSelected, @SuppressWarnings("unused") boolean cellHasFocus) { return this.buildAccessibleName(value); } @@ -121,7 +121,7 @@ public class SimpleListCellRenderer * Return the accessible name to be given to the component used to render * the given value. */ - protected String buildAccessibleName(Object value) { + protected String buildAccessibleName(@SuppressWarnings("unused") Object value) { return null; } -- cgit v1.2.3