Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-01-08 01:43:42 +0000
committerSergey Prigogin2012-01-08 01:43:42 +0000
commitd8c53b250142c12a74bdb6dadfe16189e675f1bf (patch)
treeed4b94ddda1158861f1ba47e83a2613c22e2dfb6
parent4071a34762f970dd6ffd0cc231c055940234bbe2 (diff)
downloadorg.eclipse.cdt-d8c53b250142c12a74bdb6dadfe16189e675f1bf.tar.gz
org.eclipse.cdt-d8c53b250142c12a74bdb6dadfe16189e675f1bf.tar.xz
org.eclipse.cdt-d8c53b250142c12a74bdb6dadfe16189e675f1bf.zip
@Override annotations.
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/CheckersUiActivator.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByConstReferenceQuickFix.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFix.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAssignmentInCondition.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateField.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateLocalVariable.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateParameter.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/SuggestedParenthesisQuickFix.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CodanCheckersActivator.java6
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java4
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentInConditionChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentToItselfChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CaseBreakChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CatchByReference.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java19
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NamingConventionFunctionChecker.java3
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java9
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnStyleChecker.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/StatementHasNoEffectChecker.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuggestedParenthesisChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuspiciousSemicolonChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/UnusedSymbolInFileScopeChecker.java1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/fs/ScanfFormatStringSecurityChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/Activator.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/CodanCommentMap.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxDecisionNode.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxExitNode.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxNodeFactory.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxPlainNode.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractAstFunctionChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractCIndexChecker.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/CxxModelsCache.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java5
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemReporter.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICheckersRegistry.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/AbstractProblemPreference.java9
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/BasicProblemPreference.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java9
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java9
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java4
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java11
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java4
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractBasicBlock.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleIncomingNode.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleOutgoingNode.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/BranchNode.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ExitNode.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/JumpNode.java5
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/NodeFactory.java7
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/PlainNode.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/StartNode.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java11
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblem.java15
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemElement.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemMarker.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java11
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java19
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java1
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java3
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java3
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java3
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java12
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java3
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java3
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java4
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java8
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java1
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/handlers/RunCodanCommand.java1
87 files changed, 311 insertions, 13 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/CheckersUiActivator.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/CheckersUiActivator.java
index 1c383142703..7e50126e768 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/CheckersUiActivator.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/CheckersUiActivator.java
@@ -37,6 +37,7 @@ public class CheckersUiActivator extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -49,6 +50,7 @@ public class CheckersUiActivator extends AbstractUIPlugin {
* 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/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java
index f00a37497c0..97878a20028 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixBreak.java
@@ -39,6 +39,7 @@ public class CaseBreakQuickFixBreak extends AbstractAstRewriteQuickFix {
return true;
}
+ @Override
public String getLabel() {
return Messages.CaseBreakQuickFixBreak_Label;
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java
index 27b95adaf87..7a15d6430d9 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixComment.java
@@ -12,6 +12,7 @@ import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MalformedTreeException;
public class CaseBreakQuickFixComment extends AbstractCodanCMarkerResolution {
+ @Override
public String getLabel() {
return Messages.CaseBreakQuickFixComment_Label;
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByConstReferenceQuickFix.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByConstReferenceQuickFix.java
index 26bb1321a57..f8337c4b683 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByConstReferenceQuickFix.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByConstReferenceQuickFix.java
@@ -20,10 +20,12 @@ import org.eclipse.jface.text.IDocument;
* quick fix for catch by value
*/
public class CatchByConstReferenceQuickFix extends AbstractCodanCMarkerResolution {
+ @Override
public String getLabel() {
return Messages.CatchByConstReferenceQuickFix_Message;
}
+ @Override
public void apply(IMarker marker, IDocument document) {
CatchByReferenceQuickFix.applyCatchByReferenceQuickFix(marker, document, true);
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFix.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFix.java
index cff7d0ceea8..9136c2ff6ce 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFix.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CatchByReferenceQuickFix.java
@@ -21,10 +21,12 @@ import org.eclipse.jface.text.IDocument;
* quick fix for catch by value
*/
public class CatchByReferenceQuickFix extends AbstractCodanCMarkerResolution {
+ @Override
public String getLabel() {
return Messages.CatchByReferenceQuickFix_Message;
}
+ @Override
public void apply(IMarker marker, IDocument document) {
applyCatchByReferenceQuickFix(marker, document, false);
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAssignmentInCondition.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAssignmentInCondition.java
index f076ec40fed..c4d0f14efc0 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAssignmentInCondition.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAssignmentInCondition.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.text.IDocument;
* quick fix for assignment in condition
*/
public class QuickFixAssignmentInCondition extends AbstractCodanCMarkerResolution {
+ @Override
public String getLabel() {
return Messages.QuickFixAssignmentInCondition_Message;
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateField.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateField.java
index 010ab79ef55..b460058bb37 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateField.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateField.java
@@ -33,6 +33,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ltk.core.refactoring.Change;
public class QuickFixCreateField extends AbstractAstRewriteQuickFix {
+ @Override
public String getLabel() {
return Messages.QuickFixCreateField_0;
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateLocalVariable.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateLocalVariable.java
index f3ba9404fb2..ff330b1c7bb 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateLocalVariable.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateLocalVariable.java
@@ -28,6 +28,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ltk.core.refactoring.Change;
public class QuickFixCreateLocalVariable extends AbstractAstRewriteQuickFix {
+ @Override
public String getLabel() {
return Messages.QuickFixCreateLocalVariable_0;
}
@@ -38,6 +39,7 @@ public class QuickFixCreateLocalVariable extends AbstractAstRewriteQuickFix {
* @param astName
* @param r
*/
+ @Override
public void modifyAST(IIndex index, IMarker marker) {
CxxAstUtils utils = CxxAstUtils.getInstance();
IASTTranslationUnit ast;
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateParameter.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateParameter.java
index 3d66376c137..afc17a25008 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateParameter.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixCreateParameter.java
@@ -38,6 +38,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ltk.core.refactoring.CompositeChange;
public class QuickFixCreateParameter extends AbstractAstRewriteQuickFix {
+ @Override
public String getLabel() {
return Messages.QuickFixCreateParameter_0;
}
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/SuggestedParenthesisQuickFix.java b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/SuggestedParenthesisQuickFix.java
index 73cad3d1913..e1df6213827 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/SuggestedParenthesisQuickFix.java
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/SuggestedParenthesisQuickFix.java
@@ -18,6 +18,7 @@ import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
public class SuggestedParenthesisQuickFix extends AbstractCodanCMarkerResolution {
+ @Override
public String getLabel() {
return Messages.SuggestedParenthesisQuickFix_Message;
}
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CodanCheckersActivator.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CodanCheckersActivator.java
index c2e21c38129..35119705841 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CodanCheckersActivator.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CodanCheckersActivator.java
@@ -37,6 +37,7 @@ public class CodanCheckersActivator extends Plugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -49,6 +50,7 @@ public class CodanCheckersActivator extends Plugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
@@ -71,7 +73,7 @@ public class CodanCheckersActivator extends Plugin {
}
public static void log(String message) {
- getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, message));
+ getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
}
/**
@@ -79,6 +81,6 @@ public class CodanCheckersActivator extends Plugin {
* @return
*/
public static IStatus getStatus(Throwable e) {
- return new Status(Status.ERROR, PLUGIN_ID, e.getLocalizedMessage(), e);
+ return new Status(IStatus.ERROR, PLUGIN_ID, e.getLocalizedMessage(), e);
}
}
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
index 8b5e66ceb3d..927f37209a9 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
@@ -61,6 +61,7 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
CheckerLaunchMode.RUN_ON_DEMAND);
}
+ @Override
public void processAst(IASTTranslationUnit ast) {
try {
ast.accept(new OnEachClass());
@@ -77,6 +78,7 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
shouldVisitParameterDeclarations = true;
}
+ @Override
public int visit(IASTDeclaration declaration) {
// Looking for the variables declarations.
if (declaration instanceof IASTSimpleDeclaration) {
@@ -96,6 +98,7 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
return PROCESS_CONTINUE;
}
+ @Override
public int visit(IASTParameterDeclaration parameterDecl) {
// Looking for parameters declaration. Skip references & pointers.
if (!hasPointerOrReference(parameterDecl.getDeclarator())) {
@@ -122,6 +125,7 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
}
}
+ @Override
public int visit(IASTExpression expression) {
if (expression instanceof ICPPASTNewExpression) {
// New expression.
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentInConditionChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentInConditionChecker.java
index 1693229363e..3918a7d79b5 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentInConditionChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentInConditionChecker.java
@@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
public class AssignmentInConditionChecker extends AbstractIndexAstChecker {
private static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern.
ast.accept(new CheckCodeVisitor());
@@ -36,6 +37,7 @@ public class AssignmentInConditionChecker extends AbstractIndexAstChecker {
shouldVisitExpressions = true;
}
+ @Override
public int visit(IASTExpression expression) {
if (isAssignmentExpression(expression) && isUsedAsCondition(expression)) {
reportProblem(ER_ID, expression, expression.getRawSignature());
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentToItselfChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentToItselfChecker.java
index 6b4d6f4d7ef..7be5b8857d1 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentToItselfChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AssignmentToItselfChecker.java
@@ -24,6 +24,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
public class AssignmentToItselfChecker extends AbstractIndexAstChecker {
private static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern.
ast.accept(new ASTVisitor() {
@@ -32,6 +33,7 @@ public class AssignmentToItselfChecker extends AbstractIndexAstChecker {
}
// visit expressions
+ @Override
public int visit(IASTExpression expression) {
if (isAssignmentToItself(expression)) {
reportProblem(ER_ID, expression, expression.getRawSignature());
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CaseBreakChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CaseBreakChecker.java
index 20da627cbc6..13f4f3c21ef 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CaseBreakChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CaseBreakChecker.java
@@ -217,6 +217,7 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
return getCommentMap().getLastFreestandingCommentForNode(statement);
}
+ @Override
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
addPreference(problem, PARAM_NO_BREAK_COMMENT, CheckersMessages.CaseBreakChecker_DefaultNoBreakCommentDescription,
@@ -225,6 +226,7 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
addPreference(problem, PARAM_EMPTY_CASE, CheckersMessages.CaseBreakChecker_EmptyCaseDescription, Boolean.FALSE);
}
+ @Override
public void processAst(IASTTranslationUnit ast) {
_checkLastCase = (Boolean) getPreference(getProblemById(ER_ID, getFile()), PARAM_LAST_CASE);
_checkEmptyCase = (Boolean) getPreference(getProblemById(ER_ID, getFile()), PARAM_EMPTY_CASE);
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CatchByReference.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CatchByReference.java
index 3373f76a2cb..6d493a11e80 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CatchByReference.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CatchByReference.java
@@ -45,6 +45,7 @@ public class CatchByReference extends AbstractIndexAstChecker {
public static final String PARAM_EXCEPT_ARG_LIST = "exceptions"; //$NON-NLS-1$
public static final String PARAM_UNKNOWN_TYPE = "unknown"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern.
ast.accept(new OnCatch());
@@ -55,6 +56,7 @@ public class CatchByReference extends AbstractIndexAstChecker {
shouldVisitStatements = true;
}
+ @Override
public int visit(IASTStatement stmt) {
if (stmt instanceof ICPPASTTryBlockStatement) {
try {
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java
index 5de06044fcc..ccd265c378e 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ClassMembersInitializationChecker.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.codan.internal.checkers;
-import java.util.Stack;
import java.util.HashSet;
import java.util.Set;
+import java.util.Stack;
import org.eclipse.cdt.codan.core.cxx.model.AbstractIndexAstChecker;
import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy;
@@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
import org.eclipse.cdt.core.dom.ast.IBasicType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
@@ -36,7 +37,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDefinition;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;
-import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
@@ -57,6 +57,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
public static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization"; //$NON-NLS-1$
public static final String PARAM_SKIP = "skip"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
ast.accept(new OnEachClass());
}
@@ -64,7 +65,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
class OnEachClass extends ASTVisitor {
// NOTE: Classes can be nested and even can be declared in constructors of the other classes
- private Stack< Set<IField> > constructorsStack = new Stack< Set<IField> >();
+ private final Stack< Set<IField> > constructorsStack = new Stack< Set<IField> >();
OnEachClass() {
shouldVisitDeclarations = true;
@@ -72,6 +73,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
shouldVisitExpressions = skipConstructorsWithFCalls();
}
+ @Override
public int visit(IASTDeclaration declaration) {
ICPPConstructor constructor = getConstructor(declaration);
if (constructor != null) {
@@ -87,6 +89,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
return PROCESS_CONTINUE;
}
+ @Override
public int leave(IASTDeclaration declaration) {
if (getConstructor(declaration) != null) {
for (IField field : constructorsStack.pop()) {
@@ -96,6 +99,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
return PROCESS_CONTINUE;
}
+ @Override
public int visit(IASTExpression expression) {
if (!constructorsStack.empty() && expression instanceof IASTFunctionCallExpression) {
Set<IField> actualConstructorFields = constructorsStack.peek();
@@ -141,15 +145,16 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
} else if (expr instanceof ICPPASTUnaryExpression) {
ICPPASTUnaryExpression unExpr = (ICPPASTUnaryExpression)expr;
switch (unExpr.getOperator()) {
- case ICPPASTUnaryExpression.op_amper:
- case ICPPASTUnaryExpression.op_star:
- case ICPPASTUnaryExpression.op_bracketedPrimary:
+ case IASTUnaryExpression.op_amper:
+ case IASTUnaryExpression.op_star:
+ case IASTUnaryExpression.op_bracketedPrimary:
return referencesThis(unExpr.getOperand());
}
}
return false;
}
+ @Override
public int visit(IASTName name) {
if (!constructorsStack.empty()) {
Set<IField> actualConstructorFields = constructorsStack.peek();
@@ -198,7 +203,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
IBinding binding = functionDefinition.getDeclarator().getName().resolveBinding();
if (binding instanceof ICPPConstructor) {
ICPPConstructor constructor = (ICPPConstructor) binding;
- if (constructor.getClassOwner().getKey()!=ICPPClassType.k_union) {
+ if (constructor.getClassOwner().getKey()!=ICompositeType.k_union) {
return constructor;
}
}
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NamingConventionFunctionChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NamingConventionFunctionChecker.java
index f155d4f6fe5..466e688d925 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NamingConventionFunctionChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NamingConventionFunctionChecker.java
@@ -37,6 +37,7 @@ public class NamingConventionFunctionChecker extends AbstractIndexAstChecker imp
public static final String PARAM_METHODS = "macro"; //$NON-NLS-1$
public static final String PARAM_EXCEPT_ARG_LIST = "exceptions"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
final List<IProblem> pts = getProblemsByMainId(ER_ID, getFile());
try {
@@ -45,6 +46,7 @@ public class NamingConventionFunctionChecker extends AbstractIndexAstChecker imp
shouldVisitDeclarations = true;
}
+ @Override
public int visit(IASTDeclaration element) {
if (element instanceof IASTFunctionDefinition) {
IASTName astName = ((IASTFunctionDefinition) element).getDeclarator().getName();
@@ -109,6 +111,7 @@ public class NamingConventionFunctionChecker extends AbstractIndexAstChecker imp
* org.eclipse.cdt.codan.core.model.ICheckerWithPreferences#initParameters
* (org.eclipse.cdt.codan.core.model.IProblemWorkingCopy)
*/
+ @Override
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
addPreference(problem, PARAM_KEY, CheckersMessages.NamingConventionFunctionChecker_LabelNamePattern, "^[a-z]"); //$NON-NLS-1$
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java
index 24fb21b8a42..b1d1afc0c69 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java
@@ -34,6 +34,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
public class NonVirtualDestructor extends AbstractIndexAstChecker {
public static final String PROBLEM_ID = "org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
// Traverse the AST using the visitor pattern.
ast.accept(new OnEachClass());
@@ -70,6 +71,7 @@ public class NonVirtualDestructor extends AbstractIndexAstChecker {
shouldVisitDeclSpecifiers = true;
}
+ @Override
public int visit(IASTDeclSpecifier decl) {
if (decl instanceof ICPPASTCompositeTypeSpecifier) {
ICPPASTCompositeTypeSpecifier spec = (ICPPASTCompositeTypeSpecifier) decl;
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java
index 87adf7bf554..a5eba7e178c 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java
@@ -71,6 +71,7 @@ public class ProblemBindingChecker extends AbstractIndexAstChecker {
getLaunchModePreference(problem).enableInLaunchModes(CheckerLaunchMode.RUN_AS_YOU_TYPE, CheckerLaunchMode.RUN_ON_DEMAND);
}
+ @Override
public void processAst(IASTTranslationUnit ast) {
try {
ast.accept(new ASTVisitor() {
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
index dd9ef6d59fb..8747dfacb2b 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
@@ -42,7 +42,6 @@ import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
import org.eclipse.cdt.core.dom.ast.IBasicType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IType;
-import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDefinition;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLambdaExpression;
@@ -66,7 +65,7 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
public static final String RET_NORET_ID = "org.eclipse.cdt.codan.checkers.errnoreturn"; //$NON-NLS-1$
class ReturnStmpVisitor extends ASTVisitor {
- private IASTFunctionDefinition func;
+ private final IASTFunctionDefinition func;
boolean hasret;
ReturnStmpVisitor(IASTFunctionDefinition func) {
@@ -77,12 +76,14 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
this.hasret = false;
}
+ @Override
public int visit(IASTDeclaration element) {
if (element != func)
return PROCESS_SKIP; // skip inner functions
return PROCESS_CONTINUE;
}
+ @Override
public int visit(IASTExpression expr) {
if (expr instanceof ICPPASTLambdaExpression) {
return PROCESS_SKIP;
@@ -90,6 +91,7 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
return PROCESS_CONTINUE;
}
+ @Override
public int visit(IASTStatement stmt) {
if (stmt instanceof IASTReturnStatement) {
IASTReturnStatement ret = (IASTReturnStatement) stmt;
@@ -246,7 +248,7 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
* @return
*/
protected boolean isExplicitReturn(IASTFunctionDefinition func) {
- return getDeclSpecType(func) != ICASTSimpleDeclSpecifier.t_unspecified;
+ return getDeclSpecType(func) != IASTSimpleDeclSpecifier.t_unspecified;
}
/**
@@ -306,6 +308,7 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
}
/* checker must implement @link ICheckerWithPreferences */
+ @Override
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
if (problem.getId().equals(RET_NO_VALUE_ID) || problem.getId().equals(RET_NORET_ID)) {
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnStyleChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnStyleChecker.java
index 5c72c562c91..51b68763178 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnStyleChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnStyleChecker.java
@@ -26,6 +26,7 @@ public class ReturnStyleChecker extends AbstractIndexAstChecker {
return true;
}
+ @Override
public void processAst(IASTTranslationUnit ast) {
ast.accept(new ASTVisitor() {
{
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/StatementHasNoEffectChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/StatementHasNoEffectChecker.java
index f1d39829241..3b7c1ace670 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/StatementHasNoEffectChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/StatementHasNoEffectChecker.java
@@ -43,6 +43,7 @@ public class StatementHasNoEffectChecker extends AbstractIndexAstChecker {
public static final String PARAM_MACRO_ID = "macro"; //$NON-NLS-1$
public static final String PARAM_EXCEPT_ARG_LIST = "exceptions"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
ast.accept(new CheckStmpVisitor());
}
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuggestedParenthesisChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuggestedParenthesisChecker.java
index 16eb9537a46..cfeb0c179c8 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuggestedParenthesisChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuggestedParenthesisChecker.java
@@ -35,6 +35,7 @@ public class SuggestedParenthesisChecker extends AbstractIndexAstChecker {
public static final String ER_ID = "org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem"; //$NON-NLS-1$
public static final String PARAM_NOT = "paramNot"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern.
ast.accept(new ExpressionVisitor());
@@ -45,6 +46,7 @@ public class SuggestedParenthesisChecker extends AbstractIndexAstChecker {
shouldVisitExpressions = true;
}
+ @Override
public int visit(IASTExpression expression) {
int precedence = getPrecedence(expression);
IASTNode parent = expression.getParent();
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuspiciousSemicolonChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuspiciousSemicolonChecker.java
index d865df12022..f7efd921e3a 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuspiciousSemicolonChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/SuspiciousSemicolonChecker.java
@@ -28,6 +28,7 @@ public class SuspiciousSemicolonChecker extends AbstractIndexAstChecker {
public static final String PARAM_ELSE = "else"; //$NON-NLS-1$
public static final String PARAM_ALFTER_ELSE = "afterelse"; //$NON-NLS-1$
+ @Override
public void processAst(IASTTranslationUnit ast) {
ast.accept(new ASTVisitor() {
{
@@ -74,6 +75,7 @@ public class SuspiciousSemicolonChecker extends AbstractIndexAstChecker {
return macro != null;
}
+ @Override
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
addPreference(problem, PARAM_ELSE, CheckersMessages.SuspiciousSemicolonChecker_ParamElse, Boolean.FALSE);
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/UnusedSymbolInFileScopeChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/UnusedSymbolInFileScopeChecker.java
index 54390de9ece..b22e9f26902 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/UnusedSymbolInFileScopeChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/UnusedSymbolInFileScopeChecker.java
@@ -101,6 +101,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
!staticVariableDeclarations.isEmpty();
}
+ @Override
public void processAst(IASTTranslationUnit ast) {
if (ast.isHeaderUnit())
return;
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/fs/ScanfFormatStringSecurityChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/fs/ScanfFormatStringSecurityChecker.java
index 1eca5d8c772..b340360b782 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/fs/ScanfFormatStringSecurityChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/fs/ScanfFormatStringSecurityChecker.java
@@ -78,6 +78,7 @@ public class ScanfFormatStringSecurityChecker extends AbstractIndexAstChecker {
new VulnerableFunction("sscanf", 1) //$NON-NLS-1$
};
+ @Override
public void processAst(IASTTranslationUnit ast) {
ast.accept(new FormatStringVisitor());
}
@@ -111,6 +112,7 @@ public class ScanfFormatStringSecurityChecker extends AbstractIndexAstChecker {
shouldVisitExpressions = true;
}
+ @Override
public int visit(IASTExpression expression) {
if (expression instanceof IASTFunctionCallExpression) {
IASTFunctionCallExpression callExpression = (IASTFunctionCallExpression) expression;
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/Activator.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/Activator.java
index eca8b348aea..5251574a137 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/Activator.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/Activator.java
@@ -36,6 +36,7 @@ public class Activator extends Plugin {
* @see
* org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -47,6 +48,7 @@ public class Activator extends Plugin {
* @see
* org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/CodanCommentMap.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/CodanCommentMap.java
index 2f841f652f7..b925be2cdb0 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/CodanCommentMap.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/CodanCommentMap.java
@@ -36,6 +36,7 @@ public class CodanCommentMap implements ICodanCommentMap {
* @see org.eclipse.cdt.codan.core.cxx.model.ICodanCommentMap#
* getTrailingCommentsForNode(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
+ @Override
public List<IASTComment> getTrailingCommentsForNode(IASTNode node) {
return commentedNodeMap.getTrailingCommentsForNode(node);
}
@@ -46,6 +47,7 @@ public class CodanCommentMap implements ICodanCommentMap {
* @see org.eclipse.cdt.codan.core.cxx.model.ICodanCommentMap#
* getLeadingCommentsForNode(org.eclipse.cdt.core.dom.ast.IASTNode)
*/
+ @Override
public List<IASTComment> getLeadingCommentsForNode(IASTNode node) {
return commentedNodeMap.getLeadingCommentsForNode(node);
}
@@ -57,6 +59,7 @@ public class CodanCommentMap implements ICodanCommentMap {
* org.eclipse.cdt.codan.core.cxx.model.ICodanCommentMap#getFreestandingForNode
* (org.eclipse.cdt.core.dom.ast.IASTStatement)
*/
+ @Override
public List<IASTComment> getFreestandingForNode(IASTNode node) {
return commentedNodeMap.getFreestandingCommentsForNode(node);
}
@@ -65,6 +68,7 @@ public class CodanCommentMap implements ICodanCommentMap {
* @param node
* @return
*/
+ @Override
public IASTComment getLastLeadingCommentForNode(IASTNode node) {
IASTComment comment = null;
List<IASTComment> comms = getLeadingCommentsForNode(node);
@@ -78,6 +82,7 @@ public class CodanCommentMap implements ICodanCommentMap {
* @param node
* @return
*/
+ @Override
public IASTComment getFirstTrailingCommentForNode(IASTNode node) {
IASTComment comment = null;
List<IASTComment> comms = getTrailingCommentsForNode(node);
@@ -91,6 +96,7 @@ public class CodanCommentMap implements ICodanCommentMap {
* @param node
* @return
*/
+ @Override
public IASTComment getLastFreestandingCommentForNode(IASTNode node) {
IASTComment comment = null;
List<IASTComment> comms = getFreestandingForNode(node);
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxDecisionNode.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxDecisionNode.java
index 01b70c65cd7..83899845112 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxDecisionNode.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxDecisionNode.java
@@ -35,6 +35,7 @@ public class CxxDecisionNode extends DecisionNode {
/**
* @return
*/
+ @Override
public String toStringData() {
if (getNode() == null)
return ""; //$NON-NLS-1$
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxExitNode.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxExitNode.java
index 0bec8a24c6b..b0078723052 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxExitNode.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxExitNode.java
@@ -36,6 +36,7 @@ public class CxxExitNode extends ExitNode implements IExitNode {
/**
* @return
*/
+ @Override
public String toStringData() {
if (getNode() == null)
return "return; // fake"; //$NON-NLS-1$
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxNodeFactory.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxNodeFactory.java
index f729fdef7cc..d2f094ec4f1 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxNodeFactory.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxNodeFactory.java
@@ -27,14 +27,17 @@ public class CxxNodeFactory extends NodeFactory implements INodeFactory {
super();
}
+ @Override
public IPlainNode createPlainNode() {
return new CxxPlainNode();
}
+ @Override
public IDecisionNode createDecisionNode() {
return new CxxDecisionNode();
}
+ @Override
public IExitNode createExitNode() {
return new CxxExitNode();
}
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxPlainNode.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxPlainNode.java
index 5d36a481a33..4130d8dec1d 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxPlainNode.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/internal/model/cfg/CxxPlainNode.java
@@ -35,6 +35,7 @@ public class CxxPlainNode extends PlainNode {
/**
* @return
*/
+ @Override
public String toStringData() {
if (getNode() == null)
return ""; //$NON-NLS-1$
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractAstFunctionChecker.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractAstFunctionChecker.java
index b3668773dcd..2862718fcff 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractAstFunctionChecker.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractAstFunctionChecker.java
@@ -20,6 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
* Abstract class for checkers that do all the work on function definition level
*/
public abstract class AbstractAstFunctionChecker extends AbstractIndexAstChecker implements ICheckerWithPreferences {
+ @Override
public void processAst(IASTTranslationUnit ast) {
// traverse the ast using the visitor pattern.
ast.accept(new ASTVisitor() {
@@ -27,6 +28,7 @@ public abstract class AbstractAstFunctionChecker extends AbstractIndexAstChecker
shouldVisitDeclarations = true;
}
+ @Override
public int visit(IASTDeclaration element) {
if (element instanceof IASTFunctionDefinition) {
processFunction((IASTFunctionDefinition) element);
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractCIndexChecker.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractCIndexChecker.java
index e9a5570a1bf..f5f2ab3094d 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractCIndexChecker.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractCIndexChecker.java
@@ -53,6 +53,7 @@ public abstract class AbstractCIndexChecker extends AbstractCheckerWithProblemPr
}
}
+ @Override
public synchronized boolean processResource(IResource resource) {
if (resource instanceof IFile) {
IFile file = (IFile) resource;
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java
index fa9a7e059b7..6f306b23af3 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java
@@ -88,6 +88,7 @@ public abstract class AbstractIndexAstChecker extends AbstractCheckerWithProblem
*
* @see IRunnableInEditorChecker#processModel(Object, ICheckerInvocationContext)
*/
+ @Override
public synchronized void processModel(Object model, ICheckerInvocationContext context) {
if (model instanceof IASTTranslationUnit) {
setContext(context);
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/CxxModelsCache.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/CxxModelsCache.java
index 63bf6095617..bda7bb899d8 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/CxxModelsCache.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/CxxModelsCache.java
@@ -137,6 +137,7 @@ public class CxxModelsCache implements ICodanDisposable {
* @see IDisposable#dispose()
* This method should not be called concurrently with any other method.
*/
+ @Override
public void dispose() {
Assert.isTrue(!disposed, "CxxASTCache.dispose() called more than once."); //$NON-NLS-1$
disposed = true;
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
index 7382d865e46..13425b8ed41 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
@@ -41,6 +41,7 @@ public abstract class AbstractChecker implements IChecker {
* @return true if checker is enabled in context of resource, if returns
* false checker's "processResource" method won't be called
*/
+ @Override
public boolean enabledInContext(IResource res) {
return res instanceof IFile;
}
@@ -120,6 +121,7 @@ public abstract class AbstractChecker implements IChecker {
* @return problem reporter for given checker
* @since 2.0
*/
+ @Override
public IProblemReporter getProblemReporter() {
return problemReporter;
}
@@ -166,6 +168,7 @@ public abstract class AbstractChecker implements IChecker {
* Defines if checker should be run as user type in editor. Override this
* method is checker is too heavy for that (runs too long)
*/
+ @Override
public boolean runInEditor() {
return this instanceof IRunnableInEditorChecker;
}
@@ -202,6 +205,7 @@ public abstract class AbstractChecker implements IChecker {
/**
* @since 2.0
*/
+ @Override
public void before(IResource resource) {
IProblemReporter problemReporter = CodanRuntime.getInstance().getProblemReporter();
this.problemReporter = problemReporter;
@@ -220,6 +224,7 @@ public abstract class AbstractChecker implements IChecker {
/**
* @since 2.0
*/
+ @Override
public void after(IResource resource) {
if (problemReporter instanceof IProblemReporterSessionPersistent) {
// Delete general markers
@@ -241,6 +246,7 @@ public abstract class AbstractChecker implements IChecker {
* @see IChecker#processResource(IResource, ICheckerInvocationContext)
* @since 2.0
*/
+ @Override
public synchronized boolean processResource(IResource resource, ICheckerInvocationContext context)
throws OperationCanceledException {
this.setContext(context);
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java
index 9907a22bbc5..aaebd31452d 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java
@@ -35,6 +35,7 @@ public abstract class AbstractCheckerWithProblemPreferences extends AbstractChec
/**
* Checker that actually has parameter must override this
*/
+ @Override
public void initPreferences(IProblemWorkingCopy problem) {
getTopLevelPreference(problem); // initialize
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java
index 0f210795c93..72180daa305 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java
@@ -63,6 +63,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
*
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getData()
*/
+ @Override
public Object getData() {
return extra;
}
@@ -81,6 +82,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
*
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getFile()
*/
+ @Override
public IResource getFile() {
return file;
}
@@ -96,6 +98,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
/**
* Problem line number referenced in problem view in location field
*/
+ @Override
public int getLineNumber() {
return getStartingLineNumber();
}
@@ -112,6 +115,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
*
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getStartPos()
*/
+ @Override
public int getStartingChar() {
return posStart;
}
@@ -121,6 +125,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
*
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getEndingChar()
*/
+ @Override
public int getEndingChar() {
return posEnd;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemReporter.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemReporter.java
index 366fa6d1fd1..0b842fa58fd 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemReporter.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemReporter.java
@@ -20,6 +20,7 @@ import org.eclipse.core.resources.IResource;
* @since 2.0
*/
public abstract class AbstractProblemReporter implements IProblemReporter {
+ @Override
public void reportProblem(String id, IProblemLocation loc, Object... args) {
IResource file = loc.getFile();
if (file == null)
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICheckersRegistry.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICheckersRegistry.java
index a4a0f56dc0b..675f5447ced 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICheckersRegistry.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICheckersRegistry.java
@@ -29,6 +29,7 @@ public interface ICheckersRegistry extends Iterable<IChecker> {
*
* @return iterator for registered checkers
*/
+ @Override
public Iterator<IChecker> iterator();
/**
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/AbstractProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/AbstractProblemPreference.java
index 19c7c7a5212..5e4092fd251 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/AbstractProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/AbstractProblemPreference.java
@@ -31,18 +31,22 @@ public abstract class AbstractProblemPreference implements IProblemPreference {
private String uiInfo;
private IProblemPreference parent;
+ @Override
public String getLabel() {
return label;
}
+ @Override
public String getToolTip() {
return toolTip;
}
+ @Override
public String getKey() {
return key;
}
+ @Override
public String getUiInfo() {
return uiInfo;
}
@@ -104,10 +108,12 @@ public abstract class AbstractProblemPreference implements IProblemPreference {
this.uiInfo = uiinfo;
}
+ @Override
public Object getValue() {
throw new UnsupportedOperationException();
}
+ @Override
public void setValue(Object value) {
throw new UnsupportedOperationException();
}
@@ -142,6 +148,7 @@ public abstract class AbstractProblemPreference implements IProblemPreference {
return tokenizer;
}
+ @Override
public IProblemPreference getParent() {
return parent;
}
@@ -154,6 +161,7 @@ public abstract class AbstractProblemPreference implements IProblemPreference {
this.parent = parent;
}
+ @Override
public String getQualifiedKey() {
if (parent == null)
return getKey();
@@ -166,6 +174,7 @@ public abstract class AbstractProblemPreference implements IProblemPreference {
*/
public abstract void importValue(StreamTokenizer tokenizer) throws IOException;
+ @Override
public void importValue(String str) {
StreamTokenizer tokenizer = getImportTokenizer(str);
try {
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/BasicProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/BasicProblemPreference.java
index d38f1912a14..9c6b809b055 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/BasicProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/BasicProblemPreference.java
@@ -25,6 +25,7 @@ public class BasicProblemPreference extends AbstractProblemPreference {
protected Object value;
private PreferenceType type = PreferenceType.TYPE_STRING;
+ @Override
public PreferenceType getType() {
return type;
}
@@ -78,6 +79,7 @@ public class BasicProblemPreference extends AbstractProblemPreference {
return value;
}
+ @Override
public String exportValue() {
Pattern pat = Pattern.compile("^[A-Za-z0-9._-]+$"); //$NON-NLS-1$
String x = String.valueOf(getValue());
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
index 58cf9008501..9101860aa83 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
@@ -57,6 +57,7 @@ public class FileScopeProblemPreference extends AbstractProblemPreference {
setLabel(Messages.FileScopeProblemPreference_Label);
}
+ @Override
public PreferenceType getType() {
return PreferenceType.TYPE_CUSTOM;
}
@@ -130,6 +131,7 @@ public class FileScopeProblemPreference extends AbstractProblemPreference {
return true;
return false;
}
+ @Override
public String exportValue() {
return exportPathList(INCLUSION, inclusion) + "," //$NON-NLS-1$
+ exportPathList(EXCLUSION, exclusion);
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
index a8ee12c1bbd..0a944fd5a99 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
@@ -42,6 +42,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
setLabel(label);
}
+ @Override
public PreferenceType getType() {
return PreferenceType.TYPE_LIST;
}
@@ -69,6 +70,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
*
* @return read only preference matching the key
*/
+ @Override
public IProblemPreference addChildDescriptor(IProblemPreference desc) {
Object value = desc.getValue();
String key = desc.getKey();
@@ -107,6 +109,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
* @throws NumberFormatException
* if key is not number
*/
+ @Override
public IProblemPreference getChildDescriptor(String key) throws NumberFormatException {
if (key == null || key.equals(COMMON_DESCRIPTOR_KEY)) {
// return common descriptor
@@ -125,6 +128,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
/**
* Return array of clones values of child preferences.
*/
+ @Override
public IProblemPreference[] getChildDescriptors() {
IProblemPreference[] res = new IProblemPreference[list.size()];
for (int i = 0; i < res.length; i++) {
@@ -133,6 +137,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
return res;
}
+ @Override
public Object getChildValue(String key) {
int index = Integer.parseInt(key);
return getChildValue(index);
@@ -146,6 +151,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
return list.get(index);
}
+ @Override
public void setChildValue(String key, Object value) {
int i = Integer.valueOf(key).intValue();
setChildValue(i, value);
@@ -180,6 +186,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
/**
* Removes child value by key
*/
+ @Override
public void removeChildValue(String key) {
int index = Integer.parseInt(key);
list.remove(index);
@@ -197,6 +204,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
return list1;
}
+ @Override
public String exportValue() {
StringBuffer buf = new StringBuffer("("); //$NON-NLS-1$
for (Iterator<Object> iterator = list.iterator(); iterator.hasNext();) {
@@ -258,6 +266,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
* If info key is '#' resets common descriptor to null, otherwise removes
* value
*/
+ @Override
public void removeChildDescriptor(IProblemPreference info) {
if (info.getKey().equals(COMMON_DESCRIPTOR_KEY))
setChildDescriptor(null);
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
index 4a8439e2e76..cead0066b9a 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
@@ -52,6 +52,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
setLabel(label);
}
+ @Override
public PreferenceType getType() {
return PreferenceType.TYPE_MAP;
}
@@ -60,6 +61,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
* Get parameter preference for element by key
*
*/
+ @Override
public IProblemPreference getChildDescriptor(String key) {
return hash.get(key);
}
@@ -71,6 +73,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
*
* @param desc
*/
+ @Override
public IProblemPreference addChildDescriptor(IProblemPreference desc) {
((AbstractProblemPreference) desc).setParent(this);
hash.put(desc.getKey(), desc);
@@ -83,6 +86,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
* and not assume that modifying its elements would modify actual child
* values.
*/
+ @Override
public IProblemPreference[] getChildDescriptors() {
return hash.values().toArray(new IProblemPreference[hash.values().size()]);
}
@@ -90,6 +94,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
/**
* Returns value of the child element by its key
*/
+ @Override
public Object getChildValue(String key) {
IProblemPreference childInfo = getChildDescriptor(key);
return childInfo.getValue();
@@ -98,6 +103,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
/**
* Set child value by its key
*/
+ @Override
public void setChildValue(String key, Object value) {
IProblemPreference pref = getChildDescriptor(key);
if (pref == null)
@@ -110,6 +116,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
/**
* Removes child value and descriptor by key
*/
+ @Override
public void removeChildValue(String key) {
hash.remove(key);
}
@@ -125,6 +132,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
return map;
}
+ @Override
public String exportValue() {
StringBuffer buf = new StringBuffer("{"); //$NON-NLS-1$
for (Iterator<String> iterator = hash.keySet().iterator(); iterator.hasNext();) {
@@ -205,6 +213,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements I
/**
* Removes child descriptor by its key
*/
+ @Override
public void removeChildDescriptor(IProblemPreference info) {
hash.remove(info.getKey());
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java
index c0d8c6b73ed..93959f37b94 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java
@@ -34,10 +34,12 @@ public class CheckerInvocationContext implements ICheckerInvocationContext {
objectStorage = new HashMap<Class<?>, Object>();
}
+ @Override
public IResource getResource() {
return resource;
}
+ @Override
@SuppressWarnings("unchecked")
public synchronized <T> T get(Class<T> objectClass) {
T object = (T) objectStorage.get(objectClass);
@@ -54,6 +56,7 @@ public class CheckerInvocationContext implements ICheckerInvocationContext {
* (non-Javadoc)
* @see ICheckerInvocationContext#add(Object)
*/
+ @Override
public synchronized <T extends ICodanDisposable> void add(T object) {
Object old = objectStorage.put(object.getClass(), object);
if (old != null && object != old) {
@@ -66,6 +69,7 @@ public class CheckerInvocationContext implements ICheckerInvocationContext {
* (non-Javadoc)
* @see IDisposableCache#dispose()
*/
+ @Override
public void dispose() {
for (Map.Entry<Class<?>, Object> entry : objectStorage.entrySet()) {
Object obj = entry.getValue();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
index 7e3c86400b6..dd71bdfde40 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
@@ -241,6 +241,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
*
* @see org.eclipse.cdt.codan.core.model.ICheckersRegistry#iterator()
*/
+ @Override
public Iterator<IChecker> iterator() {
return checkers.iterator();
}
@@ -263,6 +264,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* org.eclipse.cdt.codan.core.model.ICheckersRegistry#addChecker(org.eclipse
* .cdt.codan.core.model.IChecker)
*/
+ @Override
public void addChecker(IChecker checker) {
checkers.add(checker);
}
@@ -274,6 +276,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* org.eclipse.cdt.codan.core.model.ICheckersRegistry#addProblem(org.eclipse
* .cdt.codan.core.model.IProblem, java.lang.String)
*/
+ @Override
public void addProblem(IProblem p, String category) {
IProblemCategory cat = getDefaultProfile().findCategory(category);
if (cat == null)
@@ -288,6 +291,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* org.eclipse.cdt.codan.core.model.ICheckersRegistry#addCategory(org.eclipse
* .cdt.codan.core.model.IProblemCategory, java.lang.String)
*/
+ @Override
public void addCategory(IProblemCategory p, String category) {
IProblemCategory cat = getDefaultProfile().findCategory(category);
if (cat == null)
@@ -303,6 +307,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* eclipse.cdt.codan.core.model.IChecker,
* org.eclipse.cdt.codan.core.model.IProblem)
*/
+ @Override
public void addRefProblem(IChecker c, IProblem p) {
Collection<IProblem> plist = problemList.get(c);
if (plist == null) {
@@ -327,6 +332,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
*
* @return collection of problems or null
*/
+ @Override
public Collection<IProblem> getRefProblems(IChecker checker) {
return problemList.get(checker);
}
@@ -337,6 +343,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* @see
* org.eclipse.cdt.codan.core.model.ICheckersRegistry#getDefaultProfile()
*/
+ @Override
public IProblemProfile getDefaultProfile() {
return profiles.get(DEFAULT);
}
@@ -347,6 +354,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* @see
* org.eclipse.cdt.codan.core.model.ICheckersRegistry#getWorkspaceProfile()
*/
+ @Override
public IProblemProfile getWorkspaceProfile() {
IProblemProfile wp = profiles.get(ResourcesPlugin.getWorkspace());
if (wp == null) {
@@ -365,6 +373,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
return wp;
}
+ @Override
public void updateProfile(IResource element, IProblemProfile profile) {
// updating profile can invalidate all cached profiles
IProblemProfile defaultProfile = getDefaultProfile();
@@ -381,6 +390,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* org.eclipse.cdt.codan.core.model.ICheckersRegistry#getResourceProfile
* (org.eclipse.core.resources.IResource)
*/
+ @Override
public IProblemProfile getResourceProfile(IResource element) {
IProblemProfile prof = profiles.get(element);
if (prof == null) {
@@ -410,6 +420,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
* @seeorg.eclipse.cdt.codan.core.model.ICheckersRegistry#
* getResourceProfileWorkingCopy(org.eclipse.core.resources.IResource)
*/
+ @Override
public IProblemProfile getResourceProfileWorkingCopy(IResource element) {
IProblemProfile prof = (IProblemProfile) getResourceProfile(element).clone();
return prof;
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
index 1adbf6c23b6..0d2f0de74e3 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
@@ -37,6 +37,7 @@ public class CodanApplication implements IApplication {
private boolean verbose = false;
private boolean all = false;
+ @Override
public Object start(IApplicationContext context) throws Exception {
String[] args = (String[]) context.getArguments().get("application.args"); //$NON-NLS-1$
if (args == null || args.length == 0) {
@@ -107,6 +108,7 @@ public class CodanApplication implements IApplication {
System.out.println(Messages.CodanApplication_verbose_option);
}
+ @Override
public void stop() {
// nothing
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java
index fa8725da9c9..4b712a0d80c 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java
@@ -51,6 +51,7 @@ public class CodanBuilder extends IncrementalProjectBuilder implements ICodanBui
this.monitor = monitor;
}
+ @Override
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
switch (delta.getKind()) {
@@ -93,6 +94,7 @@ public class CodanBuilder extends IncrementalProjectBuilder implements ICodanBui
return null;
}
+ @Override
public void processResource(IResource resource, IProgressMonitor monitor) {
processResource(resource, monitor, null, CheckerLaunchMode.RUN_ON_FULL_BUILD);
}
@@ -105,6 +107,7 @@ public class CodanBuilder extends IncrementalProjectBuilder implements ICodanBui
* @param mode - launch mode, @see {@link CheckerLaunchMode}
* @since 2.0
*/
+ @Override
public void processResource(IResource resource, IProgressMonitor monitor, CheckerLaunchMode mode) {
processResource(resource, monitor, null, mode);
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java
index 21f47e00f73..6ef1fcf0e87 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java
@@ -26,6 +26,7 @@ public class CodeAnlysisNature implements IProjectNature {
public static final String NATURE_ID = "org.eclipse.cdt.codan.core.codanNature"; //$NON-NLS-1$
private IProject project;
+ @Override
public void configure() throws CoreException {
IProjectDescription desc = project.getDescription();
ICommand[] commands = desc.getBuildSpec();
@@ -43,6 +44,7 @@ public class CodeAnlysisNature implements IProjectNature {
project.setDescription(desc, null);
}
+ @Override
public void deconfigure() throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand[] commands = description.getBuildSpec();
@@ -58,10 +60,12 @@ public class CodeAnlysisNature implements IProjectNature {
}
}
+ @Override
public IProject getProject() {
return project;
}
+ @Override
public void setProject(IProject project) {
this.project = project;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractBasicBlock.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractBasicBlock.java
index 15a191a062e..5b69b529674 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractBasicBlock.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractBasicBlock.java
@@ -23,10 +23,12 @@ public abstract class AbstractBasicBlock implements IBasicBlock, ICfgData {
public final static IBasicBlock[] EMPTY_LIST = new IBasicBlock[0];
private Object data;
+ @Override
public Object getData() {
return data;
}
+ @Override
public void setData(Object data) {
this.data = data;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleIncomingNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleIncomingNode.java
index fbc59304344..571372cc0ec 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleIncomingNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleIncomingNode.java
@@ -27,14 +27,17 @@ public abstract class AbstractSingleIncomingNode extends AbstractBasicBlock impl
super();
}
+ @Override
public IBasicBlock[] getIncomingNodes() {
return new IBasicBlock[] { prev };
}
+ @Override
public int getIncomingSize() {
return 1;
}
+ @Override
public IBasicBlock getIncoming() {
return prev;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleOutgoingNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleOutgoingNode.java
index d23e15b754b..a4b5ad09e93 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleOutgoingNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/AbstractSingleOutgoingNode.java
@@ -27,14 +27,17 @@ public abstract class AbstractSingleOutgoingNode extends AbstractBasicBlock impl
super();
}
+ @Override
public IBasicBlock[] getOutgoingNodes() {
return new IBasicBlock[] { next };
}
+ @Override
public int getOutgoingSize() {
return 1;
}
+ @Override
public IBasicBlock getOutgoing() {
return next;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/BranchNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/BranchNode.java
index ecd99e101aa..45783023c95 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/BranchNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/BranchNode.java
@@ -25,6 +25,7 @@ public class BranchNode extends PlainNode implements IBranchNode {
this.label = label;
}
+ @Override
public String getLabel() {
return label;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java
index 18ce3d0848b..55fc5f1ae49 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java
@@ -37,6 +37,7 @@ public class ConnectorNode extends AbstractSingleOutgoingNode implements IConnec
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IBasicBlock#
* getIncomingIterator()
*/
+ @Override
public IBasicBlock[] getIncomingNodes() {
return incoming.toArray(new IBasicBlock[incoming.size()]);
}
@@ -46,6 +47,7 @@ public class ConnectorNode extends AbstractSingleOutgoingNode implements IConnec
*
* @see org.eclipse.cdt.codan.core.model.cfg.IBasicBlock#getIncomingSize ()
*/
+ @Override
public int getIncomingSize() {
return incoming.size();
}
@@ -56,6 +58,7 @@ public class ConnectorNode extends AbstractSingleOutgoingNode implements IConnec
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IConnectorNode#
* hasBackwardIncoming()
*/
+ @Override
public boolean hasBackwardIncoming() {
for (IBasicBlock node : incoming) {
if (node instanceof IJumpNode) {
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java
index c7de910f757..eef2262e921 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java
@@ -39,10 +39,12 @@ public class ControlFlowGraph implements IControlFlowGraph {
this.start = start;
}
+ @Override
public Iterator<IExitNode> getExitNodeIterator() {
return exitNodes.iterator();
}
+ @Override
public int getExitNodeSize() {
return exitNodes.size();
}
@@ -63,6 +65,7 @@ public class ControlFlowGraph implements IControlFlowGraph {
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IControlFlowGraph#
* getStartNode()
*/
+ @Override
public IStartNode getStartNode() {
return start;
}
@@ -97,6 +100,7 @@ public class ControlFlowGraph implements IControlFlowGraph {
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IControlFlowGraph#
* getUnconnectedNodeIterator()
*/
+ @Override
public Iterator<IBasicBlock> getUnconnectedNodeIterator() {
return deadNodes.iterator();
}
@@ -107,6 +111,7 @@ public class ControlFlowGraph implements IControlFlowGraph {
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IControlFlowGraph#
* getUnconnectedNodeSize()
*/
+ @Override
public int getUnconnectedNodeSize() {
return deadNodes.size();
}
@@ -116,6 +121,7 @@ public class ControlFlowGraph implements IControlFlowGraph {
*
* @see org.eclipse.cdt.codan.core.model.cfg.IControlFlowGraph#getNodes ()
*/
+ @Override
public Collection<IBasicBlock> getNodes() {
Collection<IBasicBlock> result = new LinkedHashSet<IBasicBlock>();
getNodes(getStartNode(), result);
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java
index 9353d1fb6a5..14b81f8ef4f 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java
@@ -44,6 +44,7 @@ public class DecisionNode extends AbstractSingleIncomingNode implements IDecisio
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IBasicBlock#
* getOutgoingIterator()
*/
+ @Override
public IBasicBlock[] getOutgoingNodes() {
return next.toArray(new IBasicBlock[next.size()]);
}
@@ -53,6 +54,7 @@ public class DecisionNode extends AbstractSingleIncomingNode implements IDecisio
*
* @see org.eclipse.cdt.codan.core.model.cfg.IBasicBlock#getOutgoingSize ()
*/
+ @Override
public int getOutgoingSize() {
return next.size();
}
@@ -63,6 +65,7 @@ public class DecisionNode extends AbstractSingleIncomingNode implements IDecisio
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IDecisionNode#
* getConnectionNode()
*/
+ @Override
public IConnectorNode getMergeNode() {
return conn;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ExitNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ExitNode.java
index 7bd98482538..e318576cd90 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ExitNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ExitNode.java
@@ -25,14 +25,17 @@ public class ExitNode extends AbstractSingleIncomingNode implements IExitNode {
super();
}
+ @Override
public IBasicBlock[] getOutgoingNodes() {
return EMPTY_LIST;
}
+ @Override
public int getOutgoingSize() {
return 0;
}
+ @Override
public IStartNode getStartNode() {
return start;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/JumpNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/JumpNode.java
index eb8999bfe1d..38e04e53409 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/JumpNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/JumpNode.java
@@ -27,10 +27,12 @@ public class JumpNode extends AbstractSingleIncomingNode implements IJumpNode {
super();
}
+ @Override
public IBasicBlock[] getOutgoingNodes() {
return new IBasicBlock[] { jump };
}
+ @Override
public int getOutgoingSize() {
return 1;
}
@@ -40,14 +42,17 @@ public class JumpNode extends AbstractSingleIncomingNode implements IJumpNode {
*
* @see org.eclipse.cdt.codan.core.model.cfg.IJumpNode#getJumpNode()
*/
+ @Override
public IConnectorNode getJumpNode() {
return jump;
}
+ @Override
public IBasicBlock getOutgoing() {
return jump;
}
+ @Override
public boolean isBackwardArc() {
return backward;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/NodeFactory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/NodeFactory.java
index 0de073432e5..a1266d0470c 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/NodeFactory.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/NodeFactory.java
@@ -44,6 +44,7 @@ public class NodeFactory implements INodeFactory {
*
* @see org.eclipse.cdt.codan.core.model.cfg.INodeFactory#createPlainNode ()
*/
+ @Override
public IPlainNode createPlainNode() {
return new PlainNode();
}
@@ -53,6 +54,7 @@ public class NodeFactory implements INodeFactory {
*
* @see org.eclipse.cdt.codan.core.model.cfg.INodeFactory#createJumpNode ()
*/
+ @Override
public IJumpNode createJumpNode() {
return new JumpNode();
}
@@ -63,6 +65,7 @@ public class NodeFactory implements INodeFactory {
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.INodeFactory#
* createDecisionNode()
*/
+ @Override
public IDecisionNode createDecisionNode() {
return new DecisionNode();
}
@@ -73,6 +76,7 @@ public class NodeFactory implements INodeFactory {
* @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.INodeFactory#
* createConnectiorNode()
*/
+ @Override
public IConnectorNode createConnectorNode() {
return new ConnectorNode();
}
@@ -82,6 +86,7 @@ public class NodeFactory implements INodeFactory {
*
* @see org.eclipse.cdt.codan.core.model.cfg.INodeFactory#createStartNode ()
*/
+ @Override
public IStartNode createStartNode() {
return new StartNode();
}
@@ -91,10 +96,12 @@ public class NodeFactory implements INodeFactory {
*
* @see org.eclipse.cdt.codan.core.model.cfg.INodeFactory#createExitNode ()
*/
+ @Override
public IExitNode createExitNode() {
return new ExitNode();
}
+ @Override
public IBranchNode createBranchNode(String label) {
return new BranchNode(label);
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/PlainNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/PlainNode.java
index 6ffb7b612b9..9abd9dde359 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/PlainNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/PlainNode.java
@@ -24,16 +24,19 @@ public class PlainNode extends AbstractSingleIncomingNode implements IPlainNode
super();
}
+ @Override
public IBasicBlock[] getOutgoingNodes() {
return new IBasicBlock[] { next };
}
+ @Override
public int getOutgoingSize() {
if (next == null)
return 0;
return 1;
}
+ @Override
public IBasicBlock getOutgoing() {
return next;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/StartNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/StartNode.java
index 4d64badf7c4..1307f830cd3 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/StartNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/StartNode.java
@@ -22,10 +22,12 @@ public class StartNode extends AbstractSingleOutgoingNode implements IStartNode
super();
}
+ @Override
public IBasicBlock[] getIncomingNodes() {
return EMPTY_LIST;
}
+ @Override
public int getIncomingSize() {
return 0;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java
index 32c3d14218b..deda9238a8f 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java
@@ -60,10 +60,12 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
this.checker = checker;
}
+ @Override
public IResource getResource() {
return resource;
}
+ @Override
public IChecker getChecker() {
return checker;
}
@@ -89,6 +91,7 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
}
}
+ @Override
public void deleteProblems(IResource file) {
try {
file.deleteMarkers(GENERIC_CODE_ANALYSIS_MARKER_TYPE, true, IResource.DEPTH_ZERO);
@@ -97,6 +100,7 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
}
}
+ @Override
public void deleteAllProblems() {
try {
ResourcesPlugin.getWorkspace().getRoot().deleteMarkers(GENERIC_CODE_ANALYSIS_MARKER_TYPE,
@@ -106,9 +110,11 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
}
}
+ @Override
public void deleteProblems(final IResource file, final IChecker checker) {
try {
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
Collection<IMarker> markers = findResourceMarkers(file, checker);
for (Iterator<IMarker> iterator = markers.iterator(); iterator.hasNext();) {
@@ -156,15 +162,18 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
* @return session aware problem reporter
* @since 1.1
*/
+ @Override
public IProblemReporterSessionPersistent createReporter(IResource resource, IChecker checker) {
return new CodanMarkerProblemReporter(resource, checker);
}
+ @Override
public void start() {
if (checker == null)
deleteProblems(false);
}
+ @Override
public void done() {
if (checker != null) {
if (toAdd.size() == 0)
@@ -178,6 +187,7 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
protected void reconcileMarkers() {
try {
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
Collection<IMarker> markers = findResourceMarkers(resource, checker);
for (Iterator<IMarker> iterator = markers.iterator(); iterator.hasNext();) {
@@ -271,6 +281,7 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter implemen
*
* @see IProblemReporterSessionPersistent#deleteProblems(boolean)
*/
+ @Override
public void deleteProblems(boolean all) {
if (all)
throw new UnsupportedOperationException();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblem.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblem.java
index 3bae48a4758..3c539e48b88 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblem.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblem.java
@@ -36,6 +36,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
this.multiple = multiple;
}
+ @Override
public CodanSeverity getSeverity() {
return severity;
}
@@ -49,10 +50,12 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
this.name = name;
}
+ @Override
public String getName() {
return name;
}
+ @Override
public String getId() {
return id;
}
@@ -70,10 +73,12 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
return name;
}
+ @Override
public boolean isEnabled() {
return enabled;
}
+ @Override
public void setSeverity(CodanSeverity sev) {
if (sev == null)
throw new NullPointerException();
@@ -82,6 +87,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
notifyChanged(ProblemProfileChangeEvent.PROBLEM_KEY);
}
+ @Override
public void setEnabled(boolean checked) {
checkSet();
this.enabled = checked;
@@ -103,6 +109,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
return prob;
}
+ @Override
public void setPreference(IProblemPreference value) {
if (value == null)
throw new NullPointerException();
@@ -110,6 +117,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
notifyChanged(ProblemProfileChangeEvent.PROBLEM_PREF_KEY);
}
+ @Override
public IProblemPreference getPreference() {
return rootPreference;
}
@@ -119,6 +127,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
*
* @see org.eclipse.cdt.codan.core.model.IProblem#getMessagePattern()
*/
+ @Override
public String getMessagePattern() {
return messagePattern;
}
@@ -127,6 +136,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
* @param messagePattern
* the message to set
*/
+ @Override
public void setMessagePattern(String messagePattern) {
checkSet();
this.messagePattern = messagePattern;
@@ -137,6 +147,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
*
* @see org.eclipse.cdt.codan.core.model.IProblem#getDescription()
*/
+ @Override
public String getDescription() {
return description;
}
@@ -148,6 +159,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
* org.eclipse.cdt.codan.core.model.IProblemWorkingCopy#setDescription(java
* .lang.String)
*/
+ @Override
public void setDescription(String desc) {
checkSet();
this.description = desc;
@@ -158,6 +170,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
*
* @see org.eclipse.cdt.codan.core.model.IProblem#getMarkerType()
*/
+ @Override
public String getMarkerType() {
return markerType;
}
@@ -177,6 +190,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
*
* @see org.eclipse.cdt.codan.core.model.IProblemMultiple#isMultiple()
*/
+ @Override
public boolean isMultiple() {
return multiple;
}
@@ -186,6 +200,7 @@ public class CodanProblem extends CodanProblemElement implements IProblemWorking
*
* @see org.eclipse.cdt.codan.core.model.IProblemMultiple#isOriginal()
*/
+ @Override
public boolean isOriginal() {
return !id.contains(CheckersRegistry.CLONE_SUFFIX);
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java
index 6ebb4c4c3f7..fe231b96789 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java
@@ -32,10 +32,12 @@ public class CodanProblemCategory extends CodanProblemElement implements IProble
this.name = name;
}
+ @Override
public String getName() {
return name;
}
+ @Override
public String getId() {
return id;
}
@@ -45,6 +47,7 @@ public class CodanProblemCategory extends CodanProblemElement implements IProble
return name;
}
+ @Override
public IProblemElement[] getChildren() {
return list.toArray(new IProblemElement[list.size()]);
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemElement.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemElement.java
index 5c68bd7f867..4ef2f7a3869 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemElement.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemElement.java
@@ -27,6 +27,7 @@ public class CodanProblemElement implements IProblemElement {
*
* @see org.eclipse.cdt.codan.core.model.IProblemElement#getProfile()
*/
+ @Override
public IProblemProfile getProfile() {
return profile;
}
@@ -36,6 +37,7 @@ public class CodanProblemElement implements IProblemElement {
*
* @see org.eclipse.cdt.codan.core.model.IProblemElement#getCategory()
*/
+ @Override
public IProblemCategory getParentCategory() {
return parent;
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemMarker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemMarker.java
index b5dd4a5e74b..58d0c525ffa 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemMarker.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemMarker.java
@@ -40,6 +40,7 @@ public class CodanProblemMarker implements ICodanProblemMarker {
private IProblem problem;
private Object args[];
+ @Override
public Object[] getArgs() {
return args;
}
@@ -60,6 +61,7 @@ public class CodanProblemMarker implements ICodanProblemMarker {
*
* @see org.eclipse.cdt.codan.core.model.ICodanProblemMarker#getLocation()
*/
+ @Override
public IProblemLocation getLocation() {
return loc;
}
@@ -69,6 +71,7 @@ public class CodanProblemMarker implements ICodanProblemMarker {
*
* @see org.eclipse.cdt.codan.core.model.ICodanProblemMarker#getProblem()
*/
+ @Override
public IProblem getProblem() {
return problem;
}
@@ -78,6 +81,7 @@ public class CodanProblemMarker implements ICodanProblemMarker {
*
* @see org.eclipse.cdt.codan.core.model.ICodanProblemMarker#getResource()
*/
+ @Override
public IResource getResource() {
return loc.getFile();
}
@@ -87,6 +91,7 @@ public class CodanProblemMarker implements ICodanProblemMarker {
*
* @see org.eclipse.cdt.codan.core.model.ICodanProblemMarker#createMarker()
*/
+ @Override
public IMarker createMarker() throws CoreException {
IResource file = loc.getFile();
int lineNumber = loc.getLineNumber();
@@ -112,6 +117,7 @@ public class CodanProblemMarker implements ICodanProblemMarker {
*
* @see org.eclipse.cdt.codan.core.model.ICodanProblemMarker#createMessage()
*/
+ @Override
public String createMessage() {
String messagePattern = problem.getMessagePattern();
String message = problem.getId();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
index df3c444bcd3..1207610ae76 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
@@ -25,6 +25,7 @@ public class ProblemLocationFactory implements IProblemLocationFactory {
* @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory#
* createProblemLocation(org.eclipse.core.resources.IFile, int)
*/
+ @Override
public IProblemLocation createProblemLocation(IFile file, int line) {
return new CodanProblemLocation(file, line);
}
@@ -35,6 +36,7 @@ public class ProblemLocationFactory implements IProblemLocationFactory {
* @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory#
* createProblemLocation(org.eclipse.core.resources.IFile, int, int)
*/
+ @Override
public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar) {
return new CodanProblemLocation(file, startChar, endChar);
}
@@ -45,6 +47,7 @@ public class ProblemLocationFactory implements IProblemLocationFactory {
* @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory#
* createProblemLocation(org.eclipse.core.resources.IFile, int, int, int)
*/
+ @Override
public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar, int line) {
return new CodanProblemLocation(file, startChar, endChar, line);
}
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java
index ab2ad76e57e..eaa0d524140 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java
@@ -45,6 +45,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
* org.eclipse.cdt.codan.core.model.IProblemProfile#getProblem(java.lang
* .String)
*/
+ @Override
public IProblem findProblem(String id) {
return CodanProblemCategory.findProblem(getRoot(), id);
}
@@ -54,6 +55,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
*
* @see org.eclipse.cdt.codan.core.model.IProblemProfile#getProblems()
*/
+ @Override
public IProblem[] getProblems() {
Collection<IProblem> problems = new ArrayList<IProblem>();
collectProblems(getRoot(), problems);
@@ -76,6 +78,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
}
}
+ @Override
public IProblemCategory getRoot() {
return rootCategory;
}
@@ -86,6 +89,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
((CodanProblemCategory) cat).addChild(p);
}
+ @Override
public IProblemCategory findCategory(String id) {
return CodanProblemCategory.findCategory(getRoot(), id);
}
@@ -124,6 +128,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
*
* @see org.eclipse.cdt.codan.core.model.IProblemElement#getProfile()
*/
+ @Override
public IProblemProfile getProfile() {
return this;
}
@@ -133,6 +138,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
*
* @see org.eclipse.cdt.codan.core.model.IProblemElement#getParentCategory()
*/
+ @Override
public IProblemCategory getParentCategory() {
return getRoot();
}
@@ -141,6 +147,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
/**
* @param listener
*/
+ @Override
public void addProfileChangeListener(IProblemProfileChangeListener listener) {
if (preferenceChangeListeners == null)
preferenceChangeListeners = new ListenerList();
@@ -150,6 +157,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
/**
* @param listener
*/
+ @Override
public void removeProfileChangeListener(IProblemProfileChangeListener listener) {
if (preferenceChangeListeners == null)
return;
@@ -169,10 +177,12 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
for (int i = 0; i < listeners.length; i++) {
final IProblemProfileChangeListener listener = (IProblemProfileChangeListener) listeners[i];
ISafeRunnable job = new ISafeRunnable() {
+ @Override
public void handleException(Throwable exception) {
// already logged in Platform#run()
}
+ @Override
public void run() throws Exception {
listener.profileChange(event);
}
@@ -186,6 +196,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
*
* @see org.eclipse.cdt.codan.core.model.IProblemProfile#getResource()
*/
+ @Override
public Object getResource() {
return resource;
}
diff --git a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java
index ad7784d8e7a..b6f7bde2e81 100644
--- a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java
+++ b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/ControlFlowGraphPlugin.java
@@ -28,6 +28,7 @@ public class ControlFlowGraphPlugin extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -40,6 +41,7 @@ public class ControlFlowGraphPlugin extends AbstractUIPlugin {
* 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/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
index 5a8b6b84440..7485cee680b 100644
--- a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
+++ b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
@@ -100,20 +100,25 @@ public class ControlFlowGraphView extends ViewPart {
}
class ViewContentProvider implements IStructuredContentProvider, ITreeContentProvider {
+ @Override
public void inputChanged(Viewer v, Object oldInput, Object newInput) {
}
+ @Override
public void dispose() {
}
+ @Override
public Object[] getElements(Object parent) {
return getChildren(parent);
}
+ @Override
public Object getParent(Object child) {
return null;
}
+ @Override
public Object[] getChildren(Object parent) {
if (parent instanceof Collection) {
return ((Collection) parent).toArray();
@@ -122,7 +127,7 @@ public class ControlFlowGraphView extends ViewPart {
DeadNodes dead = new DeadNodes();
Iterator<IBasicBlock> iter = ((IControlFlowGraph) parent).getUnconnectedNodeIterator();
for (; iter.hasNext();) {
- IBasicBlock iBasicBlock = (IBasicBlock) iter.next();
+ IBasicBlock iBasicBlock = iter.next();
dead.add(iBasicBlock);
}
ArrayList all = new ArrayList();
@@ -146,6 +151,7 @@ public class ControlFlowGraphView extends ViewPart {
return new Object[0];
}
+ @Override
public boolean hasChildren(Object parent) {
return getChildren(parent).length > 0;
}
@@ -169,6 +175,7 @@ public class ControlFlowGraphView extends ViewPart {
}
class ViewLabelProvider extends LabelProvider {
+ @Override
public String getText(Object obj) {
if (obj == null)
return null;
@@ -192,6 +199,7 @@ public class ControlFlowGraphView extends ViewPart {
return "0x" + Integer.toHexString(System.identityHashCode(obj));
}
+ @Override
public Image getImage(Object obj) {
String imageKey = "task.png";
if (obj instanceof IDecisionNode || obj instanceof IControlFlowGraph)
@@ -220,6 +228,7 @@ public class ControlFlowGraphView extends ViewPart {
* This is a callback that will allow us to create the viewer and initialize
* it.
*/
+ @Override
public void createPartControl(Composite parent) {
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer);
@@ -236,6 +245,7 @@ public class ControlFlowGraphView extends ViewPart {
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
+ @Override
public void menuAboutToShow(IMenuManager manager) {
ControlFlowGraphView.this.fillContextMenu(manager);
}
@@ -272,6 +282,7 @@ public class ControlFlowGraphView extends ViewPart {
private void makeActions() {
action1 = new Action() {
+ @Override
public void run() {
IEditorPart e = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
ITranslationUnit tu = (ITranslationUnit) CDTUITools.getEditorInputCElement(e.getEditorInput());
@@ -289,6 +300,7 @@ public class ControlFlowGraphView extends ViewPart {
action1.setToolTipText("Synchronize");
action1.setImageDescriptor(ControlFlowGraphPlugin.getDefault().getImageDescriptor("icons/refresh_view.gif"));
doubleClickAction = new Action() {
+ @Override
public void run() {
ISelection selection = viewer.getSelection();
Object obj = ((IStructuredSelection) selection).getFirstElement();
@@ -299,6 +311,7 @@ public class ControlFlowGraphView extends ViewPart {
private void hookDoubleClickAction() {
viewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
doubleClickAction.run();
}
@@ -316,6 +329,7 @@ public class ControlFlowGraphView extends ViewPart {
shouldVisitDeclarations = true;
}
+ @Override
public int visit(IASTDeclaration decl) {
if (decl instanceof IASTFunctionDefinition) {
CxxControlFlowGraph graph = new ControlFlowGraphBuilder().build((IASTFunctionDefinition) decl);
@@ -327,6 +341,7 @@ public class ControlFlowGraphView extends ViewPart {
};
ast.accept(visitor);
viewer.getControl().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
// TODO Auto-generated method stub
viewer.setInput(functions);
@@ -337,6 +352,7 @@ public class ControlFlowGraphView extends ViewPart {
/**
* Passing the focus request to the viewer's control.
*/
+ @Override
public void setFocus() {
viewer.getControl().setFocus();
}
@@ -410,6 +426,7 @@ public class ControlFlowGraphView extends ViewPart {
private void hookSingleClickAction() {
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
new ASTHighlighterAction(null).run();
}
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java
index c4ec43b0287..abdd3089953 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java
@@ -37,6 +37,7 @@ public class Activator extends AbstractUIPlugin {
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
* )
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -49,6 +50,7 @@ public class Activator extends AbstractUIPlugin {
* 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/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java
index 9c9f68cc5fa..ce6121332b9 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java
@@ -45,6 +45,7 @@ public class CodanProblemMarkerResolutionGenerator implements IMarkerResolutionG
}
}
+ @Override
public IMarkerResolution[] getResolutions(IMarker marker) {
if (resolutionsLoaded == false) {
readExtensions();
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java
index 6c10bb507f5..dcd2043ea3b 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java
@@ -23,6 +23,7 @@ public class OpenProblemPreferences implements IObjectActionDelegate {
public OpenProblemPreferences() {
}
+ @Override
public void run(IAction action) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection) selection;
@@ -45,10 +46,12 @@ public class OpenProblemPreferences implements IObjectActionDelegate {
}
}
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
this.selection = selection;
}
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
this.targetPart = targetPart;
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java
index 9ba23c0bf7a..e3a124d4002 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/RunCodeAnalysis.java
@@ -31,10 +31,12 @@ import org.eclipse.ui.IWorkbenchPart;
public class RunCodeAnalysis implements IObjectActionDelegate {
private ISelection sel;
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
// nothing
}
+ @Override
public void run(IAction action) {
Job job = new Job(CodanUIMessages.Job_TitleRunningAnalysis) {
@SuppressWarnings("unchecked")
@@ -67,6 +69,7 @@ public class RunCodeAnalysis implements IObjectActionDelegate {
job.schedule();
}
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
this.sel = selection;
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
index 352faec95d1..fbe2f12b6ba 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
@@ -32,6 +32,7 @@ public class ToggleNatureAction implements IObjectActionDelegate {
*
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
+ @Override
public void run(IAction action) {
if (selection instanceof IStructuredSelection) {
for (Iterator it = ((IStructuredSelection) selection).iterator(); it.hasNext();) {
@@ -56,6 +57,7 @@ public class ToggleNatureAction implements IObjectActionDelegate {
* org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action
* .IAction, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
this.selection = selection;
}
@@ -67,6 +69,7 @@ public class ToggleNatureAction implements IObjectActionDelegate {
* org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.
* action.IAction, org.eclipse.ui.IWorkbenchPart)
*/
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java
index 2b525f46afb..5c585ecd2a4 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java
@@ -139,10 +139,12 @@ public class ExclusionInclusionEntryDialog extends StatusDialog {
// -------- ExclusionPatternAdapter --------
private class ExclusionPatternAdapter implements IDialogFieldListener, IStringButtonAdapter {
// -------- IDialogFieldListener
+ @Override
public void dialogFieldChanged(DialogField field) {
doStatusLineUpdate();
}
+ @Override
public void changeControlPressed(DialogField field) {
doChangeControlPressed();
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
index 7c11bd79cf4..2f976f5f2fe 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
@@ -69,6 +69,7 @@ public class BuildPropertyPage extends FieldEditorPreferencePage implements IWor
*
* @see org.eclipse.ui.IWorkbenchPropertyPage#getElement()
*/
+ @Override
public IAdaptable getElement() {
if (element.getAdapter(IProject.class) != null)
return (IProject) element.getAdapter(IProject.class);
@@ -80,6 +81,7 @@ public class BuildPropertyPage extends FieldEditorPreferencePage implements IWor
*
* @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
*/
+ @Override
public void setElement(IAdaptable element) {
this.element = element;
if (getElement() != null) {
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java
index 629d3941458..05a60f97a94 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java
@@ -71,6 +71,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
protected void adjustForNumColumns(int numColumns) {
Control control = getLabelControl();
if (control != null) {
@@ -84,6 +85,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
protected void doFillIntoGrid(Composite parent, int numColumns) {
doFillLabelIntoGrid(parent, numColumns);
doFillBoxIntoGrid(parent, numColumns);
@@ -113,6 +115,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
protected void doLoad() {
if (getTreeControl() != null) {
String s = getPreferenceStore().getString(getPreferenceName());
@@ -140,6 +143,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
* @Override
* @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
*/
+ @Override
public void checkStateChanged(CheckStateChangedEvent event) {
Object element = event.getElement();
treeViewer.setGrayed(element, false);
@@ -185,6 +189,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
protected void doLoadDefault() {
if (getTreeControl() != null) {
String s = getPreferenceStore().getDefaultString(getPreferenceName());
@@ -195,6 +200,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
protected void doStore() {
String s = modelToString(getViewer().getInput());
if (s != null) {
@@ -230,6 +236,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
public int getNumberOfControls() {
return 2;
}
@@ -250,6 +257,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
public void setFocus() {
if (getTreeControl() != null) {
getTreeControl().setFocus();
@@ -259,6 +267,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* @see FieldEditor.setEnabled(boolean,Composite).
*/
+ @Override
public void setEnabled(boolean enabled, Composite parent) {
super.setEnabled(enabled, parent);
createListControl(parent).setEnabled(enabled);
@@ -276,6 +285,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
*/
protected abstract String modelToString(Object model);
+ @Override
protected void createControl(Composite parent) {
GridLayout ly = (GridLayout) parent.getLayout();
doFillIntoGrid(parent, ly.numColumns);
@@ -295,6 +305,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
public boolean isValid() {
return isValid;
}
@@ -302,6 +313,7 @@ public abstract class CheckedTreeEditor extends FieldEditor implements ICheckSta
/*
* (non-Javadoc) Method declared on FieldEditor.
*/
+ @Override
protected void refreshValidState() {
isValid = checkState();
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
index 1517e86fe3e..70aed99519f 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
@@ -65,6 +65,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(), CodanCorePlugin.PLUGIN_ID));
// setDescription("Code Analysis Preference Page");
problemSelectionListener = new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
if (infoButton != null) {
if (event.getSelection() instanceof ITreeSelection) {
@@ -99,6 +100,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
addField(checkedTreeEditor);
checkedTreeEditor.getTreeViewer().addSelectionChangedListener(problemSelectionListener);
checkedTreeEditor.getTreeViewer().addDoubleClickListener(new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
openCustomizeDialog();
}
@@ -213,6 +215,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
* @see
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
index fe7dcc7f3e6..25c210df10e 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
@@ -111,6 +111,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage i
*
* @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
*/
+ @Override
public void setElement(IAdaptable element) {
this.element = element;
}
@@ -120,6 +121,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage i
*
* @see org.eclipse.ui.IWorkbenchPropertyPage#getElement()
*/
+ @Override
public IAdaptable getElement() {
if (element == null)
return element;
@@ -360,6 +362,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage i
manager.addToRoot(targetNode);
final PreferenceDialog dialog = new PreferenceDialog(getControl().getShell(), manager);
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
+ @Override
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
index b3165f126e2..a1a9e9da58d 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
@@ -212,6 +212,7 @@ public class FileScopePreferencePage extends PreferencePage {
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#customButtonPressed(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField,
* int)
*/
+ @Override
public void customButtonPressed(ListDialogField field, int index) {
doCustomButtonPressed(field, index);
}
@@ -219,6 +220,7 @@ public class FileScopePreferencePage extends PreferencePage {
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#selectionChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField)
*/
+ @Override
public void selectionChanged(ListDialogField field) {
doSelectionChanged(field);
}
@@ -226,6 +228,7 @@ public class FileScopePreferencePage extends PreferencePage {
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#doubleClicked(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField)
*/
+ @Override
public void doubleClicked(ListDialogField field) {
doDoubleClicked(field);
}
@@ -233,6 +236,7 @@ public class FileScopePreferencePage extends PreferencePage {
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener#dialogFieldChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField)
*/
+ @Override
public void dialogFieldChanged(DialogField field) {
}
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java
index fb2396a13d5..9f28f8b7bee 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java
@@ -62,6 +62,7 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
* org.eclipse.jface.viewers.ICheckStateProvider#isChecked(java.lang
* .Object)
*/
+ @Override
public boolean isChecked(Object element) {
if (element instanceof IProblem) {
IProblem p = (IProblem) element;
@@ -88,6 +89,7 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
* org.eclipse.jface.viewers.ICheckStateProvider#isGrayed(java.lang.
* Object)
*/
+ @Override
public boolean isGrayed(Object element) {
if (element instanceof IProblem) {
IProblem p = (IProblem) element;
@@ -130,14 +132,17 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
}
class ProblemsContentProvider implements IContentProvider, ITreeContentProvider {
+ @Override
public void dispose() {
// TODO Auto-generated method stub
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// TODO Auto-generated method stub
}
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof Object[])
return (Object[]) parentElement;
@@ -150,14 +155,17 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
return new Object[0];
}
+ @Override
public Object getParent(Object element) {
return null;
}
+ @Override
public boolean hasChildren(Object element) {
return getChildren(element).length > 0;
}
+ @Override
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
index 15cfc9f35fa..02bbfb8f4af 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
@@ -107,6 +107,7 @@ public class ProblemDetails extends ViewPart {
description.addSelectionListener(linkSelAdapter);
ISelectionService ser = (ISelectionService) getSite().getService(ISelectionService.class);
ser.addSelectionListener(new ISelectionListener() {
+ @Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (part.getSite().getId().equals(problemsViewId)) {
processSelection(selection);
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/handlers/RunCodanCommand.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/handlers/RunCodanCommand.java
index 4d4d72855d5..096203a0e76 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/handlers/RunCodanCommand.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/handlers/RunCodanCommand.java
@@ -27,6 +27,7 @@ public class RunCodanCommand extends AbstractHandler {
public RunCodanCommand() {
}
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
RunCodeAnalysis action = new RunCodeAnalysis();

Back to the top