Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-04-19 12:25:18 -0400
committerAlexander Kurtakov2012-04-19 12:25:18 -0400
commit316262388107b9a7ca1c4d383bcf0f06c3695599 (patch)
treebffb53e5822115896f118968a69467d961fd0a18 /libhover
parentf5ed5563795f387f22c25c3a1d3146569aa74c9f (diff)
downloadorg.eclipse.linuxtools-316262388107b9a7ca1c4d383bcf0f06c3695599.tar.gz
org.eclipse.linuxtools-316262388107b9a7ca1c4d383bcf0f06c3695599.tar.xz
org.eclipse.linuxtools-316262388107b9a7ca1c4d383bcf0f06c3695599.zip
Enable some standard warnings and fix them.
Diffstat (limited to 'libhover')
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/.settings/org.eclipse.jdt.core.prefs87
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/cdt/libhover/devhelp/DevHelpPlugin.java2
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpTocProvider.java31
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/ParseDevHelp.java16
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LabelFieldEditor.java6
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java11
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/PreferenceInitializer.java1
7 files changed, 135 insertions, 19 deletions
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/.settings/org.eclipse.jdt.core.prefs b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/.settings/org.eclipse.jdt.core.prefs
index b2b4ae1813..9a549e92ea 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/.settings/org.eclipse.jdt.core.prefs
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,93 @@
-#Wed Jan 26 16:59:47 EST 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.6
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/cdt/libhover/devhelp/DevHelpPlugin.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/cdt/libhover/devhelp/DevHelpPlugin.java
index ebe7dd9a55..6a2521e42b 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/cdt/libhover/devhelp/DevHelpPlugin.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/cdt/libhover/devhelp/DevHelpPlugin.java
@@ -25,6 +25,7 @@ public class DevHelpPlugin extends AbstractUIPlugin {
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -34,6 +35,7 @@ public class DevHelpPlugin extends AbstractUIPlugin {
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpTocProvider.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpTocProvider.java
index 312ba5de45..47cce846d2 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpTocProvider.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpTocProvider.java
@@ -72,36 +72,39 @@ public class DevHelpTocProvider extends AbstractTocProvider {
@Override
public ITocContribution[] getTocContributions(String locale) {
- // TODO Auto-generated method stub
ITocContribution contribution = new ITocContribution() {
- public String getId() {
+ @Override
+ public String getId() {
// a way to identify our book
return "org.eclipse.linuxtools.cdt.libhover.devhelp.toc"; //$NON-NLS-1$
}
- public String getCategoryId() {
+ @Override
+ public String getCategoryId() {
// our book does not belong to any category of books
return null;
}
- public boolean isPrimary() {
+ @Override
+ public boolean isPrimary() {
// this is a primary, top-level contribution (a book)
return true;
}
- public IToc getToc() {
+ @Override
+ public IToc getToc() {
return new IToc() {
- public String getLabel() {
+ @Override
+ public String getLabel() {
return "Devhelp Documents"; //$NON-NLS-1$
}
- public String getHref() {
+ @Override
+ public String getHref() {
return null;
}
@Override
public boolean isEnabled(IEvaluationContext context) {
- // TODO Auto-generated method stub
return true;
}
@Override
public IUAElement[] getChildren() {
- // TODO Auto-generated method stub
return getTopics();
}
@Override
@@ -140,20 +143,22 @@ public class DevHelpTocProvider extends AbstractTocProvider {
}
};
}
- public String getLocale() {
+ @Override
+ public String getLocale() {
// this provider only provides content for the en_US locale
return "en_US"; //$NON-NLS-1$
}
- public String[] getExtraDocuments() {
+ @Override
+ public String[] getExtraDocuments() {
// there are no extra documents associated with this book
return new String[0];
}
- public String getLinkTo() {
+ @Override
+ public String getLinkTo() {
return "../org.eclipse.linuxtools.cdt.libhover.library.docs/libraries.xml#devhelpdocs";
}
@Override
public String getContributorId() {
- // TODO Auto-generated method stub
return "org.eclipse.linuxtools.cdt.libhover.devhelp"; //$NON-NLS-1$
}
};
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/ParseDevHelp.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/ParseDevHelp.java
index 4e46ac1177..cb5c0b0e28 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/ParseDevHelp.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/ParseDevHelp.java
@@ -81,6 +81,7 @@ public class ParseDevHelp {
this.funcName = this.funcName.replaceAll("\\(\\)", "").trim(); //$NON-NLS-1$ //$NON-NLS-2$
}
+ @Override
public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) {
if (t == HTML.Tag.A) {
String name = (String)(a.getAttribute(HTML.Attribute.NAME));
@@ -139,7 +140,8 @@ public class ParseDevHelp {
}
}
- public void handleEndTag(HTML.Tag t, int pos) {
+ @Override
+ public void handleEndTag(HTML.Tag t, int pos) {
if (begin) {
if (t == HTML.Tag.DIV) {
--divCounter;
@@ -175,7 +177,8 @@ public class ParseDevHelp {
}
}
- public void handleText(char[] data, int pos) {
+ @Override
+ public void handleText(char[] data, int pos) {
if (begin) {
if (returnType) {
returnValue = ""; //$NON-NLS-1$
@@ -286,12 +289,14 @@ public class ParseDevHelp {
return funcName;
}
- public String toString() {
+ @Override
+ public String toString() {
return "funcName: <" + funcName + "> returnType: <" + returnValue +
"> prototype: <" + prototype + "> description: " + description;
}
- public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) {
+ @Override
+ public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) {
}
@@ -392,7 +397,8 @@ public class ParseDevHelp {
DocumentBuilder builder = factory.newDocumentBuilder();
builder.setEntityResolver(new EntityResolver()
{
- public InputSource resolveEntity(String publicId, String systemId)
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
throws SAXException, IOException
{
return new InputSource(new StringReader("")); //$NON-NLS-1$
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LabelFieldEditor.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LabelFieldEditor.java
index dcbaccf229..03e693d56c 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LabelFieldEditor.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LabelFieldEditor.java
@@ -14,6 +14,7 @@ class LabelFieldEditor extends FieldEditor {
createControl(parent);
}
+ @Override
protected void adjustForNumColumns( int numColumns ) {
GridData gd = new GridData();
gd.horizontalSpan = numColumns;
@@ -24,16 +25,21 @@ class LabelFieldEditor extends FieldEditor {
getLabelControl(parent).setLayoutData(gd);
}
+ @Override
protected void doFillIntoGrid( Composite parent, int numColumns ) {
getLabelControl(parent);
}
+ @Override
public int getNumberOfControls() { return 1; }
/**
* The label field editor is only used to present a text label on a preference page.
*/
+ @Override
protected void doLoad() {}
+ @Override
protected void doLoadDefault() {}
+ @Override
protected void doStore() {}
}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java
index feb37d0346..43725721c6 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java
@@ -128,12 +128,15 @@ public class LibHoverPreferencePage
};
k.setUser(true);
k.addJobChangeListener(new IJobChangeListener() {
+ @Override
public void aboutToRun(IJobChangeEvent event) {
// TODO Auto-generated method stub
}
+ @Override
public void awake(IJobChangeEvent event) {
// TODO Auto-generated method stub
}
+ @Override
public void done(IJobChangeEvent event) {
Display.getDefault().syncExec(new Runnable() {
@Override
@@ -146,12 +149,15 @@ public class LibHoverPreferencePage
}
});
}
+ @Override
public void running(IJobChangeEvent event) {
// TODO Auto-generated method stub
}
+ @Override
public void scheduled(IJobChangeEvent event) {
// TODO Auto-generated method stub
}
+ @Override
public void sleeping(IJobChangeEvent event) {
// TODO Auto-generated method stub
}
@@ -159,17 +165,20 @@ public class LibHoverPreferencePage
k.schedule();
}
+ @Override
protected void contributeButtons(Composite parent) {
((GridLayout) parent.getLayout()).numColumns++;
generateButton = new Button(parent, SWT.NONE);
generateButton.setFont(parent.getFont());
generateButton.setText(LibHoverMessages.getString(GENERATE));
generateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent evt) {
regenerate();
}
});
generateButton.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent event) {
generateButton = null;
}
@@ -190,6 +199,7 @@ public class LibHoverPreferencePage
* of preferences. Each field editor knows how to save and
* restore itself.
*/
+ @Override
public void createFieldEditors() {
addField(
new LabelFieldEditor(
@@ -213,6 +223,7 @@ public class LibHoverPreferencePage
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/PreferenceInitializer.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/PreferenceInitializer.java
index e0670764b9..d95697f660 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/PreferenceInitializer.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/PreferenceInitializer.java
@@ -24,6 +24,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
*
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
+ @Override
public void initializeDefaultPreferences() {
IPreferenceStore store = DevHelpPlugin.getDefault().getPreferenceStore();
store.setDefault(PreferenceConstants.DEVHELP_DIRECTORY, "/usr/share/gtk-doc/html"); //$NON-NLS-1$

Back to the top