[autocomplete] 136/143: Adding @Override whre necessary
Benjamin Mesing
ben at alioth.debian.org
Sat Oct 19 12:53:32 UTC 2013
This is an automated email from the git hooks/post-receive script.
ben pushed a commit to branch master
in repository autocomplete.
commit e09dafabef1d15a18f459e54ab8c42b81298d75a
Author: bobbylight <robert at fifesoft.com>
Date: Sun Aug 11 10:12:55 2013 -0400
Adding @Override whre necessary
---
src/org/fife/ui/autocomplete/AbstractCompletion.java | 1 +
src/org/fife/ui/autocomplete/AbstractCompletionProvider.java | 1 +
src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java | 4 ++++
src/org/fife/ui/autocomplete/AutoCompletePopupWindow.java | 4 +++-
src/org/fife/ui/autocomplete/AutoCompletion.java | 5 +++++
src/org/fife/ui/autocomplete/BasicCompletion.java | 1 +
src/org/fife/ui/autocomplete/CompletionCellRenderer.java | 3 +++
src/org/fife/ui/autocomplete/CompletionXMLParser.java | 8 +++++++-
src/org/fife/ui/autocomplete/DelegatingCellRenderer.java | 2 ++
src/org/fife/ui/autocomplete/FastListUI.java | 3 +++
src/org/fife/ui/autocomplete/FunctionCompletion.java | 4 ++++
.../fife/ui/autocomplete/LanguageAwareCompletionProvider.java | 7 +++++++
src/org/fife/ui/autocomplete/OutlineHighlightPainter.java | 2 ++
src/org/fife/ui/autocomplete/ParameterizedCompletion.java | 1 +
.../ui/autocomplete/ParameterizedCompletionChoicesWindow.java | 2 ++
src/org/fife/ui/autocomplete/ShorthandCompletion.java | 2 ++
src/org/fife/ui/autocomplete/SizeGrip.java | 6 ++++++
src/org/fife/ui/autocomplete/TemplateCompletion.java | 2 ++
src/org/fife/ui/autocomplete/TemplatePiece.java | 3 +++
src/org/fife/ui/autocomplete/VariableCompletion.java | 3 +++
20 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/src/org/fife/ui/autocomplete/AbstractCompletion.java b/src/org/fife/ui/autocomplete/AbstractCompletion.java
index 666f4bf..687a861 100644
--- a/src/org/fife/ui/autocomplete/AbstractCompletion.java
+++ b/src/org/fife/ui/autocomplete/AbstractCompletion.java
@@ -144,6 +144,7 @@ public abstract class AbstractCompletion implements Completion {
*
* @return A string representation of this completion.
*/
+ @Override
public String toString() {
return getInputText();
}
diff --git a/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java b/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java
index fc2eae5..6290ee2 100644
--- a/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java
+++ b/src/org/fife/ui/autocomplete/AbstractCompletionProvider.java
@@ -158,6 +158,7 @@ public abstract class AbstractCompletionProvider
/**
* {@inheritDoc}
*/
+ @Override
@SuppressWarnings("unchecked")
protected List<Completion> getCompletionsImpl(JTextComponent comp) {
diff --git a/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java b/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java
index dbe9808..7e14c81 100644
--- a/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java
+++ b/src/org/fife/ui/autocomplete/AutoCompleteDescWindow.java
@@ -168,9 +168,11 @@ class AutoCompleteDescWindow extends JWindow implements HyperlinkListener,
bottomPanel = new JPanel(new BorderLayout());
b = new AbstractBorder() {
+ @Override
public Insets getBorderInsets(Component c) {
return new Insets(1, 0, 0, 0);
}
+ @Override
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
g.setColor(UIManager.getColor("controlDkShadow"));
g.drawLine(x,y, x+w-1,y);
@@ -434,6 +436,7 @@ class AutoCompleteDescWindow extends JWindow implements HyperlinkListener,
/**
* {@inheritDoc}
*/
+ @Override
public void setVisible(boolean visible) {
if (!visible) {
clearHistory();
@@ -489,6 +492,7 @@ class AutoCompleteDescWindow extends JWindow implements HyperlinkListener,
*
* @return A string representation of this history entry.
*/
+ @Override
public String toString() {
return completion.getInputText();
}
diff --git a/src/org/fife/ui/autocomplete/AutoCompletePopupWindow.java b/src/org/fife/ui/autocomplete/AutoCompletePopupWindow.java
index bd89f87..f89440d 100644
--- a/src/org/fife/ui/autocomplete/AutoCompletePopupWindow.java
+++ b/src/org/fife/ui/autocomplete/AutoCompletePopupWindow.java
@@ -667,6 +667,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
*
* @param visible Whether this window should be visible.
*/
+ @Override
public void setVisible(boolean visible) {
if (visible!=isVisible()) {
@@ -727,7 +728,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
*
* @see #installKeyBindings()
*/
- public void uninstallKeyBindings() {
+ private void uninstallKeyBindings() {
if (AutoCompletion.getDebug()) {
System.out.println("PopupWindow: Removing keybindings");
@@ -930,6 +931,7 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
super(model);
}
+ @Override
public void setUI(ListUI ui) {
if (Util.getUseSubstanceRenderers() &&
SUBSTANCE_LIST_UI.equals(ui.getClass().getName())) {
diff --git a/src/org/fife/ui/autocomplete/AutoCompletion.java b/src/org/fife/ui/autocomplete/AutoCompletion.java
index a7f6612..b1688d0 100644
--- a/src/org/fife/ui/autocomplete/AutoCompletion.java
+++ b/src/org/fife/ui/autocomplete/AutoCompletion.java
@@ -1140,6 +1140,7 @@ public class AutoCompletion {
// Ignore
}
+ @Override
public void focusLost(FocusEvent e) {
timer.stop();
//hideChildWindows(); Other listener will do this
@@ -1257,14 +1258,17 @@ public class AutoCompletion {
w.addWindowFocusListener(this);
}
+ @Override
public void componentHidden(ComponentEvent e) {
hideChildWindows();
}
+ @Override
public void componentMoved(ComponentEvent e) {
hideChildWindows();
}
+ @Override
public void componentResized(ComponentEvent e) {
hideChildWindows();
}
@@ -1299,6 +1303,7 @@ public class AutoCompletion {
* Hide the auto-completion windows when the text component loses
* focus.
*/
+ @Override
public void focusLost(FocusEvent e) {
hideChildWindows();
}
diff --git a/src/org/fife/ui/autocomplete/BasicCompletion.java b/src/org/fife/ui/autocomplete/BasicCompletion.java
index 26c3944..f2cd2fb 100644
--- a/src/org/fife/ui/autocomplete/BasicCompletion.java
+++ b/src/org/fife/ui/autocomplete/BasicCompletion.java
@@ -132,6 +132,7 @@ public class BasicCompletion extends AbstractCompletion {
*
* @return A string representation of this completion.
*/
+ @Override
public String toString() {
if (shortDesc==null) {
return getInputText();
diff --git a/src/org/fife/ui/autocomplete/CompletionCellRenderer.java b/src/org/fife/ui/autocomplete/CompletionCellRenderer.java
index 206d3bd..9bdfdcf 100644
--- a/src/org/fife/ui/autocomplete/CompletionCellRenderer.java
+++ b/src/org/fife/ui/autocomplete/CompletionCellRenderer.java
@@ -207,6 +207,7 @@ public class CompletionCellRenderer extends DefaultListCellRenderer {
* @param selected Whether the item is selected.
* @param hasFocus Whether the item has focus.
*/
+ @Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean selected, boolean hasFocus) {
@@ -280,6 +281,7 @@ public class CompletionCellRenderer extends DefaultListCellRenderer {
}
+ @Override
protected void paintComponent(Graphics g) {
//super.paintComponent(g);
@@ -610,6 +612,7 @@ public class CompletionCellRenderer extends DefaultListCellRenderer {
/**
* Overridden to update our delegate, if necessary.
*/
+ @Override
public void updateUI() {
super.updateUI();
if (delegate!=null) {
diff --git a/src/org/fife/ui/autocomplete/CompletionXMLParser.java b/src/org/fife/ui/autocomplete/CompletionXMLParser.java
index a66105c..1fa112a 100644
--- a/src/org/fife/ui/autocomplete/CompletionXMLParser.java
+++ b/src/org/fife/ui/autocomplete/CompletionXMLParser.java
@@ -125,6 +125,7 @@ public class CompletionXMLParser extends DefaultHandler {
/**
* Called when character data inside an element is found.
*/
+ @Override
public void characters(char[] ch, int start, int length) {
if (gettingDesc) {
desc.append(ch, start, length);
@@ -220,6 +221,7 @@ public class CompletionXMLParser extends DefaultHandler {
/**
* Called when an element is closed.
*/
+ @Override
public void endElement(String uri, String localName, String qName) {
if ("keywords".equals(qName)) {
@@ -289,6 +291,7 @@ public class CompletionXMLParser extends DefaultHandler {
}
+ @Override
public void error(SAXParseException e) throws SAXException {
throw e;
}
@@ -353,7 +356,8 @@ public class CompletionXMLParser extends DefaultHandler {
}
- public InputSource resolveEntity(String publicID,
+ @Override
+ public InputSource resolveEntity(String publicID,
String systemID) throws SAXException {
return new InputSource(getClass().
getResourceAsStream("CompletionXml.dtd"));
@@ -377,6 +381,7 @@ public class CompletionXMLParser extends DefaultHandler {
/**
* Called when an element starts.
*/
+ @Override
public void startElement(String uri, String localName, String qName,
Attributes attrs) {
if ("keywords".equals(qName)) {
@@ -432,6 +437,7 @@ public class CompletionXMLParser extends DefaultHandler {
}
+ @Override
public void warning(SAXParseException e) throws SAXException {
throw e;
}
diff --git a/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java b/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java
index 995c459..3a2b478 100644
--- a/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java
+++ b/src/org/fife/ui/autocomplete/DelegatingCellRenderer.java
@@ -48,6 +48,7 @@ class DelegatingCellRenderer extends DefaultListCellRenderer {
/**
* {@inheritDoc}
*/
+ @Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean selected, boolean hasFocus) {
Completion c = (Completion)value;
@@ -81,6 +82,7 @@ class DelegatingCellRenderer extends DefaultListCellRenderer {
/**
* {@inheritDoc}
*/
+ @Override
public void updateUI() {
super.updateUI();
if ((fallback instanceof JComponent) && fallback!=this) {
diff --git a/src/org/fife/ui/autocomplete/FastListUI.java b/src/org/fife/ui/autocomplete/FastListUI.java
index b7be317..87dbb0b 100644
--- a/src/org/fife/ui/autocomplete/FastListUI.java
+++ b/src/org/fife/ui/autocomplete/FastListUI.java
@@ -100,6 +100,7 @@ class FastListUI extends BasicListUI {
* define them. Since FastListUI extends BasicListUI, we need these values
* to be defined.
*/
+ @Override
protected void installDefaults() {
super.installDefaults();
@@ -119,6 +120,7 @@ class FastListUI extends BasicListUI {
/**
* Overridden to work around a Nimbus issue.
*/
+ @Override
protected void uninstallDefaults() {
super.uninstallDefaults();
@@ -140,6 +142,7 @@ class FastListUI extends BasicListUI {
* too long, to improve performance for lists with huge amounts of
* completions.
*/
+ @Override
protected void updateLayoutState() {
ListModel model = list.getModel();
diff --git a/src/org/fife/ui/autocomplete/FunctionCompletion.java b/src/org/fife/ui/autocomplete/FunctionCompletion.java
index 85913ec..94d9622 100644
--- a/src/org/fife/ui/autocomplete/FunctionCompletion.java
+++ b/src/org/fife/ui/autocomplete/FunctionCompletion.java
@@ -48,6 +48,7 @@ public class FunctionCompletion extends VariableCompletion
}
+ @Override
protected void addDefinitionString(StringBuilder sb) {
sb.append("<html><b>");
sb.append(getDefinitionString());
@@ -99,6 +100,7 @@ public class FunctionCompletion extends VariableCompletion
*
* @return The definition string.
*/
+ @Override
public String getDefinitionString() {
StringBuilder sb = new StringBuilder();
@@ -264,6 +266,7 @@ public class FunctionCompletion extends VariableCompletion
/**
* {@inheritDoc}
*/
+ @Override
public String getSummary() {
StringBuilder sb = new StringBuilder();
addDefinitionString(sb);
@@ -279,6 +282,7 @@ public class FunctionCompletion extends VariableCompletion
/**
* {@inheritDoc}
*/
+ @Override
public String getToolTipText() {
String text = getSummary();
if (text==null) {
diff --git a/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java b/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java
index 5fc0881..5edb5e2 100644
--- a/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java
+++ b/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java
@@ -105,6 +105,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
* @throws UnsupportedOperationException Always.
* @see #setParameterizedCompletionParams(char, String, char)
*/
+ @Override
public void clearParameterizedCompletionParams() {
throw new UnsupportedOperationException();
}
@@ -149,6 +150,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
* @return The list of possible completions, or an empty list if there
* are none.
*/
+ @Override
protected List<Completion> getCompletionsImpl(JTextComponent comp) {
if (!(comp instanceof RSyntaxTextArea)) {
return new ArrayList<Completion>(0);
@@ -201,6 +203,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
/**
* {@inheritDoc}
*/
+ @Override
public char getParameterListEnd() {
return defaultProvider.getParameterListEnd();
}
@@ -209,6 +212,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
/**
* {@inheritDoc}
*/
+ @Override
public String getParameterListSeparator() {
return defaultProvider.getParameterListSeparator();
}
@@ -217,6 +221,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
/**
* {@inheritDoc}
*/
+ @Override
public char getParameterListStart() {
return defaultProvider.getParameterListStart();
}
@@ -320,6 +325,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
/**
* {@inheritDoc}
*/
+ @Override
public boolean isAutoActivateOkay(JTextComponent tc) {
CompletionProvider provider = getProviderFor(tc);
return provider!=null ? provider.isAutoActivateOkay(tc) : false;
@@ -372,6 +378,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
* @throws UnsupportedOperationException Always.
* @see #clearParameterizedCompletionParams()
*/
+ @Override
public void setParameterizedCompletionParams(char listStart,
String separator, char listEnd) {
throw new UnsupportedOperationException();
diff --git a/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java b/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java
index 68db654..7d755d6 100644
--- a/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java
+++ b/src/org/fife/ui/autocomplete/OutlineHighlightPainter.java
@@ -63,6 +63,7 @@ class OutlineHighlightPainter extends
* @return The color.
* @see #setColor(Color)
*/
+ @Override
public Color getColor() {
return color;
}
@@ -71,6 +72,7 @@ class OutlineHighlightPainter extends
/**
* {@inheritDoc}
*/
+ @Override
public Shape paintLayer(Graphics g, int p0, int p1, Shape viewBounds,
JTextComponent c, View view) {
diff --git a/src/org/fife/ui/autocomplete/ParameterizedCompletion.java b/src/org/fife/ui/autocomplete/ParameterizedCompletion.java
index b58eb22..e13ada0 100644
--- a/src/org/fife/ui/autocomplete/ParameterizedCompletion.java
+++ b/src/org/fife/ui/autocomplete/ParameterizedCompletion.java
@@ -151,6 +151,7 @@ public interface ParameterizedCompletion extends Completion {
this.desc = desc;
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
if (getType()!=null) {
diff --git a/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java b/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java
index 6006e85..6cc5a1e 100644
--- a/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java
+++ b/src/org/fife/ui/autocomplete/ParameterizedCompletionChoicesWindow.java
@@ -95,6 +95,7 @@ public class ParameterizedCompletionChoicesWindow extends JWindow {
list.setCellRenderer(ac.getParamChoicesRenderer());
}
list.addMouseListener(new MouseAdapter() {
+ @Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount()==2) {
context.insertSelectedChoice();
@@ -290,6 +291,7 @@ public class ParameterizedCompletionChoicesWindow extends JWindow {
*
* @param visible Whether this window should be visible.
*/
+ @Override
public void setVisible(boolean visible) {
if (visible!=isVisible()) {
// i.e. if no possibilities matched what's been typed
diff --git a/src/org/fife/ui/autocomplete/ShorthandCompletion.java b/src/org/fife/ui/autocomplete/ShorthandCompletion.java
index 738548c..d6cd506 100644
--- a/src/org/fife/ui/autocomplete/ShorthandCompletion.java
+++ b/src/org/fife/ui/autocomplete/ShorthandCompletion.java
@@ -80,6 +80,7 @@ public class ShorthandCompletion extends BasicCompletion {
*
* @return The text the user must start to input.
*/
+ @Override
public String getInputText() {
return inputText;
}
@@ -93,6 +94,7 @@ public class ShorthandCompletion extends BasicCompletion {
* inserted).
* @see #getReplacementText()
*/
+ @Override
public String getSummary() {
String summary = super.getSummary();
return summary!=null ? summary : ("<html><body>" + getSummaryBody());
diff --git a/src/org/fife/ui/autocomplete/SizeGrip.java b/src/org/fife/ui/autocomplete/SizeGrip.java
index 17db235..5360fb0 100644
--- a/src/org/fife/ui/autocomplete/SizeGrip.java
+++ b/src/org/fife/ui/autocomplete/SizeGrip.java
@@ -60,6 +60,7 @@ class SizeGrip extends JPanel {
*
* @param o The new orientation.
*/
+ @Override
public void applyComponentOrientation(ComponentOrientation o) {
possiblyFixCursor(o.isLeftToRight());
super.applyComponentOrientation(o);
@@ -105,6 +106,7 @@ class SizeGrip extends JPanel {
*
* @param g The graphics context.
*/
+ @Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
@@ -176,6 +178,7 @@ class SizeGrip extends JPanel {
}
+ @Override
public void updateUI() {
super.updateUI();
// TODO: Key off of Aqua LaF, not just OS X, as this size grip looks
@@ -206,6 +209,7 @@ class SizeGrip extends JPanel {
private Point origPos;
+ @Override
public void mouseDragged(MouseEvent e) {
Point newPos = e.getPoint();
SwingUtilities.convertPointToScreen(newPos, SizeGrip.this);
@@ -236,11 +240,13 @@ class SizeGrip extends JPanel {
origPos.setLocation(newPos);
}
+ @Override
public void mousePressed(MouseEvent e) {
origPos = e.getPoint();
SwingUtilities.convertPointToScreen(origPos, SizeGrip.this);
}
+ @Override
public void mouseReleased(MouseEvent e) {
origPos = null;
}
diff --git a/src/org/fife/ui/autocomplete/TemplateCompletion.java b/src/org/fife/ui/autocomplete/TemplateCompletion.java
index 4afc80f..fa67a60 100644
--- a/src/org/fife/ui/autocomplete/TemplateCompletion.java
+++ b/src/org/fife/ui/autocomplete/TemplateCompletion.java
@@ -106,6 +106,7 @@ public class TemplateCompletion extends AbstractCompletion
}
+ @Override
public String getInputText() {
return inputText;
}
@@ -363,6 +364,7 @@ public class TemplateCompletion extends AbstractCompletion
}
+ @Override
public String toString() {
return getDefinitionString();
}
diff --git a/src/org/fife/ui/autocomplete/TemplatePiece.java b/src/org/fife/ui/autocomplete/TemplatePiece.java
index ff4d2c4..365c94b 100644
--- a/src/org/fife/ui/autocomplete/TemplatePiece.java
+++ b/src/org/fife/ui/autocomplete/TemplatePiece.java
@@ -35,6 +35,7 @@ interface TemplatePiece {
return text;
}
+ @Override
public String toString() {
return "[TemplatePiece.Text: text=" + text + "]";
}
@@ -54,6 +55,7 @@ interface TemplatePiece {
return text;
}
+ @Override
public String toString() {
return "[TemplatePiece.Param: param=" + text + "]";
}
@@ -73,6 +75,7 @@ interface TemplatePiece {
return text;
}
+ @Override
public String toString() {
return "[TemplatePiece.ParamCopy: param=" + text + "]";
}
diff --git a/src/org/fife/ui/autocomplete/VariableCompletion.java b/src/org/fife/ui/autocomplete/VariableCompletion.java
index 5b32d21..26042f0 100644
--- a/src/org/fife/ui/autocomplete/VariableCompletion.java
+++ b/src/org/fife/ui/autocomplete/VariableCompletion.java
@@ -97,6 +97,7 @@ public class VariableCompletion extends BasicCompletion {
/**
* {@inheritDoc}
*/
+ @Override
public String getSummary() {
StringBuilder sb = new StringBuilder();
addDefinitionString(sb);
@@ -122,6 +123,7 @@ public class VariableCompletion extends BasicCompletion {
* @return The tool tip text for this completion, or <code>null</code> if
* none.
*/
+ @Override
public String getToolTipText() {
return getDefinitionString();
}
@@ -185,6 +187,7 @@ public class VariableCompletion extends BasicCompletion {
*
* @return A string representation of this completion.
*/
+ @Override
public String toString() {
return getName();
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/autocomplete.git
More information about the pkg-java-commits
mailing list