From 0c290ae7eabb8cb32e1eb28f55cceb9e6350d596 Mon Sep 17 00:00:00 2001 From: Elliott Baron Date: Tue, 25 Aug 2009 21:01:56 -0400 Subject: Initial commit: New file. * .gitignore: New file. * org.eclipse.cdt.codan.checkers.ui/.classpath: New file. * org.eclipse.cdt.codan.checkers.ui/.project: New file. * org.eclipse.cdt.codan.checkers.ui/.settings/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/.settings/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/.settings/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/.settings/org.eclipse.jdt.core.prefs: New file. * org.eclipse.cdt.codan.checkers.ui/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/CVS/Template: New file. * org.eclipse.cdt.codan.checkers.ui/META-INF/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/META-INF/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/META-INF/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/META-INF/MANIFEST.MF: New file. * org.eclipse.cdt.codan.checkers.ui/build.properties: New file. * org.eclipse.cdt.codan.checkers.ui/plugin.xml: New file. * org.eclipse.cdt.codan.checkers.ui/src/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CheckersUiActivator.java: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Root: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CodanProblemMarkerResolutionGenerator.java: New file. * org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/QuickFixAssignmentInCondition.java: New file. * org.eclipse.cdt.codan.checkers/.classpath: New file. * org.eclipse.cdt.codan.checkers/.project: New file. * org.eclipse.cdt.codan.checkers/.settings/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/.settings/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/.settings/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/.settings/org.eclipse.jdt.core.prefs: New file. * org.eclipse.cdt.codan.checkers/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/CVS/Template: New file. * org.eclipse.cdt.codan.checkers/META-INF/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/META-INF/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/META-INF/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/META-INF/MANIFEST.MF: New file. * org.eclipse.cdt.codan.checkers/build.properties: New file. * org.eclipse.cdt.codan.checkers/plugin.xml: New file. * org.eclipse.cdt.codan.checkers/src/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/org/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/org/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/Activator.java: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/CloseOpenedFilesChecker.java: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/AssignmentInConditionChecker.java: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/CVS/Entries: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/CVS/Repository: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/CVS/Root: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/NonVirtualDestructor.java: New file. * org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/StatementHasNoEffectChecker.java: New file. * org.eclipse.cdt.codan.core/.classpath: New file. * org.eclipse.cdt.codan.core/.project: New file. * org.eclipse.cdt.codan.core/.settings/CVS/Entries: New file. * org.eclipse.cdt.codan.core/.settings/CVS/Repository: New file. * org.eclipse.cdt.codan.core/.settings/CVS/Root: New file. * org.eclipse.cdt.codan.core/.settings/org.eclipse.jdt.core.prefs: New file. * org.eclipse.cdt.codan.core/CVS/Entries: New file. * org.eclipse.cdt.codan.core/CVS/Repository: New file. * org.eclipse.cdt.codan.core/CVS/Root: New file. * org.eclipse.cdt.codan.core/CVS/Template: New file. * org.eclipse.cdt.codan.core/META-INF/CVS/Entries: New file. * org.eclipse.cdt.codan.core/META-INF/CVS/Repository: New file. * org.eclipse.cdt.codan.core/META-INF/CVS/Root: New file. * org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF: New file. * org.eclipse.cdt.codan.core/build.properties: New file. * org.eclipse.cdt.codan.core/plugin.xml: New file. * org.eclipse.cdt.codan.core/schema/CVS/Entries: New file. * org.eclipse.cdt.codan.core/schema/CVS/Repository: New file. * org.eclipse.cdt.codan.core/schema/CVS/Root: New file. * org.eclipse.cdt.codan.core/schema/checkers.exsd: New file. * org.eclipse.cdt.codan.core/src/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanApplication.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanPreferencesLoader.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanRuntime.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/PreferenceConstants.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/CodanSeverity.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICAstChecker.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICheckersRegistry.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICodanAstReconciler.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ICodanBuilder.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemCategory.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemElement.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocation.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemProfile.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemReporter.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ProblemLocation.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/ProblemProfile.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegisry.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CVS/Entries: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CVS/Repository: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CVS/Root: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblem.java: New file. * org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java: New file. * org.eclipse.cdt.codan.ui/.classpath: New file. * org.eclipse.cdt.codan.ui/.project: New file. * org.eclipse.cdt.codan.ui/.settings/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/.settings/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/.settings/CVS/Root: New file. * org.eclipse.cdt.codan.ui/.settings/org.eclipse.jdt.core.prefs: New file. * org.eclipse.cdt.codan.ui/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/CVS/Root: New file. * org.eclipse.cdt.codan.ui/CVS/Template: New file. * org.eclipse.cdt.codan.ui/META-INF/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/META-INF/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/META-INF/CVS/Root: New file. * org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF: New file. * org.eclipse.cdt.codan.ui/build.properties: New file. * org.eclipse.cdt.codan.ui/plugin.xml: New file. * org.eclipse.cdt.codan.ui/src/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CheckedTreeEditor.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/Messages.properties: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/PreferenceInitializer.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/ProblemsTreeEditor.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/Activator.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/CodanCReconciler.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/Startup.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/actions/CVS/Entries: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/actions/CVS/Repository: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/actions/CVS/Root: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/actions/RunCodeAnalysis.java: New file. * org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/ui/actions/ToggleNatureAction.java: New file. --- .../src/org/eclipse/cdt/codan/CVS/Entries | 1 + .../src/org/eclipse/cdt/codan/CVS/Repository | 1 + .../src/org/eclipse/cdt/codan/CVS/Root | 1 + .../src/org/eclipse/cdt/codan/checkers/CVS/Entries | 1 + .../org/eclipse/cdt/codan/checkers/CVS/Repository | 1 + .../src/org/eclipse/cdt/codan/checkers/CVS/Root | 1 + .../org/eclipse/cdt/codan/checkers/ui/CVS/Entries | 2 + .../eclipse/cdt/codan/checkers/ui/CVS/Repository | 1 + .../src/org/eclipse/cdt/codan/checkers/ui/CVS/Root | 1 + .../cdt/codan/checkers/ui/CheckersUiActivator.java | 50 +++++++++++++ .../cdt/codan/checkers/ui/quickfix/CVS/Entries | 2 + .../cdt/codan/checkers/ui/quickfix/CVS/Repository | 1 + .../cdt/codan/checkers/ui/quickfix/CVS/Root | 1 + .../CodanProblemMarkerResolutionGenerator.java | 30 ++++++++ .../ui/quickfix/QuickFixAssignmentInCondition.java | 82 ++++++++++++++++++++++ 15 files changed, 176 insertions(+) create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Entries create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Repository create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Root create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Entries create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Repository create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Root create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Entries create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Repository create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Root create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CheckersUiActivator.java create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Entries create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Repository create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Root create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CodanProblemMarkerResolutionGenerator.java create mode 100644 org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/QuickFixAssignmentInCondition.java (limited to 'org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan') diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Entries b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Entries new file mode 100644 index 0000000..513604d --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Entries @@ -0,0 +1 @@ +D/checkers//// diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Repository b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Repository new file mode 100644 index 0000000..dde7cb7 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Repository @@ -0,0 +1 @@ +org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Root b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Root new file mode 100644 index 0000000..04efa23 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.eclipse.org:/cvsroot/tools diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Entries b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Entries new file mode 100644 index 0000000..7f0205c --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Entries @@ -0,0 +1 @@ +D/ui//// diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Repository b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Repository new file mode 100644 index 0000000..24fc549 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Repository @@ -0,0 +1 @@ +org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Root b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Root new file mode 100644 index 0000000..04efa23 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.eclipse.org:/cvsroot/tools diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Entries b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Entries new file mode 100644 index 0000000..fc31844 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Entries @@ -0,0 +1,2 @@ +/CheckersUiActivator.java/1.1/Sat Apr 18 02:11:07 2009// +D/quickfix//// diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Repository b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Repository new file mode 100644 index 0000000..25cd7cf --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Repository @@ -0,0 +1 @@ +org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Root b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Root new file mode 100644 index 0000000..04efa23 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.eclipse.org:/cvsroot/tools diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CheckersUiActivator.java b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CheckersUiActivator.java new file mode 100644 index 0000000..1635684 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/CheckersUiActivator.java @@ -0,0 +1,50 @@ +package org.eclipse.cdt.codan.checkers.ui; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class CheckersUiActivator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.cdt.codan.checkers.ui"; + + // The shared instance + private static CheckersUiActivator plugin; + + /** + * The constructor + */ + public CheckersUiActivator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static CheckersUiActivator getDefault() { + return plugin; + } + +} diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Entries b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Entries new file mode 100644 index 0000000..641ef34 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Entries @@ -0,0 +1,2 @@ +/CodanProblemMarkerResolutionGenerator.java/1.2/Tue Apr 21 00:36:20 2009// +/QuickFixAssignmentInCondition.java/1.1/Sat Apr 18 02:11:07 2009// diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Repository b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Repository new file mode 100644 index 0000000..3bdd833 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Repository @@ -0,0 +1 @@ +org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Root b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Root new file mode 100644 index 0000000..04efa23 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@dev.eclipse.org:/cvsroot/tools diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CodanProblemMarkerResolutionGenerator.java b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CodanProblemMarkerResolutionGenerator.java new file mode 100644 index 0000000..1470e7f --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/CodanProblemMarkerResolutionGenerator.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2009 Andrew Gvozdev + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andrew Gvozdev - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.codan.checkers.ui.quickfix; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.ui.IMarkerResolution; +import org.eclipse.ui.IMarkerResolutionGenerator; + +public class CodanProblemMarkerResolutionGenerator implements IMarkerResolutionGenerator { + public IMarkerResolution[] getResolutions(IMarker marker) { + final Pattern patternBuildDependsAdd = Pattern.compile("Possible assignment in condition.*"); + String description = marker.getAttribute(IMarker.MESSAGE, "no message"); + Matcher matcherBuildDependsAdd = patternBuildDependsAdd.matcher(description); + if (matcherBuildDependsAdd.matches()) { + return new IMarkerResolution[] { new QuickFixAssignmentInCondition() }; + } + return new IMarkerResolution[0]; + } +} \ No newline at end of file diff --git a/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/QuickFixAssignmentInCondition.java b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/QuickFixAssignmentInCondition.java new file mode 100644 index 0000000..5c28d53 --- /dev/null +++ b/org.eclipse.cdt.codan.checkers.ui/src/org/eclipse/cdt/codan/checkers/ui/quickfix/QuickFixAssignmentInCondition.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2009 Andrew Gvozdev + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andrew Gvozdev - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.codan.checkers.ui.quickfix; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.FindReplaceDocumentAdapter; +import org.eclipse.jface.text.IDocument; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IMarkerResolution; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.ide.IDE; +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.texteditor.ITextEditor; + +public class QuickFixAssignmentInCondition implements IMarkerResolution { + public String getLabel() { + return "Change to '=='"; + } + + public void run(IMarker marker) { + // See if there is an open editor on the file containing the marker + IWorkbenchWindow w = PlatformUI.getWorkbench() + .getActiveWorkbenchWindow(); + if (w == null) { + return; + } + IWorkbenchPage page = w.getActivePage(); + if (page == null) { + return; + } + IFileEditorInput input = new FileEditorInput((IFile) marker + .getResource()); + IEditorPart editorPart = page.findEditor(input); + if (editorPart == null) { + // open an editor + try { + editorPart = IDE.openEditor(page, (IFile) marker.getResource(), + true); + } catch (PartInitException e) { + e.printStackTrace(); + } + } + if (editorPart == null) { + return; + } + if (editorPart instanceof ITextEditor) { + ITextEditor editor = (ITextEditor) editorPart; + IDocument doc = editor.getDocumentProvider().getDocument( + editor.getEditorInput()); + int line = marker.getAttribute(IMarker.LINE_NUMBER, -1) - 1; + FindReplaceDocumentAdapter dad = new FindReplaceDocumentAdapter(doc); + try { + dad.find(doc.getLineOffset(line), "=", /* forwardSearch */ + true, /* caseSensitive */false, + /* wholeWord */false, /* regExSearch */false); + dad.replace("==", /* regExReplace */false); + marker.delete(); + } catch (BadLocationException e) { + // TODO: log the error + e.printStackTrace(); + } catch (CoreException e) { + // TODO: log the error + e.printStackTrace(); + } + } + } +} -- cgit