From 5fc15c8b7c47ab9dca8c4ed03e4eb25329f1d881 Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Tue, 18 Feb 2025 15:41:32 +0100 Subject: [PATCH 1/7] Publish to GitHub registry (#245) * ci: push to github registry * Update package version to 5.1.0 --- .github/workflows/push-release.yml | 37 ++++++++++++++++++++++++++++++ export-csv/pom.xml | 2 +- export-xml/pom.xml | 2 +- fortran77-language/pom.xml | 2 +- fortran77-metrics/pom.xml | 2 +- fortran77-rules/pom.xml | 2 +- fortran90-language/pom.xml | 2 +- fortran90-metrics/pom.xml | 2 +- fortran90-rules/pom.xml | 2 +- icode-app/pom.xml | 2 +- icode-core/pom.xml | 2 +- icode-ide/pom.xml | 2 +- icode-library/pom.xml | 2 +- pom.xml | 2 +- 14 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/push-release.yml diff --git a/.github/workflows/push-release.yml b/.github/workflows/push-release.yml new file mode 100644 index 00000000..e1f265e8 --- /dev/null +++ b/.github/workflows/push-release.yml @@ -0,0 +1,37 @@ +# Description +# =========== +# This workflow is triggered each time a release is created +# It push I-Code to github repository +--- + name: Push release + + on: + release: + types: [created] + + jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Setup java + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '11' + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Publish on github repository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: mvn --batch-mode deploy + + \ No newline at end of file diff --git a/export-csv/pom.xml b/export-csv/pom.xml index a876f7e4..2ae3952e 100644 --- a/export-csv/pom.xml +++ b/export-csv/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 export-csv diff --git a/export-xml/pom.xml b/export-xml/pom.xml index e3d7648a..8163ae1b 100644 --- a/export-xml/pom.xml +++ b/export-xml/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 export-xml diff --git a/fortran77-language/pom.xml b/fortran77-language/pom.xml index abe22fa2..a6b999c4 100644 --- a/fortran77-language/pom.xml +++ b/fortran77-language/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 fortran77-language diff --git a/fortran77-metrics/pom.xml b/fortran77-metrics/pom.xml index 993ee4fc..99861d86 100644 --- a/fortran77-metrics/pom.xml +++ b/fortran77-metrics/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 fortran77-metrics diff --git a/fortran77-rules/pom.xml b/fortran77-rules/pom.xml index f756c8da..d5bd7f13 100644 --- a/fortran77-rules/pom.xml +++ b/fortran77-rules/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 fortran77-rules diff --git a/fortran90-language/pom.xml b/fortran90-language/pom.xml index c3db8781..9cfa2b14 100644 --- a/fortran90-language/pom.xml +++ b/fortran90-language/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 fortran90-language diff --git a/fortran90-metrics/pom.xml b/fortran90-metrics/pom.xml index b7b78f71..9f4692e9 100644 --- a/fortran90-metrics/pom.xml +++ b/fortran90-metrics/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 fortran90-metrics diff --git a/fortran90-rules/pom.xml b/fortran90-rules/pom.xml index 3c09aba4..68f99afd 100644 --- a/fortran90-rules/pom.xml +++ b/fortran90-rules/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 fortran90-rules diff --git a/icode-app/pom.xml b/icode-app/pom.xml index 0cd0359a..60d3cc75 100644 --- a/icode-app/pom.xml +++ b/icode-app/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 icode-app diff --git a/icode-core/pom.xml b/icode-core/pom.xml index 0481f3b0..4f3ad021 100644 --- a/icode-core/pom.xml +++ b/icode-core/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 icode-core diff --git a/icode-ide/pom.xml b/icode-ide/pom.xml index 78d79661..b500f3f9 100644 --- a/icode-ide/pom.xml +++ b/icode-ide/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 icode-ide diff --git a/icode-library/pom.xml b/icode-library/pom.xml index 8710c27b..ce1bb7d9 100644 --- a/icode-library/pom.xml +++ b/icode-library/pom.xml @@ -7,7 +7,7 @@ fr.cnes.icode parent - dev + 5.1.0 icode-library diff --git a/pom.xml b/pom.xml index d8fa66fa..5fc20650 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 fr.cnes.icode parent - dev + 5.1.0 pom From b8483c6864690b8949d76326e9ed78f9d9e0d930 Mon Sep 17 00:00:00 2001 From: didierC Date: Thu, 28 Nov 2024 09:14:31 +0100 Subject: [PATCH 2/7] Optimize maven versions --- export-csv/pom.xml | 5 ++--- export-xml/pom.xml | 5 ++--- fortran77-language/pom.xml | 7 +++---- fortran77-metrics/pom.xml | 5 ++--- fortran77-rules/pom.xml | 5 ++--- fortran90-language/pom.xml | 7 +++---- fortran90-metrics/pom.xml | 5 ++--- fortran90-rules/pom.xml | 5 ++--- icode-app/pom.xml | 9 ++++----- icode-core/pom.xml | 3 +-- icode-ide/fr.cnes.analysis.tools.ui/pom.xml | 2 +- icode-ide/fr.cnes.icode.feature.ui/pom.xml | 2 +- icode-ide/fr.cnes.icode.repository/pom.xml | 3 +-- icode-ide/fr.cnes.icode.tp/pom.xml | 3 +-- icode-ide/icode-library-feature/pom.xml | 2 +- icode-ide/icode-library-plugin/pom.xml | 4 +++- icode-ide/pom.xml | 9 ++------- icode-library/pom.xml | 17 ++++++++--------- pom.xml | 6 ++++-- 19 files changed, 45 insertions(+), 59 deletions(-) diff --git a/export-csv/pom.xml b/export-csv/pom.xml index 2ae3952e..18c4c977 100644 --- a/export-csv/pom.xml +++ b/export-csv/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} export-csv - ${icode.version} jar Export CSV @@ -20,7 +19,7 @@ fr.cnes.icode icode-core - ${icode.version} + ${project.version} compile diff --git a/export-xml/pom.xml b/export-xml/pom.xml index 8163ae1b..c11acb72 100644 --- a/export-xml/pom.xml +++ b/export-xml/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} export-xml - ${icode.version} jar Export XML @@ -20,7 +19,7 @@ fr.cnes.icode icode-core - ${icode.version} + ${project.version} compile diff --git a/fortran77-language/pom.xml b/fortran77-language/pom.xml index a6b999c4..4b87c0c7 100644 --- a/fortran77-language/pom.xml +++ b/fortran77-language/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} fortran77-language - ${icode.version} jar Fortran 77 language @@ -20,9 +19,9 @@ fr.cnes.icode icode-core - ${icode.version} + ${project.version} compile - + diff --git a/fortran77-metrics/pom.xml b/fortran77-metrics/pom.xml index 99861d86..70e9706c 100644 --- a/fortran77-metrics/pom.xml +++ b/fortran77-metrics/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} fortran77-metrics - ${icode.version} jar Fortran 77 metrics @@ -20,7 +19,7 @@ fr.cnes.icode fortran77-language - ${icode.version} + ${project.version} compile diff --git a/fortran77-rules/pom.xml b/fortran77-rules/pom.xml index d5bd7f13..532aa576 100644 --- a/fortran77-rules/pom.xml +++ b/fortran77-rules/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} fortran77-rules - ${icode.version} jar Fortran 77 rules @@ -20,7 +19,7 @@ fr.cnes.icode fortran77-language - ${icode.version} + ${project.version} compile diff --git a/fortran90-language/pom.xml b/fortran90-language/pom.xml index 9cfa2b14..6690ccc6 100644 --- a/fortran90-language/pom.xml +++ b/fortran90-language/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} fortran90-language - ${icode.version} jar Fortran 90 language @@ -20,9 +19,9 @@ fr.cnes.icode icode-core - ${icode.version} + ${project.version} compile - + diff --git a/fortran90-metrics/pom.xml b/fortran90-metrics/pom.xml index 9f4692e9..ed028282 100644 --- a/fortran90-metrics/pom.xml +++ b/fortran90-metrics/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} fortran90-metrics - ${icode.version} jar Fortran 90 metrics @@ -20,7 +19,7 @@ fr.cnes.icode fortran90-language - ${icode.version} + ${project.version} compile diff --git a/fortran90-rules/pom.xml b/fortran90-rules/pom.xml index 68f99afd..4d9be9df 100644 --- a/fortran90-rules/pom.xml +++ b/fortran90-rules/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} fortran90-rules - ${icode.version} jar Fortran 90 rules @@ -20,7 +19,7 @@ fr.cnes.icode fortran90-language - ${icode.version} + ${project.version} compile diff --git a/icode-app/pom.xml b/icode-app/pom.xml index 60d3cc75..371fe076 100644 --- a/icode-app/pom.xml +++ b/icode-app/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} icode-app - ${icode.version} jar i-Code CNES Application @@ -20,7 +19,7 @@ fr.cnes.icode icode-core - ${icode.version} + ${project.version} compile @@ -41,13 +40,13 @@ fr.cnes.icode fortran77-language - ${icode.version} + ${project.version} test fr.cnes.icode fortran90-language - ${icode.version} + ${project.version} test diff --git a/icode-core/pom.xml b/icode-core/pom.xml index 4f3ad021..64a08ac6 100644 --- a/icode-core/pom.xml +++ b/icode-core/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} icode-core - ${icode.version} jar i-Code Core diff --git a/icode-ide/fr.cnes.analysis.tools.ui/pom.xml b/icode-ide/fr.cnes.analysis.tools.ui/pom.xml index 2df1af75..e5e77d1c 100644 --- a/icode-ide/fr.cnes.analysis.tools.ui/pom.xml +++ b/icode-ide/fr.cnes.analysis.tools.ui/pom.xml @@ -6,7 +6,7 @@ fr.cnes.icode icode-ide - 5.1.0 + ${revision} fr.cnes.analysis.tools.ui diff --git a/icode-ide/fr.cnes.icode.feature.ui/pom.xml b/icode-ide/fr.cnes.icode.feature.ui/pom.xml index 331392c1..496c9f3b 100644 --- a/icode-ide/fr.cnes.icode.feature.ui/pom.xml +++ b/icode-ide/fr.cnes.icode.feature.ui/pom.xml @@ -6,7 +6,7 @@ fr.cnes.icode icode-ide - 5.1.0 + ${revision} fr.cnes.icode.feature.ui diff --git a/icode-ide/fr.cnes.icode.repository/pom.xml b/icode-ide/fr.cnes.icode.repository/pom.xml index f4f8b5a9..76d37f17 100644 --- a/icode-ide/fr.cnes.icode.repository/pom.xml +++ b/icode-ide/fr.cnes.icode.repository/pom.xml @@ -6,11 +6,10 @@ fr.cnes.icode icode-ide - 5.1.0 + ${revision} fr.cnes.icode.repository - 5.1.0 eclipse-repository diff --git a/icode-ide/fr.cnes.icode.tp/pom.xml b/icode-ide/fr.cnes.icode.tp/pom.xml index 07757204..e87182f4 100644 --- a/icode-ide/fr.cnes.icode.tp/pom.xml +++ b/icode-ide/fr.cnes.icode.tp/pom.xml @@ -5,11 +5,10 @@ fr.cnes.icode icode-ide - 5.1.0 + ${revision} fr.cnes.icode.tp eclipse-target-definition - 4.7-SNAPSHOT diff --git a/icode-ide/icode-library-feature/pom.xml b/icode-ide/icode-library-feature/pom.xml index 5175ffbc..268ce7b7 100644 --- a/icode-ide/icode-library-feature/pom.xml +++ b/icode-ide/icode-library-feature/pom.xml @@ -6,7 +6,7 @@ fr.cnes.icode icode-ide - 5.1.0 + ${revision} icode.library.feature diff --git a/icode-ide/icode-library-plugin/pom.xml b/icode-ide/icode-library-plugin/pom.xml index 88f90776..bb1cfb03 100644 --- a/icode-ide/icode-library-plugin/pom.xml +++ b/icode-ide/icode-library-plugin/pom.xml @@ -6,7 +6,7 @@ fr.cnes.icode icode-ide - 5.1.0 + ${revision} icode.library.plugin @@ -21,6 +21,7 @@ maven-resources-plugin + 3.3.1 copy-icode-library @@ -46,6 +47,7 @@ com.coderplus.maven.plugins copy-rename-maven-plugin + 1.0.1 rename-file diff --git a/icode-ide/pom.xml b/icode-ide/pom.xml index b500f3f9..4921e12d 100644 --- a/icode-ide/pom.xml +++ b/icode-ide/pom.xml @@ -7,21 +7,16 @@ fr.cnes.icode parent - 5.1.0 + ${revision} icode-ide - 5.1.0 pom i-Code CNES IDE 1.4.0 - 4.7-SNAPSHOT - 1.8 - UTF-8 - UTF-8 @@ -55,7 +50,7 @@ fr.cnes.icode fr.cnes.icode.tp - ${target-platform-version} + ${project.version} diff --git a/icode-library/pom.xml b/icode-library/pom.xml index ce1bb7d9..6d392559 100644 --- a/icode-library/pom.xml +++ b/icode-library/pom.xml @@ -7,11 +7,10 @@ fr.cnes.icode parent - 5.1.0 + ${revision} icode-library - ${icode.version} jar i-Code Library @@ -20,37 +19,37 @@ fr.cnes.icode icode-core - ${icode.version} + ${project.version} fr.cnes.icode fortran77-language - ${icode.version} + ${project.version} fr.cnes.icode fortran77-metrics - ${icode.version} + ${project.version} fr.cnes.icode fortran77-rules - ${icode.version} + ${project.version} fr.cnes.icode fortran90-language - ${icode.version} + ${project.version} fr.cnes.icode fortran90-metrics - ${icode.version} + ${project.version} fr.cnes.icode fortran90-rules - ${icode.version} + ${project.version} diff --git a/pom.xml b/pom.xml index 5fc20650..297dbce0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,9 +3,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 + fr.cnes.icode parent - 5.1.0 + ${revision} pom @@ -66,7 +67,8 @@ - 5.1.0 + + 5.2.0-SNAPSHOT UTF-8 UTF-8 1.8 From 2705040a947e56c6b1955d1842623a19911f68be Mon Sep 17 00:00:00 2001 From: didierC Date: Thu, 13 Feb 2025 21:23:44 +0100 Subject: [PATCH 3/7] delete Eclipse IDE module --- icode-ide/.gitignore | 25 - .../META-INF/MANIFEST.MF | 34 - .../build.properties | 6 - .../icons/disabled.png | Bin 329 -> 0 bytes .../icons/enabled.png | Bin 495 -> 0 bytes .../icons/export.GIF | Bin 116 -> 0 bytes .../icons/fortran.png | Bin 658 -> 0 bytes .../icons/launchButtonIcon.png | Bin 835 -> 0 bytes .../icons/logo-i-code-bleue-16x16.png | Bin 645 -> 0 bytes .../icons/logo-i-code-bleue-8x8.png | Bin 319 -> 0 bytes .../icons/logo-i-code-jaune-16x16.png | Bin 610 -> 0 bytes .../icons/logo-i-code-jaune-32x32.png | Bin 956 -> 0 bytes .../icons/logo-i-code-jaune-45x45.png | Bin 1334 -> 0 bytes .../icons/logo-i-code-jaune-8x8.png | Bin 322 -> 0 bytes .../icons/logo-i-code-orange-16x16.png | Bin 578 -> 0 bytes .../icons/logo-i-code-orange-32x32.png | Bin 933 -> 0 bytes .../icons/logo-i-code-orange-45x45.png | Bin 1354 -> 0 bytes .../icons/logo-i-code-orange-8x8.png | Bin 290 -> 0 bytes .../icons/logo-i-code-rouge-16x16.png | Bin 627 -> 0 bytes .../icons/logo-i-code-rouge-32x32.png | Bin 1284 -> 0 bytes .../icons/logo-i-code-rouge-45x45.png | Bin 3764 -> 0 bytes .../icons/logo-i-code-rouge-8x8.png | Bin 298 -> 0 bytes .../icons/logo-i-code-rouge-texte-250x168.png | Bin 13513 -> 0 bytes .../icons/logo-i-code-rouge-texte.png | Bin 47038 -> 0 bytes .../icons/next_icon.png | Bin 676 -> 0 bytes .../icons/previous_icon.png | Bin 655 -> 0 bytes .../icons/sample.gif | Bin 983 -> 0 bytes .../fr.cnes.analysis.tools.ui/icons/shell.png | Bin 579 -> 0 bytes .../fr.cnes.analysis.tools.ui/plugin.xml | 638 ------------------ icode-ide/fr.cnes.analysis.tools.ui/pom.xml | 15 - .../resource/README.txt | 14 - .../resource/fortran90.f90 | 173 ----- .../resource/noExtension | 0 .../resource/programme_test.f | 332 --------- .../resource/xsd/analysisResult.xsd | 81 --- .../fr.cnes.analysis.tools.ui/rnc_rulesV3.xml | 241 ------- .../schema/configuration.exsd | 159 ----- .../fr/cnes/analysis/tools/ui/Activator.java | 72 -- .../CheckConfigurationContainer.java | 189 ------ .../ConfigurationContainer.java | 111 --- .../configurations/ConfigurationService.java | 217 ------ .../tools/ui/configurations/package-info.java | 12 - .../ui/decorators/InformationDecorator.java | 90 --- .../decorators/ViolationErrorDecorator.java | 80 --- .../decorators/ViolationWarningDecorator.java | 87 --- .../tools/ui/decorators/package-info.java | 11 - .../tools/ui/editors/EditorFortran.java | 21 - .../tools/ui/editors/package-info.java | 11 - .../ui/exception/EmptyNodeException.java | 34 - .../ui/exception/EmptyProviderException.java | 32 - .../ui/exception/EmptyResourceException.java | 35 - .../ui/exception/EmptySelectionException.java | 34 - .../InvalidResourceTypeException.java | 27 - .../NonAccessibleResourceException.java | 38 -- .../exception/UnknownInstanceException.java | 34 - .../UnknownResourceTypeException.java | 28 - .../tools/ui/exception/package-info.java | 11 - .../tools/ui/handler/AnalysisHandler.java | 529 --------------- .../tools/ui/handler/AnalysisJob.java | 142 ---- .../tools/ui/handler/ClearHandler.java | 141 ---- .../ui/handler/ShowRuleTreeViewerHandler.java | 112 --- .../tools/ui/handler/package-info.java | 15 - .../tools/ui/images/ImageFactory.java | 108 --- .../tools/ui/images/package-info.java | 6 - .../tools/ui/markers/InformationMarker.java | 191 ------ .../ui/markers/ViolationErrorMarker.java | 191 ------ .../ui/markers/ViolationWarningMarker.java | 191 ------ .../tools/ui/markers/package-info.java | 12 - .../CheckerPreferencesContainer.java | 397 ----------- .../ConfigurationPreferencePage.java | 287 -------- .../LanguagePreferencesContainer.java | 212 ------ .../preferences/UserPreferencesService.java | 528 --------------- .../checkerstables/CheckersComposite.java | 591 ---------------- .../checkerstables/CheckersFilter.java | 70 -- .../checkerstables/EnabledEditingSupport.java | 117 ---- .../MaxValueEditingSupport.java | 112 --- .../checkerstables/MetricsComposite.java | 259 ------- .../MinValueEditingSupport.java | 112 --- .../SeverityEditingSupport.java | 140 ---- .../checkerstables/package-info.java | 14 - .../tools/ui/preferences/package-info.java | 14 - .../ui/utils/AnalysisHandlerUIUtils.java | 360 ---------- .../ui/view/AbstractAnalysisTreeViewer.java | 137 ---- .../tools/ui/view/AbstractLabelProvider.java | 61 -- .../analysis/tools/ui/view/MetricsView.java | 428 ------------ .../tools/ui/view/ViolationsView.java | 507 -------------- .../ui/view/metrics/FileMetricDescriptor.java | 322 --------- .../metrics/FunctionMetricDescriptor.java | 357 ---------- .../ui/view/metrics/IMetricDescriptor.java | 73 -- .../view/metrics/MetricContentProvider.java | 217 ------ .../ui/view/metrics/MetricConverter.java | 219 ------ .../ui/view/metrics/MetricDescriptor.java | 293 -------- .../ui/view/metrics/MetricLabelProvider.java | 185 ----- .../treeviewer/IUpdatableAnalysisFilter.java | 12 - .../treeviewer/file/FileTreeViewer.java | 286 -------- .../file/FileTreeViewerContentProvider.java | 223 ------ .../file/FileTreeViewerLabelProvider.java | 150 ---- .../ViolationToFileTreeViewerConverter.java | 243 ------- .../file/descriptor/FileRuleDescriptor.java | 193 ------ .../file/descriptor/FunctionDescriptor.java | 236 ------- .../file/descriptor/IFileRuleDescriptor.java | 34 - .../file/descriptor/RuleDescriptor.java | 305 --------- .../file/descriptor/ViolationDescriptor.java | 237 ------- .../file/descriptor/package-info.java | 14 - .../file/filter/FileTreeViewerFilter.java | 198 ------ .../treeviewer/file/filter/package-info.java | 11 - .../CheckResultToRuleTreeViewerConverter.java | 180 ----- .../treeviewer/rule/RuleTreeViewer.java | 271 -------- .../rule/RuleTreeViewerContentProvider.java | 222 ------ .../rule/RuleTreeViewerLabelProvider.java | 158 ----- .../rule/descriptor/FileRuleDescriptor.java | 191 ------ .../descriptor/FunctionRuleDescriptor.java | 240 ------- .../rule/descriptor/IRuleDescriptor.java | 34 - .../rule/descriptor/RuleDescriptor.java | 218 ------ .../rule/descriptor/package-info.java | 11 - .../rule/filter/RuleViewerFilter.java | 161 ----- .../treeviewer/rule/filter/package-info.java | 9 - .../ui/wizard/export/CheckerExportWizard.java | 135 ---- .../export/CheckerExportWizardPage.java | 254 ------- .../CheckerFileCreationExportWizardPage.java | 209 ------ .../tools/ui/wizard/export/package-info.java | 17 - .../fr.cnes.icode.feature.ui/build.properties | 1 - .../fr.cnes.icode.feature.ui/feature.xml | 215 ------ icode-ide/fr.cnes.icode.feature.ui/pom.xml | 15 - .../fr.cnes.icode.repository/category.xml | 8 - .../icode-ide.product | 91 --- icode-ide/fr.cnes.icode.repository/p2.inf | 1 - icode-ide/fr.cnes.icode.repository/pom.xml | 48 -- .../fr.cnes.icode.tp/fr.cnes.icode.tp.target | 21 - icode-ide/fr.cnes.icode.tp/pom.xml | 14 - .../icode-library-feature/build.properties | 1 - icode-ide/icode-library-feature/feature.xml | 20 - icode-ide/icode-library-feature/pom.xml | 15 - .../icode-library-plugin/META-INF/MANIFEST.MF | 75 -- .../icode-library-plugin/build.properties | 2 - icode-ide/icode-library-plugin/plugin.xml | 435 ------------ icode-ide/icode-library-plugin/pom.xml | 67 -- .../src/main/resources/schema/checks.exsd | 133 ---- .../schema/fr.cnes.analysis.tools.export.exsd | 126 ---- .../src/main/resources/schema/languages.exsd | 121 ---- icode-ide/pom.xml | 99 --- pom.xml | 1 - 142 files changed, 16503 deletions(-) delete mode 100644 icode-ide/.gitignore delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/META-INF/MANIFEST.MF delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/build.properties delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/disabled.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/enabled.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/export.GIF delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/fortran.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/launchButtonIcon.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-bleue-16x16.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-bleue-8x8.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-16x16.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-32x32.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-45x45.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-8x8.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-16x16.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-32x32.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-45x45.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-8x8.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-16x16.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-32x32.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-45x45.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-8x8.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-texte-250x168.png delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-texte.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/next_icon.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/previous_icon.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/sample.gif delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/icons/shell.png delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/plugin.xml delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/pom.xml delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/resource/README.txt delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/resource/fortran90.f90 delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/resource/noExtension delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/resource/programme_test.f delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/resource/xsd/analysisResult.xsd delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/rnc_rulesV3.xml delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/schema/configuration.exsd delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/Activator.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/CheckConfigurationContainer.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationContainer.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationService.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/package-info.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/InformationDecorator.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationErrorDecorator.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationWarningDecorator.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/EditorFortran.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyNodeException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyProviderException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyResourceException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptySelectionException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/InvalidResourceTypeException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/NonAccessibleResourceException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownInstanceException.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownResourceTypeException.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/package-info.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisHandler.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisJob.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ClearHandler.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ShowRuleTreeViewerHandler.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/package-info.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/ImageFactory.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/package-info.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/InformationMarker.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationErrorMarker.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationWarningMarker.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/package-info.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/CheckerPreferencesContainer.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/ConfigurationPreferencePage.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/LanguagePreferencesContainer.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/UserPreferencesService.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersComposite.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersFilter.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/EnabledEditingSupport.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MaxValueEditingSupport.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MetricsComposite.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MinValueEditingSupport.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/SeverityEditingSupport.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/package-info.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/utils/AnalysisHandlerUIUtils.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractAnalysisTreeViewer.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractLabelProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/MetricsView.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/ViolationsView.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FileMetricDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FunctionMetricDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/IMetricDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricContentProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricConverter.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricLabelProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/IUpdatableAnalysisFilter.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewer.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerContentProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerLabelProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/ViolationToFileTreeViewerConverter.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FileRuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FunctionDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/IFileRuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/RuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/ViolationDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/FileTreeViewerFilter.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/CheckResultToRuleTreeViewerConverter.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewer.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerContentProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerLabelProvider.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FileRuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FunctionRuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/IRuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/RuleDescriptor.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/RuleViewerFilter.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/package-info.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizard.java delete mode 100755 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizardPage.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerFileCreationExportWizardPage.java delete mode 100644 icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/package-info.java delete mode 100644 icode-ide/fr.cnes.icode.feature.ui/build.properties delete mode 100644 icode-ide/fr.cnes.icode.feature.ui/feature.xml delete mode 100644 icode-ide/fr.cnes.icode.feature.ui/pom.xml delete mode 100755 icode-ide/fr.cnes.icode.repository/category.xml delete mode 100644 icode-ide/fr.cnes.icode.repository/icode-ide.product delete mode 100644 icode-ide/fr.cnes.icode.repository/p2.inf delete mode 100644 icode-ide/fr.cnes.icode.repository/pom.xml delete mode 100644 icode-ide/fr.cnes.icode.tp/fr.cnes.icode.tp.target delete mode 100644 icode-ide/fr.cnes.icode.tp/pom.xml delete mode 100644 icode-ide/icode-library-feature/build.properties delete mode 100644 icode-ide/icode-library-feature/feature.xml delete mode 100644 icode-ide/icode-library-feature/pom.xml delete mode 100644 icode-ide/icode-library-plugin/META-INF/MANIFEST.MF delete mode 100644 icode-ide/icode-library-plugin/build.properties delete mode 100644 icode-ide/icode-library-plugin/plugin.xml delete mode 100644 icode-ide/icode-library-plugin/pom.xml delete mode 100644 icode-ide/icode-library-plugin/src/main/resources/schema/checks.exsd delete mode 100644 icode-ide/icode-library-plugin/src/main/resources/schema/fr.cnes.analysis.tools.export.exsd delete mode 100644 icode-ide/icode-library-plugin/src/main/resources/schema/languages.exsd delete mode 100644 icode-ide/pom.xml diff --git a/icode-ide/.gitignore b/icode-ide/.gitignore deleted file mode 100644 index 890140dc..00000000 --- a/icode-ide/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# this gitignore is applied to all projects - -# Ignore build directories (eclipse bin and maven target) -bin/ -target/ -*/target/** -*-pom.xml -*/*-pom.xml - -# Ignore code generation directories -*/src-gen/fr/ - -#Ignore checkstyle configuration -*.checkstyle - -# Ignore IDE metadata -.idea -.iml -*.iml -*/*.iml -.project -*/.project -.classpath -*/.classpath -.settings \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/META-INF/MANIFEST.MF b/icode-ide/fr.cnes.analysis.tools.ui/META-INF/MANIFEST.MF deleted file mode 100755 index bc49e08e..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,34 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: i-Code CNES UI -Bundle-SymbolicName: fr.cnes.analysis.tools.ui;singleton:=true -Bundle-Version: 5.1.0 -Bundle-Activator: fr.cnes.analysis.tools.ui.Activator -Require-Bundle: org.eclipse.core.runtime;bundle-version="3.11.0", - org.eclipse.ui;bundle-version="3.107.0", - org.eclipse.core.expressions;bundle-version="3.5.0", - org.eclipse.core.resources;bundle-version="3.10.0", - org.eclipse.ui.views;bundle-version="3.8.0", - org.eclipse.e4.ui.workbench.swt;bundle-version="0.13.0", - org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100", - org.eclipse.ui.ide;bundle-version="3.11.0", - org.eclipse.jface.text;bundle-version="3.10.0", - org.eclipse.ui.editors;bundle-version="3.9.0", - org.eclipse.e4.core.di;bundle-version="1.6.0", - org.eclipse.jface, - icode.library.plugin;bundle-version="5.1.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Export-Package: fr.cnes.analysis.tools.ui.exception, - fr.cnes.analysis.tools.ui.utils; - uses:="org.eclipse.core.runtime, - org.eclipse.core.resources, - fr.cnes.analysis.tools.ui.preferencepage, - org.eclipse.jface.viewers", - fr.cnes.analysis.tools.ui.view; - uses:="org.eclipse.swt.widgets, - org.eclipse.core.resources, - org.eclipse.jface.viewers, - org.eclipse.ui.part" -Bundle-Vendor: CNES -Bundle-ClassPath: . diff --git a/icode-ide/fr.cnes.analysis.tools.ui/build.properties b/icode-ide/fr.cnes.analysis.tools.ui/build.properties deleted file mode 100755 index 44c3aca0..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source..=src/ -output..=bin/ -bin.includes=META-INF/,\ - .,\ - plugin.xml,\ - icons/ diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/disabled.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/disabled.png deleted file mode 100644 index 308a8cfbb3bdb086385cbfe4124af07aabda138d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`E}kxqAr*1S2@*aDY8MRa8-Ca` z@&p+(&puqw%&N{<$iisDsKFo9&FEm(Y$D907$Dv!WnjZR@llIOcgqqUuW!vP3=BWF zn7f{FJiiWTUTleLM2T~LL1j^9dPWI@b5UwyNotBhd1gt5f@gAmURtSMa(=FYu7XQy zQD#|UNoHB9LV12swnBcIf-g{MQD$O}LMBjQv4RHN7zOwI{Pdhu1<$->JChr4U z6b`b;Co?%UuQ-(fN~b84=B1<-DL57+CTFB7Kt&bGjPwi?G%`v`3as??%gf9462bC% o`9FVdQ&MBb@01kj?rvLx| diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/enabled.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/enabled.png deleted file mode 100644 index 8aead091a0817bd41d9af9476b34fdc2822cc4a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`uRL8GLn`9dPTt7d?7-tXxuj## zv}vbb25n$)<#ODXYZBoe?yq3zBf&G6F9z6 zEFe_$=RW(DF{~|#J2*8?Ps+KyY+2?PE(iUtrd{i1C(g);ymn{LP9_nC38|7h*LmmO zzEt$7ebwHB7JXBeX^2tn2%_~l2fYK=nrFki-MGB4uiOCtM3Q$pn zG9x_$1&xf7k^(Dz{qpj1y+p9QUVc%!eh$QhVtpS^XIH;qS6!f5&BxbEq=8m2c)I$z JtaD0e0syAHz&ii{ diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/export.GIF b/icode-ide/fr.cnes.analysis.tools.ui/icons/export.GIF deleted file mode 100755 index f7a8897c46731e70876de961132274919fc7e435..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 116 zcmZ?wbhEHb6krfw_{0DN4fgi)?c?X$*YCHVzkmPz{r~^}2Z}2GWMO1rU}Mk$DFLZv zV7AQIb?4uOMoy*0VN(r@1-(Q?8XcCNeNs0|0&kC(Zx> diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/fortran.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/fortran.png deleted file mode 100755 index 507baee635d03768edcf4298d3114cb8b13d12ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 658 zcmV;D0&V??P)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBU!5J^NqR5(v#V88=1qr3&P6MT&Dslh9k7VZ+173X*4|NnX>vJ6QL zcU@VW8vMVuAjOts1JdGsG%{kmKNchh{4Yt5SWdD5Iq?CdWtkEGbK?E}7o~@NZLQDM zBHEDB>AoW*XDyXk|7!}9{+DG%|1Zgi{9jj?_`k6wY74r$YIFY= z0iB*5=lefB$`gn^{%6Jd{Lf1Y`chLCtBKPU)j2VWMQIWDvtqsPCx^MdPKj`P4l@8` zNNxhqz-Z4!I1NY(cVCba?shdf+$AS9(*0UWgvXlHNRRDlkshB?Biug%4f~N1<@ql) z!pj`Pkklwo-OL!zKWUNf7t

qJbLr0P&^NaF6P=2#+)A5pKOe3+84mrb z8p?)ZNNTv-%0ghG0or&XHOeb5GurDv(6CQHmrP2Fa6b=p#VnwK9jOr>w}I@9X=yI} za0Ak#y&bZFfmD#>57gvw1L%UfjA*Y;pkbLQQLYB*5$<6?@p2%4CD051bK`wM>N@M| z8JHOA>+6|-oC~>ezV9+3J^M1FJxt@{?K!XoR9dKy9MA>vK*Ns|B>MjcdOM0CGs+_r s=**tPC}$;ti3Fj53Fzgh)Cjj$0L-M`ItTqEdjJ3c07*qoM6N<$f@}^ZN&o-= diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/launchButtonIcon.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/launchButtonIcon.png deleted file mode 100755 index e45e63d8c6d52d495645cbde93bb3613333105fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 835 zcmV-J1HAl+P)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBU!!AV3xR5(wa(rZYQQ5XmCH}V21o4d5UUvh4q(pbdRhBy6P>c&oIlW66xSuoZd}BRlCep_a36)b2_r5tPiss{`M ztIgoQSc0(F1a?y2(BT+G;Eo_8p@#?y4RCpEgj1>Ezu=Y9AF41yP-+5CHvGdTL6vk` zsoZ)d9i{z5kUtGx?l`z|Ex0-VVjM@-b2;N+)8SpDLv*tV7xR~KD73e7%MRJ;LxeA% zfTLIe=1nD-5*3&UpWv9-3uba3*itn_@5e0e+d<8S4mj)Rq`GbC?M3>%o%r zfEll%5gMWq<}EdNsRQsY(BN{l9%n1&;gCMsO2zl^w|zHm_81Ws%z&Mu220ux*6jhX z$Y*$DX%JLCim)2`y&g^dvc03pqQuR%JN^J}E{zo#z)2m1qihJAbPYrgM-cjK62ULc zaDJfEA5I$y+jT6~3wU`tBBbYxlQE2=StIZ-(IWhn0cWb0z|Q;9L=lbmo}l$2rve@E zE&mGFJS_sNCUL3Z8w3@`pZ2-B3@Un?5!g;=6iktjH{T&?HzBBD1ui9q37fpB&^>pv zxzMg~IyJZyh^Ys-Wu|&cKIU;CX#EmHW|Vq~R~EeP8I!5B4y*k_e*iVijEl@n*kk|z N002ovPDHLkV1i8@boT%N diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-bleue-16x16.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-bleue-16x16.png deleted file mode 100644 index 9a43ee3417b0499990299cd8c56ba22e736f7177..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 645 zcmV;00($+4P)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jK|| z3NtxvB<~pj00IR`L_t(I%Y9QpXcIvceTj*rM(v1J$RRkrSVc@nO1(&Aa_B{&!GISb zb}!x+(L=F94uU8`$gvl9*9Nf)&7l|ZvZ6PkW+_yt9Qa&C$v~2g0}lrN z=goU>{s&3)qup*(Yt0}CND_u&u+!-hz-#+O#)ytE9kl|Ez9D8$^vuEh!e{ZOBc#? zUAHI19)chUI5ktIX`0kpQ%cFSoaDrE#Oc|qv@C02oCgM}Ua$9To@tuAQGYme8)KKL fUsbJEWZ zEzL>31?uYdpA|SgTLh-4bY3zE<#60S|MrQ`F%1k?OaJm)O=5_!UHPx#32;bRa{vGf6951U69E94oEQKA00(qQO+^Rc2@44tIaNFtR^k1rHQX4V;wnR%j>DCuU3}{9=eaXGdF1d8Zhbh!es6)vsKguBFR|5X%_dMvvEN%r2>>t|7Aede z-@H1&uV3y_O3BP7#&Jyk+QjPGH&n`b+*#k3+U&nQh)OvRbI*H7DG`Pt|GuRJK@gx) zoJ`~v{+{6zxO%wgl*Pw@9=2q6%L;dB#y-)FN?U@|N+85X&Ca-K>l3Ny!K zSR?>GxVto#(6J;crHqZu-Mo4GJA`TARP{Un;8yDs0HE0@;OMclh~p;^LKvB2v~7Dk zd1j8D=h1N-uC4CfRy8WIzEY#-d9$YwMG@=ERob>qtu>{TTrB6Aj7q$C;WQn`nTqpN wklO9`*yh=`&4>3d&)mk$Wtvnq8J>Uf2c@Cz-oGi`ivR!s07*qoM6N<$g3(X~MF0Q* diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-32x32.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-32x32.png deleted file mode 100644 index 52c10260aab62035909cd86e56e959bb681df6a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 956 zcmV;t14I0YP)8;@cMvzXfS;zOCi5wVX?Nlb z05j&B(ibq76gdO5x3_28jSpyd!O5twB^En~A~!~qpix><0lJ2Vhf&>F|LgIi8w}|aufbq&hhYlE zZ0PPPk3~+WzTY-dOWb|zo^L%?v;D2qF#|Ar#>dACb~2acWY2{?8FjImFCPyvGxele z&47_Ml0=jx&z%9Lr>B+ncdriIy1wu3(0)`i3Cur$SWW8NRY_?~DF6T}^uxuX;%Gyu zklA{&j8<8rkT8Of&6O6OT-TonRmyqMivUSqCUJ~U^M05=NPp|+s2E|J7B*2tjHByJ zSGf!)f|XE&Z_RtykVqP{uQ%x%8!ym~C+yQA8S)+Ce0;!ygZkD}sw0m!z)3Lqs@?xkep!5Vqg*48F|?m53V@*d~$M9ULof&<+9>rTB4JjBC#`R>G4oA%%uW9 zQ7zw`&)gZ}ZNg+|%nc+4& z`Li1w9OU_xLT^cRe|O9L+ne{tN_1VftQPQO=CK;3;c$4@{_JdjmU6|6t0;05+(0;~ e(8@1=1Q-C*(*i)MutBx}0000c diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-45x45.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-45x45.png deleted file mode 100644 index b2c9b2f3bcc3d271414ac5769b3870323e2ab565..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1334 zcmV-61w z4tA4+j&dC5PM$B#4*lA#A-Q4VXX=0T0a|Xau1o z+a`x%A&EJN5#8NLNX-80XXlrF8D@57-;5i748!Bi`}3Xe@9%p?$&ak8tXwmNhTE9w z>FI@qg_2J({7y)x)1952hGC41j5xmnk*|z7a2x`q*%aG;AOjzK1Xwc&4k4c{hlYl% zoo#Jxi9{mUf&p=0A3}*?3JB1M6WPJyfPaO61{@d_0nK~DF)=Y=I0PuYy}e?;G~Nde zRA9KsRa0nqcy)bnh(~w`1H@Ji7Ki+Do@i^^FCNn!b z%Nrc+?d_P6n2V+~8vcb1#7Y(y7bhntX|O9jeSLkatE)3JGxPw+-=hAsXod>qw5W-I zVa+CDAHr7Ez+VUZU_XVvzrSBO1!#B|b4!KY`C|SVZNT{rCx(955E?Fie(32xKjgQ^ zO2w@5pq-Z;I~%R??54i~4WMPbW;ii?#jYQ3eW>;;Z<+16@>NT7By8<0KQB8#sh}{u z4mi|u_wO{@_uFU%1PnR*VMYCbGc!9S>}|!EeNRshZ# zFXb}XV(estb7C9<{6b^yH6^q(?!2`|6x5 zB{ANkesyjSuxS+oW=Od6%Z9GdEC%&va74BY*ML|ZyalDYhr`g-M8Io+JLay$Ai&rt^Ac= zmej}_g58FB>80$PryEmC`8{Oog?*Ikg;X^@+;FJW=o^PfBoe-H{iyiGjq4w%e&w7t ze1Roga|BQxO&rJgZx0-^DMi@s_;lmMsTZ1R3XY?S>6l6ZgensWZUeX9SWzBsdCsH2 z)hvsG;JEwC7Vqxv?noq3b-=BkHf;^DHtR`87l+532V>h(_C8DUz5csNDs?vgSD1Y;P96DLZ>d$Wt%B4unyl?2A-Y^0vfnMv1QW68P3XV#3s8glZsDrF$p+Pf# zK$5k{lbjAjCyv6-l&qk0LuBZj6`+AEFJwrNrZiDWoNb(?a&GgcXoSH!*JXyz*_!M> z{%e~Q5HMWzjIU~+a@q0vk}nXt=LR`CtMeJUz%1B4Q4zlG*FJzKW&vT-U>$Iv1$KoA zw{;mHszDu~1c9$ZrSADfIjWoQNm2fAe1O3qIFNfwO$9?q;LEY#_k~p{A;Jc@k5CY0jYCR(^S(!lcB=$x%Krik0B+6dZy^{QX#fBK07*qoM6N<$f{Jx@I{*Lx diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-8x8.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-jaune-8x8.png deleted file mode 100644 index 35ace3c752274b192f564368e814c1ac624140bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPggQPHs*qk-XoN?g51kdAc};NL-FR zZ=ZE2LFU-U_4Uv1KU2tZYflIZ)cVLITh*BMa?Z+V{lKb*J?RC4UW!M!mo%vt2)_I< z>CuCLnmIWK-adS|xn^RE%AW6Ck0U%Mov2=a`+ROnq?$v+sZD>_c|93a&ij9|&sIxp z|C@N`_i^>KYZ*)y&rM#`Zj74WdB}|avhq1ghFJ{vpSG>qCD1DC)-2W?Ien2vRzjN2 zv)EO^^WVPfzrH=bNnwTKo|-4BqG@agGHxjO1~=?dI$!Mh$nG=Oxr=$q=Z$vm2l|G= M)78&qol`;+0QuT~?EnA( diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-16x16.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-16x16.png deleted file mode 100755 index 597b715aeed6c0fd00a15ff1c850df3bac742f15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 578 zcmV-I0=@l-P)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^Rc2@44y2nUTi)Bpeh)Ja4^R5;6x zlQC#hQ51&1rv>ezcWZH|w>XGU+q(*-xd9O>4w)=ef>}fmg*P}Xd?RMq8SCS->L>Pt| z3lc3i_iw_?1d#4vttF0Q{mKmiolZwH6ItPufvtY_|Kx23eDgU2 z7-NXzm;(T7EdVPEFm)VWe+h8Tabr8n&p(7${Ti_@%07*qoM6N<$f`-igk^lez diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-32x32.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-32x32.png deleted file mode 100644 index 47479ae06bb65a0473a65cb2ac4f6f6b60b2521d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 933 zcmV;W16urvP)8FYHk#W+D1 z+Zby7Jr22j<-PJAwI?s+aqqk5JLfy!x%a9qFU#d}larIRTCH!qP$-zD>A75O`LJ|4 zZ5W2#9U}nySsSoGd{{D>j6@>YY!;+;yB&+gTCEoE-Yfk?0Y4KH6M6}L`Mc%Mya8aw z9%-a&yyWxw{Q*cM63)D3&`*&)YS3sj#>dB<~K;d6(EJa=l)U zMxzT03!XI&4xVl{o5DK)fRRu*98RTD{LN%C^{)LF0Kv*Hy$0j+^YefmHQFx=S)|1~ zdMy@f8Ou`nz1`XYJzI#FGoEeb0K<9vX~DB>*0}$ixK+SECA#+qHe5 z-dwjJ#R4JY;2rbwl??1jLVhWNS?&GnFZKANdj450Tjfy44%xEbXm7l~P58V|Pfrg) z5mGs9sODXZ3hhw>7k-$MS)RY^Eg{pjErPDn#2%ed;n0rp)wOMMZoXE>XVt2u0QIL< zls#%@X2usqsGIQ59qIjr^r`rcN??4jw$UT4^Sz9BWTu=LgS z`2j3JbWF={JRW!LiJ(*X81AmUQ0EsdD#QfLZhWIT>@=z(A!ianr+$QiK70GaV@q(= z=&mwFIWWK@)I$ycxInU`Wd~yf+cZB&&kwg%Xw8U6$|!}I`_vmpNT;4!T@oCP3V<_@ zegN4rB`$4qD~c_FG72gU*b{Cy=;ekA95CP(EqMdTM|QywGJn}YWigV~0Mdgj8Hpsy zSThIBJ=y@mZe1+yLbL|1u6|J4|V$eDoqbFRjE{b9hrQm;U!qTk{H3W1MqCN zOvVYzb=L{Hp0|=L89)vUaL&jSW$0^&P%^(*s#1Vm&rVlZ?mT0o2I<4Q?D)U{ESnnR z5-u`(B&6lw5h1L;jrm zeX~OxnFF$>LQ6|a`*yQ)z3c6!8DA>$G|GUSw6q4>KLG{+rmWa*-MQR700000NkvXX Hu0mjfQk1ZG diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-45x45.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-45x45.png deleted file mode 100644 index eaee5808e217f028bac5b5afd4b994656aa208ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1354 zcmV-Q1-1H#P)`6pHRCwCFm_cYGRT#%#N?fZ5nV#HJ zH$91mHT5K-YtxG$E}C8xD@c2ELE9XJdXTn=SlL6#VJj$@R^2UM%o(a}-Iaq{_m`&}S%muF5LhoCrhYgrFu#+V3XM8ts=3I zUS9TgCX-3L7Hz_aIM4?;SlHB!1|DfgcDgvkzYOoB(`ow`H2)J0!ojo|P-bUmQ7G+& zg@secA%&U_reL8F5Y_#`;q{2G@c=+0cqbeVuM~U@J_IE!j+l$3XN$#REed7fR4PTg zR;!gtC4Rv%G&DqD%SXLhIQAaAbf#`LZk5aRH(57uoT6W}jFl=-NElvKLWa?)rebedc>gx3LG>y42GxtKX|Dh){uYXd!wqLvU&WYy-oaAGdw#zpwCR43v9YrKlg8-n|b~_)R{$jRv8||aL z;{94hX`a7pYikj4Xyn_^nBfPW^}agz#K-x^8$BR+{|EEt*G(vQe$MebGczNxN5r9# zlTS5!0E8r8e!{(Ipb`PHcP&*`B}#pyVAw_Sp>Z&Vk*qg-Qs!votJmDiI>;Kt(9Z*w zA^gIn%*$`FSnRZ1yweShVNxp#oZ`hKGFnVjc@34Ed3tJWY>alfTn>#xW6^ofR<>vkn z9Y-exXm({MU(gm4Y0YKb$T zJ0*Z%c0d3{B_QG;ec9Y)vyN^JoOS1+01))h^#^e~GBPqZ*4$Yn!wa9e;HW1Ag3|o> zc5VN?6Jr7D!aXz>Q_gd_s-|MM3;6u$7%$osmP$L`*-2}FU`AW1<8t1WPA?zOpdcR{ zpXGOP(JcVx=jS8pv_*-$pBo5{W6NMn61nP^Cu4)onP+EEDElQ6g6Q#>D&95Ys;ZmJW&xD08@i!XQ(>S)$$DG6HHB+@ zBz@%%tf4+Cd-98XVUNWEj>~?`yP^TXshnH( z=wLXDd^i^UywLZ^iXe}`glxd{$#l@bcUS-GkFbV36NyB$vHuD%0E19VsTZ4MM*si- M07*qoM6N<$g5GYB*8l(j diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-8x8.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-orange-8x8.png deleted file mode 100755 index 6b695e0089821f3a0a5256ba445a9523a4938070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pdfpRr>`sfLr!i^IsS%E^UQ!kTRdGHLnJPT_A7ERB}%x=S982@eu+d0 zzk=H0#LcOjm*sY)E^cbSX?dj99amrO(z99#oyTDw#j#5Q-XJ8s)-w&zu>*=^&ru$4>}&#&xycQZEOMq}XP zwqm{pEr)r}ZRVxk%s#Xue$)Ddw4UD|Rzopr0Aa^wr~m)} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-16x16.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-16x16.png deleted file mode 100755 index dac27a202c7be43b5dfb8493a00504b990653e8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 627 zcmV-(0*w8MP)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^Rc2@47)1OoX*8~^|U1xZ9fR5;6h zlRs!vQ543%7hjUvru8NzC=$vg&Co?Tlpul#FJ02XPP#Xfia5MMbP*Eh(4b?>qM#ki=wkyIoqA#UKbs z5|v7Yy=54GeQ+WR48$OMGV>_M0U^GH5lROEAC_4mro`+>KiGrB`0JMjP0DxCNkB~BAc>m`Yh93{0l!EX3m;xxJ005h_X`DG> z;>~OvB7z5pUjP8tg9EgO1N8fSh{*Ieiiq)HE=lKmfRqu##cLb?fc|FyKzU{!E0-_f z>9Z$LN<}x(wrv7n%81c*T{apGZqB9I$>zCN5MC**(RJOiCXNAuAmI9Hk+yBqvMg$? zSuhjaD+sR^FR;;QOpWu@Al2*jvCXq>n-A~YJ$4%-muXT}tybf4`M-NdviF2Wka7S3 N002ovPDHLkV1iGN4DbK| diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-32x32.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-32x32.png deleted file mode 100644 index 4049d34f5b4c2faed4f036fc579ee593b36ce5c6..0000000000000000000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<;9l#oyRHzbtE&gvLx!fA)886oSyQJj-?ZhOzifT?-D4+CoS3z9=T4Z- zW>i&Gi3WpVaI0!EVOB`QpA_)}dyn+;Es^!_Yz}pFbvcWQiWV6RhKnU7B|f{|E+i!- zVaALZ5BH(SY&PS_ks}x}Vg%YQTmZ!|RJYBR)!N!>P^nat%gf7qV`F0-ck(YSE&cIe z^)B7+_*5h=E`oH`AH)Cj>Z_hvbDk) z!SdzHk(`{2;?h#|c|5$`Za*6p6&1_#d~07{pW|-+8#ZiMXcq`sfLr!ikRSjvLDjT5C9#0p?5Q)pF=Qm~@3XnMZ(f*jr(S_S5 zEAdGh?YQZuHD0Lu%x`=BLMF^ylsi`|GZocK-S_v4*W-_spK}wiBpi zoP6K*T2w>*hTne{S}*RX$O|?7`Q+y``&< sNiZL{@Y(aS$O6fk&v&X6{(dGYuU%TPe&rq~pg$NqUHx3vIVCg!0H8Q^0ssI2 diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-texte-250x168.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/logo-i-code-rouge-texte-250x168.png deleted file mode 100644 index 1f1c967c1fad3fce769d83c6723e968972227d01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13513 zcmV;)G&akLP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L04^f{04^f|c%?sf00007bV*G`2jK=C z5d<7jc1URe03ZNKL_t(|+U=croFqk=_rFh8b@xn9&)wa_%}g^0iYP0Gih$T7;4SKU zFzBuquGhQ1?y?>z>$Qrw-s`#g0xHU(sE8trOe+X@tSES~>d?bINB7**b97f_ynjSw zRc2O1R@TwS%*1a#`I+jhtc=LWc;Y$YIbiA$0Jj0-z(?@#@Yt{MZ9v72JAocQEFK>F z7Xsko6tS1g|4U~`AI1EC7VsxvZS0(fherd%{-PAID_{cHJOlc-BDDZ{czCox?2oq) zdvx@fYo;1^ngvIBBKPo^8e%_giiv$ojEk3n$9R$5!=rt~K4=KbM(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?VI>)Yz4N00P7?X9-~j2&|rEsR|Rz%X~F zc4a`4%cAeU`!ArfNZD#k*s1lYDNTs&f4gl976t_c4+s6-%VH@Jj$AwxxqMq6nBd@{ zztpMFtE8v@>#UJ1n#_&aJrQNzwl!Zw^ooJG^Zz!z>F7$OH$SEZxlw$Zcr%*Jg!2nQ z3cit>23xj)yI95O^uMK~A?&__k*bKYY|E$cAvwAU)8Dgncry~*2R{i9^X~he%L=x6 z*@WqP)OlX{H%%ne`M|(5MStfmju8#=fD@;AyOxXuwH`blRqRSK6CMaI=8<{3s>pT@ zfZ4#+BbixA?8=^om?O~t=NAg$pr)m%zB|>qm<>{6CwF%ryxk6MU;|V8UMiV5v@aBY zps~CuH}F?E$$#w;7*NCC!Q$ZHp;8Qd&UlTMMaUlf|CRa;l8ygMJ$N7Vs2TGA^9#0y zGuM3U&p~`GSdJ)*`{V784=xPOMTSuoH=?9OeBRDoQ$O5yB%=TCm4M>PQhcz|EjVef y$qI-}Z*%FRgpT+TN4WvgXAhW;PIBy}+W diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/next_icon.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/next_icon.png deleted file mode 100755 index 6ef8de76e0f5bf01c09da24a07c61cfe558d7a4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)5 zl1oTbVI0MO-{a21M#B_R#9l-oXcPp6(?)2~B7y{4Mu9@O$#RS~LMu0okc%jC6BNCq zMPfd15iMrWDWnuP(IPA}ow0!)<9P4f`?UyPGZWN-v-$pq!}*{8hcSkHhP!mEu~WAd zo8?nd1jeIrclCk3aF;a@j#!~$nl%(P0Jzf98$5aR>}dqE;fU4n-v&x*nhu}wwKrd{ z4f;b9;fU2%OeY#6`YVQ=TOJkJo9%;vsn26nmF>ePxAA!V*2;(ZnPFo%AB#FaHw-$p z>A83xDHKX5gpddX0EtgSc(|1Lcd)Cxp7`{*Gd4M}fH9|HQD+7~1Grv}*vDrmsZm0K z5C{Q60m5V1o+G_9&%wGQR!!BO+NWc8C&Ce{BNlb~H9*c=C7oHocC*-S7Ns<$C1sQZ zLijB|M!48sj(1C=)P(9pYjao0(5pv%$FEw)G{Dl2Io>Bnm(2P=eF~WywGEfv2*dEE+1BNH1p0gO_(!va6Ym6#!ZeU0XL$ zmOyFA$XqYlC#eqYr*8WRCf~&E#M}5+`DMhod1o}n6nu_w#4?v#yZPlMNv2Zf#pvLQ?bsc$8%}?|wxEMGI60fdRAO~{ zc52bv6uF?Yza^+BugrY=o*FhT7dA)!rvyS0Urwj)#iE6g^YI%&-U+mBcICDJ0000< KMNUMnLSTZVNH5j^ diff --git a/icode-ide/fr.cnes.analysis.tools.ui/icons/previous_icon.png b/icode-ide/fr.cnes.analysis.tools.ui/icons/previous_icon.png deleted file mode 100755 index 659cd90d7f80488a8a6a2c12f6f9e5ad98720461..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 655 zcmV;A0&x9_P)_fWZPlDqB9?#%D^>oA$FjP8SXdVl!5?|TnYO4RbBH?=GA zTUy2|reO<?=@r%h} zW6#cJQfPC~s>mwxzQ}>D!BbZalds_8_h}r7_JCAa@f4F))r6lUrCf(hQ;9=;jU5L& z+1FnmP_XjQREAhnABYqX00}@!0U-tMq%XJx@e~^h8rvWApSa|&uWz9Di?6_?1E%N@ zl4EB68Hfl3f`qGnd$iXb;n;2VsHt)P`R?O`My|Agci-NCF&}hI2Ui3vQGjU{P_$N1 zwo6b*g`Wk{x;wF^0p~U>`wvX#H%c-OZ~=##s0b5Wa!4-09SO%4;Ep?Tu9$V#I5TQr z&Mtkq{`h6ugzb~9dlQg)8A30C1pt3Qg&t7B3bbY+H`>YWThbX9oF#2!=nK7F-=6arTX3U&+XWy2~<%(BYwFX|c pI#R>7P%^)q3wROKeC1m2{19*?jxd%4aX0yzy`dymabz zw#(eg=y~&N&n)dZv2xzduG}5lraiApo3(c4*{Ylg5#|$JO_EEZ<^|a2`Z*=9ns7DV zy=TR&gYw*7f%auV?ip3tvjRPmcdoho{K?x$_vR?C#t5&<;~V}S*>OMCr>h}%%bLZ9 zmo3`hYEwTICo-TTCZwgTsC&VjZRgJ1eE#fBa^%9R zmmfWS@;bnyJ27HWY}kxYzv(Hl>yu;FCPlAEh+34Muq-8Rb6C)<8qA3{r2e5 z`$vyngh#H=FWlqqvnapfc5%(!sQ4v?r7J61-&eJNEN^;KTK}T7{#i-gJh%G*9vcYdwv_*~xdw!Gz4Va?T!sXyyF@8?w<>X`X=#j%uHV4GRvj@+tE@ zQ%F!a)GKcn^~8abN>4la1UNXVL;{ZWi)lEwyeatDu%Lr6;aASiLrXXW zQm#Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0oX}IK~y+TjZ?V_ zDnSrj?<+Mj5)8zDF!mD!O+*6`PmBaZ#lQnkOuQolKgAz0F%v<&>b+{6brc@Fg5K$^ z?y2qWoiV!IF0587TrL;vc00UYulUN`ZZ~{BA8a-ooKB~39*;+O!!Xe4bYM_`FEsiV zi$#p@YE?!dJ>SfAI2;mG0X<12s#O=&{l8`)8jYe>tD#&jqfjUym&>72sfdv)7KlMGa-EMF1gU93X_JG}P_o{?SgTVmj^H~z^_dA}?=R55M zzAH}mXS3O-oy}&0e!nk7tJRW(%jF^~@h_3pYV}_9|#fX3soko9_9NLG_hr*SwOWP_^Y7iK$r%;$3q zheIJ6jmB5m3aSb<6WV&ceu?m~aVDqJNs@H%7qiNEJdR8zgH$RdmP{tG-|w;AZaOePcAp!cqPCCHEHae`woMW)l~n|?v{ ztf0?`z7jUu;e|^i5<*a!6X(Eq2I%uj=ss5(^En?8X}8;|q~DwQU)F3k@dt6O - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This view represents all violations found on analyzed file(s). - - - - - - - This view represents all metrics values found on analyzed file(s). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Shown when one or several rules of Error criticity are violated. - - - - - - - - Shown when one or several rules of Warning criticity are violated. - - - - - Shown when a metric was computed on a function but that the limit was not exceeded. - - - - - - - - - - - - - - - - -
diff --git a/icode-ide/fr.cnes.analysis.tools.ui/pom.xml b/icode-ide/fr.cnes.analysis.tools.ui/pom.xml deleted file mode 100644 index e5e77d1c..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - fr.cnes.icode - icode-ide - ${revision} - - - fr.cnes.analysis.tools.ui - - eclipse-plugin - diff --git a/icode-ide/fr.cnes.analysis.tools.ui/resource/README.txt b/icode-ide/fr.cnes.analysis.tools.ui/resource/README.txt deleted file mode 100755 index 7c7d6984..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/resource/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -Fichier pour test de programme d'analyse de code. -Edité par Pierre Marighetto. -Version 1 (05/02/2013). - ------------------------------------------------------------------------------------------------------------------------ - -Ce dossier comporte 2 fichiers : - - - README.txt Le présent document qui décrit le contenu du dossier - et de chacun des fichiers. - - - noExtension Ce fichier vérifie le bon fonctionnement d'un analyzer lorsqu'un - fichier sans extension désire être analysé. - diff --git a/icode-ide/fr.cnes.analysis.tools.ui/resource/fortran90.f90 b/icode-ide/fr.cnes.analysis.tools.ui/resource/fortran90.f90 deleted file mode 100755 index 84e86125..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/resource/fortran90.f90 +++ /dev/null @@ -1,173 +0,0 @@ -! Fichier de test pour �valuer les outils d'analyse de code Fortran. - -! Le but de ce "programme" est d'observer quelles r�gles du RNC v�rifient -! chaque outil s�lectionn� sur Internet. Il sera utilis� par la suite comme -! fichier de test pour le pugin Eclipse. - -! Ce fichier permet de tester les r�gles particuli�res impossibles -! � v�rifier pour F90 et impossible � v�rifier avec un fichier F77. - -PROGRAM TEST - - ! D�claration des variables pour la suite des v�rifications - ! Variable pour v�rification de Don.AllocDynBord - REAL, ALLOCATABLE, DIMENSION(:) :: A, B - - ! V�rification de Org.SousType - INTEGER, PARAMETER :: DOUBLE = selected_real_kind(15) - - ! Variable pour v�rification de Tr.OrdreChoix - INTEGER :: NUM - - ! Variables pour v�rification de Pr.SuiteAligne - ! V�rification de Don.SousTypeR�el - REAL D, E, F, G, H - - ! V�rification de Don.SpecSousType - INTEGER, PARAMETER :: DISTANCE = 10 - - ! Variables pour v�rification de Don.LimitePointer - INTEGER, POINTER :: P - INTEGER, TARGET :: N - - ! V�rification de Don.ConstFlottant - REAL(DOUBLE) :: x1 = 0.1 - - ! Variable pour v�rification de Don.Associated - INTEGER, POINTER :: Q - - ! Variables pour v�rification de Tr.TableauAffect - INTEGER :: V(4) - INTEGER :: TAB(4) - ! Variables pour v�rification de Don.Equivalence - COMPLEX :: COMPL(2) - REAL :: TEMP(4) - - ! V�rification de Don.Equivalence - EQUIVALENCE (TEMP(1), COMPL(1)) - - ! V�rification de Don.AllocDynBord - ! V�rification de Don.AllocEchec - ! V�rification de Err.Allocate - ALLOCATE(A(4)) - - ! Initialisation des variables - NUM = 5 - A(1) = 2 - A(2) = 4 - A(3) = 5 - A(4) = 7 - D = 75 - E = 65 - F = 92 - G = 156 - - ! V�rification de Don.AllocLiberation : toute m�moire allou�e dynamiquement doit - ! �tre lib�r�e par la suite. - ! On regarde si cette r�gle est v�rifi�e en ne lib�rant pas la m�moire. - - ! V�rification de Tr.OrdreChoix - SELECT CASE (NUM) - CASE (-5:-1) - WRITE(*, *) 'Tr.OrdreChoix' - CASE (1:10) - WRITE(*, *) 'Tr.OrdreChoix' - CASE (:-6) - WRITE(*, *) 'Tr.OrdreChoix' - CASE (0) - WRITE(*, *) 'Tr.OrdreChoix' - END SELECT - - ! V�rification de Pr.Instruction - WRITE(*, *) 'Pr.Instruction' ; WRITE(*, *) 'Pr.Instruction' ; - - ! V�rification de Pr.SuiteAligne - H = (G * F) + (G / (D - E)) & - + (F / (G + F * E)) & - - D - - ! V�rification de Id.Homonymie - CALL INCR(NUM) - - ! V�rification de Don.LimitePointer - P => N - - ! V�rification de Don.Associated - PRINT*, ASSOCIATED(Q) - - ! V�rification de Tr.TableauComplet - A(1:4) = 2 * A(1:4) - - A(1:3) = A(1:3) + A(2:4) - - ! V�rification de Tr.TableauDepend : on v�rifie la pr�sence d'un commentaire avant - ! V�rification de Tr.TableauAffect - V = (/ 1, 2, 2, 3 /) - TAB(V) = (/ 1, 2, 3, 4 /) - - ! V�rification de Tr.IFLogique - IF (D == 0) E = 7 - - ! V�rification de Err.OpenRead - ! V�rification de Int.ParamOpen - OPEN(11, FILE = 'README.txt') - - ! V�rification de Int.FormatFlottant - WRITE(6, *) x1 - - ! V�rification de Don.AllocErreur - IF (.TRUE.) THEN - ALLOCATE(B(1)) - B(2) = 0 - END IF - - ! V�rification de Dyn.Ressources - DEALLOCATE(B) - -END - - -! V�rification de Tr.RecursifBord -INTEGER RECURSIVE FUNCTION FONCTION_REC(NUM) RESULT (RES) - - ! V�rification de Pr.OperRelationnel - IF (NUM .EQ. 0) RETURN - RES = NUM * FONCTION_REC(NUM - 1) - - ! V�rification de Pr.Unit�Nomm�e -END FUNCTION - - -! V�rification de Org.SousProgramme -! V�rification de Id.Homonymie -SUBROUTINE INCR(J) - - ! V�rification de Tr.Intent - ! On ne sp�cifie pas le INTENT pour J - - I = I + 1 - RETURN - -END - - -! V�rification de Don.Init -INTEGER FUNCTION FUN(A, X) - - ! V�rification de Tr.ParamTableau : d�clarer la dimension des tableaux explicitement - INTEGER, INTENT(IN) :: A - - ! V�rification de Tr.ParamOptionnel - INTEGER, OPTIONAL, INTENT(IN) :: X - - INTEGER :: I, S = 0 - DO I = 1, A - S = S + I - END DO - FUN = S - - ! V�rification de Tr.Entry - ENTRY FUNK - RETURN - -END FUNCTION FUN diff --git a/icode-ide/fr.cnes.analysis.tools.ui/resource/noExtension b/icode-ide/fr.cnes.analysis.tools.ui/resource/noExtension deleted file mode 100755 index e69de29b..00000000 diff --git a/icode-ide/fr.cnes.analysis.tools.ui/resource/programme_test.f b/icode-ide/fr.cnes.analysis.tools.ui/resource/programme_test.f deleted file mode 100755 index 1a766ba3..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/resource/programme_test.f +++ /dev/null @@ -1,332 +0,0 @@ -0! Fichier de test pour évaluer les outils d'analyse de code Fortran. - -! Le but de ce "programme" est d'observer quelles règles du RNC vérifient -! chaque outil sélectionné sur Internet. Il sera utilisé par la suite comme -! fichier de test pour le pugin Eclipse. - -! Chaque partie de ce code enfreindra une règle sélectionnée. Afin de -! distinguer les outils adaptables à F90 de ceux restreints à F77, ce -! programme sera uniquement écrit en F77 (syntaxe libre). - - - PROGRAM TEST - -c Declaration de variables pour la suite des vérifications -c Verification Don.Separee : chaque variable doit être déclarée séparement - INTEGER I,J - - INTEGER L - -c Vérification de Pr.CartStd : toutes déclaration de variable doit être commentée -c INTEGER L n'a pas été commenté - INTEGER K - -c Vérification de Don.Utilisee : une variable déclarée doit être utilisée -c Vérification de Tr.Residus - INTEGER USELESS - -c Variable pour vérification de Don.TablePrincipe -c Vérification de Tr.ParamTableau -c Vérification de Don.Dimension - INTEGER A - DIMENSION A(10,10) - -c Variables pour vérification de Tr.ComparaisonStrict - REAL U - REAL V - -c Variables pour vérification de Tr.BoucleSortie - INTEGER INDICE - INTEGER INDICE_MAX - -c Variables pour vérification de Tr.Parenthèses - INTEGER FA - INTEGER FB - INTEGER SA - INTEGER SB - REAL RES - -c Variables pour vérification de Tr.MelangeType - REAL OPER1 - REAL OPER2 - DOUBLE PRECISION RESUL - DOUBLE PRECISION OPER3 - -c Vérification de Id.MotsClés : n'utiliser aucun mot clé de Fortran pour une variable - INTEGER DATA - -c Vérification de Don.TypNorme - INTEGER*4 I4 - REAL*4 R4 - -c Vérification de Don.DoublePrecision - DOUBLE PRECISION CONST - PARAMETER (CONST = 3.141592654) - -c Vérification de Don.CommonBlanc -c Vérification de Don.CommonGroup - COMMON OPER1,I,OPER3,J - COMMON /PARTAGE/A - -c Variable pour Tr.IndiceEntier - REAL REAL_INDEX - -c Vérification de Tr.Equivalence - REAL C(2) - REAL D(2) - EQUIVALENCE (C(1), D(1)), (C(2), D(2)) - -c Variables pour vérification de Tr.Intrinsèques - REAL ARGUM - REAL VALMOD - -c Variable pour vérification de Don.Hollerith - DOUBLE COMPLEX X(2) - - - -c Initialisation des variables - I = 0 - L = 1 - J = 0 - U = 1.2 - V = 1.3 - INDICE = 1 - INDICE_MAX = 10 - FA = 8 - FB = 15 - SA = 150 - SB = 210 - RES = 0 - OPER1 = 1.1 - OPER2 = 2.2 - OPER3 = 3.3 - RESUL = 0.0 - DATA = 0 - I4 = 0 - R4 = 1.0 - REAL_INDEX = 0 - ARGUM = 5.0 - VALMOD = 2.5 - -c Vérification de Don.Hollerith - DATA X /16Habcdefghijklmnop, 16Hqrstuvwxyz012345/ - - - -c Vérification de Org.Duplication : redondance de code -c Vérification de Pr.Aeration : le code doit être aéré - DO I = 1,10 - J= J+ 1 - K =K -1 - L=2*L - END DO - -c Vérification de Pr.Indentation : le code doit être indenté - DO I = 1,10 - J = J + 1 - K = K - 1 - L = 2 * L - END DO - -c Vérification Pr.CommIndent : les commentaires doivent être indenté comme le code - DO I = 1,2 - WRITE(*,*) 'Pr.CommIndent' - END DO - -c Vérification Don.Declaration : toutes les variables utilisées sont déclarées -c Vérification Don.Typage : toutes les variables doivent être explicitement typées - DO M = 1,2 - WRITE(*,*) 'Don.Declaration' - WRITE(*,*) 'Don.Typage' - END DO - -c Vérification Don.Homonymie -c Vérification Don.Initialisation : les données doivent être initialisées avant utilisation - DO M = 1,2 - WRITE(*,*) 'Don.Homonymie' - END DO - -c Vérification de Don.TablePrincipe - DO I = 1,10 - DO J = 1,10 - A(I,J) = I*J - END DO - END DO - - -c Vérification de Tr.ComparaisonStrict - IF (U .EQ. V) THEN - WRITE(*,*) 'Tr.ComparaisonStrict' - END IF - - IF (U .NE. V) THEN - WRITE(*,*) 'Tr.ComparaisonStrict' - END IF - -c Vérification de Tr.Choix - IF (U .EQ. V) THEN - GOTO 1000 - END IF - - IF (U .NE.V) THEN - GOTO 2000 - END IF - -1000 WRITE(*,*) 'Tr.Choix' -2000 WRITE(*,*) 'Tr.Choix' - -c Vérification de Tr.BoucleSortie - DO WHILE (INDICE .LE. INDICE_MAX) - IF (INDICE.EQ.5) THEN - GOTO 3000 - END IF - INDICE = INDICE + 1 - END DO - -c Vérification de Tr.ModifCondSortie -3000 INDICE = 1 - DO WHILE (INDICE .LE. INDICE_MAX) - IF (INDICE .LE. 5) THEN - INDICE_MAX = INDICE_MAX + 1 - END IF - INDICE = INDICE + 1 - END DO - -c Vérification de Tr.Residus - L = L + 1 -c WRITE(*,*) 'Code mort' -4000 WRITE(*,*) 'Tr.Residus' - -c Vérification de Tr.Parenthèses - RES = FA / SA + FB / SB - -c Vérification de Tr.Booleen - IF ( (FA.NE.FB) .AND. (SA.NE.SB) .AND. (U.NE.V) ) THEN - WRITE(*,*) 'TR.Booleen' - END IF - -c Vérification de Tr.DoubleNeg - IF (.NOT. (FA.NE.FA)) THEN - WRITE(*,*) 'Tr.DoubleNeg' - END IF - -c Vérification de Tr.MelangeType - RESUL = OPER1 + OPER2 + OPER3 - -c Vérification de Tr.ComparConst - IF (INDICE_MAX .LE. INDICE) THEN - WRITE(*,*) 'Tr.ComparConst' - END IF - -c Vérification de Int.ExistenceFichier - open(11, file = 'README.txt') - close(11) - -c Vérification de Int.CheminFichier - open(12, file = '../test_script/README.txt') - -c Vérification de Int.FichierFermeture : seul le premier fichier est fermé -c Aucune fermeture de fichier n'est appliquée à l'unité 12 - -c Vérification de Int.GrouperES - WRITE(*,*) I - WRITE(*,*) J - -c Vérification de Qa.Factorisation - RES = (3 * FA * FB) + (2 * FB) - -c Vérification de Id.MotsClés - DATA = 4 - -c Vérification de Tr.IfArithmétique - IF (FA - FB) 5000,6000,7000 -5000 WRITE(*,*) 'Tr.IfArithmétique' -6000 WRITE(*,*) 'Tr.IfArithmétique' -7000 WRITE(*,*) 'Tr.IfArithmétique' - -c Vérification de Tr.IfElse - IF (FA .LT. 0) THEN - WRITE(*,*) 'Tr.IfElse' - ELSE IF (FA .GT. 0) THEN - WRITE(*,*) 'Tr.IfElse' - ELSE IF (FA .EQ. 0) THEN - WRITE(*,*) 'Tr.IfElse' - END IF - -c Vérification de Tr.IndiceEntier - DO REAL_INDEX = 0.1,1.0,0.1 - U = REAL_INDEX - END DO - -c Vérification de Tr.DoImbriqués - DO 8000, I = 1,10 - DO 8000, J = 1,10 - A(I,J) = I + J -8000 CONTINUE - -c Vérification de Tr.Pause - PAUSE - -c Vérification de Tr.Intrinsèques - RES = AMOD (ARGUM,VALMOD) - -c Vérification de Int.NuméroLogique - WRITE(2,*) RES - -c Vérification de Tr.Parametres - CALL SUB(3,NO_PARAM,K) - -c Vérification de Int.UnitéGénérique - WRITE(*,*) 'Int.UnitéGraphique' - -c Vérification de Tr.TypeFonctionExt - J = EXT - - END PROGRAM - - - -c Vérification de Tr.IntrinNom - FUNCTION SIN (OPER) - -c Vérification de Tr.Function : le type de OPER et de retour de la fonction SIN ne sont pas déclarés -c Vérification de Tr.ParSortie : initialiser la valeur de retour d'une fonction avant de l'attribuer - SIN = OPER - - ENTRY COS - RETURN - - END FUNCTION - - - - SUBROUTINE SUB(OPER1, OPER2, OPER3) - -c Vérification de Tr.OrdreParFormel - INTEGER OPER1 - INTEGER OPER3 - INTEGER OPER2 - - OPER2 = OPER2 + OPER1 - -c Vérification de Tr.ParSortie : les paramètres de sortie d'une procédure doivent être initialisés avant traitement - OPER3 = 2 * OPER1 - -c Vérification de Tr.SubReturn : on ne peut utiliser RETURN(i) -c Vérification de Tr.FonctionSortie : une fonction n'a qu'une seule sortie - RETURN - RETURN 1 - - END SUBROUTINE SUB - - - -c Vérification de Tr.FunctionPar - FUNCTION NO_PARAM - -c Commentaire utilisé pour augmenter le taux de commentaires - - NO_PARAM = 5 - - END FUNCTION NO_PARAM diff --git a/icode-ide/fr.cnes.analysis.tools.ui/resource/xsd/analysisResult.xsd b/icode-ide/fr.cnes.analysis.tools.ui/resource/xsd/analysisResult.xsd deleted file mode 100755 index 0e3a4b32..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/resource/xsd/analysisResult.xsd +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Rule's ID and selection for analysis. - - - - - - - Project - - - - - - - - - - - - - - - - Analysis informations - - - - - - - - - - - - - - - Rules analyzed. - - - - - - - - - - - - Results of an analysis. - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/rnc_rulesV3.xml b/icode-ide/fr.cnes.analysis.tools.ui/rnc_rulesV3.xml deleted file mode 100755 index 31b9502b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/rnc_rulesV3.xml +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/icode-ide/fr.cnes.analysis.tools.ui/schema/configuration.exsd b/icode-ide/fr.cnes.analysis.tools.ui/schema/configuration.exsd deleted file mode 100644 index 2f1bcec8..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/schema/configuration.exsd +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - [Enter description of this extension point.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/Activator.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/Activator.java deleted file mode 100755 index ee4df7a1..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/Activator.java +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -/** - * As this Activator has been modified, it has to be tested and software quality - * has to be done. The only modification is done in start method, which loads - * all preferences used in the project. - */ -public class Activator extends AbstractUIPlugin implements BundleActivator { - /** - * Plug-in ID - */ - public static final String PLUGIN_ID = "fr.cnes.analysis.tools.ui"; - /** - * The static bundle context - **/ - private static BundleContext context; - /** - * Plugin activator - */ - private static Activator plugin; - - /** - * Static method which returns the bundle context of this activator. - * - * @return the bundle context - **/ - public static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * - * @see - * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext - * ) - */ - @Override - public void start(final BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext - * ) - */ - @Override - public void stop(final BundleContext bundleContext) throws Exception { - Activator.context = null; - } - - /** - * @return plugin activator. - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/CheckConfigurationContainer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/CheckConfigurationContainer.java deleted file mode 100644 index ba27e788..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/CheckConfigurationContainer.java +++ /dev/null @@ -1,189 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.configurations; - -import fr.cnes.icode.logger.ICodeLogger; - -/** - * This class is a data structure being used by {@link ConfigurationService}. - */ -public class CheckConfigurationContainer { - - /** - * Class name - **/ - private static final String CLASS = CheckConfigurationContainer.class.getName(); - - /** - * Checker identifier - */ - private String checkId; - /** - * Checker name - */ - private String name; - /** - * Checker configuration's description - */ - private String description; - /** - * Checker is enabled - */ - private boolean enabled; - /** - * Max value set for the Checker - */ - private Float maxValue; - /** - * Min value set for the Checker - */ - private Float minValue; - - /** - * @param pCheckId Checker identifier - * @param pName Checker name - * @param pDescription Checker configuration's description - * @param pEnabled Checker is enabled - * @param pMaxValue Max value set for the Checker - * @param pMinValue Min value set for the Checker - */ - public CheckConfigurationContainer(String pCheckId, String pName, String pDescription, - Boolean pEnabled, Float pMaxValue, Float pMinValue) { - super(); - final String method = "CheckConfigurationContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pCheckId, pName, pDescription, pEnabled, pMaxValue, pMinValue - }); - this.checkId = pCheckId; - this.name = pName; - this.description = pDescription; - this.enabled = pEnabled.booleanValue(); - this.maxValue = pMaxValue; - this.minValue = pMinValue; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the checkId - */ - public final String getCheckId() { - final String method = "getCheckId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, checkId); - return checkId; - } - - /** - * @param pCheckId the checkId to set - */ - public final void setCheckId(String pCheckId) { - final String method = "setCheckId"; - ICodeLogger.entering(CLASS, method, pCheckId); - this.checkId = pCheckId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the name - */ - public final String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /** - * @param pName the name to set - */ - public final void setName(String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the description - */ - public final String getDescription() { - final String method = "getDescription"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, description); - return description; - } - - /** - * @param pDescription the description to set - */ - public final void setDescription(String pDescription) { - final String method = "setDescription"; - ICodeLogger.entering(CLASS, method, pDescription); - this.description = pDescription; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the enabled - */ - public final boolean isEnabled() { - final String method = "isEnabled"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(enabled)); - return enabled; - } - - /** - * @param pEnabled the enabled to set - */ - public final void setEnabled(boolean pEnabled) { - final String method = "setEnabled"; - ICodeLogger.entering(CLASS, method, Boolean.valueOf(pEnabled)); - this.enabled = pEnabled; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the maxValue - */ - public final Float getMaxValue() { - final String method = "getMaxValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, maxValue); - return maxValue; - } - - /** - * @param pMaxValue the maxValue to set - */ - public final void setMaxValue(Float pMaxValue) { - final String method = "setMaxValue"; - ICodeLogger.entering(CLASS, method, pMaxValue); - this.maxValue = pMaxValue; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the minValue - */ - public final Float getMinValue() { - final String method = "getMinValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, minValue); - return minValue; - } - - /** - * @param pMinValue the minValue to set - */ - public final void setMinValue(Float pMinValue) { - final String method = "setMinValue"; - ICodeLogger.entering(CLASS, method, pMinValue); - this.minValue = pMinValue; - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationContainer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationContainer.java deleted file mode 100644 index b6d121e5..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationContainer.java +++ /dev/null @@ -1,111 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.configurations; - -import fr.cnes.icode.logger.ICodeLogger; - -import java.util.ArrayList; -import java.util.List; - -/** - * This class is a data structure being used by {@link ConfigurationService}. - */ -public class ConfigurationContainer { - - /** - * Class name - **/ - private static final String CLASS = ConfigurationContainer.class.getName(); - /** - * Configuration's name - */ - private String name; - /** - * Configuration's description - */ - private String description; - /** - * Checker's configuration - */ - private List checkConfigurations; - - /** - * @param pName Configuration's name - * @param pDescription Configuration's description - */ - public ConfigurationContainer(String pName, String pDescription) { - final String method = "ConfigurationContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pName, pDescription - }); - this.name = pName; - this.description = pDescription; - this.checkConfigurations = new ArrayList<>(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the name - */ - public final String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /** - * @param pName the name to set - */ - public final void setName(String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the description - */ - public final String getDescription() { - final String method = "getDescription"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, description); - return description; - } - - /** - * @param pDescription the description to set - */ - public final void setDescription(String pDescription) { - final String method = "setDescription"; - ICodeLogger.entering(CLASS, method, pDescription); - this.description = pDescription; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the checkConfigurations - */ - public final List getCheckConfigurations() { - final String method = "getCheckConfigurations"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, checkConfigurations); - return checkConfigurations; - } - - /** - * @param pCheckConfigurations the checkConfigurations to set - */ - public final void setCheckConfigurations( - List pCheckConfigurations) { - final String method = "setCheckConfigurations"; - ICodeLogger.entering(CLASS, method, pCheckConfigurations); - this.checkConfigurations = pCheckConfigurations; - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationService.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationService.java deleted file mode 100644 index e4395aae..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/ConfigurationService.java +++ /dev/null @@ -1,217 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.configurations; - -import fr.cnes.icode.exception.NullContributionException; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; - -import java.util.ArrayList; -import java.util.List; - -/** - * This class should be used to reach configurations data contributing to - * {@link #CONFIGURATION_EP_ID}. - * - * @since 3.0 - */ -public final class ConfigurationService { - - /** - * Configuration EP identifier - */ - public static final String CONFIGURATION_EP_ID = "fr.cnes.analysis.tools.ui.configuration"; - /** - * Configuration EP name - */ - public static final String CONFIGURATION_EP_NAME = "configuration"; - /** - * Configuration Element - */ - public static final String CONFIGURATION_EP_EL_CONFIGURATION = "configuration"; - /** - * Configuration Element's attribute name - */ - public static final String CONFIGURATION_EP_EL_CONFIGURATION_ATT_NAME = "name"; - /** - * Configuration Element's attribute description - */ - public static final String CONFIGURATION_EP_EL_CONFIGURATION_ATT_DESCRIPTION = "description"; - /** - * CheckConfiguration Element - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION = "checkConfiguration"; - /** - * CheckConfiguration Element's attribute checkId - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_CHECKID = "checkId"; - /** - * CheckConfiguration Element's attribute name - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_NAME = "name"; - /** - * CheckConfiguration Element's attribute description - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_DESCRIPTION = "description"; - /** - * CheckConfiguration Element's attribute enabled - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_ENABLED = "enabled"; - /** - * CheckConfiguration Element's attribute maxValue - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_MAXVALUE = "maxValue"; - /** - * CheckConfiguration Element's attribute minValue - */ - public static final String CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_MINVALUE = "minValue"; - - /** - * Class name - **/ - private static final String CLASS = ConfigurationService.class.getName(); - - /** - * This utility class should not be instantiated. - */ - private ConfigurationService() { - // Do not instantiate - } - - /** - * @return All the configurations in contribution of - * {@link #CONFIGURATION_EP_ID}. - */ - public static List getConfigurations() { - final String method = "getConfigurations"; - ICodeLogger.entering(CLASS, method); - final List configurations = new ArrayList<>(); - final IConfigurationElement[] configurationsContributors = Platform.getExtensionRegistry() - .getConfigurationElementsFor(CONFIGURATION_EP_ID); - for (IConfigurationElement configuration : configurationsContributors) { - final List checkersConfigurations = new ArrayList<>(); - final ConfigurationContainer configContainer = new ConfigurationContainer( - configuration.getAttribute(CONFIGURATION_EP_EL_CONFIGURATION_ATT_NAME), - configuration.getAttribute( - CONFIGURATION_EP_EL_CONFIGURATION_ATT_DESCRIPTION)); - for (IConfigurationElement checkerConfiguration : configuration - .getChildren(CONFIGURATION_EP_EL_CHECKCONFIGURATION)) { - Boolean isEnabled = Boolean.TRUE; - if (checkerConfiguration - .getAttribute(CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_ENABLED) - .equals("false")) { - isEnabled = Boolean.FALSE; - } - Float minValue, maxValue; - try { - minValue = Float.valueOf(Float.parseFloat(checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_MINVALUE))); - } catch (@SuppressWarnings("unused") NullPointerException exception) { - minValue = Float.valueOf(Float.NaN); - } - try { - maxValue = Float.valueOf(Float.parseFloat(checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_MAXVALUE))); - } catch (@SuppressWarnings("unused") NullPointerException exception) { - maxValue = Float.valueOf(Float.NaN); - } - checkersConfigurations.add(new CheckConfigurationContainer( - checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_CHECKID), - checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_NAME), - checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_DESCRIPTION), - isEnabled, maxValue, minValue)); - } - configContainer.setCheckConfigurations(checkersConfigurations); - configurations.add(configContainer); - } - ICodeLogger.exiting(CLASS, method, configurations); - return configurations; - } - - /** - * @param configurationName The configuration to retrieve data from - * @return A {@link ConfigurationContainer} containing all data contained - * for configurationName. - * @throws NullContributionException when configuration requested do not exist or is trying to - * reach contribution not available/ - */ - public static ConfigurationContainer getConfigurations(String configurationName) - throws NullContributionException { - final String method = "getConfigurations"; - ICodeLogger.entering(CLASS, method, configurationName); - final IConfigurationElement[] configurationsContributors = Platform.getExtensionRegistry() - .getConfigurationElementsFor(CONFIGURATION_EP_ID); - boolean found = false; - IConfigurationElement configuration; - int configurationsCounter = 0; - IConfigurationElement checkerConfiguration; - int checkerConfigurationsCounter = 0; - ConfigurationContainer configContainer = null; - while (configurationsContributors.length > configurationsCounter && !found) { - configuration = configurationsContributors[configurationsCounter]; - final List checkersConfigurations = new ArrayList<>(); - if (configuration.getAttribute(CONFIGURATION_EP_EL_CONFIGURATION_ATT_NAME) - .equals(configurationName)) { - configContainer = new ConfigurationContainer( - configuration.getAttribute( - CONFIGURATION_EP_EL_CONFIGURATION_ATT_NAME), - configuration.getAttribute( - CONFIGURATION_EP_EL_CONFIGURATION_ATT_DESCRIPTION)); - while (configuration.getChildren( - CONFIGURATION_EP_EL_CHECKCONFIGURATION).length > checkerConfigurationsCounter - && !found) { - checkerConfiguration = configuration.getChildren( - CONFIGURATION_EP_EL_CHECKCONFIGURATION)[checkerConfigurationsCounter]; - Boolean isEnabled = Boolean.TRUE; - if (checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_ENABLED) - .equals("false")) { - isEnabled = Boolean.FALSE; - } - Float minValue, maxValue; - try { - minValue = Float.valueOf(Float.parseFloat(checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_MINVALUE))); - } catch (@SuppressWarnings("unused") NullPointerException e) { - minValue = Float.valueOf(Float.NaN); - } - try { - maxValue = Float.valueOf(Float.parseFloat(checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_MAXVALUE))); - } catch (@SuppressWarnings("unused") NullPointerException e) { - maxValue = Float.valueOf(Float.NaN); - } - checkersConfigurations.add(new CheckConfigurationContainer(checkerConfiguration - .getAttribute(CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_CHECKID), - checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_NAME), - checkerConfiguration.getAttribute( - CONFIGURATION_EP_EL_CHECKCONFIGURATION_ATT_DESCRIPTION), - isEnabled, maxValue, minValue)); - checkerConfigurationsCounter++; - } - configContainer.setCheckConfigurations(checkersConfigurations); - found = true; - } - configurationsCounter++; - } - - if (found) { - ICodeLogger.exiting(CLASS, method, configContainer); - return configContainer; - } - final NullContributionException exception = new NullContributionException( - "Impossible to find " + configurationName + " in " + CONFIGURATION_EP_ID - + " contributors."); - ICodeLogger.throwing(CLASS, method, exception); - throw exception; - - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/package-info.java deleted file mode 100644 index 7942d4a9..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/configurations/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Package containing configuration's API for UI Plug-in. - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ - -/** - * Package containing configuration's API for UI Plug-in. - */ -package fr.cnes.analysis.tools.ui.configurations; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/InformationDecorator.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/InformationDecorator.java deleted file mode 100644 index 4680c706..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/InformationDecorator.java +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.decorators; - -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.markers.InformationMarker; -import fr.cnes.analysis.tools.ui.markers.ViolationErrorMarker; -import fr.cnes.analysis.tools.ui.markers.ViolationWarningMarker; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.viewers.IDecoration; -import org.eclipse.jface.viewers.ILightweightLabelDecorator; -import org.eclipse.jface.viewers.LabelProvider; - -import java.util.List; - -/** - * Put a new Decoration in the files tree on the top right of an icon of a file - * if a file contains a violation error marker. - *

- * This class is being called everytime a document is being refreshed in the - * files explorer view. - *

- * In case there is no marker anymore (error && warning), this class restore - * back the original icon. - */ -public class InformationDecorator extends LabelProvider implements ILightweightLabelDecorator { - - /** - * Link to the Violation Error icon - */ - public static final String ICON = ImageFactory.INFO_VERY_SMALL; - /** - * Decorator ID - */ - public static final String ID_INFORMATION_DECORATOR = "fr.cnes.analysis.tools.ui.decorators" - + ".informationdecorator"; - - /** - * Class name - **/ - private static final String CLASS = InformationDecorator.class.getName(); - - /** - * An Violation Error icon is being put on the top-right of the icon's file - * only if the file contain a marker of type "ViolationErrorMarker". - */ - @Override - public void decorate(Object resource, final IDecoration decoration) { - final String method = "decorate"; - ICodeLogger.entering(CLASS, method, new Object[]{ - resource, decoration - }); - - if (resource instanceof IResource) { - // We add a Information decorator only if there is a information in - // the file and that there is no errors markers nor warning markers - // in the file - final List vErrorMarkers = ViolationErrorMarker - .findAllMarkers((IResource) resource); - final List vWarningMarkers = ViolationWarningMarker - .findAllMarkers((IResource) resource); - final List vInformationMarkers = InformationMarker - .findAllMarkers((IResource) resource); - if (vErrorMarkers.isEmpty() && vWarningMarkers.isEmpty() - && !vInformationMarkers.isEmpty()) { - // If the file do not contain error marker and contain warning - // markers then we put an overlay icon on the top right of the - // file's icon - decoration.addOverlay(ImageFactory.getDescriptor(ICON), IDecoration.TOP_RIGHT); - } else { - // otherwise we remove the overlay if there is no violation - // error neither violation warning markers. - // NOTE : When warnings decorators are activated, this is only - // here that we remove the markers if both - // Error and Warnings decorators are removed. - if (vErrorMarkers.isEmpty() && vWarningMarkers.isEmpty() - && vInformationMarkers.isEmpty()) { - decoration.addOverlay(null); - } - } - } - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationErrorDecorator.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationErrorDecorator.java deleted file mode 100755 index cb7f7c0d..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationErrorDecorator.java +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.decorators; - -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.markers.ViolationErrorMarker; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.viewers.IDecoration; -import org.eclipse.jface.viewers.ILightweightLabelDecorator; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.ui.IDecoratorManager; -import org.eclipse.ui.PlatformUI; - -import java.util.List; - -/** - * Put a new Decoration in the files tree on the top right of an icon of a file - * if a file contains a violation error marker. - *

- * This class is being called everytime a document is being refreshed in the - * files explorer view. - *

- * In case there is no marker anymore (error && warning), this class restore - * back the original icon. - */ -public class ViolationErrorDecorator extends LabelProvider implements ILightweightLabelDecorator { - - /** - * Link to the Violation Error icon - */ - public static final String ICON = ImageFactory.ERROR_VERY_SMALL; - /** - * Decorator ID - */ - public static final String ID_VIOLATION_ERROR_DECORATOR = "fr.cnes.tools.ui." - + "decorators.violationerrordecorator"; - /** - * Class name - **/ - private static final String CLASS = ViolationErrorDecorator.class.getName(); - - /** - * An Violation Error icon is being put on the top-right of the icon's file - * only if the file contain a marker of type "ViolationErrorMarker". - */ - @Override - public void decorate(Object resource, final IDecoration decoration) { - final String method = "decorate"; - ICodeLogger.entering(CLASS, method, new Object[]{ - resource, decoration - }); - - /* - * We call the decorator manager to be able to know if the Violation - * Warning decorator is activated. If it's is activated then the - * decorators removal will be done by the Violoation Warning decorator. - * Otherwise, it's the Violation Error decorator that removes the errors - * decorators. - */ - final IDecoratorManager manager = PlatformUI.getWorkbench().getDecoratorManager(); - if (resource instanceof IResource) { - final List markers = ViolationErrorMarker.findAllMarkers((IResource) resource); - if (!markers.isEmpty()) { - decoration.addOverlay(ImageFactory.getDescriptor(ICON), IDecoration.TOP_RIGHT); - // By recursivity, decorate all parents. - - } - - } else if (!manager.getEnabled(ID_VIOLATION_ERROR_DECORATOR)) { - decoration.addOverlay(null); - } - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationWarningDecorator.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationWarningDecorator.java deleted file mode 100755 index 0265c462..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/ViolationWarningDecorator.java +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.decorators; - -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.markers.ViolationErrorMarker; -import fr.cnes.analysis.tools.ui.markers.ViolationWarningMarker; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.viewers.IDecoration; -import org.eclipse.jface.viewers.ILightweightLabelDecorator; -import org.eclipse.jface.viewers.LabelProvider; - -import java.util.List; - -/** - * ViolationWarningDecorator add decorators to the file's icon when there is - * markers of warning criticity and no marker of error criticity. - *

- * This class is being called everytime a document is being refreshed in the - * files explorer view. - *

- * In case there is no marker anymore (error && warning), this class restore - * back the original icon. - */ -public class ViolationWarningDecorator extends LabelProvider implements ILightweightLabelDecorator { - - /** - * Link to the i-Code CNES Warning criticity icon. - */ - public static final String ICON = ImageFactory.WARNING_VERY_SMALL; - /** - * Decorator identifier - */ - public static final String ID = "fr.cnes.analysis.tools.ui.decorators." - + "violationwarningdecorator"; - /** - * Class name - **/ - private static final String CLASS = ViolationWarningDecorator.class.getName(); - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang. - * Object, org.eclipse.jface.viewers.IDecoration) - */ - @Override - public void decorate(final Object resource, final IDecoration decoration) { - final String method = "decorate"; - ICodeLogger.entering(CLASS, method, new Object[]{ - resource, decoration - }); - - if (resource instanceof IResource) { - // We add a ViolationWarningDecorator only if there is a warning in - // the file and that there is no errors markers in the file - final List vErrorMarkers = ViolationErrorMarker - .findAllMarkers((IResource) resource); - final List vWarningMarkers = ViolationWarningMarker - .findAllMarkers((IResource) resource); - - if (vErrorMarkers.isEmpty() && !vWarningMarkers.isEmpty()) { - // If the file do not contain error marker and contain warning - // markers then we put an overlay icon on the top right of the - // file's icon - decoration.addOverlay(ImageFactory.getDescriptor(ICON), IDecoration.TOP_RIGHT); - } else { - // otherwise we remove the overlay if there is no violation - // error neither violation warning markers. - // NOTE : When warnings decorators are activated, this is only - // here that we remove the markers if both - // Error and Warnings decorators are removed. - if (vErrorMarkers.isEmpty() && vWarningMarkers.isEmpty()) { - decoration.addOverlay(null); - } - } - } - ICodeLogger.exiting(CLASS, method); - - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/package-info.java deleted file mode 100644 index a9b3a015..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/decorators/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Package containing i-Code CNES Decorator of UI Plug-in. - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * Package containing i-Code CNES Decorator of UI Plug-in. - */ -package fr.cnes.analysis.tools.ui.decorators; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/EditorFortran.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/EditorFortran.java deleted file mode 100755 index 6be75474..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/EditorFortran.java +++ /dev/null @@ -1,21 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ - -package fr.cnes.analysis.tools.ui.editors; - -import org.eclipse.ui.editors.text.TextEditor; - -/** - * Editor extension for open all fortran files extensions. - */ -public class EditorFortran extends TextEditor { - /** - * Constructor. - */ - public EditorFortran() { - super(); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/package-info.java deleted file mode 100644 index d5149ea7..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/editors/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Package containing i-Code CNES Editors of UI Plug-in. - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * Package containing i-Code CNES Editors of UI Plug-in. - */ -package fr.cnes.analysis.tools.ui.editors; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyNodeException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyNodeException.java deleted file mode 100755 index cfe86369..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyNodeException.java +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * Exception throw when the page load is empty. - */ -public class EmptyNodeException extends Exception { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -2622872998164155942L; - - /** - * Default constructor. - */ - public EmptyNodeException() { - super(); - } - - /** - * Constructor with a message as parameter. - * - * @param message The exception message. - */ - public EmptyNodeException(final String message) { - super(message); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyProviderException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyProviderException.java deleted file mode 100755 index f2643e58..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyProviderException.java +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * Exception throw when the provider load is empty. - */ -public class EmptyProviderException extends Exception { - /** - * Serial version UID. - */ - private static final long serialVersionUID = -1423752077318249456L; - - /** - * Default constructor. - */ - public EmptyProviderException() { - super(); - } - - /** - * Constructor with a message as parameter. - * - * @param message The exception message. - */ - public EmptyProviderException(final String message) { - super(message); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyResourceException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyResourceException.java deleted file mode 100755 index eec27834..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptyResourceException.java +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * Exception throw when the resource is empty : a folder or a project has no - * members. - */ -public class EmptyResourceException extends Exception { - - /** - * Serial Version UID. - */ - private static final long serialVersionUID = 6504785843304862870L; - - /** - * Default constructor. - */ - public EmptyResourceException() { - super(); - } - - /** - * Constructor with a message as parameter. - * - * @param message The exception message. - */ - public EmptyResourceException(final String message) { - super(message); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptySelectionException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptySelectionException.java deleted file mode 100755 index 32f0be8b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/EmptySelectionException.java +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * Exception throw when the package explorer selection is empty. - */ -public class EmptySelectionException extends Exception { - - /** - * Serial Version UID. - */ - private static final long serialVersionUID = 4395611590755520580L; - - /** - * Default constructor. - */ - public EmptySelectionException() { - super(); - } - - /** - * Constructor with a message as parameter. - * - * @param message The exception message. - */ - public EmptySelectionException(final String message) { - super(message); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/InvalidResourceTypeException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/InvalidResourceTypeException.java deleted file mode 100755 index 49224b34..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/InvalidResourceTypeException.java +++ /dev/null @@ -1,27 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * This exception is thrown whenever {IResource}'s type is ROOT, while its - * parent is a project or a folder. - */ -public class InvalidResourceTypeException extends Exception { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = -8619336880299930548L; - - /** - * Constructor with message. - * - * @param message the error message. - */ - public InvalidResourceTypeException(final String message) { - super(message); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/NonAccessibleResourceException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/NonAccessibleResourceException.java deleted file mode 100755 index c256a167..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/NonAccessibleResourceException.java +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * This exception is thrown whenever the resource is not accessible : a folder - * does not exist, a project does not exist, a project is empty. - */ -public class NonAccessibleResourceException extends Exception { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 6576045126274438859L; - - /** - * Constructor with message. - * - * @param message the error message. - */ - public NonAccessibleResourceException(final String message) { - super(message); - } - - /** - * Constructor with message and original exception. - * - * @param message the error message. - * @param exception original exception. - */ - public NonAccessibleResourceException(final String message, final Exception exception) { - super(message, exception); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownInstanceException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownInstanceException.java deleted file mode 100755 index d8681249..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownInstanceException.java +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * Exception throw when the page load is empty. - */ -public class UnknownInstanceException extends Exception { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 431826525188171840L; - - /** - * Default constructor. - */ - public UnknownInstanceException() { - super(); - } - - /** - * Constructor with a message as parameter. - * - * @param message The exception message. - */ - public UnknownInstanceException(final String message) { - super(message); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownResourceTypeException.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownResourceTypeException.java deleted file mode 100755 index 95572404..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/UnknownResourceTypeException.java +++ /dev/null @@ -1,28 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.exception; - -/** - * This exception is thrown whenever { IResource}'s type is not FILE, nor - * FOLDER, nor PROJECT, nor ROOT (which are the only 4 options). - */ -public class UnknownResourceTypeException extends Exception { - - /** - * Auto-generated serialVersionUID. - */ - private static final long serialVersionUID = 4095575983823504009L; - - /** - * Constructor with message. - * - * @param message the error message. - */ - public UnknownResourceTypeException(final String message) { - super(message); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/package-info.java deleted file mode 100644 index 4d16408f..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/exception/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Package containing i-Code CNES Exceptions of UI Plug-in. - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * Package containing i-Code CNES Exceptions of UI Plug-in. - */ -package fr.cnes.analysis.tools.ui.exception; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisHandler.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisHandler.java deleted file mode 100644 index ba560d98..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisHandler.java +++ /dev/null @@ -1,529 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.handler; - -import fr.cnes.analysis.tools.ui.decorators.InformationDecorator; -import fr.cnes.analysis.tools.ui.decorators.ViolationErrorDecorator; -import fr.cnes.analysis.tools.ui.decorators.ViolationWarningDecorator; -import fr.cnes.analysis.tools.ui.exception.EmptyProviderException; -import fr.cnes.analysis.tools.ui.exception.EmptySelectionException; -import fr.cnes.analysis.tools.ui.markers.InformationMarker; -import fr.cnes.analysis.tools.ui.markers.ViolationErrorMarker; -import fr.cnes.analysis.tools.ui.markers.ViolationWarningMarker; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.analysis.tools.ui.view.MetricsView; -import fr.cnes.analysis.tools.ui.view.ViolationsView; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.resources.*; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.jobs.IJobChangeEvent; -import org.eclipse.core.runtime.jobs.JobChangeAdapter; -import org.eclipse.core.runtime.jobs.JobGroup; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IDecoratorManager; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.WorkspaceModifyOperation; -import org.eclipse.ui.handlers.HandlerUtil; - -import java.io.File; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; - -/** - * This class can run analysis using {@link Analyzer} service. - *

- * On {@link #execute(ExecutionEvent)} : - *

    - *
  • Identify which languages should be analyzed in - * {@link IPreferenceStore}.
  • - *
  • Identify which Rules or Metric should be analyzed in - * {@link IPreferenceStore}
  • - *
  • Identify which {@link File}s should be analyzed using - * {@link PlatformUI}'s selection service.
  • - *
  • Run an analysis using {@link RuleAnalysisJob}
  • - *
- *

- * - * @since 3.0 - */ -public class AnalysisHandler extends AbstractHandler { - - /** - * Class name - */ - private static final String CLASS = AnalysisHandler.class.getName(); - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. - * ExecutionEvent) - */ - @Override - public Object execute(final ExecutionEvent event) throws ExecutionException { - final String method = "execute"; - ICodeLogger.entering(CLASS, method); - /* - * 1.Identification the languages to analyze : - * - */ - final List languagesIds = UserPreferencesService.getEnabledLanguagesIds(); - final List excludedChecksIds = UserPreferencesService.getDisabledCheckersIds(); - - /* - * 3. Identification of the selected files - */ - List files = new ArrayList<>(); - try { - files = retrieveSelectedFiles(HandlerUtil.getCurrentStructuredSelection(event)); - - /* - * 4. Creation of jobs to run analysis. - */ - final AnalysisJob analysisJob = new AnalysisJob("Running analysis...", files, - languagesIds, excludedChecksIds); - analysisJob.setUser(true); - analysisJob.addJobChangeListener(new JobChangeAdapter() { - - @Override - public void done(final IJobChangeEvent event) { - Display.getDefault().asyncExec(new Runnable() { - - @Override - public void run() { - if (analysisJob.getResult().isOK()) { - final List results = ((AnalysisJob) event.getJob()) - .getCheckResults(); - final List resultsViolation = new ArrayList<>(); - final List resultsMetric = new ArrayList<>(); - for (CheckResult result : results) { - if (result.getValue() == null) { - resultsViolation.add(result); - } else { - resultsMetric.add(result); - } - } - AnalysisHandler.updateViolationsView(resultsViolation); - AnalysisHandler.updateMetricsView(resultsMetric); - AnalysisHandler.insertMarkers(results); - } else { - ICodeLogger.error(CLASS, method, - analysisJob.getResult().getMessage()); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(), - "i-Code CNES - Analysis failure", - analysisJob.getResult().getMessage()); - } - } - }); - } - }); - - final JobGroup group = new JobGroup("i-Code CNES Analysis.", 2, 2); - analysisJob.setJobGroup(group); - - // Launching the analysis. - analysisJob.schedule(); - - } catch (EmptySelectionException exception) { - ICodeLogger.warning(CLASS, method, exception); - MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "i-Code CNES - Warning", - exception.getMessage()); - } catch (CoreException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(HandlerUtil.getActiveShell(event), "i-Code CNES - ERROR", - exception.getMessage()); - } - ICodeLogger.exiting(CLASS, method, null); - return null; - } - - /** - * This method return {@link File}s in UI selected by the user. - * - * @param pSelection currently selected by the user on UI - * @return every {@link File}s in the selection - * @throws EmptySelectionException when no selection is set. - * @throws CoreException when some resources are not reachable. - */ - private List retrieveSelectedFiles(IStructuredSelection pSelection) - throws EmptySelectionException, CoreException { - final String method = "retrieveSelectedFiles"; - ICodeLogger.entering(CLASS, method, pSelection); - final List files = new ArrayList<>(); - final Iterator selectionIterator = pSelection.iterator(); - if (!selectionIterator.hasNext()) { - final EmptySelectionException exception = new EmptySelectionException( - "i-Code CNES : Please select file(s) in the Project" - + " Explorer before running an analysis."); - ICodeLogger.throwing(CLASS, method, exception); - throw exception; - } - while (selectionIterator.hasNext()) { - final IResource selection = (IResource) selectionIterator.next(); - files.addAll(this.findFiles(selection)); - } - ICodeLogger.exiting(CLASS, method, files); - return files; - - } - - /** - * This method can be used to find different File element of a selection. - * - *

- * Warning : this method is recursive - *

- * - * @param selection The selection to search for files - * @return a list of file included in the selection - * @throws CoreException when resources of a {@link IProject} or {@link IFolder} - * couldn't be reached - */ - private List findFiles(IResource selection) throws CoreException { - final String method = "findFiles"; - ICodeLogger.entering(CLASS, method); - final List files = new ArrayList<>(); - switch (selection.getType()) { - case IResource.ROOT: - for (IResource resource : ((IWorkspaceRoot) selection).members()) { - files.addAll(this.findFiles(resource)); - } - break; - case IResource.PROJECT: - for (IResource resource : ((IProject) selection).members()) { - files.addAll(this.findFiles(resource)); - } - break; - case IResource.FOLDER: - for (IResource resource : ((IFolder) selection).members()) { - files.addAll(this.findFiles(resource)); - } - break; - case IResource.FILE: - files.add(((IFile) selection).getLocation().toFile().getAbsoluteFile()); - break; - default: - break; - } - ICodeLogger.exiting(CLASS, method, files); - return files; - } - - /** - * Update the violation's view - * - * @param violations to show in the view. - */ - protected static void updateViolationsView(final List violations) { - final String method = "updateCheckResultView"; - ICodeLogger.entering(CLASS, method, violations); - - try { - // get the page - final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getActivePage(); - - // open view - page.showView(ViolationsView.VIEW_ID); - - // get view - final ViolationsView view = (ViolationsView) page.findView(ViolationsView.VIEW_ID); - - // show rules analyze results - if (view != null) { - view.display(violations); - } - - } catch (final PartInitException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method); - } - - /** - * Update MetricsView - * - * @param values to show in the view - */ - private static void updateMetricsView(final List values) { - final String method = "updateMetricsView"; - ICodeLogger.entering(CLASS, method, values); - - try { - // get the page - final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getActivePage(); - - // open view - page.showView(MetricsView.VIEW_ID); - - // get view - final MetricsView view = (MetricsView) page.findView(MetricsView.VIEW_ID); - - // show rules analyze results - if (view != null) { - view.display(values); - } - - } catch (final PartInitException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } catch (final EmptyProviderException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method insert for each violation detected a new marker on the line - * of the violation. - * - * @param checks the checks to add marker with - */ - public static void insertMarkers(List checks) { - final String method = "insertMarkers"; - ICodeLogger.entering(CLASS, method, checks); - final ProgressMonitorDialog pmdialog = new ProgressMonitorDialog( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); - try { - pmdialog.run(true, true, new WorkspaceModifyOperation() { - @Override - protected void execute(final IProgressMonitor monitor) throws CoreException, - InvocationTargetException, InterruptedException { - try { - - final HashSet cleanedFiles = new HashSet(); - String message = "Violation detected here."; - IFile file; - for (final CheckResult check : checks) { - file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation( - new Path(check.getFile().getAbsolutePath()) - .makeRelativeTo(ResourcesPlugin - .getWorkspace() - .getRoot() - .getFullPath())); - if (file != null && file.exists()) { - if (!cleanedFiles.contains(file)) { - cleanedFiles.add(file); - file.deleteMarkers(ViolationErrorMarker.MARKER, true, 1); - file.deleteMarkers(ViolationWarningMarker.MARKER, true, 1); - file.deleteMarkers(InformationMarker.MARKER, true, 1); - } - } - Float limit = Float.valueOf(Float.NaN); - boolean violation = false; - if (UserPreferencesService.hasMaxValue(check.getId()) - && !UserPreferencesService.getMaxValue(check.getId()) - .isNaN()) { - limit = UserPreferencesService.getMaxValue(check.getId()); - violation = check.getValue().compareTo(limit) > 0; - if (violation) { - message = getMaximumViolationMessage(check.getName(), - check.getValue(), limit); - } else { - message = getMaximumComplianceMessage(check.getName(), - check.getValue(), limit); - - } - } else if (UserPreferencesService.hasMinValue(check.getId()) - && !UserPreferencesService.getMaxValue(check.getId()) - .isNaN()) { - limit = UserPreferencesService.getMinValue(check.getId()); - violation = check.getValue().compareTo(limit) < 0; - if (violation) { - message = getMinimumViolationMessage(check.getName(), - check.getValue(), limit); - } else { - message = getMinimumComplianceMessage(check.getName(), - check.getValue(), limit); - } - } else { - if (check.getMessage() == null || check.getMessage().isEmpty()) { - if (check.getValue() != null && !check.getValue().isNaN()) { - message = getDefaultMetricComputedMessage(check.getName(), - check.getValue()); - } else { - message = getDefaultMetricUncomputedMessage( - check.getName()); - violation = false; - } - } else { - message = check.getName() + " | " + check.getMessage(); - violation = true; - } - - } - - if (violation && UserPreferencesService - .getCheckerSeverity(check.getId()) - .equals(UserPreferencesService.PREF_SEVERITY_ERROR_VALUE)) { - ViolationErrorMarker.createMarker(file, check.getLine(), - check.getName(), message); - } else if (violation && UserPreferencesService - .getCheckerSeverity(check.getId()) - .equals(UserPreferencesService.PREF_SEVERITY_WARNING_VALUE)) { - ViolationWarningMarker.createMarker(file, check.getLine(), - check.getName(), message); - } else { - InformationMarker.createMarker(file, check.getLine(), - check.getName(), message); - } - } - } catch (final CoreException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(), - "Marker problem", exception.getMessage()); - - } - } - }); - } catch (InvocationTargetException | InterruptedException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Marker problem", exception.getMessage()); - } - // One time all markers have been insert, we refresh all - // decorators. - - final IDecoratorManager manager = PlatformUI.getWorkbench().getDecoratorManager(); - - manager.update(ViolationWarningDecorator.ID); - manager.update(ViolationErrorDecorator.ID_VIOLATION_ERROR_DECORATOR); - manager.update(InformationDecorator.ID_INFORMATION_DECORATOR); - - ICodeLogger.exiting(CLASS, method); - - } - - /** - * @param name of the metric - * @return Default message when a metric is not being computed for a - * function. - */ - protected static String getDefaultMetricUncomputedMessage(String name) { - final String method = "getDefaultMetricUncomputedMessage"; - ICodeLogger.entering(CLASS, method, name); - final String message = name - + " | Checker value for this function was not computed. Please refer to CNES" - + " RNC for more informations."; - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param name of the metric - * @param value of the metric - * @return default message when a metric is computed. - */ - protected static String getDefaultMetricComputedMessage(String name, Float value) { - final String method = "getDefaultMetricComputedMessage"; - ICodeLogger.entering(CLASS, method, new Object[]{ - name, value - }); - final String message = name + " | Value is " + value + "."; - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param name of the metric - * @param value of the metric - * @param limit set by the user for the metric - * @return the error message - */ - protected static String getMaximumViolationMessage(String name, Float value, Float limit) { - final String method = ""; - ICodeLogger.entering(CLASS, method, new Object[]{ - name, value, limit - }); - final String message = name + " | Value is " + value + " while it should not exceed " - + limit + "."; - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param name of the metric - * @param value of the metric - * @param limit set by the user for the metric - * @return the compliance message - */ - protected static String getMaximumComplianceMessage(String name, Float value, Float limit) { - final String method = ""; - ICodeLogger.entering(CLASS, method, new Object[]{ - name, value, limit - }); - final String message = name + " | Value is " + value + ", below it's maximum limit of " - + limit + "."; - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param name of the metric - * @param value of the metric - * @param limit set by the user for the metric - * @return the error message - */ - protected static String getMinimumViolationMessage(String name, Float value, Float limit) { - final String method = ""; - ICodeLogger.entering(CLASS, method, new Object[]{ - name, value, limit - }); - final String message = name + " | Value is " + value + " while it should not below " + limit - + "."; - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param name of the metric - * @param value of the metric - * @param limit set by the user for the metric - * @return the error message - */ - protected static String getMinimumComplianceMessage(String name, Float value, Float limit) { - final String method = ""; - ICodeLogger.entering(CLASS, method, new Object[]{ - name, value, limit - }); - final String message = name + " | Value is " + value + " above it's minimum limit of " - + limit + "."; - ICodeLogger.exiting(CLASS, method, message); - return message; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisJob.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisJob.java deleted file mode 100644 index 5b7ca6c4..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/AnalysisJob.java +++ /dev/null @@ -1,142 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.handler; - -import fr.cnes.analysis.tools.ui.Activator; -import fr.cnes.icode.Analyzer; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; - -import java.io.File; -import java.util.HashSet; -import java.util.List; - -/** - * This {@link Job} run an analysis using {@link Analyzer} service. - * - * @since 3.0 - */ -public class AnalysisJob extends Job { - - /** - * Class name - */ - private static final String CLASS = AnalysisJob.class.getName(); - - /** - * {@link Analyzer} service to run the analysis - */ - private Analyzer analyzer; - /** - * List of files to analyze. - */ - private List inputFiles; - /** - * List of languages plug-in identifiers to run analysis with - */ - private List languageIds; - /** - * List of all metrics excluded from the analysis. More informations on - * : {@link Analyzer#computeMetrics(List, List, List)} - */ - private List excludedIds; - /** - * {@link FileValue} list from analysis result. - */ - private List checks; - - /** - * Constructor for {@link AnalysisJob} - * - * @param pName name of the Job - * @param pInputFiles to analyze - * @param pLanguageIds to run analysis with - * @param pExcludedIds to exclude from analysis - */ - public AnalysisJob(final String pName, final List pInputFiles, - final List pLanguageIds, final List pExcludedIds) { - super(pName); - final String method = "AnalysisJob"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pName, pInputFiles, pLanguageIds, pExcludedIds - }); - this.inputFiles = pInputFiles; - this.languageIds = pLanguageIds; - this.excludedIds = pExcludedIds; - this.analyzer = new Analyzer(); - ICodeLogger.exiting(CLASS, method); - } - - @Override - protected IStatus run(IProgressMonitor monitor) { - final String method = "run"; - ICodeLogger.entering(this.getClass().getName(), method, monitor); - IStatus status = this.verifyInputs(); - monitor.setTaskName("Analyzing files..."); - if (status.isOK()) { - this.checks = analyzer.stableCheck(new HashSet<>(inputFiles), languageIds, excludedIds); - } - ICodeLogger.exiting(CLASS, method, status); - return status; - } - - /** - * @return whether or not files to analyzer can be reachde in the file - * system. - */ - private IStatus verifyInputs() { - final String method = "verifyInputs"; - ICodeLogger.entering(this.getClass().getName(), method); - int counter = 0; - IStatus status = Status.OK_STATUS; - while (this.inputFiles.size() > counter && status.isOK()) { - if (!inputFiles.get(counter).exists()) { - ICodeLogger.warning(CLASS, method, - "File unreachable : " + inputFiles.get(counter).getAbsolutePath()); - status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, - "File unreachable : " + inputFiles.get(counter).getAbsolutePath()); - } - counter++; - } - ICodeLogger.exiting(CLASS, method, status); - return status; - } - - /** - * @return files to analyzed - */ - public List getInputFiles() { - final String method = "getInputFiles"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, inputFiles); - return inputFiles; - } - - /** - * @param pInputFiles to analyze - */ - public void setInputFiles(List pInputFiles) { - final String method = "setInputFiles"; - ICodeLogger.entering(CLASS, method, pInputFiles); - this.inputFiles = pInputFiles; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return checkerResults results from the analysis. - */ - public List getCheckResults() { - final String method = "getCheckResults"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, checks); - return checks; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ClearHandler.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ClearHandler.java deleted file mode 100755 index 9bd612b8..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ClearHandler.java +++ /dev/null @@ -1,141 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.handler; - -import fr.cnes.analysis.tools.ui.exception.EmptyProviderException; -import fr.cnes.analysis.tools.ui.view.MetricsView; -import fr.cnes.analysis.tools.ui.view.ViolationsView; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.ui.IDecoratorManager; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.handlers.HandlerUtil; - -/** - * Handler to clear the views. - */ -public class ClearHandler extends AbstractHandler { - - /** - * Class name - */ - private static final String CLASS = ClearHandler.class.getName(); - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core. - * commands .ExecutionEvent) - */ - @Override - public Object execute(final ExecutionEvent event) { - final String method = "execute"; - ICodeLogger.entering(this.getClass().getName(), method, event); - try { - - // clear the violations view - this.clearViolationsView(); - - // clear the metrics view - this.clearMetricsView(); - - // delete markers - this.clearAllMarkers(); - - this.refreshDecorators(); - - } catch (final EmptyProviderException exception) { - ICodeLogger.error(this.getClass().getName(), method, exception); - MessageDialog.openError(HandlerUtil.getActiveShell(event), "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(this.getClass().getName(), method, null); - return null; - } - - /** - * Simply refresh all decorators to remove them from the IResource of type - * IFile in the files tree. - */ - private void refreshDecorators() { - final String method = "refreshDecorators"; - ICodeLogger.entering(CLASS, method); - final IDecoratorManager manager = PlatformUI.getWorkbench().getDecoratorManager(); - - manager.update("fr.cnes.analysis.tools.ui.decorators.violationwarningdecorator"); - manager.update("fr.cnes.analysis.tools.ui.decorators.violationerrordecorator"); - - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method clear the violation view if it is opened. - * - * @throws EmptyProviderException error throw whenever the provider corresponding to the view - * can't be found - */ - private void clearViolationsView() throws EmptyProviderException { - final String method = "clearViolationsView"; - ICodeLogger.entering(CLASS, method); - - final ViolationsView rulesView = (ViolationsView) PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage() - .findView(ViolationsView.VIEW_ID); - if (rulesView != null) { - rulesView.clear(); - } - ICodeLogger.exiting(CLASS, method); - - } - - /** - * This method clear the metric view if it is opened. - * - * @throws EmptyProviderException error throw whenever the provider corresponding to the view - * can't be found - */ - private void clearMetricsView() throws EmptyProviderException { - final String method = "clearMetricsView"; - ICodeLogger.entering(CLASS, method); - - final MetricsView metricsView = (MetricsView) PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage().findView(MetricsView.VIEW_ID); - if (metricsView != null) { - metricsView.clear(); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method clear all the markers errors and warning from files. - */ - private void clearAllMarkers() { - final String method = "clearAllMarkers"; - ICodeLogger.entering(CLASS, method); - - final IResource resource = ResourcesPlugin.getWorkspace().getRoot(); - final int depth = IResource.DEPTH_INFINITE; - try { - resource.deleteMarkers("fr.cnes.analysis.tools.ui.markers.ViolationErrorMarker", true, - depth); - resource.deleteMarkers("fr.cnes.analysis.tools.ui.markers.ViolationWarningMarker", true, - depth); - resource.deleteMarkers("fr.cnes.analysis.tools.ui.markers.InformationMarker", true, - depth); - } catch (final CoreException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Marker deletion problem", exception.getMessage()); - } - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ShowRuleTreeViewerHandler.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ShowRuleTreeViewerHandler.java deleted file mode 100755 index 11330352..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/ShowRuleTreeViewerHandler.java +++ /dev/null @@ -1,112 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.handler; - -import fr.cnes.analysis.tools.ui.view.ViolationsView; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.ui.PlatformUI; - -/** - * This Handler is being used by {@link ViolationsView} to dispose and show - * different tree viewers available for the user. - * - * @version 2.0 - * @since 2.0 - */ -public class ShowRuleTreeViewerHandler implements IHandler { - - /** - * Class name - */ - private static final String CLASS = ShowRuleTreeViewerHandler.class.getName(); - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#addHandlerListener(org.eclipse.core. - * commands.IHandlerListener) - */ - @Override - public void addHandlerListener(IHandlerListener handlerListener) { - // Do nothing - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.commands.IHandler#dispose() - */ - @Override - public void dispose() { - // Do nothing. - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. - * ExecutionEvent) - */ - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - final String method = "execute"; - ICodeLogger.entering(CLASS, method, event); - final ViolationsView view = (ViolationsView) PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage() - .findView(ViolationsView.VIEW_ID); - final String name = event.getParameter("TreeViewer"); - if (!view.getTreeViewerType().equals(name)) { - view.setTreeViewerType(name); - } - ICodeLogger.exiting(CLASS, method, null); - return null; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.commands.IHandler#isEnabled() - */ - @Override - public boolean isEnabled() { - final String method = "isEnabled"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.TRUE); - return true; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.commands.IHandler#isHandled() - */ - @Override - public boolean isHandled() { - final String method = "isHandled"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.TRUE); - return true; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#removeHandlerListener(org.eclipse.core - * .commands.IHandlerListener) - */ - @Override - public void removeHandlerListener(IHandlerListener handlerListener) { - // Do nothing - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/package-info.java deleted file mode 100644 index 2e055460..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/handler/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Package containing i-Code CNES UI Plugin handlers. - * - * @version 3.0 - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * Package containing i-Code CNES UI Plugin handlers. - * - * @version 3.0 - */ -package fr.cnes.analysis.tools.ui.handler; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/ImageFactory.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/ImageFactory.java deleted file mode 100644 index 1ad8e598..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/ImageFactory.java +++ /dev/null @@ -1,108 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.images; - -import fr.cnes.analysis.tools.ui.Activator; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.plugin.AbstractUIPlugin; - -/** - * This service should be used to reach images stored in the plugin resources. - * - * @since 3.0 - */ -public final class ImageFactory { - - /** - * I-code logo red, 8x8 - */ - public static final String ENABLED = "./icons/enabled.png"; - /** - * I-code logo red, 8x8 - */ - public static final String DISABLED = "./icons/disabled.png"; - /** - * I-code logo red, 8x8 - */ - public static final String ERROR_VERY_SMALL = "./icons/logo-i-code-rouge-8x8.png"; - /** - * I-code logo red, 16x16 - */ - public static final String ERROR_SMALL = "./icons/logo-i-code-rouge-16x16.png"; - /** - * I-code logo red, 32x32 - */ - public static final String ERROR_MEDIUM = "./icons/logo-i-code-rouge-32x32.png"; - /** - * I-code logo red, 8x8 - */ - public static final String ERROR_BIG = "./icons/logo-i-code-rouge-45x45.png"; - /** - * I-code logo blue, 8x8 - */ - public static final String INFO_VERY_SMALL = "./icons/logo-i-code-bleue-8x8.png"; - /** - * I-code logo blue, 16x16 - */ - public static final String INFO_SMALL = "./icons/logo-i-code-bleue-16x16.png"; - /** - * I-code logo orange, 8x8 - */ - public static final String WARNING_VERY_SMALL = "./icons/logo-i-code-orange-8x8.png"; - /** - * I-code logo orange, 16x16 - */ - public static final String WARNING_SMALL = "./icons/logo-i-code-orange-16x16.png"; - /** - * I-code logo orange, 32x32 - */ - public static final String WARNING_MEDIUM = "./icons/logo-i-code-orange-32x32.png"; - /** - * I-code logo orange, 8x8 - */ - public static final String WARNING_BIG = "./icons/logo-i-code-orange-45x45.png"; - /** - * Class name - */ - private static final String CLASS = ImageFactory.class.getName(); - - /** - * Private constructor to remove public constructor has this utility class - * should not be instantiate. - */ - private ImageFactory() { - // not called - } - - /** - * @param pImageLocation Location of the image (relative to the plugin). - * @return The ImageDescriptor located in pImageLocation - */ - public static ImageDescriptor getDescriptor(final String pImageLocation) { - final String method = "getDescriptor"; - ICodeLogger.entering(CLASS, method, pImageLocation); - final ImageDescriptor descriptor = AbstractUIPlugin - .imageDescriptorFromPlugin(Activator.PLUGIN_ID, pImageLocation); - ICodeLogger.exiting(CLASS, method, descriptor); - return descriptor; - } - - /** - * @param pImageLocation Location of the image file (relative to the plug-in). - * @return The Image located in pImageLocation - */ - public static Image getImage(final String pImageLocation) { - final String method = "getImage"; - ICodeLogger.entering(CLASS, method, pImageLocation); - final Image image = AbstractUIPlugin - .imageDescriptorFromPlugin(Activator.PLUGIN_ID, pImageLocation) - .createImage(); - ICodeLogger.exiting(CLASS, method, image); - return image; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/package-info.java deleted file mode 100644 index 8342a57a..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/images/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.images; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/InformationMarker.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/InformationMarker.java deleted file mode 100644 index dfa12758..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/InformationMarker.java +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.markers; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.text.Position; -import org.eclipse.jface.text.TextSelection; -import org.eclipse.jface.text.source.IAnnotationModel; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.texteditor.IDocumentProvider; -import org.eclipse.ui.texteditor.ITextEditor; -import org.eclipse.ui.texteditor.SimpleMarkerAnnotation; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * ViolationErrorMarker This class implements the creation of marker and the - * listing of theses ones. This class is useful for the use of markers and also - * the decorator. It allows also multiple lines selection. - */ -public final class InformationMarker { - /** - * ID of the marker - */ - public static final String MARKER = "fr.cnes.analysis.tools.ui.markers.InformationMarker"; - - /** - * ID of the annotation - */ - public static final String ANNOTATION = "fr.cnes.analysis.tools.ui.Information"; - /** - * Class name - */ - private static final String CLASS = InformationMarker.class.getName(); - - /** - * Default constructor removal to avoid instantiation. - */ - private InformationMarker() { - - } - - /** - * Create a new marker - * - * @param res The resource in which must be put the marker (file) - * @param line Line number of the marker - * @param description The description of the function - * @param message The error message - * @return the new marker - * @throws CoreException when marker couldn't be created. - */ - public static IMarker createMarker(final IResource res, final Integer line, - final String description, final String message) throws CoreException { - final String method = "createMarker"; - ICodeLogger.entering(CLASS, method, new Object[]{ - res, line, description, message - }); - IMarker marker = null; - // note: you use the id that is defined in your plugin.xml - marker = res.createMarker(MARKER); - marker.setAttribute(IMarker.MESSAGE, message); - marker.setAttribute(IMarker.LINE_NUMBER, line); - marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_LOW); - marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO); - ICodeLogger.exiting(CLASS, method, marker); - return marker; - } - - /** - * Find all markers in a file. - * - * @param resource resource to find marker on. - * @return list of a resources markers - */ - public static List findMarkers(final IResource resource) { - final String method = "findMarkers"; - ICodeLogger.entering(CLASS, method, resource); - List markers; - try { - markers = Arrays.asList(resource.findMarkers(MARKER, true, IResource.DEPTH_ZERO)); - } catch (@SuppressWarnings("unused") CoreException e) { - markers = new ArrayList(); - } - ICodeLogger.exiting(CLASS, method, markers); - return markers; - } - - /** - * Returns a list of markers that are linked to the resource or any sub - * resource of the resource - * - * @param resource resource to find marker on. - * @return list of markers that are linked to the resource or any - * sub-resource or resource - */ - public static List findAllMarkers(final IResource resource) { - final String method = "findAllMarkers"; - ICodeLogger.entering(CLASS, method, resource); - List markers; - try { - markers = Arrays.asList(resource.findMarkers(MARKER, true, IResource.DEPTH_INFINITE)); - } catch (@SuppressWarnings("unused") CoreException e) { - markers = new ArrayList(); - } - ICodeLogger.exiting(CLASS, method, markers); - return markers; - } - - /** - * Returns the selection of the package explorer - * - * @return the selection of the package explorer - */ - public static TreeSelection getTreeSelection() { - final String method = "getTreeSelection"; - ICodeLogger.entering(CLASS, method); - TreeSelection toReturn = null; - final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getSelectionService().getSelection(); - if (selection instanceof TreeSelection) { - toReturn = (TreeSelection) selection; - } - ICodeLogger.exiting(CLASS, method, toReturn); - return toReturn; - } - - /** - * Returns the selection of the package explorer - * - * @return selection of the package explorer - */ - public static TextSelection getTextSelection() { - final String method = "getTextSelection"; - ICodeLogger.entering(CLASS, method); - TextSelection toReturn = null; - final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getSelectionService().getSelection(); - if (selection instanceof TextSelection) { - toReturn = (TextSelection) selection; - } - ICodeLogger.exiting(CLASS, method, toReturn); - return toReturn; - } - - /** - * @param marker Marker to add annotation - * @param selection selection to add annotation on. - * @param editor document editor to add annotation on. - */ - public static void addAnnotation(final IMarker marker, final ITextSelection selection, - final ITextEditor editor) { - final String method = "addAnnotation"; - ICodeLogger.entering(CLASS, method, new Object[]{ - marker, selection, editor - }); - // The DocumentProvider enables to get the document currently loaded in - // the editor - final IDocumentProvider idp = editor.getDocumentProvider(); - - // This is the document we want to connect to. This is taken from the - // current editor input. - final IDocument document = idp.getDocument(editor.getEditorInput()); - - // The IannotationModel enables to add/remove/change annoatation to a - // Document loaded in an Editor - final IAnnotationModel iamf = idp.getAnnotationModel(editor.getEditorInput()); - - // Note: The annotation type id specify that you want to create one of - // your annotations - final SimpleMarkerAnnotation ma = new SimpleMarkerAnnotation(ANNOTATION, marker); - - // Finally add the new annotation to the model - iamf.connect(document); - iamf.addAnnotation(ma, new Position(selection.getOffset(), selection.getLength())); - iamf.disconnect(document); - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationErrorMarker.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationErrorMarker.java deleted file mode 100755 index ae63a1f5..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationErrorMarker.java +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.markers; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.text.Position; -import org.eclipse.jface.text.TextSelection; -import org.eclipse.jface.text.source.IAnnotationModel; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.texteditor.IDocumentProvider; -import org.eclipse.ui.texteditor.ITextEditor; -import org.eclipse.ui.texteditor.SimpleMarkerAnnotation; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * ViolationErrorMarker This class implements the creation of marker and the - * listing of theses ones. This class is useful for the use of markers and also - * the decorator. It allows also multiple lines selection. - */ -public final class ViolationErrorMarker { - /** - * ID of the marker - */ - public static final String MARKER = "fr.cnes.analysis.tools.ui.markers.ViolationErrorMarker"; - - /** - * ID of the annotation - */ - public static final String ANNOTATION = "fr.cnes.analysis.tools.ui.ViolationError"; - /** - * Class name - */ - private static final String CLASS = ViolationErrorMarker.class.getName(); - - /** - * Default constructor removal to avoid instantiation. - */ - private ViolationErrorMarker() { - - } - - /** - * Create a new marker - * - * @param res The resource in which must be put the marker (file) - * @param line Line number of the marker - * @param description The description of the function - * @param message The error message - * @return the new marker - * @throws CoreException when marker could not be created. - */ - public static IMarker createMarker(final IResource res, final Integer line, - final String description, final String message) throws CoreException { - final String method = "createMarker"; - ICodeLogger.entering(CLASS, method, new Object[]{ - res, line, description, message - }); - IMarker marker = null; - // note: you use the id that is defined in your plugin.xml - marker = res.createMarker(MARKER); - marker.setAttribute(IMarker.MESSAGE, message); - marker.setAttribute(IMarker.LINE_NUMBER, line); - marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH); - marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); - ICodeLogger.exiting(CLASS, method, marker); - return marker; - } - - /** - * Find all markers in a file. - * - * @param resource to find marker on. - * @return list of a resources markers - */ - public static List findMarkers(final IResource resource) { - final String method = "findMarkers"; - ICodeLogger.entering(CLASS, method, resource); - List markers; - try { - markers = Arrays.asList(resource.findMarkers(MARKER, true, IResource.DEPTH_ZERO)); - } catch (@SuppressWarnings("unused") CoreException e) { - markers = new ArrayList(); - } - ICodeLogger.exiting(CLASS, method, markers); - return markers; - } - - /** - * Returns a list of markers that are linked to the resource or any sub - * resource of the resource - * - * @param resource to find markers on. - * @return list of markers that are linked to the resource or any - * sub-resource or resource - */ - public static List findAllMarkers(final IResource resource) { - final String method = "findAllMarkers"; - ICodeLogger.entering(CLASS, method, resource); - List markers; - try { - markers = Arrays.asList(resource.findMarkers(MARKER, true, IResource.DEPTH_INFINITE)); - } catch (@SuppressWarnings("unused") CoreException e) { - markers = new ArrayList(); - } - ICodeLogger.exiting(CLASS, method, markers); - return markers; - } - - /** - * Returns the selection of the package explorer - * - * @return the selection of the package explorer - */ - public static TreeSelection getTreeSelection() { - final String method = "getTreeSelection"; - ICodeLogger.entering(CLASS, method); - TreeSelection toReturn = null; - final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getSelectionService().getSelection(); - if (selection instanceof TreeSelection) { - toReturn = (TreeSelection) selection; - } - ICodeLogger.exiting(CLASS, method, toReturn); - return toReturn; - } - - /** - * Returns the selection of the package explorer - * - * @return selection of the package explorer - */ - public static TextSelection getTextSelection() { - final String method = "getTextSelection"; - ICodeLogger.entering(CLASS, method); - TextSelection toReturn = null; - final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getSelectionService().getSelection(); - if (selection instanceof TextSelection) { - toReturn = (TextSelection) selection; - } - ICodeLogger.exiting(CLASS, method, toReturn); - return toReturn; - } - - /** - * @param marker Marker to add annotation - * @param selection selection to add annotation on. - * @param editor document editor to add annotation on. - */ - public static void addAnnotation(final IMarker marker, final ITextSelection selection, - final ITextEditor editor) { - final String method = "addAnnotation"; - ICodeLogger.entering(CLASS, method, new Object[]{ - marker, selection, editor - }); - // The DocumentProvider enables to get the document currently loaded in - // the editor - final IDocumentProvider idp = editor.getDocumentProvider(); - - // This is the document we want to connect to. This is taken from the - // current editor input. - final IDocument document = idp.getDocument(editor.getEditorInput()); - - // The IannotationModel enables to add/remove/change annoatation to a - // Document loaded in an Editor - final IAnnotationModel iamf = idp.getAnnotationModel(editor.getEditorInput()); - - // Note: The annotation type id specify that you want to create one of - // your annotations - final SimpleMarkerAnnotation ma = new SimpleMarkerAnnotation(ANNOTATION, marker); - - // Finally add the new annotation to the model - iamf.connect(document); - iamf.addAnnotation(ma, new Position(selection.getOffset(), selection.getLength())); - iamf.disconnect(document); - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationWarningMarker.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationWarningMarker.java deleted file mode 100755 index f4cbc4ab..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/ViolationWarningMarker.java +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.markers; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.text.Position; -import org.eclipse.jface.text.TextSelection; -import org.eclipse.jface.text.source.IAnnotationModel; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.texteditor.IDocumentProvider; -import org.eclipse.ui.texteditor.ITextEditor; -import org.eclipse.ui.texteditor.SimpleMarkerAnnotation; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * ViolationErrorMarker This class implements the creation of marker and the - * listing of theses ones. This class is useful for the use of markers and also - * the decorator. It allows also multiple lines selection. - */ -public final class ViolationWarningMarker { - /** - * Marker ID pointing on the image. - */ - public static final String MARKER = "fr.cnes.analysis.tools.ui.markers.ViolationWarningMarker"; - - /** - * Annotation ID - */ - public static final String ANNOTATION = "fr.cnes.analysis.tools.ui.ViolationWarning"; - /** - * Class name - */ - private static final String CLASS = ViolationWarningMarker.class.getName(); - - /** - * Default constructor removal to avoid instantiation. - */ - private ViolationWarningMarker() { - - } - - /** - * Create a new marker - * - * @param res The resource in which must be put the marker (file) - * @param line Line number of the marker - * @param description The description of the function - * @param message The error message - * @return the new marker - * @throws CoreException when marker could not be created. - */ - public static IMarker createMarker(final IResource res, final Integer line, - final String description, final String message) throws CoreException { - final String method = "createMarker"; - ICodeLogger.entering(CLASS, method, new Object[]{ - res, line, description, message - }); - IMarker marker = null; - // note: you use the id that is defined in your plugin.xml - marker = res.createMarker(MARKER); - marker.setAttribute(IMarker.MESSAGE, message); - marker.setAttribute(IMarker.LINE_NUMBER, line); - marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_NORMAL); - marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); - ICodeLogger.exiting(CLASS, method, marker); - return marker; - } - - /** - * Find all markers in a file. - * - * @param resource to find marker on. - * @return list of a resources markers - */ - public static List findMarkers(final IResource resource) { - final String method = "findMarkers"; - ICodeLogger.entering(CLASS, method, resource); - List markers; - try { - markers = Arrays.asList(resource.findMarkers(MARKER, true, IResource.DEPTH_ZERO)); - } catch (@SuppressWarnings("unused") CoreException e) { - markers = new ArrayList(); - } - ICodeLogger.exiting(CLASS, method, markers); - return markers; - } - - /** - * Returns a list of markers that are linked to the resource or any sub - * resource of the resource - * - * @param resource to find marker on. - * @return list of markers that are linked to the resource or any - * sub-resource or resource - */ - public static List findAllMarkers(final IResource resource) { - final String method = "findAllMarkers"; - ICodeLogger.entering(CLASS, method, resource); - List markers; - try { - markers = Arrays.asList(resource.findMarkers(MARKER, true, IResource.DEPTH_INFINITE)); - } catch (@SuppressWarnings("unused") CoreException e) { - markers = new ArrayList(); - } - ICodeLogger.exiting(CLASS, method, markers); - return markers; - } - - /** - * Returns the selection of the package explorer - * - * @return the selection of the package explorer - */ - public static TreeSelection getTreeSelection() { - final String method = "getTreeSelection"; - ICodeLogger.entering(CLASS, method); - TreeSelection toReturn = null; - final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getSelectionService().getSelection(); - if (selection instanceof TreeSelection) { - toReturn = (TreeSelection) selection; - } - ICodeLogger.exiting(CLASS, method, toReturn); - return toReturn; - } - - /** - * Returns the selection of the package explorer - * - * @return selection of the package explorer - */ - public static TextSelection getTextSelection() { - final String method = "getTextSelection"; - ICodeLogger.entering(CLASS, method); - TextSelection toReturn = null; - final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getSelectionService().getSelection(); - if (selection instanceof TextSelection) { - toReturn = (TextSelection) selection; - } - ICodeLogger.exiting(CLASS, method, toReturn); - return toReturn; - } - - /** - * @param marker Marker to add annotation - * @param selection selection to add annotation on. - * @param editor document editor to add annotation on. - */ - public static void addAnnotation(final IMarker marker, final ITextSelection selection, - final ITextEditor editor) { - final String method = "addAnnotation"; - ICodeLogger.entering(CLASS, method, new Object[]{ - marker, selection, editor - }); - // The DocumentProvider enables to get the document currently loaded in - // the editor - final IDocumentProvider idp = editor.getDocumentProvider(); - - // This is the document we want to connect to. This is taken from the - // current editor input. - final IDocument document = idp.getDocument(editor.getEditorInput()); - - // The IannotationModel enables to add/remove/change annoatation to a - // Document loaded in an Editor - final IAnnotationModel iamf = idp.getAnnotationModel(editor.getEditorInput()); - - // Note: The annotation type id specify that you want to create one of - // your annotations - final SimpleMarkerAnnotation ma = new SimpleMarkerAnnotation(ANNOTATION, marker); - - // Finally add the new annotation to the model - iamf.connect(document); - iamf.addAnnotation(ma, new Position(selection.getOffset(), selection.getLength())); - iamf.disconnect(document); - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/package-info.java deleted file mode 100644 index 9210fa1a..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/markers/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Package containing i-Code CNES Markers of UI Plug-in. - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ - -/** - * Package containing i-Code CNES Markers of UI Plug-in. - */ -package fr.cnes.analysis.tools.ui.markers; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/CheckerPreferencesContainer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/CheckerPreferencesContainer.java deleted file mode 100644 index ea10ba6f..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/CheckerPreferencesContainer.java +++ /dev/null @@ -1,397 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences; - -import fr.cnes.analysis.tools.ui.Activator; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * Container for Checker preferences used by {@link UserPreferencesService} - */ -public class CheckerPreferencesContainer { - - /** - * Class name - */ - private static final String CLASS = CheckerPreferencesContainer.class.getName(); - - /** - * Checker's identifier - */ - private String id; - /** - * Checker's name - */ - private String name; - /** - * Checker's enabling - */ - private boolean checked; - /** - * Checker's severity - */ - private String severity; - /** - * Checker's max value - */ - private Float maxValue; - /** - * Checker's min value - */ - private Float minValue; - /** - * Checker is a metric - */ - private boolean isMetric; - /** - * Checker language's name - */ - private String languageName; - /** - * Checker language's id - */ - private String languageId; - - /** - * @param pLanguageId Checker language's id - * @param pLanguageName Checker language's name - * @param pId Checker's identifier - * @param pName Checker's name - * @param pChecked Checker's enabling - * @param pSeverity Checker's severity - * @param pIsMetric Checker is a metric - */ - public CheckerPreferencesContainer(final String pLanguageId, final String pLanguageName, - final String pId, final String pName, final boolean pChecked, - final String pSeverity, final boolean pIsMetric) { - final String method = "CheckerPreferencesContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pLanguageId, pLanguageName, pId, pName, Boolean.valueOf(pChecked), pSeverity, - Boolean.valueOf(pIsMetric) - }); - this.languageId = pLanguageId; - this.languageName = pLanguageName; - this.id = pId; - this.name = pName; - this.checked = pChecked; - this.severity = pSeverity; - this.minValue = Float.valueOf(Float.NaN); - this.maxValue = Float.valueOf(Float.NaN); - this.isMetric = pIsMetric; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pLanguageId Checker language's id - * @param pLanguageName Checker language's name - * @param pId Checker's identifier - * @param pName Checker's name - * @param pChecked Checker's enabling - * @param pSeverity Checker's severity - * @param pMinValue Checker's min value - * @param pMaxValue Checker's max value - * @param pIsMetric Checker is a metric - */ - public CheckerPreferencesContainer(final String pLanguageId, final String pLanguageName, - final String pId, final String pName, final boolean pChecked, - final String pSeverity, final Float pMinValue, final Float pMaxValue, - final boolean pIsMetric) { - final String method = "CheckerPreferencesContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pLanguageId, pLanguageName, pId, pName, Boolean.valueOf(pChecked), pSeverity, pMinValue, - pMaxValue, Boolean.valueOf(pIsMetric) - }); - this.languageId = pLanguageId; - this.languageName = pLanguageName; - this.id = pId; - this.name = pName; - this.checked = pChecked; - this.severity = pSeverity; - this.minValue = pMinValue; - this.maxValue = pMaxValue; - this.isMetric = pIsMetric; - ICodeLogger.exiting(CLASS, method); - - } - - /** - * @return the id - */ - public final String getId() { - final String method = "getId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, id); - return id; - } - - /** - * @param pId the id to set - */ - public final void setId(final String pId) { - final String method = "setId"; - ICodeLogger.entering(CLASS, method, pId); - this.id = pId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the name - */ - public final String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /** - * @param pName the name to set - */ - public final void setName(final String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the checked - */ - public final boolean isChecked() { - final String method = "isChecked"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(checked)); - return checked; - } - - /** - * @param pChecked the checked to set - */ - public final void setChecked(final boolean pChecked) { - final String method = "setChecked"; - ICodeLogger.entering(CLASS, method, Boolean.valueOf(pChecked)); - this.checked = pChecked; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the severity - */ - public final String getSeverity() { - final String method = "getSeverity"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, severity); - return severity; - } - - /** - * @param pSeverity the severity to set - */ - public final void setSeverity(final String pSeverity) { - final String method = "setSeverity"; - ICodeLogger.entering(CLASS, method, pSeverity); - this.severity = pSeverity; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the maxValue - */ - public final Float getMaxValue() { - final String method = "getMaxValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, maxValue); - return maxValue; - } - - /** - * @param pMaxValue the maxValue to set - */ - public final void setMaxValue(final float pMaxValue) { - final String method = "setMaxValue"; - ICodeLogger.entering(CLASS, method); - this.maxValue = Float.valueOf(pMaxValue); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the minValue - */ - public final Float getMinValue() { - final String method = "getMinValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, minValue); - return minValue; - } - - /** - * @param pMinValue the minValue to set - */ - public final void setMinValue(final float pMinValue) { - final String method = "setMinValue"; - ICodeLogger.entering(CLASS, method, Float.valueOf(pMinValue)); - this.minValue = Float.valueOf(pMinValue); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param languageId - */ - public void savePreferences() { - final String method = "savePreferences"; - ICodeLogger.entering(CLASS, method); - final IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - store.setValue(this.getId(), checked); - store.setValue(this.getId() + UserPreferencesService.PREF_SEVERITY_KEY, this.severity); - if (!this.maxValue.isNaN()) { - store.setValue(this.getId() + UserPreferencesService.PREF_MAX_VALUE_KEY, - this.maxValue.floatValue()); - } - if (!this.minValue.isNaN()) { - store.setValue(this.getId() + UserPreferencesService.PREF_MIN_VALUE_KEY, - this.minValue.floatValue()); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * Set preferences to default. - */ - public void setToDefault() { - final String method = "setToDefault"; - ICodeLogger.entering(CLASS, method); - final IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - this.checked = store.getDefaultBoolean(this.getId()); - store.setToDefault(this.getId()); - this.severity = store - .getDefaultString(this.getId() + UserPreferencesService.PREF_SEVERITY_KEY); - store.setToDefault(this.getId() + UserPreferencesService.PREF_SEVERITY_KEY); - - if (this.isMetric) { - this.maxValue = Float.valueOf(store.getDefaultFloat( - this.getId() + UserPreferencesService.PREF_MAX_VALUE_KEY)); - store.setToDefault(this.getId() + UserPreferencesService.PREF_MAX_VALUE_KEY); - } - if (this.isMetric) { - this.minValue = Float.valueOf(store.getDefaultFloat( - this.getId() + UserPreferencesService.PREF_MAX_VALUE_KEY)); - store.setToDefault(this.getId() + UserPreferencesService.PREF_MIN_VALUE_KEY); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * Update preferences store with current values of attributes. - */ - public void update() { - final String method = "update"; - ICodeLogger.entering(CLASS, method); - final IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - if (!store.contains(this.getId())) { - this.checked = true; - } else { - this.checked = store.getBoolean(this.getId()); - } - if (!store.contains(this.getId() + UserPreferencesService.PREF_SEVERITY_KEY)) { - this.severity = UserPreferencesService.PREF_SEVERITY_ERROR_VALUE; - } else { - this.severity = store - .getString(this.getId() + UserPreferencesService.PREF_SEVERITY_KEY); - } - - if (this.isMetric) { - this.maxValue = Float.valueOf(store - .getFloat(this.getId() + UserPreferencesService.PREF_MAX_VALUE_KEY)); - } - if (this.isMetric) { - this.minValue = Float.valueOf(store - .getFloat(this.getId() + UserPreferencesService.PREF_MIN_VALUE_KEY)); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the isMetric - */ - public final boolean isMetric() { - final String method = "isMetric"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isMetric)); - return isMetric; - } - - /** - * @param pIsMetric the isMetric to set - */ - public final void setMetric(final boolean pIsMetric) { - final String method = "setMetric"; - ICodeLogger.entering(CLASS, method, Boolean.valueOf(pIsMetric)); - this.isMetric = pIsMetric; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pMaxValue the maxValue to set - */ - public final void setMaxValue(final Float pMaxValue) { - final String method = "setMaxValue"; - ICodeLogger.entering(CLASS, method, pMaxValue); - this.maxValue = pMaxValue; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pMinValue the minValue to set - */ - public final void setMinValue(final Float pMinValue) { - final String method = "setMinValue"; - ICodeLogger.entering(CLASS, method, pMinValue); - this.minValue = pMinValue; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the languageId - */ - public final String getLanguageId() { - final String method = "getLanguageId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, languageId); - return languageId; - } - - /** - * @param pLanguageId the languageId to set - */ - public final void setLanguageId(final String pLanguageId) { - final String method = "setLanguageId"; - ICodeLogger.entering(CLASS, method, pLanguageId); - this.languageId = pLanguageId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pLanguageName the languageName to set - */ - public final void setLanguageName(final String pLanguageName) { - final String method = "setLanguageName"; - ICodeLogger.entering(CLASS, method, pLanguageName); - this.languageName = pLanguageName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the languageName - */ - public final String getLanguageName() { - final String method = "getLanguageName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, languageName); - return languageName; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/ConfigurationPreferencePage.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/ConfigurationPreferencePage.java deleted file mode 100644 index 4bfb561d..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/ConfigurationPreferencePage.java +++ /dev/null @@ -1,287 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences; - -import fr.cnes.analysis.tools.ui.Activator; -import fr.cnes.analysis.tools.ui.configurations.ConfigurationContainer; -import fr.cnes.analysis.tools.ui.configurations.ConfigurationService; -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.preferences.checkerstables.CheckersComposite; -import fr.cnes.analysis.tools.ui.preferences.checkerstables.MetricsComposite; -import fr.cnes.icode.exception.NullContributionException; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.*; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; - -/** - * i-Code CNES Preferences page. - */ -public class ConfigurationPreferencePage extends PreferencePage - implements IWorkbenchPreferencePage { - - /** - * Composite containing the configuration preference page - */ - private Composite composite; - /** - * List of {@link CheckerPreferencesContainer} displayed on the page - */ - private List preferences; - /** - * Configuration identifier selected - */ - private String configurationId; - /** - * Combo box to set the configuration - */ - private Combo configurationSelection; - /** - * Table viewer containing the rules - */ - private CheckersComposite rulesExpandBarContainer; - /** - * Table viewer containing the metrics - */ - private MetricsComposite metricsExpandBarContainer; - - @Override - public void init(final IWorkbench workbench) { - final String method = "init"; - ICodeLogger.entering(this.getClass().getName(), method, workbench); - // Page description - setImageDescriptor(ImageFactory.getDescriptor(ImageFactory.ERROR_BIG)); - setDescription("This preference page is dedicated to i-SCode analysis. On this page," - + " you can enable/disable language and checker that should be " - + "run during the analysis."); - - // Associate preference store - final IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - setPreferenceStore(store); - ICodeLogger.exiting(this.getClass().getName(), method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse. - * swt.widgets.Composite) - */ - @Override - protected Control createContents(Composite parent) { - final String method = "createContents"; - ICodeLogger.entering(this.getClass().getName(), method, parent); - final Label info = new Label(parent, SWT.NONE); - info.setText("Do you wish to choose an existing configuration ?"); - configurationSelection = new Combo(parent, SWT.READ_ONLY); - configurationSelection.add(UserPreferencesService.PREF_CONFIGURATION_CUSTOMVALUE); - configurationId = UserPreferencesService.getConfigurationName(); - final List configs = ConfigurationService.getConfigurations(); - for (final ConfigurationContainer config : configs) { - configurationSelection.add(config.getName()); - } - if (configurationSelection.indexOf(UserPreferencesService.getConfigurationName()) != -1) { - configurationSelection.select(configurationSelection - .indexOf(UserPreferencesService.getConfigurationName())); - } - - composite = new Composite(parent, SWT.LEFT); - - // Sets the layout data for the top composite's - // place in its parent's layout. - - // Sets the layout for the top composite's - // children to populate. - composite.setLayout(new FillLayout()); - composite.setBackground(parent.getBackground()); - - try { - preferences = UserPreferencesService.getCheckersPreferences(); - preferences.sort(new Comparator() { - - @Override - public int compare(CheckerPreferencesContainer arg0, - CheckerPreferencesContainer arg1) { - return arg0.getName().compareTo(arg1.getName()); - } - }); - } catch (NullContributionException | CoreException e) { - MessageDialog.openError(getShell(), Activator.PLUGIN_ID, e.getMessage()); - } - final ExpandBar expandBar = new ExpandBar(composite, SWT.V_SCROLL); - expandBar.setToolTipText("Choose rules and languages that should be enabled."); - final GridLayout layout = new GridLayout(); - layout.makeColumnsEqualWidth = true; - final Color expandBarColor = new Color(parent.getBackground().getDevice(), - parent.getBackground().getRed() - 10, - parent.getBackground().getGreen() - 10, - parent.getBackground().getBlue() - 10); - - expandBar.setBackground(expandBarColor); - - final List metrics = new ArrayList<>(); - final List rules = new ArrayList<>(); - for (final CheckerPreferencesContainer checker : preferences) { - if (checker.isMetric()) { - metrics.add(checker); - } else { - rules.add(checker); - } - } - - // Expand item for Rules : - rulesExpandBarContainer = new CheckersComposite(expandBar, rules, SWT.EMBEDDED); - rulesExpandBarContainer.setLayout(layout); - - final ExpandItem ruleExpandItem = new ExpandItem(expandBar, SWT.NONE, 0); - ruleExpandItem.setText("Rules"); - ruleExpandItem.setImage(ImageFactory.getImage(ImageFactory.ERROR_SMALL)); - ruleExpandItem.setHeight(rulesExpandBarContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).y); - ruleExpandItem.setControl(rulesExpandBarContainer); - // We build the expandItem Metrics; - metricsExpandBarContainer = new MetricsComposite(expandBar, metrics, SWT.EMBEDDED); - metricsExpandBarContainer.setLayout(layout); - - final ExpandItem metricExpandItem = new ExpandItem(expandBar, SWT.NONE, 0); - metricExpandItem.setText("Metric"); - metricExpandItem.setImage(ImageFactory.getImage(ImageFactory.ERROR_SMALL)); - metricExpandItem.setHeight( - metricsExpandBarContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).y); - metricExpandItem.setControl(metricsExpandBarContainer); - - // Then the expandItem Rules - // Color of the background of the expandbar taking the one of the main - // window - configurationSelection.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(final SelectionEvent e) { - final String methodName = "widgetSelected"; - ICodeLogger.entering(this.getClass().getName(), methodName, e); - configurationId = configurationSelection - .getItem(configurationSelection.getSelectionIndex()); - refresh(); - ICodeLogger.exiting(this.getClass().getName(), methodName); - } - - }); - parent.getParent().pack(); - parent.getParent().redraw(); - this.refresh(); - ICodeLogger.exiting(this.getClass().getName(), method, composite); - return composite; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.preference.PreferencePage#performApply() - */ - @Override - public void performApply() { - final String method = "performApply"; - ICodeLogger.entering(this.getClass().getName(), method); - if (configurationId.equals(UserPreferencesService.PREF_CONFIGURATION_CUSTOMVALUE)) { - UserPreferencesService.setDefaultConfiguration(); - for (final CheckerPreferencesContainer checker : metricsExpandBarContainer - .getInputs()) { - checker.savePreferences(); - } - for (final CheckerPreferencesContainer checker : rulesExpandBarContainer.getInputs()) { - checker.savePreferences(); - } - } else { - for (final CheckerPreferencesContainer checker : metricsExpandBarContainer - .getInputs()) { - checker.setToDefault(); - } - for (final CheckerPreferencesContainer checker : rulesExpandBarContainer.getInputs()) { - checker.setToDefault(); - } - try { - UserPreferencesService.setConfiguration(configurationId); - } catch (NullContributionException e) { - MessageDialog.openError(getShell(), Activator.PLUGIN_ID, e.getMessage()); - ICodeLogger.error(this.getClass().getName(), method, e); - } - for (final CheckerPreferencesContainer checker : metricsExpandBarContainer - .getInputs()) { - checker.update(); - } - for (final CheckerPreferencesContainer checker : rulesExpandBarContainer.getInputs()) { - checker.update(); - } - } - this.refresh(); - ICodeLogger.exiting(this.getClass().getName(), method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.preference.PreferencePage#performDefaults() - */ - @Override - public void performDefaults() { - final String method = "performDefaults"; - ICodeLogger.entering(this.getClass().getName(), method); - - for (final CheckerPreferencesContainer checker : metricsExpandBarContainer.getInputs()) { - checker.setToDefault(); - } - for (final CheckerPreferencesContainer checker : rulesExpandBarContainer.getInputs()) { - checker.setToDefault(); - } - UserPreferencesService.setDefaultConfiguration(); - configurationSelection.select(configurationSelection - .indexOf(UserPreferencesService.getConfigurationName())); - this.refresh(); - ICodeLogger.exiting(this.getClass().getName(), method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.preference.PreferencePage#performOk() - */ - @Override - public boolean performOk() { - final String method = "performOk"; - ICodeLogger.entering(this.getClass().getName(), method); - this.performApply(); - ICodeLogger.exiting(this.getClass().getName(), method); - return super.performOk(); - } - - /** - * Redraw every elements of the view. - */ - public void refresh() { - final String method = "refresh"; - ICodeLogger.entering(this.getClass().getName(), method); - this.composite.getParent().getParent().redraw(); - this.composite.layout(); - this.composite.redraw(); - metricsExpandBarContainer.refresh(); - rulesExpandBarContainer.refresh(); - ICodeLogger.exiting(this.getClass().getName(), method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/LanguagePreferencesContainer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/LanguagePreferencesContainer.java deleted file mode 100644 index 29c6edc5..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/LanguagePreferencesContainer.java +++ /dev/null @@ -1,212 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences; - -import fr.cnes.analysis.tools.ui.Activator; -import fr.cnes.icode.logger.ICodeLogger; - -import java.util.ArrayList; -import java.util.List; - -/** - * Container for languages used {@link UserPreferencesService} - */ -public class LanguagePreferencesContainer { - - /** - * Class name - */ - private static final String CLASS = LanguagePreferencesContainer.class.getName(); - - /** - * Language's identifier - */ - private String id; - /** - * Language's name - */ - private String name; - /** - * Language selection - */ - private boolean checked; - /** - * Language's checkers - */ - private List checkers; - - /** - * @param pId Language's identifier - * @param pChecked Language's checkers - */ - public LanguagePreferencesContainer(final String pId, final boolean pChecked) { - final String method = "LanguagePreferencesContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pId, Boolean.valueOf(pChecked) - }); - this.id = pId; - this.checked = pChecked; - this.checkers = new ArrayList<>(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pId Language's identifier - * @param pName Language's name - * @param pChecked Language selection - */ - public LanguagePreferencesContainer(final String pId, final String pName, - final boolean pChecked) { - final String method = "LanguagePreferencesContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pId, pName, Boolean.valueOf(pChecked) - }); - this.id = pId; - this.name = pName; - this.checked = pChecked; - this.checkers = new ArrayList<>(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pId Language's identifier - * @param pName Language's name - * @param pChecked Language selection - * @param pCheckers Language's checkers - */ - public LanguagePreferencesContainer(final String pId, final String pName, - final boolean pChecked, final List pCheckers) { - final String method = "LanguagePreferencesContainer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pId, pName, Boolean.valueOf(pChecked), pCheckers - }); - this.id = pId; - this.name = pName; - this.checked = pChecked; - this.checkers = pCheckers; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pChecked selection to set. - */ - public void setChecked(final Boolean pChecked) { - final String method = "setChecked"; - ICodeLogger.entering(CLASS, method, pChecked); - checked = pChecked.booleanValue(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method set checked to the default value found in the preference - * store. It also set the preference store value to default. This method - * uses setChecked method, thus the button is also updated. - */ - public void setToDefault() { - final String method = "setToDefault"; - ICodeLogger.entering(CLASS, method); - Activator.getDefault().getPreferenceStore().setToDefault(id); - for (final CheckerPreferencesContainer checker : checkers) { - checker.setToDefault(); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method save preferences in i-Code UI preferences stores with - * containers values. - */ - public void savePreferences() { - final String method = "savePreferences"; - ICodeLogger.entering(CLASS, method); - for (final CheckerPreferencesContainer checker : checkers) { - checker.savePreferences(); - } - Activator.getDefault().getPreferenceStore().setValue(id, checked); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the id - */ - public final String getId() { - final String method = "getId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, id); - return id; - } - - /** - * @param pId the id to set - */ - public final void setId(final String pId) { - final String method = "setId"; - ICodeLogger.entering(CLASS, method, pId); - this.id = pId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the name - */ - public final String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /** - * @param pName the name to set - */ - public final void setName(final String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the checked - */ - public final boolean isChecked() { - final String method = "isChecked"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(checked)); - return checked; - } - - /** - * @param pChecked the checked to set - */ - public final void setChecked(final boolean pChecked) { - final String method = "setChecked"; - ICodeLogger.entering(CLASS, method, Boolean.valueOf(pChecked)); - this.checked = pChecked; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the checkers - */ - public final List getCheckers() { - final String method = "getCheckers"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, checkers); - return checkers; - } - - /** - * @param pCheckers the checkers to set - */ - public final void setCheckers(final List pCheckers) { - final String method = "setCheckers"; - ICodeLogger.entering(CLASS, method, pCheckers); - this.checkers = pCheckers; - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/UserPreferencesService.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/UserPreferencesService.java deleted file mode 100644 index d8942a78..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/UserPreferencesService.java +++ /dev/null @@ -1,528 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences; - -import fr.cnes.analysis.tools.ui.Activator; -import fr.cnes.analysis.tools.ui.configurations.CheckConfigurationContainer; -import fr.cnes.analysis.tools.ui.configurations.ConfigurationContainer; -import fr.cnes.analysis.tools.ui.configurations.ConfigurationService; -import fr.cnes.icode.exception.NullContributionException; -import fr.cnes.icode.logger.ICodeLogger; -import fr.cnes.icode.services.checkers.CheckerContainer; -import fr.cnes.icode.services.checkers.CheckerService; -import fr.cnes.icode.services.languages.ILanguage; -import fr.cnes.icode.services.languages.LanguageService; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.PreferenceStore; -import org.eclipse.ui.PlatformUI; - -import java.util.ArrayList; -import java.util.List; - -/** - * - */ -public class UserPreferencesService extends AbstractPreferenceInitializer { - - /** - * Preference key to access severity of a checker - */ - public static final String PREF_SEVERITY_KEY = ".Severity"; - /** - * Preference value of SEVERITY for Error - */ - public static final String PREF_SEVERITY_ERROR_VALUE = "Error"; - /** - * Preference value of SEVERITY for Warning - */ - public static final String PREF_SEVERITY_WARNING_VALUE = "Warning"; - /** - * Preference value of SEVERITY for Info - */ - public static final String PREF_SEVERITY_INFO_VALUE = "Info"; - /** - * Preference key to access Min of a checker - */ - public static final String PREF_MIN_VALUE_KEY = ".Min"; - /** - * Preference key to access Max of a checker - */ - public static final String PREF_MAX_VALUE_KEY = ".Max"; - /** - * Preference key to access severity of a checker - */ - public static final String PREF_CONFIGURATION_KEY = "Configuration"; - /** - * Preference key to access severity of a checker - */ - public static final String PREF_CONFIGURATION_CUSTOMVALUE = "Custom"; - /** - * Class name - */ - private static final String CLASS = UserPreferencesService.class.getName(); - - /** - * This method retrieves all contributor of analyzer using - * {@link LanguageService} and {@link CheckerService} and set each languages - * and checker, then sets : - *
    - *
  • Checked : true
  • - *
  • Severity : Error
  • - *
  • maxValue, minValue: Pending the - * {@link CheckerPreferencesContainer}
  • - *
- * - * @throws NullContributionException when a contribution couldn't be reached in one of the - * extension points being used to initiate preferences. - * @throws CoreException when an eclipse related method couldn't be executed - */ - public static void initPreferences() throws NullContributionException, CoreException { - final String method = "initPreferences"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.error(CLASS, method, new Exception("avant")); - for (final String languageId : LanguageService.getLanguagesIds()) { - ICodeLogger.error(CLASS, method, new Exception("Language de benoit: " + languageId)); - Activator.getDefault().getPreferenceStore().setDefault(languageId, true); - for (final CheckerContainer checker : CheckerService.getCheckers(languageId)) { - Activator.getDefault().getPreferenceStore().setDefault(checker.getId(), true); - Activator.getDefault().getPreferenceStore().setDefault( - checker.getId() + PREF_SEVERITY_KEY, PREF_SEVERITY_ERROR_VALUE); - if (checker.isMetric()) { - Activator.getDefault().getPreferenceStore() - .setDefault(checker.getId() + PREF_MAX_VALUE_KEY, Float.NaN); - Activator.getDefault().getPreferenceStore() - .setDefault(checker.getId() + PREF_MIN_VALUE_KEY, Float.NaN); - } - } - } - Activator.getDefault().getPreferenceStore().setDefault(PREF_CONFIGURATION_KEY, - PREF_CONFIGURATION_CUSTOMVALUE); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer# - * initializeDefaultPreferences() - */ - @Override - public void initializeDefaultPreferences() { - final String method = "initializeDefaultPreferences"; - ICodeLogger.entering(CLASS, method); - try { - initPreferences(); - } catch (NullContributionException | CoreException e) { - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - Activator.PLUGIN_ID, e.getMessage()); - ICodeLogger.error(this.getClass().getName(), method, e); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param languageId Identifier of the language to enable. - * @return Language enabling success. - */ - public static boolean enableLanguage(final String languageId) { - final String method = "enableLanguage"; - ICodeLogger.entering(CLASS, method, languageId); - boolean success = false; - if (languageExists(languageId)) { - Activator.getDefault().getPreferenceStore().setValue(languageId, true); - success = true; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(success)); - return success; - } - - /** - * @param languageId Language identifier to verify. - * @return Whether or not the language is enabled. - */ - public static boolean isEnabledLanguage(final String languageId) { - final String method = "isEnabledLanguage"; - ICodeLogger.entering(CLASS, method, languageId); - final boolean isEnabledLanguage = Activator.getDefault().getPreferenceStore() - .getBoolean(languageId); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEnabledLanguage)); - return isEnabledLanguage; - } - - /** - * @param checkerId Identifier of the checker. - * @return Whether or not the language is enabled. - */ - public static boolean isEnabledChecker(final String checkerId) { - final String method = "isEnabledChecker"; - ICodeLogger.entering(CLASS, method, checkerId); - final boolean isEnabledChecker = Activator.getDefault().getPreferenceStore() - .getBoolean(checkerId); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEnabledChecker)); - return isEnabledChecker; - } - - /** - * @param languageId Language identifier of language to disable. - * @return Language disabling success. - */ - public static boolean disableLanguage(final String languageId) { - final String method = "disableLanguage"; - ICodeLogger.entering(CLASS, method, languageId); - boolean success = false; - if (languageExists(languageId)) { - Activator.getDefault().getPreferenceStore().setValue(languageId, false); - success = true; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(success)); - return success; - } - - /** - * Enable a checker pending it's language. In case the language is disabled - * it will be enabled too. - * - * @param languageId language identifier of the checker - * @param checkerId identifier of the checker to enable - * @return checker enabling success - */ - public static boolean enableChecker(final String languageId, final String checkerId) { - final String method = "enableChecker"; - ICodeLogger.entering(CLASS, method, new Object[]{ - languageId, checkerId - }); - boolean success = false; - if (checkerExists(languageId, checkerId)) { - Activator.getDefault().getPreferenceStore().setValue(languageId, true); - Activator.getDefault().getPreferenceStore().setValue(checkerId, true); - success = true; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(success)); - return success; - } - - /** - * Disable a checker pending it's language. - * - * @param languageId language identifier of the checker - * @param checkerId identifier of the checker to enable - * @return checker disabling success - */ - public static boolean disableChecker(final String languageId, final String checkerId) { - final String method = "disableChecker"; - ICodeLogger.entering(CLASS, method, new Object[]{ - languageId, checkerId - }); - boolean success = false; - if (checkerExists(languageId, checkerId)) { - Activator.getDefault().getPreferenceStore().setValue(checkerId, false); - success = true; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(success)); - return success; - } - - /** - * This method verify and return for each languages contributing the - * analyzer that is enabled in the preferences. - * - * @return Language identifier of languages enabled in the - * {@link PreferenceStore}. - */ - public static List getEnabledLanguagesIds() { - final String method = "getEnabledLanguagesIds"; - ICodeLogger.entering(CLASS, method); - final List languages = new ArrayList<>(); - for (final String language : LanguageService.getLanguagesIds()) { - if (isEnabledLanguage(language)) { - languages.add(language); - } - } - ICodeLogger.exiting(CLASS, method, languages); - return languages; - } - - /** - * @return identifiers of checkers disabled - */ - public static List getDisabledCheckersIds() { - final String method = "getDisabledCheckersIds"; - ICodeLogger.entering(CLASS, method); - final List checkers = new ArrayList<>(); - for (final String languageId : getEnabledLanguagesIds()) { - for (final String checkerId : CheckerService.getCheckersIds(languageId)) { - if (!isEnabledChecker(checkerId)) { - checkers.add(checkerId); - } - } - } - ICodeLogger.exiting(CLASS, method, checkers); - return checkers; - } - - /** - * This method verify and return for each languages contributing the - * analyzer and it's checkers. - * - * @return Language identifier of languages enabled in the - * {@link PreferenceStore}. - * @throws CoreException on execution failure - * @throws NullContributionException when no contribution can be found - */ - public static List getLanguagesPreferences() - throws NullContributionException, CoreException { - final String method = "getLanguagesPreferences"; - ICodeLogger.entering(CLASS, method); - final List languagesPrefs = new ArrayList<>(); - for (final ILanguage language : LanguageService.getLanguages()) { - if (languageExists(language.getId())) { - final boolean languageEnabled = isEnabledLanguage(language.getId()); - final List checkersPrefs = new ArrayList<>(); - for (final CheckerContainer checker : CheckerService - .getCheckers(language.getId())) { - if (checkerExists(language.getId(), checker.getId())) { - checkersPrefs.add(new CheckerPreferencesContainer(language.getId(), - language.getName(), checker.getId(), checker.getName(), - isEnabledChecker(checker.getId()), - getCheckerSeverity(checker.getId()), checker.isMetric())); - } - } - languagesPrefs.add(new LanguagePreferencesContainer(language.getId(), - language.getName(), languageEnabled, checkersPrefs)); - - } - } - ICodeLogger.exiting(CLASS, method, languagesPrefs); - return languagesPrefs; - } - - /** - * @return checkers with value set in preferences - * @throws NullContributionException if a checker can't be reached because not existing - * @throws CoreException when a checker can be reached for some runtime reasons. - */ - public static List getCheckersPreferences() - throws NullContributionException, CoreException { - final String method = "getCheckersPreferences"; - ICodeLogger.entering(CLASS, method); - final List checkPrefs = new ArrayList<>(); - for (final CheckerContainer checker : CheckerService.getCheckers()) { - final String languageId = checker.getLanguage().getId(); - final String languageName = checker.getLanguage().getName(); - final String severity = getCheckerSeverity(checker.getId()); - final boolean isEnabled = isEnabledChecker(checker.getId()); - if (checker.isMetric()) { - final Float minValue; - if (hasMinValue(checker.getId())) { - minValue = getMinValue(checker.getId()); - } else { - minValue = Float.valueOf(Float.NaN); - } - final Float maxValue; - if (hasMaxValue(checker.getId())) { - maxValue = getMaxValue(checker.getId()); - } else { - maxValue = Float.valueOf(Float.NaN); - } - checkPrefs.add(new CheckerPreferencesContainer(languageId, languageName, - checker.getId(), checker.getName(), isEnabled, severity, minValue, - maxValue, true)); - } else { - checkPrefs.add(new CheckerPreferencesContainer(languageId, languageName, - checker.getId(), checker.getName(), isEnabled, severity, false)); - } - } - ICodeLogger.exiting(CLASS, method, checkPrefs); - return checkPrefs; - } - - /** - * @param checkerId identifier of the checker - * @return severity of the checker - */ - public static String getCheckerSeverity(String checkerId) { - final String method = "getCheckerSeverity"; - ICodeLogger.entering(CLASS, method, checkerId); - final String checkerSeverity = Activator.getDefault().getPreferenceStore() - .getString(checkerId + PREF_SEVERITY_KEY); - ICodeLogger.exiting(CLASS, method, checkerSeverity); - return checkerSeverity; - } - - /** - * @param languageId language of the checker - * @param checkerId identifier of the checker - * @param severity severity chosen for the checker - * @return set of the severity success - */ - public static boolean setCheckerSeverity(final String languageId, final String checkerId, - final String severity) { - final String method = "setCheckerSeverity"; - ICodeLogger.entering(CLASS, method, new Object[]{ - languageId, checkerId, severity - }); - boolean success = false; - if (checkerExists(languageId, checkerId)) { - Activator.getDefault().getPreferenceStore().setValue(checkerId + PREF_SEVERITY_KEY, - severity); - success = true; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(success)); - return success; - } - - /** - * @param languageId language identifier of the checker - * @param checkerId identifier of the checker - * @return whether or not the preferences store contains this checker. - */ - public static boolean checkerExists(final String languageId, final String checkerId) { - final String method = "checkerExists"; - ICodeLogger.entering(CLASS, method, new Object[]{ - languageId, checkerId - }); - final boolean checkerExists = Activator.getDefault().getPreferenceStore() - .contains(checkerId); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(checkerExists)); - return checkerExists; - } - - /** - * @param configurationName Configuration name to set in preferences. - * @throws NullContributionException when a contribution could not be reached. - */ - public static void setConfiguration(final String configurationName) - throws NullContributionException { - final String method = "setConfiguration"; - ICodeLogger.entering(CLASS, method, configurationName); - Activator.getDefault().getPreferenceStore().setValue(PREF_CONFIGURATION_KEY, - configurationName); - final ConfigurationContainer config = ConfigurationService - .getConfigurations(configurationName); - for (CheckConfigurationContainer checker : config.getCheckConfigurations()) { - Activator.getDefault().getPreferenceStore().setValue( - checker.getCheckId() + PREF_MAX_VALUE_KEY, - checker.getMaxValue().floatValue()); - Activator.getDefault().getPreferenceStore().setValue( - checker.getCheckId() + PREF_MIN_VALUE_KEY, - checker.getMinValue().floatValue()); - Activator.getDefault().getPreferenceStore().setValue(checker.getCheckId(), - checker.isEnabled()); - } - ICodeLogger.exiting(CLASS, method); - - } - - /** - * Set back the active configuration to - * {@link #PREF_CONFIGURATION_CUSTOMVALUE}. - */ - public static void setDefaultConfiguration() { - final String method = "setDefaultConfiguration"; - ICodeLogger.entering(CLASS, method); - Activator.getDefault().getPreferenceStore().setToDefault(PREF_CONFIGURATION_KEY); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return active configuration - */ - public static String getConfigurationName() { - final String method = "getConfigurationName"; - ICodeLogger.entering(CLASS, method); - final String configurationName = Activator.getDefault().getPreferenceStore() - .getString(PREF_CONFIGURATION_KEY); - ICodeLogger.exiting(CLASS, method, configurationName); - return configurationName; - } - - /** - * @return active configuration - */ - public static boolean isDefaultConfigurationActive() { - final String method = "isDefaultConfigurationActive"; - ICodeLogger.entering(CLASS, method); - final boolean defaultConfigurationActive = Activator.getDefault().getPreferenceStore() - .getString(PREF_CONFIGURATION_KEY).equals(PREF_CONFIGURATION_CUSTOMVALUE); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(defaultConfigurationActive)); - return defaultConfigurationActive; - } - - /** - * @param languageId that must be checked - * @return whether or not the preference store contains this language. - */ - public static boolean languageExists(final String languageId) { - final String method = "languageExists"; - ICodeLogger.entering(CLASS, method, languageId); - final boolean languageExists = Activator.getDefault().getPreferenceStore() - .contains(languageId); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(languageExists)); - return languageExists; - } - - /** - * @param checkerId identifier of the checker - * @return the maxValue allowed for the checkerId, if it's set. - */ - public static Float getMaxValue(final String checkerId) { - final String method = "getMaxValue"; - ICodeLogger.entering(CLASS, method, checkerId); - final Float maxValue = Float.valueOf(Activator.getDefault().getPreferenceStore() - .getFloat(checkerId + PREF_MAX_VALUE_KEY)); - ICodeLogger.exiting(CLASS, method, maxValue); - return maxValue; - } - - /** - * @param checkerId identifier of the checker - * @return whether or not a max value was set in preference for the - * checkerId. - */ - public static boolean hasMaxValue(final String checkerId) { - final String method = "hasMaxValue"; - ICodeLogger.entering(CLASS, method, checkerId); - final boolean hasMaxValue = Activator.getDefault().getPreferenceStore() - .contains(checkerId + PREF_MAX_VALUE_KEY) - && !Float.isNaN(Activator.getDefault().getPreferenceStore() - .getFloat(checkerId + PREF_MAX_VALUE_KEY)); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(hasMaxValue)); - return hasMaxValue; - } - - /** - * @param checkerId identifier of the checker - * @return the minimum value set for the checkerId, if one is - * set. - */ - public static Float getMinValue(final String checkerId) { - final String method = "getMinValue"; - ICodeLogger.entering(CLASS, method, checkerId); - final Float minValue = Float.valueOf(Activator.getDefault().getPreferenceStore() - .getFloat(checkerId + PREF_MIN_VALUE_KEY)); - ICodeLogger.exiting(CLASS, method, minValue); - return minValue; - } - - /** - * @param checkerId identifier of the checker - * @return whether or not a minimum value was set of this - * checkedId. - */ - public static boolean hasMinValue(final String checkerId) { - final String method = "hasMinValue"; - ICodeLogger.entering(CLASS, method, checkerId); - final boolean hasMinValue = Activator.getDefault().getPreferenceStore() - .contains(checkerId + PREF_MIN_VALUE_KEY) - && !Float.isNaN(Activator.getDefault().getPreferenceStore() - .getFloat(checkerId + PREF_MIN_VALUE_KEY)); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(hasMinValue)); - return hasMinValue; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersComposite.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersComposite.java deleted file mode 100644 index e067d24e..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersComposite.java +++ /dev/null @@ -1,591 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.LanguagePreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.ArrayContentProvider; -import org.eclipse.jface.viewers.ColumnLabelProvider; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.TableViewerColumn; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.*; - -import java.util.List; - -/** - * This viewer can show {@link CheckerPreferencesContainer} in a Table, - * editable. - */ -public class CheckersComposite extends Composite { - /** - * Enable or disable checkers column's index. - */ - private static final int COLUMN_ENABLED_INDEX = 0; - /** - * Enable or disable checkers column's bound. - */ - private static final int COLUMN_ENABLED_BOUND = 30; - /** - * Checker's name column's name. - */ - private static final String COLUMN_CHECKER_NAME = "Checker"; - /** - * Checker's name checkers column's index. - */ - private static final int COLUMN_CHECKER_INDEX = 1; - /** - * Checker's name checkers column's bound. - */ - private static final int COLUMN_CHECKER_BOUND = 200; - /** - * Checker's languages column's name. - */ - private static final String COLUMN_LANGUAGE_NAME = "Language"; - /** - * Checker's languages checkers column's index. - */ - private static final int COLUMN_LANGUAGE_INDEX = 2; - /** - * Checker's languages checkers column's bound. - */ - private static final int COLUMN_LANGUAGE_BOUND = 80; - /** - * Checker's severity column's name. - */ - private static final String COLUMN_SEVERITY_NAME = "Severity"; - /** - * Checker's severity column's index. - */ - private static final int COLUMN_SEVERITY_INDEX = 3; - /** - * Checker's severity column's bound. - */ - private static final int COLUMN_SEVERITY_BOUND = 80; - - /** - * Class name - **/ - private static final String CLASS = CheckersComposite.class.getName(); - - /** - * Image of information severity level - */ - private Image infoImage; - /** - * Image of warning severity level - */ - private Image warningImage; - /** - * Image of error severity level - */ - private Image errorImage; - /** - * Image of information enabled checker - */ - private Image enabledImage; - /** - * Image of disabled checker - */ - private Image disabledImage; - /** - * Enabled column - */ - private TableViewerColumn enabledColumn; - /** - * All checkers are enabled - */ - private boolean allEnabledChecked; - - /** - * The TableViewer - */ - private TableViewer checkersTableViewer; - /** - * Language preference container - */ - private LanguagePreferencesContainer language; - /** - * Checkers to configure in the table - */ - private List inputs; - /** - * Listener for all checker enabling/disabling - */ - private Listener enableAllListerner; - - /** - * @param pParent Composite containing the Table Viewer. - * @param checkers Table viewer's inputs. - * @param style SWT Composite style. - */ - public CheckersComposite(final Composite pParent, - final List checkers, final int style) { - super(pParent, style); - final String method = "CheckerTableViewer"; - - ICodeLogger.entering(CLASS, method, new Object[]{ - pParent, checkers - }); - this.inputs = checkers; - infoImage = ImageFactory.getImage(ImageFactory.INFO_SMALL); - warningImage = ImageFactory.getImage(ImageFactory.WARNING_SMALL); - errorImage = ImageFactory.getImage(ImageFactory.ERROR_SMALL); - enabledImage = ImageFactory.getImage(ImageFactory.ENABLED); - disabledImage = ImageFactory.getImage(ImageFactory.DISABLED); - final GridLayout layout = new GridLayout(2, false); - this.setLayout(layout); - final Label searchLabel = new Label(this, SWT.NONE); - searchLabel.setText("Search: "); - final Text searchText = new Text(this, SWT.BORDER | SWT.SEARCH); - searchText.setLayoutData( - new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL)); - - this.createViewer(this); - final CheckersFilter filter = new CheckersFilter(); - searchText.addModifyListener(new ModifyListener() { - @Override - public void modifyText(final ModifyEvent e) { - filter.setSearchText(searchText.getText()); - checkersTableViewer.refresh(); - } - }); - checkersTableViewer.addFilter(filter); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pParent Composite containing the Table Viewer - */ - private void createViewer(final Composite pParent) { - final String method = "createViewer"; - ICodeLogger.entering(CLASS, method, pParent); - checkersTableViewer = new TableViewer(pParent, - SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER); - createColumns(this, checkersTableViewer); - final Table table = checkersTableViewer.getTable(); - table.setHeaderVisible(true); - table.setLinesVisible(true); - - checkersTableViewer.setContentProvider(new ArrayContentProvider()); - // get the content for the viewer, setInput will call getElements in the - // contentProvider - checkersTableViewer.setInput(inputs); - // make the selection available to other views - - // define layout for the viewer - final GridData gridData = new GridData(); - gridData.verticalAlignment = GridData.FILL; - gridData.horizontalSpan = 2; - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - checkersTableViewer.getControl().setLayoutData(gridData); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pParent Composite containing the Table Viewer - * @param pCheckersTableViewer TableViewer containing the columns. - */ - protected void createColumns(final Composite pParent, final TableViewer pCheckersTableViewer) { - final String method = "createColumns"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pParent, pCheckersTableViewer - }); - enabledColumn = createEnabledViewerColumn(COLUMN_ENABLED_BOUND, COLUMN_ENABLED_INDEX); - enabledColumn.setEditingSupport(new EnabledEditingSupport(pCheckersTableViewer, this)); - enabledColumn.setLabelProvider(new ColumnLabelProvider() { - - @Override - public String getText(final Object element) { - return null; - } - - @Override - public Image getImage(final Object element) { - final Image image; - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - if (checker.isChecked()) { - image = enabledImage; - } else { - image = disabledImage; - } - - return image; - } - }); - TableViewerColumn col = createTableViewerColumn(COLUMN_CHECKER_NAME, COLUMN_CHECKER_BOUND, - COLUMN_CHECKER_INDEX); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - return checker.getName(); - } - }); - col = createTableViewerColumn(COLUMN_LANGUAGE_NAME, COLUMN_LANGUAGE_BOUND, - COLUMN_LANGUAGE_INDEX); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - return checker.getLanguageName(); - } - }); - - col = createTableViewerColumn(COLUMN_SEVERITY_NAME, COLUMN_SEVERITY_BOUND, - COLUMN_SEVERITY_INDEX); - col.setEditingSupport(new SeverityEditingSupport(pCheckersTableViewer)); - col.setLabelProvider(new ColumnLabelProvider() { - - @Override - public String getText(final Object element) { - return ((CheckerPreferencesContainer) element).getSeverity(); - } - - @Override - public Image getImage(final Object element) { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - final Image severityImage; - switch (checker.getSeverity()) { - case UserPreferencesService.PREF_SEVERITY_ERROR_VALUE: - severityImage = errorImage; - break; - case UserPreferencesService.PREF_SEVERITY_WARNING_VALUE: - severityImage = warningImage; - break; - case UserPreferencesService.PREF_SEVERITY_INFO_VALUE: - default: - severityImage = infoImage; - break; - } - ICodeLogger.exiting(CLASS, method, severityImage); - return severityImage; - - } - - }); - - } - - /** - * @param title Column's title. - * @param bound Column's bound - * @param colNumber Column's index. - * @return {@link TableViewerColumn} created. - */ - protected TableViewerColumn createTableViewerColumn(final String title, final int bound, - final int colNumber) { - final String method = "createTableViewerColumn"; - ICodeLogger.entering(CLASS, method, new Object[]{ - title, Integer.valueOf(bound), Integer.valueOf(colNumber) - }); - final TableViewerColumn viewerColumn = new TableViewerColumn(this.checkersTableViewer, - SWT.NONE); - final TableColumn column = viewerColumn.getColumn(); - column.setText(title); - column.setWidth(bound); - column.setResizable(true); - column.setMoveable(true); - ICodeLogger.exiting(CLASS, method, viewerColumn); - return viewerColumn; - } - - /** - * @param bound Column's bound. - * @param colNumber Column's index. - * @return A column with an Image to set checker enabled or disabled. - */ - protected TableViewerColumn createEnabledViewerColumn(final int bound, final int colNumber) { - final String method = "createEnabledViewerColumn"; - ICodeLogger.entering(CLASS, method, new Object[]{ - Integer.valueOf(bound), Integer.valueOf(colNumber) - }); - final TableViewerColumn viewerColumn = new TableViewerColumn(this.checkersTableViewer, - SWT.CENTER); - final TableColumn column = viewerColumn.getColumn(); - column.setImage(ImageFactory.getImage(ImageFactory.DISABLED)); - column.setToolTipText("Check to select or unselect every rules in the table."); - column.setWidth(bound); - column.setResizable(true); - column.setMoveable(true); - enableAllListerner = new Listener() { - - @Override - public void handleEvent(final Event event) { - /* - * If the event is a selection one, then we have to set inputs - * to get all of them checked or unchecked. - */ - if (event.type == SWT.Selection) { - if (UserPreferencesService.isDefaultConfigurationActive()) { - if (!allEnabledChecked) { - column.setImage(ImageFactory.getImage(ImageFactory.ENABLED)); - for (final CheckerPreferencesContainer checker : inputs) { - checker.setChecked(true); - } - allEnabledChecked = true; - } else { - column.setImage(ImageFactory.getImage(ImageFactory.DISABLED)); - for (final CheckerPreferencesContainer checker : inputs) { - checker.setChecked(false); - } - allEnabledChecked = false; - } - } else { - column.setImage(null); - } - } - /* - * Image must be set pending the inputs and the configuration. - */ - if (UserPreferencesService.isDefaultConfigurationActive()) { - allEnabledChecked = isAllEnabled(); - if (allEnabledChecked) { - column.setImage(ImageFactory.getImage(ImageFactory.ENABLED)); - } else { - column.setImage(ImageFactory.getImage(ImageFactory.DISABLED)); - } - } else { - column.setImage(null); - } - - checkersTableViewer.refresh(); - } - - private boolean isAllEnabled() { - int inputCounter = 0; - boolean allEnabled = true; - while (inputCounter < inputs.size() && allEnabled) { - if (!inputs.get(inputCounter).isChecked()) { - allEnabled = false; - } - inputCounter++; - } - return allEnabled; - } - }; - column.addListener(SWT.Selection, enableAllListerner); - this.refresh(); - ICodeLogger.exiting(CLASS, method, viewerColumn); - return viewerColumn; - - } - - /** - * Refresh the TableViewer and it's components. - */ - public void refresh() { - final String method = "refresh"; - ICodeLogger.entering(CLASS, method); - this.checkersTableViewer.getControl().redraw(); - this.enableAllListerner.handleEvent(new Event()); - this.checkersTableViewer.refresh(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the infoImage - */ - protected Image getInfoImage() { - final String method = "getInfoImage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, infoImage); - return infoImage; - } - - /** - * @param pInfoImage the infoImage to set - */ - protected void setInfoImage(final Image pInfoImage) { - final String method = "setInfoImage"; - ICodeLogger.entering(CLASS, method, pInfoImage); - this.infoImage = pInfoImage; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the warningImage - */ - protected Image getWarningImage() { - final String method = "getWarningImage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, warningImage); - return warningImage; - } - - /** - * @param pWarningImage the warningImage to set - */ - protected void setWarningImage(final Image pWarningImage) { - final String method = "setWarningImage"; - ICodeLogger.entering(CLASS, method, pWarningImage); - this.warningImage = pWarningImage; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the errorImage - */ - protected Image getErrorImage() { - final String method = "getErrorImage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, errorImage); - return errorImage; - } - - /** - * @param pErrorImage the errorImage to set - */ - protected void setErrorImage(final Image pErrorImage) { - final String method = "setErrorImage"; - ICodeLogger.entering(CLASS, method, pErrorImage); - this.errorImage = pErrorImage; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the enabledImage - */ - protected Image getEnabledImage() { - final String method = "getEnabledImage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, enabledImage); - return enabledImage; - } - - /** - * @param pEnabledImage the enabledImage to set - */ - protected void setEnabledImage(final Image pEnabledImage) { - final String method = "setEnabledImage"; - ICodeLogger.entering(CLASS, method, pEnabledImage); - this.enabledImage = pEnabledImage; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the disabledImage - */ - protected Image getDisabledImage() { - final String method = "getDisabledImage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, disabledImage); - return disabledImage; - } - - /** - * @param pDisabledImage the disabledImage to set - */ - protected void setDisabledImage(final Image pDisabledImage) { - final String method = "setDisabledImage"; - ICodeLogger.entering(CLASS, method, pDisabledImage); - this.disabledImage = pDisabledImage; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the enabledColumn - */ - protected TableViewerColumn getEnabledColumn() { - final String method = "getEnabledColumn"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, enabledColumn); - return enabledColumn; - } - - /** - * @param pEnabledColumn the enabledColumn to set - */ - protected void setEnabledColumn(final TableViewerColumn pEnabledColumn) { - final String method = "setEnabledColumn"; - ICodeLogger.entering(CLASS, method, pEnabledColumn); - this.enabledColumn = pEnabledColumn; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the allEnabledChecked - */ - protected boolean isAllEnabledChecked() { - final String method = "isAllEnabledChecked"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(allEnabledChecked)); - return allEnabledChecked; - } - - /** - * @param pAllEnabledChecked the allEnabledChecked to set - */ - protected void setAllEnabledChecked(final boolean pAllEnabledChecked) { - final String method = "setAllEnabledChecked"; - ICodeLogger.entering(CLASS, method, Boolean.valueOf(pAllEnabledChecked)); - this.allEnabledChecked = pAllEnabledChecked; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the language - */ - public final LanguagePreferencesContainer getLanguage() { - final String method = "getLanguage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, language); - return language; - } - - /** - * @param pLanguage the language to set - */ - public final void setLanguage(final LanguagePreferencesContainer pLanguage) { - final String method = "setLanguage"; - ICodeLogger.entering(CLASS, method, pLanguage); - this.language = pLanguage; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the inputs - */ - public final List getInputs() { - final String method = "getInputs"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, inputs); - return inputs; - } - - /** - * @param pInputs the inputs to set - */ - public final void setInputs(final List pInputs) { - final String method = "setInputs"; - ICodeLogger.entering(CLASS, method, pInputs); - this.inputs = pInputs; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param isEnabled Set enabled or disabled all checker of the TableViewer. - */ - public void setAllEnabledChecker(final boolean isEnabled) { - final String method = "setAllEnabledChecker"; - ICodeLogger.entering(CLASS, method, Boolean.valueOf(isEnabled)); - if (allEnabledChecked && !isEnabled) { - allEnabledChecked = false; - enabledColumn.getColumn().setImage(disabledImage); - } - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersFilter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersFilter.java deleted file mode 100644 index 5bb13954..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/CheckersFilter.java +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerFilter; - -/** - * Filter for {@link CheckerPreferencesContainer} - */ -public class CheckersFilter extends ViewerFilter { - - /** - * Class name - **/ - private static final String CLASS = CheckersFilter.class.getName(); - - /** - * Search string - */ - private String searchString; - - /** - * Adding pattern to s parameter. - * - * @param str Searched string. - */ - public void setSearchText(final String str) { - final String method = "setSearchText"; - ICodeLogger.entering(CLASS, method, str); - // ensure that the value can be used for matching - this.searchString = "(?i:.*" + str + ".*)"; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers. - * Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public boolean select(final Viewer viewer, final Object parentElement, final Object element) { - final String method = "select"; - ICodeLogger.entering(CLASS, method, new Object[]{ - viewer, parentElement, element - }); - boolean select = false; - if (searchString == null || searchString.length() == 0) { - select = true; - } else { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - if (checker.getName().matches(searchString) - || checker.getLanguageName().matches(searchString)) { - select = true; - } - } - - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(select)); - - return select; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/EnabledEditingSupport.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/EnabledEditingSupport.java deleted file mode 100644 index d86f7012..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/EnabledEditingSupport.java +++ /dev/null @@ -1,117 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.*; -import org.eclipse.swt.SWT; - -/** - * Editing support for Enabled cells. - */ -public class EnabledEditingSupport extends EditingSupport { - /** - * Class name - **/ - private static final String CLASS = EnabledEditingSupport.class.getName(); - - /** - * Column viewer containing the cell - */ - private final ColumnViewer viewer; - /** - * TableViewer containing the column - */ - private final CheckersComposite checkerTableViewer; - - /** - * @param pViewer Column viewer containing the cell - * @param pCheckerTableViewer TableViewer containing the column - */ - public EnabledEditingSupport(final TableViewer pViewer, - final CheckersComposite pCheckerTableViewer) { - super(pViewer); - final String method = "EnabledEditingSupport"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pViewer, pCheckerTableViewer - }); - this.viewer = pViewer; - this.checkerTableViewer = pCheckerTableViewer; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object) - */ - @Override - protected CellEditor getCellEditor(Object element) { - final String method = "getCellEditor"; - ICodeLogger.entering(CLASS, method, element); - final CellEditor editor = new CheckboxCellEditor(null, SWT.CHECK | SWT.READ_ONLY); - ICodeLogger.exiting(CLASS, method, editor); - return editor; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object) - */ - @Override - protected boolean canEdit(Object element) { - final String method = "canEdit"; - ICodeLogger.entering(CLASS, method, element); - return UserPreferencesService.isDefaultConfigurationActive(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object) - */ - @Override - protected Object getValue(Object element) { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method, element); - final Object value; - if (UserPreferencesService.isDefaultConfigurationActive()) { - value = Boolean.valueOf(((CheckerPreferencesContainer) element).isChecked()); - } else { - value = Boolean.valueOf(UserPreferencesService - .isEnabledChecker(((CheckerPreferencesContainer) element).getId())); - } - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, - * java.lang.Object) - */ - @Override - protected void setValue(Object element, Object value) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, new Object[]{ - element, value - }); - ((CheckerPreferencesContainer) element).setChecked(((Boolean) value).booleanValue()); - - if (!((Boolean) value).booleanValue()) { - this.checkerTableViewer.setAllEnabledChecker(false); - } - viewer.refresh(); - ICodeLogger.exiting(CLASS, method); - - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MaxValueEditingSupport.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MaxValueEditingSupport.java deleted file mode 100644 index bb0530ad..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MaxValueEditingSupport.java +++ /dev/null @@ -1,112 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.CellEditor; -import org.eclipse.jface.viewers.EditingSupport; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.TextCellEditor; - -/** - * Editing support for Maximum columns. - */ -public class MaxValueEditingSupport extends EditingSupport { - /** - * Class name - **/ - private static final String CLASS = MaxValueEditingSupport.class.getName(); - /** - * Cell editor - */ - private final CellEditor editor; - - /** - * @param pViewer Column viewer containing the cell - */ - public MaxValueEditingSupport(final TableViewer pViewer) { - super(pViewer); - final String method = "MaxValueEditingSupport"; - ICodeLogger.entering(CLASS, method, pViewer); - this.editor = new TextCellEditor(pViewer.getTable()); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object) - */ - @Override - protected CellEditor getCellEditor(final Object element) { - final String method = "getCellEditor"; - ICodeLogger.entering(CLASS, method, element); - ICodeLogger.exiting(CLASS, method, editor); - return editor; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object) - */ - @Override - protected boolean canEdit(final Object element) { - final String method = "canEdit"; - ICodeLogger.entering(CLASS, method, element); - final boolean canEdit = UserPreferencesService.isDefaultConfigurationActive() - && ((CheckerPreferencesContainer) element).isMetric(); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(canEdit)); - return canEdit; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object) - */ - @Override - protected Object getValue(final Object element) { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method, element); - final Object value; - if (UserPreferencesService.isDefaultConfigurationActive()) { - value = Float.toString( - ((CheckerPreferencesContainer) element).getMaxValue().floatValue()); - } else { - value = UserPreferencesService - .getMaxValue(((CheckerPreferencesContainer) element).getId()); - } - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, - * java.lang.Object) - */ - @Override - protected void setValue(final Object element, final Object value) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, new Object[]{ - element, value - }); - try { - ((CheckerPreferencesContainer) element).setMaxValue(Float.parseFloat((String) value)); - } catch (@SuppressWarnings("unused") NullPointerException | NumberFormatException e) { - ((CheckerPreferencesContainer) element).setMaxValue(Float.NaN); - } - this.getViewer().refresh(); - ICodeLogger.exiting(CLASS, method); - - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MetricsComposite.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MetricsComposite.java deleted file mode 100644 index 11493b36..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MetricsComposite.java +++ /dev/null @@ -1,259 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.ColumnLabelProvider; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.TableViewerColumn; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -import java.util.List; - -/** - * This {@link CheckersComposite} is implemented to show and edit configuration - * of i-Code Checker which are set as metrics. - * - * @version 3.0 - * @since 3.0 - */ -public class MetricsComposite extends CheckersComposite { - /** - * Enable or disable checkers column's index. - */ - private static final int COLUMN_ENABLED_INDEX = 0; - /** - * Enable or disable checkers column's bound. - */ - private static final int COLUMN_ENABLED_BOUND = 30; - /** - * Checker's name column's name. - */ - private static final String COLUMN_CHECKER_NAME = "Checker"; - /** - * Checker's name checkers column's index. - */ - private static final int COLUMN_CHECKER_INDEX = 1; - /** - * Checker's name checkers column's bound. - */ - private static final int COLUMN_CHECKER_BOUND = 200; - /** - * Checker's languages column's name. - */ - private static final String COLUMN_LANGUAGE_NAME = "Language"; - /** - * Checker's languages checkers column's index. - */ - private static final int COLUMN_LANGUAGE_INDEX = 2; - /** - * Checker's languages checkers column's bound. - */ - private static final int COLUMN_LANGUAGE_BOUND = 80; - /** - * Checker's minimum value column's name. - */ - private static final String COLUMN_MINIMUM_NAME = "Minimum"; - /** - * Checker's minimum value column's index. - */ - private static final int COLUMN_MINIMUM_INDEX = 3; - /** - * Checker's minimum value column's bound. - */ - private static final int COLUMN_MINIMUM_BOUND = 80; - /** - * Checker's maximum value column's name. - */ - private static final String COLUMN_MAXIMUM_NAME = "Maximum"; - /** - * Checker's maximum value column's index. - */ - private static final int COLUMN_MAXIMUM_INDEX = 4; - /** - * Checker's maximum value column's bound. - */ - private static final int COLUMN_MAXIMUM_BOUND = 80; - /** - * Checker's severity column's name. - */ - private static final String COLUMN_SEVERITY_NAME = "Severity"; - /** - * Checker's severity column's index. - */ - private static final int COLUMN_SEVERITY_INDEX = 5; - /** - * Checker's severity column's bound. - */ - private static final int COLUMN_SEVERITY_BOUND = 80; - - /** - * Float NaN display. - */ - private static final String FLOAT_NAN_DISPLAY = "-"; - - /** - * Class name - **/ - private static final String CLASS = MetricsComposite.class.getName(); - - /** - * @param parent composite containing the table. - * @param checkers to show and configure in the table. - * @param style SWT style - */ - public MetricsComposite(final Composite parent, - final List checkers, final int style) { - super(parent, checkers, style); - final String method = "MetricsComposite"; - ICodeLogger.entering(CLASS, method, new Object[]{ - parent, checkers, Integer.valueOf(style) - }); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.preferences.checkerstables.CheckerTableViewer# - * createColumns(org.eclipse.swt.widgets.Composite, - * org.eclipse.jface.viewers.TableViewer) - */ - @Override - protected void createColumns(final Composite parent, final TableViewer pCheckersTableViewer) { - final String method = "createColumns"; - ICodeLogger.entering(CLASS, method, new Object[]{ - parent, pCheckersTableViewer - }); - - setEnabledColumn(createEnabledViewerColumn(COLUMN_ENABLED_BOUND, COLUMN_ENABLED_INDEX)); - getEnabledColumn().setEditingSupport(new EnabledEditingSupport(pCheckersTableViewer, this)); - getEnabledColumn().setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - return null; - } - - @Override - public Image getImage(final Object element) { - final Image image; - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - if (checker.isChecked()) { - image = getEnabledImage(); - } else { - image = getDisabledImage(); - } - return image; - } - }); - TableViewerColumn col = createTableViewerColumn(COLUMN_CHECKER_NAME, COLUMN_CHECKER_BOUND, - COLUMN_CHECKER_INDEX); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - return checker.getName(); - } - }); - col = createTableViewerColumn(COLUMN_LANGUAGE_NAME, COLUMN_LANGUAGE_BOUND, - COLUMN_LANGUAGE_INDEX); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - return checker.getLanguageName(); - } - }); - - col = createTableViewerColumn(COLUMN_MINIMUM_NAME, COLUMN_MINIMUM_BOUND, - COLUMN_MINIMUM_INDEX); - col.setEditingSupport(new MinValueEditingSupport(pCheckersTableViewer)); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - String floatValue = FLOAT_NAN_DISPLAY; - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - if (UserPreferencesService.isDefaultConfigurationActive()) { - if (!checker.getMinValue().isNaN()) { - floatValue = Float.toString(checker.getMinValue().floatValue()); - } else if (UserPreferencesService.hasMinValue(checker.getId())) { - floatValue = Float.toString(UserPreferencesService - .getMinValue(checker.getId()).floatValue()); - } - } else { - if (UserPreferencesService.hasMinValue(checker.getId())) { - floatValue = Float.toString(UserPreferencesService - .getMinValue(checker.getId()).floatValue()); - } - } - return floatValue; - } - }); - - col = createTableViewerColumn(COLUMN_MAXIMUM_NAME, COLUMN_MAXIMUM_BOUND, - COLUMN_MAXIMUM_INDEX); - col.setEditingSupport(new MaxValueEditingSupport(pCheckersTableViewer)); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - String floatValue = FLOAT_NAN_DISPLAY; - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - if (UserPreferencesService.isDefaultConfigurationActive()) { - if (!checker.getMaxValue().isNaN()) { - floatValue = Float.toString(checker.getMaxValue().floatValue()); - } else if (UserPreferencesService.hasMaxValue(checker.getId())) { - floatValue = Float.toString(UserPreferencesService - .getMaxValue(checker.getId()).floatValue()); - } - } else { - if (UserPreferencesService.hasMaxValue(checker.getId())) { - floatValue = Float.toString(UserPreferencesService - .getMaxValue(checker.getId()).floatValue()); - } - } - return floatValue; - } - }); - col = createTableViewerColumn(COLUMN_SEVERITY_NAME, COLUMN_SEVERITY_BOUND, - COLUMN_SEVERITY_INDEX); - col.setEditingSupport(new SeverityEditingSupport(pCheckersTableViewer)); - col.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(final Object element) { - return ((CheckerPreferencesContainer) element).getSeverity(); - } - - @Override - public Image getImage(final Object element) { - final CheckerPreferencesContainer checker = (CheckerPreferencesContainer) element; - final Image severityImage; - switch (checker.getSeverity()) { - case UserPreferencesService.PREF_SEVERITY_ERROR_VALUE: - severityImage = getErrorImage(); - break; - case UserPreferencesService.PREF_SEVERITY_WARNING_VALUE: - severityImage = getWarningImage(); - break; - case UserPreferencesService.PREF_SEVERITY_INFO_VALUE: - default: - severityImage = getInfoImage(); - break; - } - - return severityImage; - - } - - }); - ICodeLogger.exiting(CLASS, method); - - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MinValueEditingSupport.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MinValueEditingSupport.java deleted file mode 100644 index 0c4de72e..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/MinValueEditingSupport.java +++ /dev/null @@ -1,112 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.CellEditor; -import org.eclipse.jface.viewers.EditingSupport; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.TextCellEditor; - -/** - * Editing support for minimum - */ -public class MinValueEditingSupport extends EditingSupport { - - /** - * Class name - **/ - private static final String CLASS = MinValueEditingSupport.class.getName(); - - /** - * Cell editor - */ - private final CellEditor editor; - - /** - * @param pViewer Table viewer containing the cell - */ - public MinValueEditingSupport(final TableViewer pViewer) { - super(pViewer); - final String method = "MinValueEditingSupport"; - ICodeLogger.entering(CLASS, method, pViewer); - this.editor = new TextCellEditor(pViewer.getTable()); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object) - */ - @Override - protected CellEditor getCellEditor(final Object element) { - final String method = "getCellEditor"; - ICodeLogger.entering(CLASS, method, element); - ICodeLogger.exiting(CLASS, method, editor); - return editor; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object) - */ - @Override - protected boolean canEdit(final Object element) { - final String method = "canEdit"; - ICodeLogger.entering(CLASS, method, element); - final boolean canEdit = UserPreferencesService.isDefaultConfigurationActive() - && ((CheckerPreferencesContainer) element).isMetric(); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(canEdit)); - return canEdit; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object) - */ - @Override - protected Object getValue(final Object element) { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method, element); - final Object value; - if (UserPreferencesService.isDefaultConfigurationActive()) { - value = Float.toString( - ((CheckerPreferencesContainer) element).getMinValue().floatValue()); - } else { - value = UserPreferencesService - .getMinValue(((CheckerPreferencesContainer) element).getId()); - } - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, - * java.lang.Object) - */ - @Override - protected void setValue(final Object element, final Object value) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, element); - try { - ((CheckerPreferencesContainer) element).setMinValue(Float.parseFloat((String) value)); - } catch (@SuppressWarnings("unused") NullPointerException | NumberFormatException e) { - ((CheckerPreferencesContainer) element).setMinValue(Float.NaN); - } - this.getViewer().refresh(); - ICodeLogger.exiting(CLASS, method); - - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/SeverityEditingSupport.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/SeverityEditingSupport.java deleted file mode 100644 index 10f6e48d..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/SeverityEditingSupport.java +++ /dev/null @@ -1,140 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; - -import fr.cnes.analysis.tools.ui.preferences.CheckerPreferencesContainer; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.CellEditor; -import org.eclipse.jface.viewers.ComboBoxCellEditor; -import org.eclipse.jface.viewers.EditingSupport; -import org.eclipse.jface.viewers.TableViewer; - -/** - * Editing support for Severity. - */ -public class SeverityEditingSupport extends EditingSupport { - - /** - * Class name - **/ - private static final String CLASS = SeverityEditingSupport.class.getName(); - - /** - * TableViewer containing the column - */ - private final TableViewer viewer; - - /** - * @param pViewer TableViewer containing the column - */ - public SeverityEditingSupport(final TableViewer pViewer) { - super(pViewer); - final String method = ""; - ICodeLogger.entering(CLASS, method, pViewer); - this.viewer = pViewer; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object) - */ - @Override - protected CellEditor getCellEditor(final Object element) { - final String method = ""; - ICodeLogger.entering(CLASS, method, element); - final int options = 3; - final String[] severity = new String[options]; - severity[0] = UserPreferencesService.PREF_SEVERITY_INFO_VALUE; - severity[1] = UserPreferencesService.PREF_SEVERITY_WARNING_VALUE; - severity[2] = UserPreferencesService.PREF_SEVERITY_ERROR_VALUE; - final ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(viewer.getTable(), severity); - ICodeLogger.exiting(CLASS, method, cellEditor); - return cellEditor; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object) - */ - @Override - protected boolean canEdit(final Object element) { - final String method = ""; - ICodeLogger.entering(CLASS, method, element); - final boolean canEdit = UserPreferencesService.isDefaultConfigurationActive(); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(canEdit)); - return canEdit; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object) - */ - @Override - protected Object getValue(final Object element) { - final String method = ""; - ICodeLogger.entering(CLASS, method, element); - final Integer severityCode; - final String severity; - if (UserPreferencesService.isDefaultConfigurationActive()) { - severity = ((CheckerPreferencesContainer) element).getSeverity(); - } else { - severity = UserPreferencesService - .getCheckerSeverity(((CheckerPreferencesContainer) element).getId()); - } - switch (severity) { - case UserPreferencesService.PREF_SEVERITY_ERROR_VALUE: - severityCode = Integer.valueOf(2); - break; - case UserPreferencesService.PREF_SEVERITY_WARNING_VALUE: - severityCode = Integer.valueOf(1); - break; - case UserPreferencesService.PREF_SEVERITY_INFO_VALUE: - default: - severityCode = Integer.valueOf(0); - break; - } - ICodeLogger.exiting(CLASS, method, severity); - return severityCode; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, - * java.lang.Object) - */ - @Override - protected void setValue(final Object element, final Object value) { - final String method = ""; - ICodeLogger.entering(CLASS, method, new Object[]{ - element, value - }); - final int severityCode = ((Integer) value).intValue(); - final String severity; - switch (severityCode) { - case 2: - severity = UserPreferencesService.PREF_SEVERITY_ERROR_VALUE; - break; - case 1: - severity = UserPreferencesService.PREF_SEVERITY_WARNING_VALUE; - break; - case 0: - default: - severity = UserPreferencesService.PREF_SEVERITY_INFO_VALUE; - break; - } - ((CheckerPreferencesContainer) element).setSeverity(severity); - viewer.refresh(); - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/package-info.java deleted file mode 100644 index 463a16d2..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/checkerstables/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Package containing i-Code CNES Checkers table viewers for preferences pages - * of UI Plug-in. - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ - -/** - * Package containing i-Code CNES Checkers table viewers for preferences pages - * of UI Plug-in. - */ -package fr.cnes.analysis.tools.ui.preferences.checkerstables; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/package-info.java deleted file mode 100644 index 407fa927..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/preferences/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Package containing Preference page and Preference service of i-Code CNES UI - * Plug-in - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * Package containing Preference page and Preference service of i-Code CNES UI - * Plug-in - */ - -package fr.cnes.analysis.tools.ui.preferences; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/utils/AnalysisHandlerUIUtils.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/utils/AnalysisHandlerUIUtils.java deleted file mode 100755 index ead2bb76..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/utils/AnalysisHandlerUIUtils.java +++ /dev/null @@ -1,360 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.utils; - -import fr.cnes.analysis.tools.ui.exception.*; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jface.viewers.IStructuredSelection; - -import java.util.LinkedList; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Contains tools methods for handler purpose. - */ -public final class AnalysisHandlerUIUtils { - /** - * Logger - **/ - private final static Logger LOGGER = Logger.getLogger(AnalysisHandlerUIUtils.class.getName()); - - /** - * Protected constructor. This method should not be instantiated. - */ - private AnalysisHandlerUIUtils() { - // do nothing - } - - /** - * Check if the selection is not empty. - * - * @param selection the current selection. - * @throws EmptySelectionException if the selection is empty. - */ - public static void checkSelection(final IStructuredSelection selection) - throws EmptySelectionException { - LOGGER.finest("Begin checkSelection method"); - - if (selection == null) { - throw new EmptySelectionException("Selection is null."); - } else if (selection.isEmpty()) { - throw new EmptySelectionException("Selection is empty."); - } else if (selection.getFirstElement() == null) { - throw new EmptySelectionException("Selection element is null."); - } - - LOGGER.finest("End checkSelection method"); - } - - /** - * Retrieve the files on the corresponding language from the selection. - * - * @param selection the selection - * @param pFileExtension file's possible extensions - * @return the retrieved files. - * @throws EmptyResourceException if the resource is empty. - * @throws UnknownResourceTypeException if the resource type is unknown. - * @throws InvalidResourceTypeException if the resource type is invalid. - * @throws NonAccessibleResourceException if the resource is not accessible. - * @throws EmptySelectionException if the selection is empty. - */ - public static List retrieveFiles(final IStructuredSelection selection, - final String[] pFileExtension) throws EmptyResourceException, - UnknownResourceTypeException, InvalidResourceTypeException, - NonAccessibleResourceException, EmptySelectionException { - LOGGER.finest("Begin retrieveFiles method"); - - final List files = browseSelection(selection, pFileExtension); - if (files.isEmpty()) { - throw new EmptyResourceException( - "Please select at least one file before launching the analyse."); - } - - LOGGER.finest("End retrieveFiles method"); - return files; - } - - /** - * Retrieve the selected files for all files in a selection. - * - * @param selection The current selection - * @param fileExtension list of file's possible extensions - * @return The selected files list - * @throws EmptyResourceException A project or a folder has no members. - * @throws UnknownResourceTypeException Resource has unknown type - * @throws InvalidResourceTypeException Resource has invalid type (a project's member or a folder's - * member cannot have ROOT type) - * @throws NonAccessibleResourceException Resource is not accessible - * @throws EmptySelectionException Root has no projects - */ - public static List browseSelection(final IStructuredSelection selection, - final String[] fileExtension) throws EmptyResourceException, - UnknownResourceTypeException, InvalidResourceTypeException, - NonAccessibleResourceException, EmptySelectionException { - LOGGER.finest("Begin browseSelection method"); - - final List files = new LinkedList(); - - for (int i = 0; i < selection.size(); i++) { - if (selection.toList().get(i) instanceof IResource) { - files.addAll(retrieveSelectedFiles((IResource) selection.toList().get(i), - fileExtension)); - } - } - - LOGGER.finest("End browseSelection method"); - return files; - } - - /** - * Retrieve the selected files. - * - * @param resource The input resource. - * @param fileExtension list of file's possible extensions - * @return The selected files list. - * @throws EmptyResourceException A project or a folder has no members. - * @throws UnknownResourceTypeException Resource has unknown type. - * @throws InvalidResourceTypeException Resource has invalid type (a project's member or a folder's - * member cannot have ROOT type). - * @throws NonAccessibleResourceException Resource is not accessible. - * @throws EmptySelectionException Root has no projects. - */ - public static List retrieveSelectedFiles(final IResource resource, - final String[] fileExtension) throws EmptyResourceException, - UnknownResourceTypeException, InvalidResourceTypeException, - NonAccessibleResourceException, EmptySelectionException { - LOGGER.finest("Begin retrieveSelectedFiles method"); - - final List files = new LinkedList(); - - switch (resource.getType()) { - case IResource.ROOT: - files.addAll(retrieveFilesFromRoot((IWorkspaceRoot) resource, fileExtension)); - break; - case IResource.PROJECT: - files.addAll(retrieveFilesFromProject((IProject) resource, fileExtension)); - break; - case IResource.FOLDER: - files.addAll(retrieveFilesFromFolder((IFolder) resource, fileExtension)); - break; - case IResource.FILE: - if (checkFileExtension(resource, fileExtension)) { - files.add(resource.getLocation()); - } - break; - default: - final UnknownResourceTypeException exception = new UnknownResourceTypeException( - "Resource " + resource.getName() + " has type " + resource.getType() + "."); - LOGGER.log(Level.FINER, exception.getClass() + " : " + exception.getMessage(), - exception); - throw exception; - } - - LOGGER.finest("End retrieveSelectedFiles method"); - return files; - } - - /** - * Retrieve selected files from Root. - * - * @param resource the selection, as workspace root. - * @param fileExtension list of file's possible extensions - * @return all the files from root. - * @throws EmptyResourceException A project or a folder has no members. - * @throws UnknownResourceTypeException Resource has unknown type. - * @throws InvalidResourceTypeException Resource has invalid type (a project's member or a folder's - * member cannot have ROOT type). - * @throws NonAccessibleResourceException Resource is not accessible. - * @throws EmptySelectionException Root has not projects. - */ - public static List retrieveFilesFromRoot(final IWorkspaceRoot resource, - final String[] fileExtension) throws EmptyResourceException, - UnknownResourceTypeException, InvalidResourceTypeException, - NonAccessibleResourceException, EmptySelectionException { - LOGGER.finest("Begin retrieveFilesFromRoot method"); - - final List files = new LinkedList(); - final IProject[] projects = resource.getProjects(); - if (projects == null) { - throw new EmptySelectionException("Selected root has no projects."); - } else { - for (final IProject project : projects) { - files.addAll(retrieveFilesFromProject(project, fileExtension)); - } - } - - LOGGER.finest("End retrieveFilesFromRoot method"); - return files; - } - - /** - * Retrieve all project's files. - * - * @param project the current project. - * @param fileExtension list of file's possible extensions - * @return The project's files. - * @throws EmptyResourceException A project or a folder has no members. - * @throws UnknownResourceTypeException Resource has unknown type. - * @throws InvalidResourceTypeException Resource has invalid type (a project's member or a folder's - * member cannot have ROOT type). - * @throws NonAccessibleResourceException Resource is not accessible. - */ - public static List retrieveFilesFromProject(final IProject project, - final String[] fileExtension) - throws EmptyResourceException, UnknownResourceTypeException, - InvalidResourceTypeException, NonAccessibleResourceException { - LOGGER.finest("Begin retrieveFilesFromProject method"); - - final List files = new LinkedList(); - if (project.isAccessible()) { - try { - final IResource[] members = project.members(); - if (members == null) { - throw new EmptyResourceException("Project " + project.getName() + " is empty."); - } else { - for (final IResource member : members) { - switch (member.getType()) { - case IResource.PROJECT: - files.addAll( - retrieveFilesFromProject((IProject) member, fileExtension)); - break; - case IResource.FOLDER: - files.addAll(retrieveFilesFromFolder((IFolder) member, fileExtension)); - break; - case IResource.FILE: - if (checkFileExtension(member, fileExtension)) { - files.add(member.getLocation()); - } - break; - case IResource.ROOT: - final InvalidResourceTypeException invalidException = new InvalidResourceTypeException( - "Resource " + member.getName() + " has type " - + member.getType() + "."); - LOGGER.log(Level.FINER, - invalidException.getClass() + " : " - + invalidException.getMessage(), - invalidException); - throw invalidException; - default: - final UnknownResourceTypeException unknownException = new UnknownResourceTypeException( - "Resource " + member.getName() + " has type " - + member.getType() + "."); - LOGGER.log(Level.FINER, - unknownException.getClass() + " : " - + unknownException.getMessage(), - unknownException); - throw unknownException; - } - } - } - } catch (final CoreException e) { - throw new NonAccessibleResourceException( - "Project " + project.getName() + " is not accessible or is closed.", e); - } - } else { - throw new NonAccessibleResourceException( - "Project " + project.getName() + " is not accessible or is closed."); - } - - LOGGER.finest("End retrieveFilesFromProject method"); - return files; - } - - /** - * Retrieve all folder's files. - * - * @param folder the current folder. - * @param fileExtension list of file's possible extensions - * @return The folder's files. - * @throws EmptyResourceException A project or a folder has no members. - * @throws UnknownResourceTypeException Resource has unknown type. - * @throws InvalidResourceTypeException Resource has invalid type (a project's member or a folder's - * member cannot have ROOT type). - * @throws NonAccessibleResourceException Resource is not accessible. - */ - public static List retrieveFilesFromFolder(final IFolder folder, - final String[] fileExtension) - throws EmptyResourceException, UnknownResourceTypeException, - InvalidResourceTypeException, NonAccessibleResourceException { - LOGGER.finest("Begin retrieveFilesFromFolder method"); - - try { - final List files = new LinkedList(); - final IResource[] members = folder.members(); - if (members == null) { - throw new EmptyResourceException("Folder " + folder.getName() + " is empty."); - } else { - for (final IResource member : members) { - switch (member.getType()) { - case IResource.PROJECT: - files.addAll(retrieveFilesFromProject((IProject) member, fileExtension)); - break; - case IResource.FOLDER: - files.addAll(retrieveFilesFromFolder((IFolder) member, fileExtension)); - break; - case IResource.FILE: - if (checkFileExtension(member, fileExtension)) { - files.add(member.getLocation()); - } - break; - case IResource.ROOT: - final InvalidResourceTypeException exception = new InvalidResourceTypeException( - "Resource " + member.getName() + " has type " + member.getType() - + "."); - LOGGER.log(Level.FINER, - exception.getClass() + " : " + exception.getMessage(), - exception); - throw exception; - default: - final UnknownResourceTypeException unknownException = new UnknownResourceTypeException( - "Resource " + member.getName() + " has type " + member.getType() - + "."); - LOGGER.log(Level.FINER, unknownException.getClass() + " : " - + unknownException.getMessage(), unknownException); - throw unknownException; - } - } - } - - LOGGER.finest("End retrieveFilesFromFolder method"); - return files; - } catch (final CoreException e) { - throw new NonAccessibleResourceException( - "Folder " + folder.getName() + " does not exist.", e); - } - } - - /** - * Check file extension. - * - * @param file the file to be checked. - * @param fileExtension list of file's possible extensions - * @return true if the file extension is f, f77 (non case sensitive). - */ - public static boolean checkFileExtension(final IResource file, final String[] fileExtension) { - LOGGER.finest("Begin checkFileExtension method"); - - boolean rightExtension = false; - final boolean isRightFile = (file.getName() != null) && !(file.getName().startsWith(".")); - if (isRightFile && (file.getFileExtension() != null)) { - for (final String extension : fileExtension) { - rightExtension = rightExtension - | extension.equalsIgnoreCase(file.getFileExtension()); - } - } - - LOGGER.finest("End checkFileExtension method"); - return rightExtension; - - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractAnalysisTreeViewer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractAnalysisTreeViewer.java deleted file mode 100755 index a9aea6ef..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractAnalysisTreeViewer.java +++ /dev/null @@ -1,137 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.ide.IDE; - -/** - * AbstractviolationsTreeViewer is an abstract class containing most useful - * method to create a TreeViewer showing result of a static analysis. - */ -public abstract class AbstractAnalysisTreeViewer extends TreeViewer { - /** - * Class name - **/ - private final static String CLASS = AbstractAnalysisTreeViewer.class.getName(); - /** - * Titles of the columns - */ - private String[] titles; - - /** - * Bounds of the TreeViewer - */ - private int[] bounds; - - /** - * @param parent Composite containing the TreeViewer - * @param style Style parameters of the TreeViewer - * @param pTitles Columns titles - * @param pBounds Bounds of the TreeViewer. - */ - public AbstractAnalysisTreeViewer(Composite parent, int style, String[] pTitles, - int[] pBounds) { - super(parent, style); - final String method = "AbstractAnalysisTreeViewer"; - ICodeLogger.entering(CLASS, method); - this.titles = pTitles; - this.bounds = pBounds; - this.createColumns(); - this.addDoubleClickAction(); - } - - /** - * This method must be implemented to define the content provider for the - * columns of the viewer - */ - protected abstract void createColumns(); - - /** - * This method must be implemented in order to open a file selected by the - * user by double clicking one of the TreeViewer content. - *

- * {@link #openFileInEditor(IResource, int)} - */ - protected abstract void addDoubleClickAction(); - - /** - * Method that open a file in the editor when double-clicked, on a specific - * line. - * - * @param res the file to open - * @param line the line on which the file has to be opened - */ - protected void openFileInEditor(final IResource res, final int line) { - final String method = "openFileInEditor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - res, Integer.valueOf(line) - }); - final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getActivePage(); - try { - // Before creating the marker - res.deleteMarkers(IMarker.MARKER, false, 1); - final IMarker marker = res.createMarker(IMarker.MARKER); - marker.setAttribute(IMarker.LINE_NUMBER, line); - IDE.openEditor(page, marker); - } catch (final CoreException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Marker problem", exception.getMessage()); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the titles - */ - public String[] getTitles() { - final String method = "getTitles"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, titles); - return titles; - } - - /** - * @param pTitles the titles to set - */ - public void setTitles(String[] pTitles) { - final String method = "setTitles"; - ICodeLogger.entering(CLASS, method, pTitles); - - this.titles = pTitles; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the bounds - */ - public int[] getBounds() { - final String method = "getBounds"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, bounds); - return bounds; - } - - /** - * @param pBounds the bounds to set - */ - public void setBounds(int[] pBounds) { - final String method = "setBounds"; - ICodeLogger.entering(CLASS, method, pBounds); - this.bounds = pBounds; - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractLabelProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractLabelProvider.java deleted file mode 100755 index 0d6e0832..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/AbstractLabelProvider.java +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.ColumnLabelProvider; - -/** - * Label provider for columns of viewers - */ -public abstract class AbstractLabelProvider extends ColumnLabelProvider { - - /** - * Class name - */ - private static final String CLASS = AbstractLabelProvider.class.getName(); - /** - * An integer to determine which column has to be provide. - **/ - private int type; - - /** - * Constructor with integer parameter which represents the column created. - * - * @param pType the column to create - */ - public AbstractLabelProvider(final int pType) { - super(); - final String method = "AbstractLabelProvider"; - ICodeLogger.entering(CLASS, method, Integer.valueOf(pType)); - this.type = pType; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the type. - * - * @return the type - */ - public int getType() { - final String method = "getType"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Integer.valueOf(this.type)); - return this.type; - } - - /** - * Setter for the type. - * - * @param pType the type to set - */ - public void setType(final int pType) { - final String method = "setType"; - ICodeLogger.entering(CLASS, method, Integer.valueOf(pType)); - this.type = pType; - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/MetricsView.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/MetricsView.java deleted file mode 100755 index 6917c07f..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/MetricsView.java +++ /dev/null @@ -1,428 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view; - -import fr.cnes.analysis.tools.ui.exception.EmptyProviderException; -import fr.cnes.analysis.tools.ui.view.metrics.FunctionMetricDescriptor; -import fr.cnes.analysis.tools.ui.view.metrics.MetricContentProvider; -import fr.cnes.analysis.tools.ui.view.metrics.MetricLabelProvider; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.*; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.swt.widgets.TreeColumn; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.ide.IDE; -import org.eclipse.ui.part.ViewPart; - -import java.util.*; - -/** - * View displaying the metrics computation results. - * - * @see fr.cnes.analysis.tools.ui.view.AbstractAnalysisView - */ -public class MetricsView extends ViewPart { - - /** - * View ID. - **/ - public static final String VIEW_ID = MetricsView.class.getName(); - /** - * Markers - */ - public static final List MARKERS = new ArrayList(); - - /** - * Class name - */ - private static final String CLASS = MetricsView.class.getName(); - - /** - * This attribute store all the analysis results files. - */ - private static Set analysisResult = new HashSet(); - /** - * Columns titles - **/ - private final String[] titles = { - "Metric", "Total", "Mean", "Minimum", "Maximum" - }; - /** - * Bounds value. - **/ - private final int[] bounds = { - 200, 75, 75, 75, 75, 200, 200 - }; - /** - * The viewer which display results. - **/ - private TreeViewer viewer; - - /** - * Empty constructor. - */ - public MetricsView() { - super(); - final String method = "MetricsView"; - ICodeLogger.entering(CLASS, method); - analysisResult = new TreeSet<>(new Comparator() { - - @Override - public int compare(final CheckResult value1, final CheckResult value2) { - - int res = value1.getId().compareTo(value2.getId()); - if (res == 0) { - res = value1.getFile().getAbsolutePath() - .compareTo(value2.getFile().getAbsolutePath()); - } - return res; - } - }); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt. - * widgets .Composite) - */ - @Override - public void createPartControl(final Composite parent) { - final String method = "createPartControl"; - ICodeLogger.entering(CLASS, method, parent); - final GridLayout layout = new GridLayout(this.titles.length, false); - parent.setLayout(layout); - this.createViewer(parent); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method create the viewer, which is a tree table. - * - * @param parent the parent composite - */ - private void createViewer(final Composite parent) { - final String method = "createViewer"; - ICodeLogger.entering(CLASS, method, parent); - // Defining overall style for TreeViewer - final int scrollStyle = SWT.H_SCROLL | SWT.V_SCROLL; - final int selecStyle = SWT.MULTI | SWT.FULL_SELECTION; - final int style = scrollStyle | selecStyle; - this.viewer = new TreeViewer(parent, style | SWT.FILL); - // Make headers and lines of the tree visible - final Tree tree = this.viewer.getTree(); - tree.setHeaderVisible(true); - tree.setLinesVisible(true); - - // Setting the content provider and creating columns - this.createColumns(); - - // Expand the tree - this.viewer.setAutoExpandLevel(1); - - // Add selection provider which allows to listen to each - // selection made on this viewer. - this.getSite().setSelectionProvider(this.viewer); - - // Add a DoubleClickListener - this.addDoubleClickAction(); - - // Layout the viewer - final GridData gridData = new GridData(); - gridData.verticalAlignment = GridData.FILL; - gridData.horizontalSpan = this.titles.length; - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - this.viewer.getTree().setLayoutData(gridData); - - ICodeLogger.exiting(CLASS, method); - } - - /** - * Create TreeViewer columns - */ - protected void createColumns() { - final String method = "createColumns"; - ICodeLogger.entering(CLASS, method); - viewer.setContentProvider(new MetricContentProvider()); - TreeViewerColumn col; - for (int i = 0; i < this.getTitles().length; i++) { - // Create the column - col = this.createTreeViewerColumn(this.getTitles()[i], this.getBounds()[i]); - - // Add a label provider - col.setLabelProvider(new MetricLabelProvider(i)); - } - - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method creates a tree viewer column. - * - * @param title title of the column - * @param bound size of the column - * @return a table viewer's column - */ - protected TreeViewerColumn createTreeViewerColumn(final String title, final int bound) { - final String method = "createTreeViewerColumn"; - ICodeLogger.entering(CLASS, method, new Object[]{ - title, Integer.valueOf(bound) - }); - final TreeViewerColumn viewerColumn = new TreeViewerColumn(this.viewer, SWT.NONE); - final TreeColumn column = viewerColumn.getColumn(); - column.setText(title); - column.setWidth(bound); - column.setResizable(true); - column.setMoveable(false); - - ICodeLogger.exiting(CLASS, method, viewerColumn); - return viewerColumn; - } - - /** - * Action to do when a double click over the item is done - */ - protected void addDoubleClickAction() { - final String method = "addDoubleClickAction"; - ICodeLogger.entering(CLASS, method); - viewer.addDoubleClickListener(new IDoubleClickListener() { - - @Override - public void doubleClick(final DoubleClickEvent event) { - final IStructuredSelection thisSelection = (IStructuredSelection) event - .getSelection(); - final Object selectedNode = thisSelection.getFirstElement(); - - viewer.setExpandedState(selectedNode, !viewer.getExpandedState(selectedNode)); - // if it is a leaf -> open the file - if (!viewer.isExpandable(selectedNode) - && selectedNode instanceof FunctionMetricDescriptor) { - - // get Path of the file & Line of the - // File containing the - // Metric - final IPath path = ((FunctionMetricDescriptor) selectedNode).getFilePath(); - final int line = ((FunctionMetricDescriptor) selectedNode).getLine().intValue(); - - // get resource - final IFile fileToOpen = ResourcesPlugin.getWorkspace().getRoot() - .getFileForLocation(path); - final IResource res = fileToOpen; - - // open file in editor - MetricsView.this.openFileInEditor(res, line); - - } - } - - }); - - ICodeLogger.exiting(CLASS, method); - } - - /** - * Open the file containing the metric at the metric's function line. - * - * @param res the file to open - * @param line the line where the file should open - */ - private void openFileInEditor(final IResource res, final int line) { - final String method = "openFileInEditor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - res, Integer.valueOf(line) - }); - final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getActivePage(); - try { - // Before creating the marker - res.deleteMarkers(IMarker.MARKER, false, 1); - final IMarker marker = res.createMarker(IMarker.MARKER); - marker.setAttribute(IMarker.LINE_NUMBER, line); - marker.setAttribute("Class", "Metric"); - - IDE.openEditor(page, marker); - } catch (final CoreException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Marker problem", exception.getMessage()); - } - ICodeLogger.exiting(CLASS, method); - } - - /** - * Displays the analyze results on the view. - * - * @param values the descriptors to show on the view - * @return - * @throws EmptyProviderException when source provider to determine view type is not found (not - * necessarily used) - */ - public void display(final List values) throws EmptyProviderException { - final String method = "display"; - ICodeLogger.entering(CLASS, method, values); - synchronized (this) { - final Set listInputs = new TreeSet( - new Comparator() { - - @Override - public int compare(final CheckResult value1, - final CheckResult value2) { - - int res = 0; - res = value1.getId().compareTo(value2.getId()); - if (res == 0) { - res = value1.getFile().getAbsolutePath().compareTo( - value2.getFile().getAbsolutePath()); - if (res == 0) { - /* - * We don't compare location if the - * location is a file's one. - */ - if ((value1.getLocation() == null - || value1.getLocation().isEmpty()) - && (value2.getLocation() == null - || value2.getLocation() - .isEmpty())) { - res = 0; - } else if ((value1.getLocation() == null - || value1.getLocation().isEmpty()) - && (value2.getLocation() != null - || value2.getLocation() - .isEmpty())) { - return -1; - } else if ((value1.getLocation() != null - || value1.getLocation().isEmpty()) - && (value2.getLocation() == null - || value2.getLocation() - .isEmpty())) { - return 1; - } else { - res = value1.getLocation() - .compareTo(value2.getLocation()); - } - } - } - return res; - } - }); - - if (viewer.getInput() != null) { - for (final CheckResult input : (CheckResult[]) viewer.getInput()) { - listInputs.add(input); - } - } - - for (final CheckResult value : values) { - listInputs.add(value); - } - analysisResult = listInputs; - viewer.setInput(listInputs.toArray(new CheckResult[listInputs.size()])); - } - - viewer.refresh(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method will clear the message and make it appear on the view. - * - * @throws EmptyProviderException when source provider to determine view type is not found (not - * necessarily used) - */ - public void clear() throws EmptyProviderException { - final String method = "clear"; - ICodeLogger.entering(CLASS, method); - analysisResult.clear(); - viewer.setInput(new CheckResult[0]); - viewer.refresh(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the analysisResult - */ - public Set getAnalysisResult() { - final String method = "getAnalysisResult"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, analysisResult); - return analysisResult; - } - - /** - * Getter for the bounds. - * - * @return the bounds - */ - public int[] getBounds() { - final String method = "getBounds"; - ICodeLogger.entering(CLASS, method); - final int[] clonedBounds = this.bounds.clone(); - ICodeLogger.exiting(CLASS, method, clonedBounds); - return clonedBounds; - } - - /** - * Getter for the titles. - * - * @return the titles - */ - public String[] getTitles() { - final String method = "getTitles"; - ICodeLogger.entering(CLASS, method); - final String[] clonedTitles = this.titles.clone(); - ICodeLogger.exiting(CLASS, method, clonedTitles); - return clonedTitles; - } - - /** - * Getter for the viewer. - * - * @return the viewer - */ - public TreeViewer getViewer() { - final String method = "getViewer"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.viewer); - return this.viewer; - } - - /** - * Setter for the viewer. - * - * @param pViewer this.descriptors.clone() set - */ - public void setViewer(final TreeViewer pViewer) { - final String method = "setViewer"; - ICodeLogger.entering(CLASS, method, pViewer); - this.viewer = pViewer; - ICodeLogger.exiting(CLASS, method); - } - - @Override - public void setFocus() { - final String method = "setFocus"; - ICodeLogger.entering(CLASS, method); - this.viewer.getControl().setFocus(); - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/ViolationsView.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/ViolationsView.java deleted file mode 100644 index f1b2a251..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/ViolationsView.java +++ /dev/null @@ -1,507 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view; - -import fr.cnes.analysis.tools.ui.exception.EmptyProviderException; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.IUpdatableAnalysisFilter; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.FileTreeViewer; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.FileTreeViewerContentProvider; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.filter.FileTreeViewerFilter; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.RuleTreeViewer; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.RuleTreeViewerContentProvider; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.filter.RuleViewerFilter; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Text; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.ui.part.ViewPart; - -import java.util.Comparator; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - -public class ViolationsView extends ViewPart { - - /** - * View identifier - */ - public static final String VIEW_ID = ViolationsView.class.getName(); - - public static final String RULE_TREE_VIEWER_TYPE = "RuleTreeViewer"; - - /** - * FILE_TREE_VIEWER_TYPE - */ - public static final String FILE_TREE_VIEWER_TYPE = "FileTreeViewer"; - /** - * Class name - */ - private static final String CLASS = MetricsView.class.getName(); - /** - * The string to filter results in the TreeViewer - */ - private String searchString = ""; - - /** - * Indicate if violation of level warning must be shown - */ - private boolean showWarning = true; - /** - * Indicate if violation of level error must be shown - */ - private boolean showError = true; - /** - * Whether or not to show violation of Info severity - */ - private boolean showInfo; - /** - * Contain the identifier of the type of TreeViewer currently being - * displayed in the view. By default, the view show a RuleTreeViewer one - */ - private String treeViewerType = RULE_TREE_VIEWER_TYPE; - - /** - * The list of all violation used by the TreeViewer of the view, useful to - * make an export of the view - */ - private Set analysisResults = new TreeSet<>(new Comparator() { - - @Override - public int compare(final CheckResult value1, final CheckResult value2) { - - int res = value1.getId().compareTo(value2.getId()); - if (res == 0) { - res = value1.getFile().getAbsoluteFile() - .compareTo(value2.getFile().getAbsoluteFile()); - } - return res; - } - }); - - /** - * The viewer which display results. - **/ - private TreeViewer viewer; - - /** - * Composite contained in the view and displaying it's elements - */ - private Composite parent; - - /** - * Constructor with an integer array for table bounds and string array for - * the titles, as parameters. - */ - public ViolationsView() { - super(); - final String method = "ViolationsView"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the viewer. - * - * @return the viewer - */ - public TreeViewer getViewer() { - final String method = "getViewer"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method); - return this.viewer; - } - - /** - * Setter for the viewer. - * - * @param pViewer this.descriptors.clone() set - */ - public void setViewer(final TreeViewer pViewer) { - final String method = "setViewer"; - ICodeLogger.entering(CLASS, method, pViewer); - this.viewer = pViewer; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt. - * widgets.Composite) - */ - @Override - public void createPartControl(final Composite pParent) { - final String method = "createPartControl"; - ICodeLogger.entering(CLASS, method, pParent); - this.parent = pParent; - final GridLayout layout = new GridLayout(); - - pParent.setLayout(layout); - /* - * Adding the filter field - */ - final Text search = new Text(pParent, SWT.SEARCH | SWT.CANCEL | SWT.ICON_SEARCH); - search.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); - search.setMessage("Filter : Enter part of file path, name, rule name or function's name... " - + "(not case sensitive)"); - - /* - * Updating search attribute every time the search field is being - * modified. - */ - search.addModifyListener(new ModifyListener() { - - @Override - public void modifyText(final ModifyEvent event) { - final Text source = (Text) event.getSource(); - searchString = source.getText(); - update(); - } - - }); - - /* - * Add a selection adapter for the button SWT.CANCEL of the search field - * that set the searching field to null when the user click on the - * button. Note : SWT.CANCEL do not exist in Windows 7. - */ - search.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetDefaultSelected(final SelectionEvent event) { - if (event.detail == SWT.CANCEL) { - final Text text = (Text) event.getSource(); - text.setText(""); - update(); - } - } - }); - - final Button infoBtn = new Button(pParent, SWT.CHECK | SWT.SELECTED); - infoBtn.setText("Info"); - infoBtn.setSelection(true); - final Button warningBtn = new Button(pParent, SWT.CHECK | SWT.SELECTED); - warningBtn.setText("Warning"); - warningBtn.setSelection(true); - final Button errorBtn = new Button(pParent, SWT.CHECK | SWT.CHECK); - errorBtn.setText("Error"); - errorBtn.setSelection(true); - - infoBtn.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(final SelectionEvent event) { - final Button btn = (Button) event.getSource(); - showInfo = btn.getSelection(); - update(); - } - - }); - - warningBtn.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(final SelectionEvent event) { - final Button btn = (Button) event.getSource(); - showWarning = btn.getSelection(); - update(); - } - - }); - - errorBtn.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(final SelectionEvent event) { - final Button btn = (Button) event.getSource(); - showError = btn.getSelection(); - update(); - } - }); - - this.createRuleTreeViewer(pParent); - layout.numColumns = this.getViewer().getTree().getColumnCount(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * - */ - public void update() { - final String method = "update"; - ICodeLogger.entering(CLASS, method); - for (final ViewerFilter filter : this.viewer.getFilters()) { - if (filter instanceof IUpdatableAnalysisFilter) { - ((IUpdatableAnalysisFilter) filter).update(searchString, showInfo, showWarning, - showError); - } - } - viewer.refresh(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method create the viewer, which is a tree table. - * - * @param pParent the parent composite - */ - private void createRuleTreeViewer(final Composite pParent) { - final String method = "createRuleTreeViewer"; - ICodeLogger.entering(CLASS, method, pParent); - // Defining overall style for TreeViewer - final int scrollStyle = SWT.H_SCROLL | SWT.V_SCROLL; - final int selecStyle = SWT.MULTI | SWT.FULL_SELECTION; - final int style = scrollStyle | selecStyle; - this.viewer = new RuleTreeViewer(pParent, style | SWT.FILL); - // Make headers and lines of the tree visible - final Tree tree = this.viewer.getTree(); - tree.setHeaderVisible(true); - tree.setLinesVisible(true); - - // Expand the tree - this.viewer.setAutoExpandLevel(1); - - // Add selection provider which allows to listen to each - // selection made on this viewer. - this.getSite().setSelectionProvider(this.viewer); - - // Layout the viewer - final GridData gridData = new GridData(); - gridData.verticalAlignment = GridData.FILL; - gridData.horizontalSpan = this.viewer.getTree().getColumnCount(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - this.viewer.getTree().setLayoutData(gridData); - - /* - * Creating a filter using field search & check buttons Warning and - * Error. - * - * Show only element selected by the user. - */ - final RuleViewerFilter ruleFilter = new RuleViewerFilter(); - viewer.addFilter(ruleFilter); - - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method create the viewer, which is a tree table. - * - * @param pParent the parent composite - */ - private void createFileTreeViewer(final Composite pParent) { - final String method = "createFileTreeViewer"; - ICodeLogger.entering(CLASS, method, pParent); - // Defining overall style for TreeViewer - final int scrollStyle = SWT.H_SCROLL | SWT.V_SCROLL; - final int selecStyle = SWT.MULTI | SWT.FULL_SELECTION; - final int style = scrollStyle | selecStyle; - this.viewer = new FileTreeViewer(pParent, style | SWT.FILL); - // Make headers and lines of the tree visible - final Tree tree = this.viewer.getTree(); - tree.setHeaderVisible(true); - tree.setLinesVisible(true); - - // Expand the tree - this.viewer.setAutoExpandLevel(1); - - // Add selection provider which allows to listen to each - // selection made on this viewer. - this.getSite().setSelectionProvider(this.viewer); - - // Layout the viewer - final GridData gridData = new GridData(); - gridData.verticalAlignment = GridData.FILL; - gridData.horizontalSpan = this.viewer.getTree().getColumnCount(); - gridData.grabExcessHorizontalSpace = true; - gridData.grabExcessVerticalSpace = true; - gridData.horizontalAlignment = GridData.FILL; - this.viewer.getTree().setLayoutData(gridData); - - /* - * Creating a filter using field search & check buttons Warning and - * Error. - * - * Show only element selected by the user. - */ - final FileTreeViewerFilter fileFilter = new FileTreeViewerFilter(); - this.viewer.addFilter(fileFilter); - - ICodeLogger.exiting(CLASS, method); - } - - /** - * Display violations found during analysis in the violations view. - * - * @param violations the violations to display - */ - public void display(final List violations) { - final String method = "display"; - ICodeLogger.entering(CLASS, method, violations); - synchronized (this) { - final Set listInputs = new TreeSet( - new Comparator() { - - @Override - public int compare(final CheckResult check1, - final CheckResult check2) { - int res = check1.getName().compareTo(check2.getName()); - if (res == 0) { - res = check1.getFile().getAbsolutePath().compareTo( - check2.getFile().getAbsolutePath()); - if (res == 0) { - res = check1.getLine().compareTo(check2.getLine()); - if (res == 0) { - res = check1.getLocation() - .compareTo(check2.getLocation()); - if (res == 0) { - res = check1.getMessage() - .compareTo(check2.getMessage()); - } - } - } - } - return res; - } - - }); - - if (this.treeViewerType.equals(FILE_TREE_VIEWER_TYPE) - && ((FileTreeViewerContentProvider) this.viewer.getContentProvider()) - .getConverter().getInputs() != null) { - for (final CheckResult value : ((FileTreeViewerContentProvider) this.getViewer() - .getContentProvider()).getConverter().getInputs()) { - listInputs.add(value); - } - } - if (this.treeViewerType.equals(RULE_TREE_VIEWER_TYPE) - && ((RuleTreeViewerContentProvider) this.viewer.getContentProvider()) - .getConverter().getInputs() != null) { - for (final CheckResult value : ((RuleTreeViewerContentProvider) this.getViewer() - .getContentProvider()).getConverter().getInputs()) { - listInputs.add(value); - } - } - for (final CheckResult value : violations) { - listInputs.add(value); - } - - this.analysisResults = listInputs; - - this.getViewer().setInput(listInputs.toArray(new CheckResult[listInputs.size()])); - } - this.getViewer().refresh(); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.part.WorkbenchPart#setFocus() - */ - @Override - public void setFocus() { - final String method = "setFocus"; - ICodeLogger.entering(CLASS, method); - this.viewer.getControl().setFocus(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method will clear the message and make it appear on the view. - * - * @throws EmptyProviderException when source provider to determine view type is not found (not - * necessarily used) - */ - public void clear() throws EmptyProviderException { - final String method = "clear"; - ICodeLogger.entering(CLASS, method); - this.analysisResults.clear(); - this.getViewer().setInput(new CheckResult[0]); - this.getViewer().refresh(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the Treeviewer type - */ - public String getTreeViewerType() { - final String method = "getTreeViewerType"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.treeViewerType); - return this.treeViewerType; - } - - /** - * Set the TreeViewerType by modifying the attribute and also processing to - * dispose if necessary the old TreeViewer and create a new one with the - * type requested. - * - * @param name Name or identifier of the TreeViewerType requested. - */ - public void setTreeViewerType(final String name) { - final String method = "setTreeViewerType"; - ICodeLogger.entering(CLASS, method, name); - if (!this.treeViewerType.equals(name)) { - // Disposal of the old TreeViewer - this.viewer.getControl().dispose(); - if (name.equals(FILE_TREE_VIEWER_TYPE)) { - this.createFileTreeViewer(this.parent); - // We reinsert inputs from previous TreeViewer in the current - // one - this.getViewer().setInput(this.analysisResults - .toArray(new CheckResult[this.analysisResults.size()])); - this.treeViewerType = name; - - } else if (name.equals(RULE_TREE_VIEWER_TYPE)) { - this.createRuleTreeViewer(this.parent); - // We reinsert inputs from previous TreeViewer in the current - // one - this.getViewer().setInput(this.analysisResults - .toArray(new CheckResult[this.analysisResults.size()])); - this.treeViewerType = name; - - } - // This call is necessary to refresh the table in the parent - // Composite. - this.parent.layout(); - } - ICodeLogger.exiting(CLASS, method); - - } - - /** - * @return analysis results - */ - public Set getAnalysisResults() { - final String method = "getAnalysisResults"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, analysisResults); - return analysisResults; - } - - /** - * @param pAnalysisResults results to set. - */ - public void setAnalysisResults(Set pAnalysisResults) { - final String method = "setAnalysisResults"; - ICodeLogger.entering(CLASS, method, pAnalysisResults); - this.analysisResults = pAnalysisResults; - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FileMetricDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FileMetricDescriptor.java deleted file mode 100755 index cd43248b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FileMetricDescriptor.java +++ /dev/null @@ -1,322 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -/** - * Class descriptor for metric value in a file. - */ -public class FileMetricDescriptor implements IMetricDescriptor, Cloneable { - - /** - * Class name - */ - private static final String CLASS = FileMetricDescriptor.class.getName(); - - /** - * File's path. - **/ - private IPath filePath; - /** - * Value for the file. - **/ - private Float value; - /** - * List of descriptors for the function in the file. - **/ - private List descriptors; - - /** - * Empty constructor. - */ - public FileMetricDescriptor() { - final String method = "FileMetricDescriptor"; - ICodeLogger.entering(CLASS, method); - this.value = Float.valueOf(0.0f); - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor with file's path and the value. - * - * @param pFilePath the file's path - * @param pValue the value - */ - public FileMetricDescriptor(final IPath pFilePath, final Float pValue) { - final String method = "FileMetricDescriptor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pFilePath, pValue - }); - this.filePath = pFilePath; - this.value = pValue; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the file's path. - * - * @return the file's path - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.filePath); - return this.filePath; - } - - /** - * Getter for the descriptors. - * - * @return the descriptors - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.descriptors); - return this.descriptors; - } - - /** - * Setter for the file's path. - * - * @param pFilePath the file's path to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the descriptors. - * - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(final List pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = new ArrayList<>(pDescriptors); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the value - * - * @param pValue the value to set - */ - public void setValue(final Float pValue) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, pValue); - this.value = pValue; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - final String name = this.filePath.toFile().getName(); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getValue() - */ - @Override - public Float getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.value); - return this.value; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMean() - */ - @Override - public Float getMean() { - final String method = "getMean"; - ICodeLogger.entering(CLASS, method); - Float mean = Float.valueOf(0.0f); - for (final FunctionMetricDescriptor descriptor : this.descriptors) { - mean = Float.valueOf((mean.floatValue() + descriptor.getValue().floatValue())); - } - mean = Float.valueOf(mean.floatValue() / this.descriptors.size()); - ICodeLogger.exiting(CLASS, method, mean); - return mean; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMinimum() - */ - @Override - public Float getMinimum() { - final String method = "getMinimum"; - ICodeLogger.entering(CLASS, method); - float min = Float.NaN; - for (final FunctionMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getValue().floatValue() < min || Float.isNaN(min)) { - min = descriptor.getValue().floatValue(); - } - } - ICodeLogger.exiting(CLASS, method, Float.valueOf(min)); - return Float.valueOf(min); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMaximum() - */ - @Override - public Float getMaximum() { - final String method = "getMaximum"; - ICodeLogger.entering(CLASS, method); - float max = Float.NaN; - for (final FunctionMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getValue().floatValue() > max || Float.isNaN(max)) { - max = descriptor.getValue().floatValue(); - } - } - ICodeLogger.exiting(CLASS, method, Float.valueOf(max)); - return Float.valueOf(max); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMinCause() - */ - @Override - public String getMinCause() { - final String method = "getMinCause"; - ICodeLogger.entering(CLASS, method); - final float min = Float.NaN; - String minCause = ""; - for (final FunctionMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getValue().floatValue() < min || Float.isNaN(min)) { - minCause = descriptor.getName(); - } - } - ICodeLogger.exiting(CLASS, method, minCause); - return minCause; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMaxCause() - */ - @Override - public String getMaxCause() { - final String method = "getMaxCause"; - ICodeLogger.entering(CLASS, method); - final float max = Float.NaN; - String maxCause = ""; - for (final FunctionMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getValue().floatValue() > max || Float.isNaN(max)) { - maxCause = descriptor.getName(); - } - } - ICodeLogger.exiting(CLASS, method, maxCause); - return maxCause; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#hasRightValue() - */ - @Override - public boolean hasRightValue() { - final String method = "hasRightValue"; - ICodeLogger.entering(CLASS, method); - boolean result = true; - int counter = 0; - while (result && this.descriptors.size() > counter) { - result = this.descriptors.get(counter).hasRightValue(); - counter++; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(result)); - return result; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof FileMetricDescriptor) { - isEqual = this.filePath.equals(((FileMetricDescriptor) object).getFilePath()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final String method = "hashCode"; - ICodeLogger.entering(CLASS, method); - assert false : "hashCode not designed"; - ICodeLogger.exiting(CLASS, method, this.value); - return this.value.intValue(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public FileMetricDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final FileMetricDescriptor clone = (FileMetricDescriptor) super.clone(); - clone.setValue(this.value); - clone.setFilePath(this.filePath); - clone.setDescriptors(new LinkedList(this.descriptors)); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FunctionMetricDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FunctionMetricDescriptor.java deleted file mode 100755 index 173d1c75..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/FunctionMetricDescriptor.java +++ /dev/null @@ -1,357 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -/** - * Descriptor for metric's value of a function. - */ -public class FunctionMetricDescriptor implements IMetricDescriptor, Cloneable { - /** - * Class name - */ - private static final String CLASS = FunctionMetricDescriptor.class.getName(); - - /** - * Metric's id, used to find associated preferences. - **/ - private String metricId; - - /** - * Metric's value's location. - **/ - private String location; - - /** - * Metric's value - **/ - private Float value; - - /** - * Path of the file containing the Metric - **/ - private IPath filePath; - - /** - * Line of the metric. - **/ - private Integer line; - - /** - * Empty constructor. - */ - public FunctionMetricDescriptor() { - final String method = "FunctionMetricDescriptor"; - ICodeLogger.entering(CLASS, method); - this.metricId = ""; - this.location = ""; - this.value = Float.valueOf(0.0f); - this.line = Integer.valueOf(0); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor with all attributes initialized. - * - * @param pId the id - * @param pLocation the location - * @param pValue the value - * @param pFilePath the file containing the metric Path - * @param pLine metric's line - */ - public FunctionMetricDescriptor(final String pId, final String pLocation, final Float pValue, - final IPath pFilePath, final Integer pLine) { - final String method = "FunctionMetricDescriptor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pId, pLocation, pValue, pFilePath, pLine - }); - this.metricId = pId; - this.filePath = pFilePath; - this.location = pLocation; - this.value = pValue; - this.line = pLine; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for line. - * - * @return line of the metric - */ - public Integer getLine() { - final String method = "getLine"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, line); - return line; - } - - /** - * Setter for line. - * - * @param pLine new line - */ - public void setLine(final Integer pLine) { - final String method = "setLine"; - ICodeLogger.entering(CLASS, method, pLine); - this.line = pLine; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the path of the file containing the Metric - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, filePath); - return filePath; - } - - /** - * Set the filePath of the file containing the Metric - * - * @param pFilePath the new Path to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the id. - * - * @return the id - */ - public String getMetricId() { - final String method = "getMetricId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.metricId); - return this.metricId; - } - - /** - * Getter for the location. - * - * @return the location - */ - public String getLocation() { - final String method = "getLocation"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.location); - return this.location; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getValue() - */ - @Override - public Float getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.value); - return this.value; - } - - /** - * Setter for the id. - * - * @param pId the id to set - */ - public void setMetricId(final String pId) { - final String method = "setMetricId"; - ICodeLogger.entering(CLASS, method, pId); - this.metricId = pId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the location. - * - * @param pLocation the location to set - */ - public void setLocation(final String pLocation) { - final String method = "setLocation"; - ICodeLogger.entering(CLASS, method, pLocation); - this.location = pLocation; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the value. - * - * @param pValue the value to set - */ - public void setValue(final Float pValue) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, pValue); - this.value = pValue; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.location); - return this.location; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMean() - */ - @Override - public Float getMean() { - final String method = "getMean"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Float.valueOf(Float.NaN)); - return Float.valueOf(Float.NaN); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMinimum() - */ - @Override - public Float getMinimum() { - final String method = "getMinimum"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Float.valueOf(Float.NaN)); - return Float.valueOf(Float.NaN); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMaximum() - */ - @Override - public Float getMaximum() { - final String method = "getMaximum"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, Float.valueOf(Float.NaN)); - return Float.valueOf(Float.NaN); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMinCause() - */ - @Override - public String getMinCause() { - final String method = "getMinCause"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, ""); - return ""; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMaxCause() - */ - @Override - public String getMaxCause() { - final String method = "getMaxCause"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, ""); - return ""; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#hasRightValue() - */ - @Override - public boolean hasRightValue() { - final String method = "hasRightValue"; - ICodeLogger.entering(CLASS, method); - boolean result = true; - if (UserPreferencesService.hasMaxValue(this.getMetricId())) { - final Float exceptedValue = UserPreferencesService.getMaxValue(this.getMetricId()); - result = this.getValue().compareTo(exceptedValue) < 0 || exceptedValue.isNaN(); - } - if (UserPreferencesService.hasMinValue(this.getMetricId()) && result) { - final Float exceptedValue = UserPreferencesService.getMinValue(this.getMetricId()); - result = this.getValue().compareTo(exceptedValue) > 0 || exceptedValue.isNaN(); - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(result)); - return result; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof FunctionMetricDescriptor) { - isEqual = this.location.equals(((FunctionMetricDescriptor) object).getLocation()) - && this.metricId.equals( - ((FunctionMetricDescriptor) object).getMetricId()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final String method = "hashCode"; - ICodeLogger.entering(CLASS, method); - assert false : "hashCode not designed"; - ICodeLogger.exiting(CLASS, method, this.value); - return this.value.intValue(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public FunctionMetricDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final FunctionMetricDescriptor clone = (FunctionMetricDescriptor) super.clone(); - clone.setMetricId(this.metricId); - clone.setLocation(this.location); - clone.setValue(this.value); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/IMetricDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/IMetricDescriptor.java deleted file mode 100755 index 10da963a..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/IMetricDescriptor.java +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -/** - * Interface which represents any level of a metric description. It could - * describe the metric, a file or a value. This interface is mainly used to - * display results in the MetricsView. - */ -public interface IMetricDescriptor { - - /** - * Returns the name of this descriptor. - * - * @return the name - */ - String getName(); - - /** - * Returns the value of this descriptor. - * - * @return the value - */ - Float getValue(); - - /** - * Returns the mean value calculated for this descriptor. - * - * @return the mean - */ - Float getMean(); - - /** - * Returns the minimum value calculated for this descriptor. - * - * @return the minimum - */ - Float getMinimum(); - - /** - * Returns the maximum value calculated for this descriptor. - * - * @return the maximum - */ - Float getMaximum(); - - /** - * Returns the resource causing the minimum value calculated for this - * descriptor. - * - * @return the minCause - */ - String getMinCause(); - - /** - * Returns the resource causing the maximum value calculated for this - * descriptor. - * - * @return the maxCause - */ - String getMaxCause(); - - /** - * Returns true if the value is between thresholds defined in preferences, - * false otherwise. - * - * @return whether the value is good - */ - boolean hasRightValue(); -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricContentProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricContentProvider.java deleted file mode 100755 index 600123f2..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricContentProvider.java +++ /dev/null @@ -1,217 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -import fr.cnes.analysis.tools.ui.exception.UnknownInstanceException; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.ui.PlatformUI; - -import java.util.List; - -/** - * This class provides a content provider for the tree viewer in the metric - * view. - * - * @see org.eclipse.jface.viewers.ITreeContentProvider - */ -public class MetricContentProvider implements ITreeContentProvider { - /** - * Class name - **/ - private static final String CLASS = MetricContentProvider.class.getName(); - - /** - * A value container which has all values of metrics. - **/ - private MetricConverter converter; - - /** - * Getter for the converter - * - * @return the converter - */ - public MetricConverter getConverter() { - final String method = "getConverter"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, converter); - return this.converter; - } - - /** - * Setter for the converter - * - * @param pConverter the converter to set - */ - public void setConverter(final MetricConverter pConverter) { - final String method = "setConverter"; - ICodeLogger.entering(CLASS, method, pConverter); - this.converter = pConverter; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang. - * Object) - */ - @Override - public boolean hasChildren(final Object element) { - final String method = "hasChildren"; - ICodeLogger.entering(CLASS, method, element); - - // Every type has a child except for FunctionValue type - final boolean result; - if (element instanceof FunctionMetricDescriptor) { - result = false; - } else if (element instanceof FileMetricDescriptor) { - if (((FileMetricDescriptor) element).getDescriptors().isEmpty()) { - result = false; - } else { - result = true; - } - } else { - result = true; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(result)); - return result; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object - * ) - */ - @Override - public Object getParent(final Object element) { - final String method = "getParent"; - ICodeLogger.entering(CLASS, method, element); - ICodeLogger.exiting(CLASS, method, null); - return null; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse. - * jface .viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { - final String method = "inputChanged"; - ICodeLogger.entering(CLASS, method, new Object[]{ - viewer, oldInput, newInput - }); - - try { - if (newInput instanceof CheckResult[]) { - this.converter = new MetricConverter(((CheckResult[]) newInput).clone()); - // run analysis - this.converter.setUser(true); - this.converter.schedule(); - this.converter.join(); - - } else if (newInput != null) { - final UnknownInstanceException exception = new UnknownInstanceException( - "inputChanged method of AbstractContentProvider has a " - + newInput.getClass().getName() - + " type instead of a Descriptor[] instance"); - ICodeLogger.throwing(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - } catch (final InterruptedException exception) { - ICodeLogger.throwing(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang. - * Object) - */ - @Override - public Object[] getElements(final Object inputElement) { - final String method = "getElements"; - ICodeLogger.entering(CLASS, method, inputElement); - final Object[] elements = this.converter.getContainer(); - ICodeLogger.exiting(CLASS, method, elements); - return elements; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang. - * Object) - */ - @Override - public Object[] getChildren(final Object parentElement) { - final String method = "getChildren"; - ICodeLogger.entering(CLASS, method, parentElement); - Object[] values = new FunctionMetricDescriptor[0]; - if (parentElement instanceof FileMetricDescriptor) { - // The parent element can be a FileValue : we find array of - // function values depending - final List mVals = ((FileMetricDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new FunctionMetricDescriptor[mVals.size()]); - - } else if (parentElement instanceof MetricDescriptor) { - // A Descriptor : we find array of file values depending - final List mVals = ((MetricDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new FileMetricDescriptor[mVals.size()]); - - } else if (parentElement instanceof MetricDescriptor[]) { - // An array of descriptors : we find each descriptor depending - values = (MetricDescriptor[]) parentElement; - - } else if (!(parentElement instanceof FunctionMetricDescriptor)) { - // Otherwise, an error is thrown on the interface - final UnknownInstanceException exception = new UnknownInstanceException( - "Unknow type in getChildren method of AbstractContentProvider : " - + parentElement.getClass().getName()); - ICodeLogger.throwing(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - ICodeLogger.exiting(CLASS, method, values); - return values; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - @Override - public void dispose() { - final String method = "dispose"; - ICodeLogger.entering(CLASS, method); - if (this.converter != null) { - this.converter.setContainer(new MetricDescriptor[0]); - } - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricConverter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricConverter.java deleted file mode 100755 index 7ffbae8b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricConverter.java +++ /dev/null @@ -1,219 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; - -import java.util.LinkedList; -import java.util.List; - -/** - * Job used to converter inputs from analysis to valuable inputs for the - * MetricView. - */ -public class MetricConverter extends Job { - /** - * Class name - **/ - private static final String CLASS = MetricConverter.class.getName(); - - /** - * Job message - */ - private static final String CONVERT_JOB_MESSAGE = "Converting results..."; - - /** - * The original inputs. - **/ - private CheckResult[] inputs; - /** - * A value container which has all values of rules. - **/ - private MetricDescriptor[] container; - - /** - * Empty constructor for this Job. - */ - public MetricConverter() { - super(CONVERT_JOB_MESSAGE); - final String method = "MetricConverter"; - ICodeLogger.entering(CLASS, method); - this.inputs = new CheckResult[0]; - this.container = new MetricDescriptor[0]; - ICodeLogger.exiting(CLASS, method); - - } - - /** - * Constructor for this Job with an array of violations. - * - * @param checkResults the inputs - */ - public MetricConverter(final CheckResult[] checkResults) { - super(CONVERT_JOB_MESSAGE); - final String method = "MetricConverter"; - ICodeLogger.entering(CLASS, method, checkResults); - this.inputs = checkResults.clone(); - this.container = new MetricDescriptor[0]; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the inputs id. - * - * @return the inputs - */ - public CheckResult[] getInputs() { - final String method = "CheckResult"; - ICodeLogger.entering(CLASS, method); - final CheckResult[] clonedInputs = this.inputs.clone(); - ICodeLogger.exiting(CLASS, method, clonedInputs); - return clonedInputs; - } - - /** - * Getter for the container - * - * @return the container - */ - public MetricDescriptor[] getContainer() { - final String method = "MetricDescriptor"; - ICodeLogger.entering(CLASS, method); - final MetricDescriptor[] clonedContainer = this.container.clone(); - ICodeLogger.exiting(CLASS, method, clonedContainer); - return clonedContainer; - } - - /** - * Setter for the inputs. - * - * @param pInputs the inputs to set - */ - public void setInputs(final CheckResult[] pInputs) { - final String method = "setInputs"; - ICodeLogger.entering(CLASS, method, pInputs); - this.inputs = pInputs.clone(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the container - * - * @param pContainer the container to set - */ - public void setContainer(final MetricDescriptor[] pContainer) { - final String method = "setContainer"; - ICodeLogger.entering(CLASS, method, pContainer); - this.container = pContainer.clone(); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime. - * IProgressMonitor) - */ - @Override - public IStatus run(final IProgressMonitor monitor) { - final String method = "run"; - ICodeLogger.entering(CLASS, method, monitor); - // Instantiate return variable - final IStatus status = Status.OK_STATUS; - final int totalWork = this.inputs.length; - - // Instantiate descriptors - final List descriptors = new LinkedList(); - // final FileMetricDescriptor file = new FileMetricDescriptor(); - // final FunctionMetricDescriptor function = new - // FunctionMetricDescriptor(); - - // Start converting - monitor.beginTask("Converting...", totalWork); - - for (final CheckResult checker : this.inputs) { - /* - * 1. Defining which informations of the checker already have been - * fulfilled in the descriptors. - */ - int metricIndex = 0; - int fileIndex = 0; - boolean metricDefined = false; - boolean fileDefined = false; - while (metricIndex < descriptors.size() && !metricDefined) { - final MetricDescriptor metric = descriptors.get(metricIndex); - if (checker.getName().equals(metric.getName())) { - metricDefined = true; - while (fileIndex < metric.getDescriptors().size() && !fileDefined) { - final FileMetricDescriptor file = metric.getDescriptors().get(fileIndex); - if (file.getFilePath().toFile().getAbsolutePath() - .equals(checker.getFile().getAbsolutePath())) { - fileDefined = true; - } else { - fileIndex++; - } - } - } else { - metricIndex++; - } - } - /* - * 2. Writing information into the descriptors - */ - /* - * 2.1 Defining the metric if not defined - */ - final MetricDescriptor metric; - if (!metricDefined) { - metric = new MetricDescriptor(checker.getName()); - descriptors.add(metric); - } else { - metric = descriptors.get(metricIndex); - } - final FileMetricDescriptor file; - /* - * 2.2 If the checker is defined for a file. The job is done once - * FileMetricDescriptor is updated or created. - */ - if (checker.getLocation() == null || checker.getLocation().isEmpty()) { - if (!fileDefined) { - file = new FileMetricDescriptor(new Path(checker.getFile().getAbsolutePath()), - checker.getValue()); - metric.getDescriptors().add(file); - } else { - file = metric.getDescriptors().get(fileIndex); - file.setValue(checker.getValue()); - } - } else { - /* - * 2.3 If the checker is not defined for a file, then, - * FileMetricDescriptor must be created without value and - * FunctionMetricDescriptor added to it. - */ - if (!fileDefined) { - file = new FileMetricDescriptor(); - file.setFilePath(new Path(checker.getFile().getAbsolutePath())); - metric.getDescriptors().add(file); - } else { - file = metric.getDescriptors().get(fileIndex); - } - file.getDescriptors().add(new FunctionMetricDescriptor(checker.getId(), - checker.getLocation(), checker.getValue(), - new Path(checker.getFile().getAbsolutePath()), checker.getLine())); - } - } - this.container = descriptors.toArray(new MetricDescriptor[descriptors.size()]); - ICodeLogger.exiting(CLASS, method, status); - return status; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricDescriptor.java deleted file mode 100755 index 2d5bd52a..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricDescriptor.java +++ /dev/null @@ -1,293 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -import fr.cnes.icode.logger.ICodeLogger; - -import java.util.LinkedList; -import java.util.List; - -/** - * Class for general description of a metric. - */ -public class MetricDescriptor implements IMetricDescriptor, Cloneable { - - /** - * Class name - **/ - private static final String CLASS = MetricDescriptor.class.getName(); - - /** - * Name of the metric. - **/ - private String name; - /** - * List of descriptor for the files. - **/ - private List descriptors; - - /** - * Empty constructor. - */ - public MetricDescriptor() { - final String method = "MetricDescriptor"; - ICodeLogger.entering(CLASS, method); - this.name = ""; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor with metric's name. - * - * @param pName metric's name - */ - public MetricDescriptor(final String pName) { - final String method = "MetricDescriptor"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, name); - return this.name; - } - - /** - * Getter for descriptors. - * - * @return the descriptors. - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, descriptors); - return this.descriptors; - } - - /** - * Setter for the name. - * - * @param pName the name to set - */ - public void setName(final String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the descriptors. - * - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(final List pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = pDescriptors; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getValue() - */ - @Override - public Float getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - Float value = Float.valueOf(0.0f); - for (final FileMetricDescriptor descriptor : this.descriptors) { - value = Float.valueOf(value.floatValue() + descriptor.getValue().floatValue()); - } - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMean() - */ - @Override - public Float getMean() { - final String method = "getMean"; - ICodeLogger.entering(CLASS, method); - float mean = 0.0f; - float totalSize = 0.0f; - for (final FileMetricDescriptor descriptor : this.descriptors) { - mean = mean + descriptor.getMean().floatValue() * descriptor.getDescriptors().size(); - totalSize = totalSize + descriptor.getDescriptors().size(); - } - mean = mean / totalSize; - ICodeLogger.exiting(CLASS, method, Float.valueOf(mean)); - return Float.valueOf(mean); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMinimum() - */ - @Override - public Float getMinimum() { - final String method = "getMinimum"; - ICodeLogger.entering(CLASS, method); - float min = Float.NaN; - for (final FileMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getMinimum().floatValue() < min || Float.isNaN(min)) { - min = descriptor.getMinimum().floatValue(); - } - } - ICodeLogger.exiting(CLASS, method, Float.valueOf(min)); - return Float.valueOf(min); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMaximum() - */ - @Override - public Float getMaximum() { - final String method = "getMaximum"; - ICodeLogger.entering(CLASS, method); - float max = Float.NaN; - for (final FileMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getMaximum().floatValue() > max || Float.isNaN(max)) { - max = descriptor.getMaximum().floatValue(); - } - } - ICodeLogger.exiting(CLASS, method, Float.valueOf(max)); - return Float.valueOf(max); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMinCause() - */ - @Override - public String getMinCause() { - final String method = "getMinCause"; - ICodeLogger.entering(CLASS, method); - final float min = Float.NaN; - String minCause = ""; - for (final FileMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getMinimum().floatValue() < min || Float.isNaN(min)) { - minCause = descriptor.getName(); - } - } - ICodeLogger.exiting(CLASS, method, minCause); - return minCause; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getMaxCause() - */ - @Override - public String getMaxCause() { - final String method = "getMaxCause"; - ICodeLogger.entering(CLASS, method); - final float max = Float.NaN; - String maxCause = ""; - for (final FileMetricDescriptor descriptor : this.descriptors) { - if (descriptor.getMaximum().floatValue() > max || Float.isNaN(max)) { - maxCause = descriptor.getName(); - } - } - ICodeLogger.exiting(CLASS, method, maxCause); - return maxCause; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#hasRightValue() - */ - @Override - public boolean hasRightValue() { - final String method = "hasRightValue"; - ICodeLogger.entering(CLASS, method); - boolean result = true; - int counter = 0; - while (result && this.descriptors.size() > counter) { - result = this.descriptors.get(counter).hasRightValue(); - counter++; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(result)); - return result; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof MetricDescriptor) { - isEqual = this.name.equals(((MetricDescriptor) object).getName()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final String method = "hashCode"; - ICodeLogger.entering(CLASS, method); - assert false : "hashCode not designed"; - ICodeLogger.exiting(CLASS, method); - return this.descriptors.size(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public MetricDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final MetricDescriptor clone = (MetricDescriptor) super.clone(); - clone.setName(this.name); - clone.setDescriptors(new LinkedList(this.descriptors)); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricLabelProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricLabelProvider.java deleted file mode 100755 index c4fc8208..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/metrics/MetricLabelProvider.java +++ /dev/null @@ -1,185 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.metrics; - -import fr.cnes.analysis.tools.ui.exception.UnknownInstanceException; -import fr.cnes.analysis.tools.ui.view.AbstractLabelProvider; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.PlatformUI; - -/** - * This class provides column for the metric tree viewer. - */ -public class MetricLabelProvider extends AbstractLabelProvider { - - /** Static values that determines column types. **/ - /** - * This value is for metric name column. - **/ - public static final int METRIC_NAME = 0; - /** - * This value is for metric value column. - **/ - public static final int METRIC_VALUE = 1; - /** - * This value is for mean value column. - **/ - public static final int MEAN = 2; - /** - * This value is for minimum value column. - **/ - public static final int MINIMUM = 3; - /** - * This value is for maximum value column. - **/ - public static final int MAXIMUM = 4; - /** - * This value is for minimum resource cause column. - **/ - public static final int MIN_CAUSE = 5; - /** - * This value is for maximum resource cause column. - **/ - public static final int MAX_CAUSE = 6; - - /** - * Class name - **/ - private static final String CLASS = MetricLabelProvider.class.getName(); - - /** Logger **/ - /** - * Nan value displaying - */ - private static final String NAN_VALUE_DISPLAY = "--"; - - /** - * Constructor with integer parameter which represents the column created. - * - * @param pType the column to create - */ - public MetricLabelProvider(final int pType) { - super(pType); - final String method = "MetricLabelProvider"; - ICodeLogger.entering(CLASS, method, Integer.valueOf(pType)); - - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ColumnLabelProvider#getForeground(java.lang - * .Object) - */ - @Override - public Color getForeground(final Object element) { - final String method = "getForeground"; - ICodeLogger.entering(CLASS, method, element); - Color color = Display.getCurrent().getSystemColor(SWT.COLOR_BLUE); - if (element instanceof IMetricDescriptor) { - if (!((IMetricDescriptor) element).hasRightValue()) { - color = Display.getCurrent().getSystemColor(SWT.COLOR_RED); - } - } else { - final UnknownInstanceException exception = new UnknownInstanceException( - "getForeground method of MetricLabelProvider class has a " - + element.getClass().getName() - + " element, but it should be a Viewable instance."); - ICodeLogger.throwing(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method, color); - return color; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ColumnLabelProvider#getText(java.lang.Object) - */ - @Override - public String getText(final Object element) { - final String method = "getText"; - ICodeLogger.entering(CLASS, method, element); - String text = ""; - if (element instanceof IMetricDescriptor) { - switch (this.getType()) { - case METRIC_NAME: - text = ((IMetricDescriptor) element).getName(); - break; - case METRIC_VALUE: - if (((IMetricDescriptor) element).getValue().isInfinite() - || ((IMetricDescriptor) element).getValue().isNaN()) { - text = NAN_VALUE_DISPLAY; - } else { - text = ((IMetricDescriptor) element).getValue().toString(); - } - break; - case MEAN: - if (((IMetricDescriptor) element).getValue().isInfinite() - || ((IMetricDescriptor) element).getMean().isNaN()) { - text = NAN_VALUE_DISPLAY; - } else { - text = ((IMetricDescriptor) element).getMean().toString(); - } - break; - case MINIMUM: - if (((IMetricDescriptor) element).getValue().isInfinite() - || ((IMetricDescriptor) element).getMinimum().isNaN()) { - text = NAN_VALUE_DISPLAY; - } else { - text = ((IMetricDescriptor) element).getMinimum().toString(); - } - break; - case MAXIMUM: - if (((IMetricDescriptor) element).getValue().isInfinite() - || ((IMetricDescriptor) element).getMaximum().isNaN()) { - text = NAN_VALUE_DISPLAY; - } else { - text = ((IMetricDescriptor) element).getMaximum().toString(); - } - break; - case MIN_CAUSE: - text = ((IMetricDescriptor) element).getMinCause(); - break; - case MAX_CAUSE: - text = ((IMetricDescriptor) element).getMaxCause(); - break; - default: - final RuntimeException exception = new ArrayIndexOutOfBoundsException( - "Wrong column value for MetricLabelProvider class : " - + this.getType()); - ICodeLogger.throwing(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - } else { - final UnknownInstanceException exception = new UnknownInstanceException( - "getText method of MetricLabelProvider class has a " - + element.getClass().getName() - + " element, but it should be a Viewable instance."); - ICodeLogger.throwing(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method, text); - return text; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/IUpdatableAnalysisFilter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/IUpdatableAnalysisFilter.java deleted file mode 100755 index 3274d775..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/IUpdatableAnalysisFilter.java +++ /dev/null @@ -1,12 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer; - -public interface IUpdatableAnalysisFilter { - - public void update(String searchString, boolean showInfo, boolean showWarning, - boolean showError); -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewer.java deleted file mode 100755 index 9c5cc2ef..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewer.java +++ /dev/null @@ -1,286 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file; - -import fr.cnes.analysis.tools.ui.view.AbstractAnalysisTreeViewer; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FunctionDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.RuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.ViolationDescriptor; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jface.viewers.*; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.swt.widgets.TreeColumn; - -/** - * TreeViewer that show violations in {@link #getInput()} organized by their : - *

    - *
  • {@link FileRuleDescriptor}
  • - *
  • {@link FunctionDescriptor}
  • - *
  • {@link RuleDescriptor}
  • - *
  • All the {@link ViolationDescriptor} are contained inside - * {@link RuleDescriptor}
  • - *
- *

- * It also contains information as the number of violations on each files, - * functions or rules and can be ordered and filtered, using a - * {@link FileTreeViewerComparator}.
- * - * @version 2.1 - * @see fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.RuleTreeViewer - * @since 2.0 - */ -public class FileTreeViewer extends AbstractAnalysisTreeViewer { - - /** - * TITLES : Location => File > Function > Rules > Violations Line => Line of - * the violation ! => Criticity Number of violation. - */ - public static final String[] TITLES = new String[]{ - "Location", "Line", "!", "Number of violations" - }; - - /** - * Bounds of the TreeViewer - */ - public static final int[] BOUNDS = new int[]{ - 425, 50, 30, 200 - }; - - /** - * Class name - */ - private static final String CLASS = FileTreeViewer.class.getName(); - /** - * Kind of bitmap to know if the sorting should be up or down for each - * column of the tree - */ - private transient boolean[] columnSortUp = new boolean[]{ - true, true, false, true, true - }; - - /** - * Index selected to sort the columns, by default 1 - */ - private transient int indexSort = 1; - - /** - * Constructor for violations file treeviewer. - * - * @param parent The Composite containing the TreeViewer - * @param style The SWT style - */ - public FileTreeViewer(final Composite parent, final int style) { - super(parent, style, TITLES, BOUNDS); - final String method = "FileTreeViewer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - parent, Integer.valueOf(style) - }); - final ViewerComparator comparator = new FileTreeViewerComparator(); - this.setComparator(comparator); - ICodeLogger.exiting(CLASS, method); - } - - @Override - protected void createColumns() { - final String method = "createColumns"; - ICodeLogger.entering(CLASS, method); - this.setContentProvider(new FileTreeViewerContentProvider()); - TreeViewerColumn col; - for (int i = 0; i < super.getTitles().length; i++) { - // Create the column - col = this.createTreeViewerColumn(this.getTitles()[i], this.getBounds()[i], i); - // Add a label provider - col.setLabelProvider(new FileTreeViewerLabelProvider(i)); - } - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.AbstractAnalysisTreeViewer# - * addDoubleClickAction() - */ - @Override - protected void addDoubleClickAction() { - final String method = "addDoubleClickAction"; - ICodeLogger.entering(CLASS, method); - this.addDoubleClickListener(new IDoubleClickListener() { - - @Override - public void doubleClick(final DoubleClickEvent event) { - final TreeViewer tViewer = (TreeViewer) event.getViewer(); - final IStructuredSelection thisSelection = (IStructuredSelection) event - .getSelection(); - final Object selectedNode = thisSelection.getFirstElement(); - - // if it is a leaf -> open the file - if (!tViewer.isExpandable(selectedNode) - && selectedNode instanceof ViolationDescriptor) { - final IPath path = ((ViolationDescriptor) selectedNode).getFilePath(); - final int number = ((ViolationDescriptor) selectedNode).getValue().intValue(); - // get resource - final IFile fileToOpen = ResourcesPlugin.getWorkspace().getRoot() - .getFileForLocation(path); - final IResource res = fileToOpen; - - // open file in editor - openFileInEditor(res, number); - } - } - }); - ICodeLogger.exiting(CLASS, method); - - } - - /** - * Create a column of the TreeViewer, customize it and assign it's index - * number and action listener to be sorted. - * - * @param title The title of the head column. - * @param bound The bound of the column. - * @param colNumber The index number of the column in the TreeViewer. - * @return The treeViewerColumn created. - */ - private TreeViewerColumn createTreeViewerColumn(final String title, final int bound, - final int colNumber) { - final String method = "createTreeViewerColumn"; - ICodeLogger.entering(CLASS, method, new Object[]{ - title, Integer.valueOf(bound), Integer.valueOf(colNumber) - }); - final TreeViewerColumn viewerColumn = new TreeViewerColumn(this, SWT.NONE); - final TreeColumn column = viewerColumn.getColumn(); - column.setText(title); - column.setWidth(bound); - column.setResizable(true); - column.setMoveable(true); - - column.addSelectionListener(new SelectionAdapter() { - - /* - * (non-Javadoc) - * - * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org. - * eclipse.swt.events.SelectionEvent) - */ - @Override - public void widgetSelected(SelectionEvent e) { - columnSortUp[colNumber] = !columnSortUp[colNumber]; - indexSort = colNumber; - final Tree tree = getTree(); - tree.setSortColumn(column); - if (columnSortUp[colNumber]) { - tree.setSortDirection(SWT.UP); - } else { - tree.setSortDirection(SWT.DOWN); - } - refresh(); - } - - }); - ICodeLogger.exiting(CLASS, method, viewerColumn); - return viewerColumn; - } - - /** - * Comparator for class {@link FileTreeViewer}. Allow the user to order the - * file using different column sort. - */ - class FileTreeViewerComparator extends ViewerComparator { - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface. - * viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public int compare(Viewer viewer, Object e1, Object e2) { - int rc = 0; - if (e1 instanceof RuleDescriptor && e2 instanceof RuleDescriptor) { - final RuleDescriptor rule1 = (RuleDescriptor) e1; - final RuleDescriptor rule2 = (RuleDescriptor) e2; - - switch (indexSort) { - case 2: - rc = rule1.getSeverity().compareTo(rule2.getSeverity()); - break; - case 0: - rc = rule1.getName().compareToIgnoreCase(rule2.getName()); - break; - case 3: - rc = rule1.getValue().intValue() - rule2.getValue().intValue(); - break; - default: - rc = 0; - break; - } - } else if (e1 instanceof FileRuleDescriptor && e2 instanceof FileRuleDescriptor) { - final FileRuleDescriptor file1 = (FileRuleDescriptor) e1; - final FileRuleDescriptor file2 = (FileRuleDescriptor) e2; - - switch (indexSort) { - case 0: - rc = file1.getName().compareToIgnoreCase(file2.getName()); - break; - case 3: - rc = file1.getValue().intValue() - file2.getValue().intValue(); - break; - default: - rc = 0; - break; - } - } else if (e1 instanceof FunctionDescriptor && e2 instanceof FunctionDescriptor) { - - final FunctionDescriptor function1 = (FunctionDescriptor) e1; - final FunctionDescriptor function2 = (FunctionDescriptor) e2; - - switch (indexSort) { - case 0: - rc = function1.getName().compareToIgnoreCase(function2.getName()); - break; - case 3: - rc = function1.getValue().intValue() - function2.getValue().intValue(); - break; - default: - rc = 0; - break; - } - } else if (e1 instanceof ViolationDescriptor && e2 instanceof ViolationDescriptor) { - final ViolationDescriptor violation1 = (ViolationDescriptor) e1; - final ViolationDescriptor violation2 = (ViolationDescriptor) e2; - - switch (indexSort) { - case 0: - rc = violation1.getLocation().compareToIgnoreCase(violation2.getLocation()); - break; - case 1: - rc = violation1.getValue().intValue() - violation2.getValue().intValue(); - break; - default: - rc = 0; - break; - } - - } - // If descending order, flip the direction - if (columnSortUp[indexSort]) { - rc = -rc; - } - return rc; - } - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerContentProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerContentProvider.java deleted file mode 100755 index c7c2dfc1..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerContentProvider.java +++ /dev/null @@ -1,223 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file; - -import fr.cnes.analysis.tools.ui.exception.UnknownInstanceException; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FunctionDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.RuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.ViolationDescriptor; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.ui.PlatformUI; - -import java.util.List; - -/** - * @version 2.1 - * @see FileTreeViewer - * @see org.eclipse.jface.viewers.ITreeContentProvider - * @since 2.0 - */ -public class FileTreeViewerContentProvider implements ITreeContentProvider { - /** - * Class name - */ - private static final String CLASS = FileTreeViewerContentProvider.class.getName(); - /** - * The original inputs. - **/ - private ViolationToFileTreeViewerConverter converter; - - /** - * Empty constructor. - */ - public FileTreeViewerContentProvider() { - super(); - final String method = "FileTreeViewerContentProvider"; - ICodeLogger.entering(CLASS, method); - this.converter = new ViolationToFileTreeViewerConverter(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the converter. - * - * @return the converter - */ - public ViolationToFileTreeViewerConverter getConverter() { - final String method = "ViolationToFileTreeViewerConverter"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.converter); - return this.converter; - } - - /** - * Setter for the converter. - * - * @param pConverter the converter to set - */ - public void setConverter(final ViolationToFileTreeViewerConverter pConverter) { - final String method = "setConverter"; - ICodeLogger.entering(CLASS, method, pConverter); - this.converter = pConverter; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse. - * jface .viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { - final String method = "inputChanged"; - ICodeLogger.entering(CLASS, method, new Object[]{ - viewer, oldInput, newInput - }); - - try { - if (newInput instanceof CheckResult[]) { - this.converter.setInputs(((CheckResult[]) newInput).clone()); - // run analysis - this.converter.setUser(true); - this.converter.schedule(); - this.converter.join(); - - } else if (newInput != null) { - final UnknownInstanceException exception = new UnknownInstanceException( - "inputChanged method of AbstractContentProvider has a " - + newInput.getClass().getName() - + " type instead of a Descriptor[] instance"); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - } catch (final InterruptedException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang. - * Object) - */ - @Override - public Object[] getElements(final Object inputElement) { - final String method = "getElements"; - ICodeLogger.entering(CLASS, method); - - final Object[] elements = this.converter.getContainer(); - ICodeLogger.exiting(CLASS, method, elements); - return elements; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - @Override - public void dispose() { - final String method = "dispose"; - ICodeLogger.entering(CLASS, method); - if (this.converter != null) { - this.converter.setContainer(new FileRuleDescriptor[0]); - } - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang. - * Object) - */ - @Override - public boolean hasChildren(final Object element) { - final String method = "hasChildren"; - ICodeLogger.entering(CLASS, method, element); - final boolean hasChildren = !(element instanceof ViolationDescriptor); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(hasChildren)); - return hasChildren; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object - * ) - */ - @Override - public Object getParent(final Object element) { - final String method = "getParent"; - ICodeLogger.entering(CLASS, method, element); - ICodeLogger.exiting(CLASS, method, null); - return null; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang. - * Object) - */ - @Override - public Object[] getChildren(final Object parentElement) { - final String method = "getChildren"; - ICodeLogger.entering(CLASS, method, parentElement); - Object[] values = null; - if (parentElement instanceof FileRuleDescriptor) { - - // The parent element can be a FileValue : we find array of - // function values depending - final List mVals = ((FileRuleDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new FunctionDescriptor[mVals.size()]); - } else if (parentElement instanceof FunctionDescriptor) { - - // A Descriptor : we find array of file values depending - final List mVals = ((FunctionDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new RuleDescriptor[mVals.size()]); - } else if (parentElement instanceof RuleDescriptor) { - final List mVals = ((RuleDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new ViolationDescriptor[mVals.size()]); - - } else if (!(parentElement instanceof RuleDescriptor)) { - - // Otherwise, an error is thrown on the interface - final UnknownInstanceException exception = new UnknownInstanceException( - "Unknow type in getChildren method of AbstractContentProvider : " - + parentElement.getClass().getName()); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method, values); - return values; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerLabelProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerLabelProvider.java deleted file mode 100755 index fa633d5c..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/FileTreeViewerLabelProvider.java +++ /dev/null @@ -1,150 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file; - -import fr.cnes.analysis.tools.ui.exception.UnknownInstanceException; -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.analysis.tools.ui.view.AbstractLabelProvider; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.IFileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.RuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.ViolationDescriptor; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.PlatformUI; - -/** - * Set the content of a {@link FileTreeViewer} using - */ -public class FileTreeViewerLabelProvider extends AbstractLabelProvider { - /** Static values that determines column types. **/ - /** - * This value is for rule criticity column. - **/ - public static final int SEVERITY = 2; - /** - * This value is for rule name column. - **/ - public static final int LOCATION = 0; - /** - * This value is for error's line column. - **/ - public static final int LINE = 1; - /** - * This value is for number of violations column. - **/ - public static final int NB_VIOL = 3; - - /** - * Class name - */ - private static final String CLASS = FileTreeViewerLabelProvider.class.getName(); - - /** - * Constructor with integer parameter which represents the column created. - * - * @param pType the column to create - */ - public FileTreeViewerLabelProvider(final int pType) { - super(pType); - final String method = "FileTreeViewerLabelProvider"; - ICodeLogger.entering(CLASS, method, Integer.valueOf(pType)); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This functions set the text for each element of a column. - *

- * The text should be "--" is the element shouldn't contain information for - * the column. - * - * @param element the element store in the column - * @return the text to store in column case - */ - @Override - public String getText(final Object element) { - final String method = "getText"; - ICodeLogger.entering(CLASS, method, element); - - String text = ""; - if (element instanceof IFileRuleDescriptor) { - switch (this.getType()) { - case SEVERITY: - break; - case LOCATION: - text = ((IFileRuleDescriptor) element).getName(); - break; - case LINE: - if (element instanceof ViolationDescriptor) { - text = ((IFileRuleDescriptor) element).getValue().toString(); - } else { - text = "--"; - } - break; - case NB_VIOL: - if (element instanceof ViolationDescriptor) { - text = "--"; - } else { - text = ((IFileRuleDescriptor) element).getValue().toString(); - } - break; - default: - final RuntimeException exception = new ArrayIndexOutOfBoundsException( - "Wrong column value for ViolationsLabelProvider class : " - + this.getType()); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - break; - } - } else { - final UnknownInstanceException exception = new UnknownInstanceException( - "getText method of ViolationsLabelProvider class has a " - + element.getClass().getName() - + " element, but it should be an IRuleDescriptor instance."); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method, text); - return text; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ColumnLabelProvider#getImage(java.lang.Object) - */ - @Override - public Image getImage(final Object element) { - final String method = "getImage"; - ICodeLogger.entering(CLASS, method, element); - Image image = null; - if (this.getType() == SEVERITY && element instanceof RuleDescriptor) { - switch (((RuleDescriptor) element).getSeverity()) { - case UserPreferencesService.PREF_SEVERITY_ERROR_VALUE: - image = ImageFactory.getImage(ImageFactory.ERROR_SMALL); - break; - case UserPreferencesService.PREF_SEVERITY_WARNING_VALUE: - image = ImageFactory.getImage(ImageFactory.WARNING_SMALL); - break; - case UserPreferencesService.PREF_SEVERITY_INFO_VALUE: - default: - image = ImageFactory.getImage(ImageFactory.INFO_SMALL); - break; - } - } - - ICodeLogger.exiting(CLASS, method, image); - return image; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/ViolationToFileTreeViewerConverter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/ViolationToFileTreeViewerConverter.java deleted file mode 100755 index e7848f2b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/ViolationToFileTreeViewerConverter.java +++ /dev/null @@ -1,243 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file; - -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FunctionDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.RuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.ViolationDescriptor; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; - -import java.util.LinkedList; -import java.util.List; - -/** - * Thread job converting all {@link Violation} in {@link #inputs} into a - * {@link #container} of {@link FileRuleDescriptor}.
- *

- * The job consist in verifying different attributes of the {@link Violation} - * and the {@link #container}, creating a new :
- *

    - *
  • {@link FileRuleDescriptor} for {@link Violation#getFile()} not in the - * container.
  • - *
  • {@link FunctionDescriptor} for {@link Violation#getLocation()} not in the - * container, and associating it into it's related descriptors.
  • - *
  • {@link RuleDescriptor} for {@link Violation#getRuleName()} not in the - * container,and associating it into it's related {@link FunctionDescriptor}'s - * descriptors.
  • - *
  • {@link ViolationDescriptor} for each violation and putting it into the - * right {@link RuleDescriptor}. - *
- * - * @version 2.1 - * @see Job - * @see fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.FileTreeViewer - * @since 2.0 - */ -public class ViolationToFileTreeViewerConverter extends Job { - /** - * Class name - */ - private static final String CLASS = ViolationToFileTreeViewerConverter.class.getName(); - - /** - * The original inputs. - **/ - private CheckResult[] inputs; - /** - * A value container which has all values of rules. - **/ - private FileRuleDescriptor[] container; - - /** - * Empty constructor for this Job. - */ - public ViolationToFileTreeViewerConverter() { - super("Converting results..."); - final String method = "ViolationToFileTreeViewerConverter"; - ICodeLogger.entering(CLASS, method); - this.inputs = new CheckResult[0]; - this.container = new FileRuleDescriptor[0]; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor for this Job with an array of violations. - * - * @param pInputs the inputs - */ - public ViolationToFileTreeViewerConverter(final CheckResult[] pInputs) { - super("Converting results..."); - final String method = "ViolationToFileTreeViewerConverter"; - ICodeLogger.entering(CLASS, method, pInputs); - this.inputs = pInputs.clone(); - this.container = new FileRuleDescriptor[0]; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the inputs id. - * - * @return the inputs - */ - public CheckResult[] getInputs() { - final String method = "getInputs"; - ICodeLogger.entering(CLASS, method); - final CheckResult[] clonedInputs = this.inputs.clone(); - ICodeLogger.exiting(CLASS, method, clonedInputs); - return clonedInputs; - } - - /** - * Getter for the container - * - * @return the container - */ - public FileRuleDescriptor[] getContainer() { - final String method = "getContainer"; - ICodeLogger.entering(CLASS, method); - final FileRuleDescriptor[] clonedContainer = this.container.clone(); - ICodeLogger.exiting(CLASS, method, clonedContainer); - return clonedContainer; - } - - /** - * Setter for the inputs. - * - * @param pInputs the inputs to set - */ - public void setInputs(final CheckResult[] pInputs) { - final String method = "setInputs"; - ICodeLogger.entering(CLASS, method, pInputs); - this.inputs = pInputs.clone(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the container - * - * @param pContainer the container to set - */ - public void setContainer(final FileRuleDescriptor[] pContainer) { - final String method = "setContainer"; - ICodeLogger.entering(CLASS, method, pContainer); - this.container = pContainer.clone(); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime. - * IProgressMonitor) - */ - @Override - public IStatus run(final IProgressMonitor monitor) { - final String method = "run"; - ICodeLogger.entering(CLASS, method, monitor); - // Instantiate return variable - IStatus status = Status.OK_STATUS; - final int totalWork = this.inputs.length; - - // Instantiate descriptors - final List descriptors = new LinkedList<>(); - - FileRuleDescriptor file = new FileRuleDescriptor(); - FunctionDescriptor function = new FunctionDescriptor(); - RuleDescriptor rule = new RuleDescriptor(); - ViolationDescriptor viold = new ViolationDescriptor(); - - // Start converting - monitor.beginTask("Converting...", totalWork); - try { - /* - * For every violation contained in the TreeViewer inputs. We add - * the violation to the descriptor list verifying that, for each - * violation : -> If there is already one about the concerned file, - * to add only information inside the FileRuleDescriptor -> Same for - * element inside of the rule as FunctionDescriptor and - * RuleDescriptor. -> If it's not included in the descriptor, then - * to create required new descriptors. - */ - for (final CheckResult value : this.inputs) { - file = new FileRuleDescriptor(new Path(value.getFile().getAbsolutePath())); - - if (descriptors.contains(file)) { - file = descriptors.get((descriptors.indexOf(file))); - function = new FunctionDescriptor(value.getLocation(), Integer.valueOf(-1), - new Path(value.getFile().getAbsolutePath())); - if (file.getDescriptors().contains(function)) { - function = file.getDescriptors() - .get(file.getDescriptors().indexOf(function)); - rule = new RuleDescriptor(value.getId(), value.getName(), - value.getLocation(), Integer.valueOf(-1), - new Path(value.getFile().getAbsolutePath())); - if (function.getDescriptors().contains(rule)) { - rule = function.getDescriptors() - .get(function.getDescriptors().indexOf(rule)); - viold = new ViolationDescriptor(value.getName(), value.getLocation(), - value.getMessage(), value.getLine(), - new Path(value.getFile().getAbsolutePath())); - if (rule.getDescriptors().contains(viold)) { - /* - * This shouldn't happen, this mean the - * violation was recorded two times. - */ - } else { - rule.getDescriptors().add(viold.clone()); - } - } else { - viold = new ViolationDescriptor(value.getName(), value.getLocation(), - value.getMessage(), value.getLine(), - new Path(value.getFile().getAbsolutePath())); - rule.getDescriptors().add(viold.clone()); - function.getDescriptors().add(rule.clone()); - } - } else { - rule = new RuleDescriptor(value.getId(), value.getName(), - value.getLocation(), Integer.valueOf(-1), - new Path(value.getFile().getAbsolutePath())); - viold = new ViolationDescriptor(value.getName(), value.getLocation(), - value.getMessage(), value.getLine(), - new Path(value.getFile().getAbsolutePath())); - rule.getDescriptors().add(viold.clone()); - function.getDescriptors().add(rule.clone()); - file.getDescriptors().add(function.clone()); - } - } else { - rule = new RuleDescriptor(value.getId(), value.getName(), value.getLocation(), - Integer.valueOf(-1), - new Path(value.getFile().getAbsolutePath())); - viold = new ViolationDescriptor(value.getName(), value.getLocation(), - value.getMessage(), value.getLine(), - new Path(value.getFile().getAbsolutePath())); - function = new FunctionDescriptor(value.getLocation(), Integer.valueOf(-1), - new Path(value.getFile().getAbsolutePath())); - rule.getDescriptors().add(viold.clone()); - function.getDescriptors().add(rule.clone()); - file.getDescriptors().add(function.clone()); - descriptors.add(file.clone()); - } - - } - this.container = descriptors.toArray(new FileRuleDescriptor[descriptors.size()]); - - } catch (final CloneNotSupportedException exception) { - ICodeLogger.error(CLASS, method, exception); - status = new Status(IStatus.ERROR, "fr.cnes.analysis.tools.ui", IStatus.ERROR, - exception.getMessage(), exception); - } - - ICodeLogger.exiting(CLASS, method, status); - return status; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FileRuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FileRuleDescriptor.java deleted file mode 100755 index 5e235be3..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FileRuleDescriptor.java +++ /dev/null @@ -1,193 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -import java.util.LinkedList; -import java.util.List; - -/** - * Descriptor for a File that is intended to be shown.
- * This descriptor would return it's {@link #filePath} and the number of - * violations that it contains when using {@link #getName()} and - * {@link #getValue()} when instanced in a {@link IFileRuleDescriptor}.
- *

- * Descriptors of this file are {@link FunctionDescriptor} for all violations - * contained in a function of the file described by the class. - * - * @version 2.1 - * @see IFileRuleDescriptor - * @since 2.0 - */ -public class FileRuleDescriptor implements IFileRuleDescriptor, Cloneable { - /** - * Class name - **/ - private static final String CLASS = FileRuleDescriptor.class.getName(); - - /** - * File's path. - **/ - private IPath filePath; - /** - * List of violations in the file. - **/ - private List descriptors; - - /** - * Empty constructor. - */ - public FileRuleDescriptor() { - final String method = "FileRuleDescriptor"; - ICodeLogger.entering(CLASS, method); - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - - } - - /** - * Constructor with the file's path. - * - * @param pFilePath the file's path. - */ - public FileRuleDescriptor(final IPath pFilePath) { - final String method = "FileRuleDescriptor"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the file's path. - * - * @return file's path - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.filePath); - return this.filePath; - } - - /** - * Getter for the descriptors. - * - * @return the descriptors - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.descriptors); - return this.descriptors; - } - - /** - * Setter for the file's path. - * - * @param pFilePath the file's path to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the descriptors. - * - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(final List pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = pDescriptors; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - final String name = this.filePath.toFile().getName(); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getValue() - */ - @Override - public Integer getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - int sum = 0; - for (final FunctionDescriptor fd : this.descriptors) { - sum += fd.getValue().intValue(); - } - ICodeLogger.exiting(CLASS, method, Integer.valueOf(sum)); - return Integer.valueOf(sum); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof FileRuleDescriptor) { - isEqual = this.filePath.equals(((FileRuleDescriptor) object).getFilePath()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final String method = "hashCode"; - ICodeLogger.entering(CLASS, method); - assert false : "hashCode not designed"; - ICodeLogger.exiting(CLASS, method); - return this.descriptors.size(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public FileRuleDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final FileRuleDescriptor clone = (FileRuleDescriptor) super.clone(); - clone.setFilePath(this.filePath); - clone.setDescriptors(new LinkedList(this.descriptors)); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FunctionDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FunctionDescriptor.java deleted file mode 100755 index 6eab5363..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/FunctionDescriptor.java +++ /dev/null @@ -1,236 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -import java.util.LinkedList; -import java.util.List; - -/** - * Descriptor for a Function that is intended to be shown.
- * This descriptor would return it's {@link #location} and the number of - * violations that it contains while using {@link #getName()} and - * {@link #getValue()} when instanced in a {@link IFileRuleDescriptor}.
- *

- * Descriptors of this file are {@link RuleDescriptor} for each rule violated in - * the function described by this class. - * - * @version 2.1 - * @see IFileRuleDescriptor - * @see FileRuleDescriptor - * @see RuleDescriptor - * @since 2.0 - */ -public class FunctionDescriptor implements IFileRuleDescriptor, Cloneable { - /** - * Class name - **/ - private static final String CLASS = FunctionDescriptor.class.getName(); - - /** - * Function containing the violation. - **/ - private String location; - /** - * Line of the violation. - **/ - private Integer value; - /** - * File name - */ - private IPath filePath; - /** - * List of all rules violated in the file - */ - private List descriptors; - - /** - * Empty constructor. - */ - public FunctionDescriptor() { - final String method = "FunctionDescriptor"; - ICodeLogger.entering(CLASS, method); - this.descriptors = new LinkedList<>(); - this.location = ""; - this.value = Integer.valueOf(-1); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pLocation Function's name. - * @param pValue Value computed for the function. - * @param pFilePath Function's file. - */ - public FunctionDescriptor(final String pLocation, final Integer pValue, final IPath pFilePath) { - super(); - final String method = "FunctionDescriptor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pLocation, pValue, pFilePath - }); - this.descriptors = new LinkedList<>(); - this.location = pLocation; - this.value = pValue; - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, location); - return this.location; - } - - @Override - public Integer getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - int sum = 0; - for (RuleDescriptor r : this.descriptors) { - sum += r.getValue().intValue(); - } - ICodeLogger.exiting(CLASS, method, Integer.valueOf(sum)); - return Integer.valueOf(sum); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final String method = "hashCode"; - ICodeLogger.entering(CLASS, method); - final int prime = 31; - int result = 1; - result = prime * result + ((location == null) ? 0 : location.hashCode()); - ICodeLogger.exiting(CLASS, method, Integer.valueOf(result)); - return result; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object obj) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, obj); - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final FunctionDescriptor other = (FunctionDescriptor) obj; - if (location == null) { - if (other.location != null) { - return false; - } - } else if (!location.equals(other.location)) { - return false; - } - ICodeLogger.exiting(CLASS, method, Boolean.TRUE); - return true; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public FunctionDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final FunctionDescriptor clone = (FunctionDescriptor) super.clone(); - clone.setDescriptors(new LinkedList(this.descriptors)); - clone.setFilePath(this.filePath); - clone.setLocation(this.location); - clone.setValue(this.value); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } - - /** - * @return the location - */ - public String getLocation() { - final String method = "getLocation"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, location); - return location; - } - - /** - * @param pLocation the location to set - */ - public void setLocation(final String pLocation) { - final String method = "setLocation"; - ICodeLogger.entering(CLASS, method, pLocation); - this.location = pLocation; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the filePath - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, filePath); - return filePath; - } - - /** - * @param pFilePath the filePath to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the descriptors - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, descriptors); - return descriptors; - } - - /** - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(List pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = pDescriptors; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pValue the value to set - */ - public void setValue(Integer pValue) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, pValue); - this.value = pValue; - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/IFileRuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/IFileRuleDescriptor.java deleted file mode 100755 index 8949054b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/IFileRuleDescriptor.java +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor; - -/** - * Interface for the rule, a file or a violation. This interface is mainly used - * to display results in the ViolationsView. - * - * @version 2.0 - * @see IFileRuleDescriptor - * @see FileRuleDescriptor - * @see RuleDescriptor - * @see ViolationDescriptor - * @since 2.0 - */ -public interface IFileRuleDescriptor { - /** - * Returns the name of this descriptor. - * - * @return the name - */ - String getName(); - - /** - * Returns the value of this descriptor. - * - * @return the value - */ - Integer getValue(); - -} \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/RuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/RuleDescriptor.java deleted file mode 100755 index a54a799c..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/RuleDescriptor.java +++ /dev/null @@ -1,305 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor; - -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -import java.util.LinkedList; -import java.util.List; - -/** - * Descriptor for a Rule that is intended to be shown.
- * This descriptor would return it's rules {@link #name} and the number of - * violations that it contains while using {@link #getName()} and - * {@link #getValue()} when instanced in a {@link IFileRuleDescriptor}.
- *

- * Descriptors contained by this descriptor are {@link ViolationDescriptor}. - * - * @version 2.1 - * @see IFileRuleDescriptor - * @see FileRuleDescriptor - * @see RuleDescriptor - * @see ViolationDescriptor - * @since 2.0 - */ -public class RuleDescriptor implements IFileRuleDescriptor, Cloneable { - /** - * Class name - **/ - private static final String CLASS = RuleDescriptor.class.getName(); - - /** - * Rule's id. - **/ - private String ruleId; - /** - * Rule's name. - **/ - private String name; - /** - * Function containing the violation. - **/ - private String location; - /** - * Number of violations stored for the rule - */ - private Integer value; - /** - * The violations stored for the rule - */ - private List descriptors; - /** - * File name - */ - private IPath filePath; - - /** - * Empty constructor. - */ - public RuleDescriptor() { - final String method = ""; - ICodeLogger.entering(CLASS, method); - this.ruleId = ""; - this.name = ""; - this.location = ""; - this.value = Integer.valueOf(-1); - this.descriptors = new LinkedList<>(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor for RuleDescriptor - * - * @param pRuleId The ID of the rule - * @param pName Name of the Rule - * @param pLocation Location of the function, program, method containing the - * violation of the rule - * @param pValue Number of Violation contained for this rule - * @param pPath Path to the file containing the rule - */ - public RuleDescriptor(final String pRuleId, final String pName, final String pLocation, - final Integer pValue, final IPath pPath) { - super(); - final String method = "RuleDescriptor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pRuleId, pName, pLocation, pValue, pPath - }); - this.ruleId = pRuleId; - this.name = pName; - this.location = pLocation; - this.value = pValue; - this.descriptors = new LinkedList<>(); - this.filePath = pPath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the descriptors - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method); - return descriptors; - } - - /** - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(final LinkedList pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = pDescriptors; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the id. - * - * @return rule's id - */ - public String getRuleId() { - final String method = "getRuleId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.ruleId); - return this.ruleId; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.name); - return this.name; - } - - /** - * Setter for the id. - * - * @param pRuleId the id to set - */ - public void setRuleId(final String pRuleId) { - final String method = ""; - ICodeLogger.entering(CLASS, method, pRuleId); - this.ruleId = pRuleId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the name - * - * @param pName the name to set - */ - public void setName(final String pName) { - final String method = ""; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.rules.treeviewer.file.IFileRuleDescriptor# - * getValue() - */ - @Override - public Integer getValue() { - final String method = ""; - ICodeLogger.entering(CLASS, method); - final Integer value = Integer.valueOf(this.descriptors.size()); - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /** - * @return The severity of the current Rule - */ - public String getSeverity() { - final String method = "getSeverity"; - ICodeLogger.entering(CLASS, method); - final String severity = UserPreferencesService.getCheckerSeverity(this.ruleId); - ICodeLogger.exiting(CLASS, method, severity); - return severity; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final String method = "hashCode"; - ICodeLogger.entering(CLASS, method); - final int prime = 31; - int result = 1; - result = prime * result + ((filePath == null) ? 0 : filePath.hashCode()); - result = prime * result + ((location == null) ? 0 : location.hashCode()); - result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result + ((ruleId == null) ? 0 : ruleId.hashCode()); - result = prime * result + ((value == null) ? 0 : value.hashCode()); - ICodeLogger.exiting(CLASS, method, Integer.valueOf(result)); - return result; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof RuleDescriptor) { - isEqual = this.name.equals(((RuleDescriptor) object).getName()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public RuleDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final RuleDescriptor clone = (RuleDescriptor) super.clone(); - clone.setDescriptors(new LinkedList(this.descriptors)); - clone.setRuleId(this.ruleId); - clone.setName(this.name); - clone.setFilePath(this.filePath); - clone.setLocation(this.location); - clone.setValue(this.value); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } - - /** - * @return the location - */ - public String getLocation() { - final String method = "getLocation"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, location); - return location; - } - - /** - * @param pLocation the location to set - */ - public void setLocation(final String pLocation) { - final String method = "setLocation"; - ICodeLogger.entering(CLASS, method, pLocation); - this.location = pLocation; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the filePath - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, filePath); - return filePath; - } - - /** - * @param pFilePath the filePath to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pValue the value to set - */ - public void setValue(final Integer pValue) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, pValue); - this.value = pValue; - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/ViolationDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/ViolationDescriptor.java deleted file mode 100755 index 8eed8b57..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/ViolationDescriptor.java +++ /dev/null @@ -1,237 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -/** - * Descriptor for a violation that is intended to be shown.
- * This descriptor would return the violation message {@link #name} and the line - * of the violation in the file using {@link #getName()} and {@link #getValue()} - * when instanced in a {@link IFileRuleDescriptor}.
- *

- * Descriptors contained by this descriptor are {@link ViolationDescriptor}. - * - * @version 2.1 - * @see IFileRuleDescriptor - * @see FileRuleDescriptor - * @see RuleDescriptor - * @see ViolationDescriptor - * @since 2.0 - */ -public class ViolationDescriptor implements IFileRuleDescriptor, Cloneable { - /** - * Class name - **/ - private static final String CLASS = ViolationDescriptor.class.getName(); - /** - * Rule's id. - **/ - private String ruleId; - /** - * Violation's message. - **/ - private String message; - /** - * Function containing the violation. - **/ - private String location; - /** - * Line of the violation. - **/ - private Integer line; - /** - * The path of the file containing the violation. - */ - private IPath filePath; - - /** - * Constructor for Violation Descriptor - * - * @param pRuleId The rule violated - * @param pMessage The violation's message - * @param pLocation The function where is violation is located - * @param pLine The line of the violation - * @param pFilePath The filePath to the violation - */ - public ViolationDescriptor(final String pRuleId, final String pLocation, final String pMessage, - final Integer pLine, final IPath pFilePath) { - super(); - final String method = "ViolationDescriptor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pRuleId, pLocation, pMessage, pLocation, pLine, pFilePath - }); - this.ruleId = pRuleId; - this.message = pMessage; - this.location = pLocation; - this.line = pLine; - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Empty constructor - */ - public ViolationDescriptor() { - final String method = "ViolationDescriptor"; - ICodeLogger.entering(CLASS, method); - this.ruleId = ""; - this.message = ""; - this.location = ""; - this.line = Integer.valueOf(-1); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor. - * IFileRuleDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, message); - return this.message; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor. - * IFileRuleDescriptor#getLine() - */ - @Override - public Integer getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, line); - return this.line; - } - - /** - * @return the ruleId - */ - public String getRuleId() { - final String method = "getRuleId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, ruleId); - return ruleId; - } - - /** - * @param pRuleId the ruleId to set - */ - public void setRuleId(final String pRuleId) { - final String method = "setRuleId"; - ICodeLogger.entering(CLASS, method, pRuleId); - this.ruleId = pRuleId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the location - */ - public String getLocation() { - final String method = "getLocation"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, location); - return location; - } - - /** - * @param pLocation the location to set - */ - public void setLocation(final String pLocation) { - final String method = "setLocation"; - ICodeLogger.entering(CLASS, method, pLocation); - this.location = pLocation; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the filePath - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, filePath); - return filePath; - } - - /** - * @param pFilePath the filePath to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pName the name to set - */ - public void setName(final String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.message = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * @param pLine the value to set - */ - public void setLine(final Integer pLine) { - final String method = "setLine"; - ICodeLogger.entering(CLASS, method, pLine); - this.line = pLine; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public ViolationDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final ViolationDescriptor clone = (ViolationDescriptor) super.clone(); - clone.setRuleId(this.ruleId); - clone.setName(this.message); - clone.setMessage(this.message); - clone.setFilePath(this.filePath); - clone.setLocation(this.location); - clone.setLine(this.line); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } - - /** - * @return Violation message. - */ - public String getMessage() { - final String method = "getMessage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param pMessage Violation message to set. - */ - public void setMessage(final String pMessage) { - final String method = "setMessage"; - ICodeLogger.entering(CLASS, method, pMessage); - this.message = pMessage; - ICodeLogger.exiting(CLASS, method); - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/package-info.java deleted file mode 100755 index 9d0e3d4b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/descriptor/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This package contains all descriptors for the - * {@link fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.FileTreeViewer} - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * This package contains all descriptors for the - * {@link fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.FileTreeViewer} - * - */ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/FileTreeViewerFilter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/FileTreeViewerFilter.java deleted file mode 100755 index 19370097..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/FileTreeViewerFilter.java +++ /dev/null @@ -1,198 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.filter; - -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.IUpdatableAnalysisFilter; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.FunctionDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.RuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.descriptor.ViolationDescriptor; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerFilter; - -/** - * This class is a filter to apply on - * {@link fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.FileTreeViewer} - */ -public class FileTreeViewerFilter extends ViewerFilter implements IUpdatableAnalysisFilter { - /** - * Class name - */ - private static final String CLASS = FileTreeViewerFilter.class.getName(); - - /** - * String filtered - */ - private String searchString = ""; - /** - * Is the filter focusing a file ? - */ - private boolean filteringFile = false; - /** - * Is the filter focusing a function ? - */ - private boolean filteringFunction = false; - /** - * Is the filter focusing a Rule ? - */ - private boolean filteringRule = false; - /** - * Should we show violation of Warning criticity ? - */ - private boolean showWarning = true; - /** - * Should we show violation of Error criticity ? - */ - private boolean showError = true; - /** - * Should info severity violation be shown ? - */ - private boolean showInfo = true; - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers. - * Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public boolean select(final Viewer pViewer, final Object pParentElement, - final Object pElement) { - final String method = "select"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pViewer, pParentElement, pElement - }); - boolean show = false; - boolean ruleBeingShown = false; - /* - * Setting filtering level - */ - if (pElement instanceof FileRuleDescriptor) { - final FileRuleDescriptor file = (FileRuleDescriptor) pElement; - if (file.getName().toUpperCase().contains(searchString.toUpperCase())) { - show = true; - filteringFile = true; - } else { - for (final FunctionDescriptor function : file.getDescriptors()) { - if (function.getName().toString().toUpperCase() - .contains(searchString.toUpperCase())) { - show = true; - filteringFunction = true; - } else { - for (final RuleDescriptor rule : function.getDescriptors()) { - if (rule.getName().toUpperCase().contains(searchString.toUpperCase()) - && checkSeverity(rule)) { - show = true; - filteringRule = true; - ruleBeingShown = true; - } else { - for (ViolationDescriptor violation : rule.getDescriptors()) { - if ((violation.getName().toString().toUpperCase() - .contains(searchString.toUpperCase())) - && checkSeverity(rule)) { - show = true; - ruleBeingShown = true; - } - } - } - } - } - } - } - } else if (pElement instanceof FunctionDescriptor) { - final FunctionDescriptor function = (FunctionDescriptor) pElement; - if (function.getName().toString().toUpperCase().contains(searchString.toUpperCase()) - || filteringFile) { - show = true; - } else { - for (final RuleDescriptor rule : function.getDescriptors()) { - if (rule.getName().toUpperCase().contains(searchString.toUpperCase()) - && checkSeverity(rule)) { - show = true; - ruleBeingShown = true; - } else { - for (final ViolationDescriptor violation : rule.getDescriptors()) { - if (violation.getName().toString().toUpperCase() - .contains(searchString.toUpperCase())) { - show = true; - ruleBeingShown = true; - } - } - } - } - } - } else if (pElement instanceof RuleDescriptor) { - final RuleDescriptor rule = (RuleDescriptor) pElement; - if ((rule.getName().toUpperCase().contains(searchString.toUpperCase()) || filteringFile - || filteringFunction) && checkSeverity(rule)) { - show = true; - } else { - for (final ViolationDescriptor violation : rule.getDescriptors()) { - if (violation.getName().toString().toUpperCase() - .contains(searchString.toUpperCase()) && checkSeverity(rule)) { - show = true; - } - } - } - } else if (pElement instanceof ViolationDescriptor) { - final ViolationDescriptor violation = (ViolationDescriptor) pElement; - show = violation.getName().toString().toUpperCase().contains(searchString.toUpperCase()) - || filteringFile || filteringFunction || filteringRule; - } - if (pElement instanceof FileRuleDescriptor || pElement instanceof FunctionDescriptor) { - show = (show || ruleBeingShown); - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(show)); - return show; - - } - - /** - * @param rule Rule to verify. - * @return whether or not the CheckerResult should be shown pending it's - * severity configuration. - */ - private boolean checkSeverity(final RuleDescriptor rule) { - final String method = "checkSeverity"; - ICodeLogger.entering(CLASS, method); - final boolean checked = (rule.getSeverity() - .equals(UserPreferencesService.PREF_SEVERITY_WARNING_VALUE) && showWarning) - || (rule.getSeverity() - .equals(UserPreferencesService.PREF_SEVERITY_ERROR_VALUE) - && showError) - || (rule.getSeverity() - .equals(UserPreferencesService.PREF_SEVERITY_INFO_VALUE) - && showInfo); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(checked)); - return checked; - } - - /* - * (non-Javadoc) - * - * @see - * fr.cnes.analysis.tools.ui.view.rules.treeviewer.IUpdatableAnalysisFilter# - * update(java.lang.String, boolean, boolean) - */ - @Override - public void update(final String pSearchString, final boolean pShowInfo, - final boolean pShowWarning, final boolean pShowError) { - final String method = "update"; - ICodeLogger.entering(CLASS, method); - this.searchString = pSearchString; - this.showError = pShowError; - this.showWarning = pShowWarning; - this.showInfo = pShowInfo; - filteringRule = false; - filteringFile = false; - filteringFunction = false; - ICodeLogger.exiting(CLASS, method); - - } -} \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/package-info.java deleted file mode 100755 index 1d4b0fdd..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/file/filter/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This package contains all filter for the FileTreeViewer - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * This package contains all filter for the FileTreeViewer - */ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.file.filter; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/CheckResultToRuleTreeViewerConverter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/CheckResultToRuleTreeViewerConverter.java deleted file mode 100755 index 4f994792..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/CheckResultToRuleTreeViewerConverter.java +++ /dev/null @@ -1,180 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule; - -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FunctionRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.RuleDescriptor; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; - -import java.util.LinkedList; -import java.util.List; - -/** - * Job used to converter inputs from analysis to valuable inputs for the - * ViolationView. - */ -public class CheckResultToRuleTreeViewerConverter extends Job { - - /** - * Class name - */ - private static final String CLASS = CheckResultToRuleTreeViewerConverter.class.getName(); - - /** - * The original inputs. - **/ - private CheckResult[] inputs; - /** - * A value container which has all values of rules. - **/ - private RuleDescriptor[] container; - - /** - * Empty constructor for this Job. - */ - public CheckResultToRuleTreeViewerConverter() { - super("Converting results..."); - final String method = "CheckResultToRuleTreeViewerConverter"; - ICodeLogger.entering(CLASS, method); - this.inputs = new CheckResult[0]; - this.container = new RuleDescriptor[0]; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor for this Job with an array of violations. - * - * @param pInputs the inputs - */ - public CheckResultToRuleTreeViewerConverter(final CheckResult[] pInputs) { - super("Converting results..."); - final String method = "CheckResultToRuleTreeViewerConverter"; - ICodeLogger.entering(CLASS, method, pInputs); - this.inputs = pInputs.clone(); - this.container = new RuleDescriptor[0]; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the inputs id. - * - * @return the inputs - */ - public CheckResult[] getInputs() { - final String method = "getInputs"; - ICodeLogger.entering(CLASS, method); - final CheckResult[] clonedResults = this.inputs.clone(); - ICodeLogger.exiting(CLASS, method, clonedResults); - return clonedResults; - } - - /** - * Getter for the container - * - * @return the container - */ - public RuleDescriptor[] getContainer() { - final String method = "getContainer"; - ICodeLogger.entering(CLASS, method); - final RuleDescriptor[] clonedContainer = this.container.clone(); - ICodeLogger.exiting(CLASS, method, clonedContainer); - return clonedContainer; - } - - /** - * Setter for the inputs. - * - * @param pInputs the inputs to set - */ - public void setInputs(final CheckResult[] pInputs) { - final String method = "setInputs"; - ICodeLogger.entering(CLASS, method, pInputs); - this.inputs = pInputs.clone(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the container - * - * @param pContainer the container to set - */ - public void setContainer(final RuleDescriptor[] pContainer) { - final String method = "setContainer"; - ICodeLogger.entering(CLASS, method, pContainer); - this.container = pContainer.clone(); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime. - * IProgressMonitor) - */ - @Override - public IStatus run(final IProgressMonitor monitor) { - final String method = "run"; - ICodeLogger.entering(CLASS, method, monitor); - // Instantiate return variable - IStatus status = Status.OK_STATUS; - final int totalWork = this.inputs.length; - - // Instantiate descriptors - final List descriptors = new LinkedList(); - final RuleDescriptor rule = new RuleDescriptor(); - final FileRuleDescriptor file = new FileRuleDescriptor(); - final FunctionRuleDescriptor function = new FunctionRuleDescriptor(); - - // Start converting - monitor.beginTask("Converting...", totalWork); - try { - for (final CheckResult value : this.inputs) { - if (descriptors.isEmpty() || !descriptors.get(descriptors.size() - 1).getName() - .equals(value.getName())) { - rule.getDescriptors().clear(); - rule.setRuleId(value.getId()); - rule.setName(value.getName()); - descriptors.add(rule.clone()); - - } - if (descriptors.get(descriptors.size() - 1).getDescriptors().isEmpty() - || !descriptors.get(descriptors.size() - 1).getDescriptors() - .get(descriptors.get(descriptors.size() - 1) - .getDescriptors().size() - 1) - .getFilePath().equals(new Path(value.getFile() - .getAbsolutePath()))) { - file.getDescriptors().clear(); - file.setFilePath(new Path(value.getFile().getAbsolutePath())); - descriptors.get(descriptors.size() - 1).getDescriptors().add(file.clone()); - } - function.setRuleId(value.getId()); - function.setFilePath(new Path(value.getFile().getAbsolutePath())); - function.setMessage(value.getMessage()); - function.setLocation(value.getLocation()); - function.setValue(value.getLine()); - descriptors.get(descriptors.size() - 1).getDescriptors().get( - descriptors.get(descriptors.size() - 1).getDescriptors().size() - 1) - .getDescriptors().add(function.clone()); - monitor.worked(1); - } - this.container = descriptors.toArray(new RuleDescriptor[descriptors.size()]); - } catch (final CloneNotSupportedException exception) { - ICodeLogger.error(CLASS, method, exception); - status = new Status(IStatus.ERROR, "fr.cnes.analysis.tools.fortran.analyzer", - IStatus.ERROR, exception.getMessage(), exception); - } - - ICodeLogger.exiting(CLASS, method, status); - return status; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewer.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewer.java deleted file mode 100755 index dc7ccbab..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewer.java +++ /dev/null @@ -1,271 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule; - -import fr.cnes.analysis.tools.ui.view.AbstractAnalysisTreeViewer; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FunctionRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.RuleDescriptor; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jface.viewers.*; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.swt.widgets.TreeColumn; - -/** - * ViolationsRuleTreeViewer This class implements an AbstractAnalysisTreeViewer - * with {@link RuleDescriptor} {@link } - */ -public class RuleTreeViewer extends AbstractAnalysisTreeViewer { - - /** - * Class name - */ - private static final String CLASS = RuleTreeViewer.class.getName(); - - /** - * Titles of the columns - */ - private static final String[] TITLES = new String[]{ - " ! ", "Rule", "Line", "Number of violations", "Message" - }; - - /** - * Bounds of the TreeViewer - */ - private static final int[] BOUNDS = new int[]{ - 50, 200, 50, 50, 200 - }; - /** - * Kind of bitmap to know if the sorting should be up or down for each - * column of the tree - */ - private boolean[] columnSortUp = new boolean[]{ - true, true, false, true, true - }; - - /** - * Index selected to sort the columns, by default 1 - */ - private int indexSort = 1; - - /** Bounds of the columns */ - - /** - * Constructor for violations rule treeviewer. - * - * @param parent The Composite containing the TreeViewer - * @param style The SWT style - */ - public RuleTreeViewer(final Composite parent, final int style) { - super(parent, style, TITLES, BOUNDS); - final String method = "RuleTreeViewer"; - ICodeLogger.entering(CLASS, method, new Object[]{ - parent, Integer.valueOf(style) - }); - final ViewerComparator comparator = new RuleTreeViewerComparator(); - this.setComparator(comparator); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This method creates all columns of the tree table viewer. - */ - protected void createColumns() { - final String method = "createColumns"; - ICodeLogger.entering(CLASS, method); - - this.setContentProvider(new RuleTreeViewerContentProvider()); - TreeViewerColumn col; - for (int i = 0; i < super.getTitles().length; i++) { - // Create the column - col = this.createTreeViewerColumn(this.getTitles()[i], this.getBounds()[i], i); - // Add a label provider - col.setLabelProvider(new RuleTreeViewerLabelProvider(i)); - } - - ICodeLogger.exiting(CLASS, method); - } - - /** - * Create a column of the TreeViewer, customize it and assign it's index - * number and action listener to be sorted. - * - * @param title The title of the head column. - * @param bound The bound of the column. - * @param colNumber The index number of the column in the TreeViewer. - * @return The treeViewerColumn created. - */ - private TreeViewerColumn createTreeViewerColumn(final String title, final int bound, - final int colNumber) { - final String method = "createTreeViewerColumn"; - ICodeLogger.entering(CLASS, method); - final TreeViewerColumn viewerColumn = new TreeViewerColumn(this, SWT.NONE); - final TreeColumn column = viewerColumn.getColumn(); - column.setText(title); - column.setWidth(bound); - column.setResizable(true); - column.setMoveable(true); - - column.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(SelectionEvent e) { - columnSortUp[colNumber] = !columnSortUp[colNumber]; - indexSort = colNumber; - final Tree tree = getTree(); - tree.setSortColumn(column); - if (columnSortUp[colNumber]) { - tree.setSortDirection(SWT.UP); - } else { - tree.setSortDirection(SWT.DOWN); - } - refresh(); - } - - }); - ICodeLogger.exiting(CLASS, method, viewerColumn); - return viewerColumn; - } - - /** - * Action to do when a double click over the item is done - */ - protected void addDoubleClickAction() { - final String method = "addDoubleClickAction"; - ICodeLogger.entering(CLASS, method); - this.addDoubleClickListener(new IDoubleClickListener() { - - @Override - public void doubleClick(final DoubleClickEvent event) { - final TreeViewer tViewer = (TreeViewer) event.getViewer(); - final IStructuredSelection thisSelection = (IStructuredSelection) event - .getSelection(); - final Object selectedNode = thisSelection.getFirstElement(); - - tViewer.setExpandedState(selectedNode, !tViewer.getExpandedState(selectedNode)); - - // if it is a leaf -> open the file - if (!tViewer.isExpandable(selectedNode) - && selectedNode instanceof FunctionRuleDescriptor) { - final IPath path = ((FunctionRuleDescriptor) selectedNode).getFilePath(); - final int number = ((FunctionRuleDescriptor) selectedNode).getValue() - .intValue(); - // get resource - final IFile fileToOpen = ResourcesPlugin.getWorkspace().getRoot() - .getFileForLocation(path); - final IResource res = fileToOpen; - - // open file in editor - openFileInEditor(res, number); - } - } - }); - ICodeLogger.exiting(CLASS, method); - } - - /** - * @return the columnSortUp - */ - public boolean[] getColumnSortUp() { - final String method = "getColumnSortUp"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, columnSortUp); - return columnSortUp; - } - - /** - * @param columnSortUp the columnSortUp to set - */ - public void setColumnSortUp(boolean[] columnSortUp) { - final String method = "setColumnSortUp"; - ICodeLogger.entering(CLASS, method, columnSortUp); - this.columnSortUp = columnSortUp; - ICodeLogger.exiting(CLASS, method); - } - - /** - * This internal class compose the ViewerComparator of the TreeViewer. The - * compare method is being called everytime a refresh is being called. - */ - class RuleTreeViewerComparator extends ViewerComparator { - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface. - * viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public int compare(Viewer viewer, Object e1, Object e2) { - int rc = 0; - if (e1 instanceof RuleDescriptor && e2 instanceof RuleDescriptor) { - final RuleDescriptor rule1 = (RuleDescriptor) e1; - final RuleDescriptor rule2 = (RuleDescriptor) e2; - - switch (indexSort) { - case 0: - rc = rule1.getSeverity().compareTo(rule2.getSeverity()); - break; - case 1: - rc = rule1.getName().compareToIgnoreCase(rule2.getName()); - break; - case 3: - rc = rule1.getValue().intValue() - rule2.getValue().intValue(); - break; - default: - rc = 0; - } - } else if (e1 instanceof FileRuleDescriptor && e2 instanceof FileRuleDescriptor) { - final FileRuleDescriptor file1 = (FileRuleDescriptor) e1; - final FileRuleDescriptor file2 = (FileRuleDescriptor) e2; - - switch (indexSort) { - case 1: - rc = file1.getName().compareToIgnoreCase(file2.getName()); - break; - case 3: - rc = file1.getValue().intValue() - file2.getValue().intValue(); - break; - default: - rc = 0; - } - } else if (e1 instanceof FunctionRuleDescriptor - && e2 instanceof FunctionRuleDescriptor) { - final FunctionRuleDescriptor function1 = (FunctionRuleDescriptor) e1; - final FunctionRuleDescriptor function2 = (FunctionRuleDescriptor) e2; - - switch (indexSort) { - case 1: - rc = function1.getLocation().compareToIgnoreCase(function2.getLocation()); - break; - case 2: - rc = function1.getValue().intValue() - function2.getValue().intValue(); - break; - case 4: - rc = function1.getName().compareToIgnoreCase(function2.getName()); - break; - default: - rc = 0; - } - } - // If descending order, flip the direction - if (columnSortUp[indexSort]) { - rc = -rc; - } - return rc; - } - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerContentProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerContentProvider.java deleted file mode 100755 index afb924e4..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerContentProvider.java +++ /dev/null @@ -1,222 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule; - -import fr.cnes.analysis.tools.ui.exception.UnknownInstanceException; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FunctionRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.RuleDescriptor; -import fr.cnes.icode.data.CheckResult; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.ui.PlatformUI; - -import java.util.List; - -/** - * This class provides a content provider for the tree viewer in the metric - * view. - * - * @see org.eclipse.jface.viewers.ITreeContentProvider - */ -public class RuleTreeViewerContentProvider implements ITreeContentProvider { - /** - * Class name - */ - private static final String CLASS = RuleTreeViewerContentProvider.class.getName(); - /** - * The original inputs. - **/ - private CheckResultToRuleTreeViewerConverter converter; - - /** - * Empty constructor. - */ - public RuleTreeViewerContentProvider() { - super(); - final String method = "RuleTreeViewerContentProvider"; - ICodeLogger.entering(CLASS, method); - this.converter = new CheckResultToRuleTreeViewerConverter(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the converter. - * - * @return the converter - */ - public CheckResultToRuleTreeViewerConverter getConverter() { - final String method = "getConverter"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.converter); - return this.converter; - } - - /** - * Setter for the converter. - * - * @param pConverter the converter to set - */ - public void setConverter(final CheckResultToRuleTreeViewerConverter pConverter) { - final String method = "setConverter"; - ICodeLogger.entering(CLASS, method, pConverter); - this.converter = pConverter; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse. - * jface .viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { - final String method = "inputChanged"; - ICodeLogger.entering(CLASS, method, new Object[]{ - viewer, oldInput, newInput - }); - - try { - if (newInput instanceof CheckResult[]) { - this.converter.setInputs(((CheckResult[]) newInput).clone()); - // run analysis - this.converter.setUser(true); - this.converter.schedule(); - this.converter.join(); - - } else if (newInput != null) { - final UnknownInstanceException exception = new UnknownInstanceException( - "inputChanged method of AbstractContentProvider has a " - + newInput.getClass().getName() - + " type instead of a Descriptor[] instance"); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - } catch (final InterruptedException exception) { - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang. - * Object) - */ - @Override - public Object[] getElements(final Object inputElement) { - final String method = "getElements"; - ICodeLogger.entering(CLASS, method, inputElement); - final Object[] elements = this.converter.getContainer(); - - ICodeLogger.exiting(CLASS, method, elements); - return elements; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - @Override - public void dispose() { - final String method = "dispose"; - ICodeLogger.entering(CLASS, method); - if (this.converter != null) { - this.converter.setContainer(new RuleDescriptor[0]); - } - - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang. - * Object) - */ - @Override - public boolean hasChildren(final Object element) { - final String method = "hasChildren"; - ICodeLogger.entering(CLASS, method, element); - final boolean hasChildren = !(element instanceof FunctionRuleDescriptor); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(hasChildren)); - return hasChildren; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object - * ) - */ - @Override - public Object getParent(final Object element) { - final String method = "getParent"; - ICodeLogger.entering(CLASS, method, element); - ICodeLogger.exiting(CLASS, method, null); - return null; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang. - * Object) - */ - @Override - public Object[] getChildren(final Object parentElement) { - final String method = "getChildren"; - ICodeLogger.entering(CLASS, method, parentElement); - Object[] values = null; - if (parentElement instanceof FileRuleDescriptor) { - - // The parent element can be a FileValue : we find array of - // function values depending - final List mVals = ((FileRuleDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new FunctionRuleDescriptor[mVals.size()]); - } else if (parentElement instanceof RuleDescriptor) { - - // A Descriptor : we find array of file values depending - final List mVals = ((RuleDescriptor) parentElement) - .getDescriptors(); - values = mVals.toArray(new FileRuleDescriptor[mVals.size()]); - } else if (parentElement instanceof RuleDescriptor[]) { - - // An array of descriptors : we find each descriptor depending - values = (RuleDescriptor[]) parentElement; - } else if (!(parentElement instanceof FunctionRuleDescriptor)) { - - // Otherwise, an error is thrown on the interface - final UnknownInstanceException exception = new UnknownInstanceException( - "Unknow type in getChildren method of AbstractContentProvider : " - + parentElement.getClass().getName()); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method, values); - return values; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerLabelProvider.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerLabelProvider.java deleted file mode 100755 index c9003f1e..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/RuleTreeViewerLabelProvider.java +++ /dev/null @@ -1,158 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule; - -import fr.cnes.analysis.tools.ui.exception.UnknownInstanceException; -import fr.cnes.analysis.tools.ui.images.ImageFactory; -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.analysis.tools.ui.view.AbstractLabelProvider; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FunctionRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.IRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.RuleDescriptor; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.PlatformUI; - -/** - * This class provides column for the table viewer. - */ -public class RuleTreeViewerLabelProvider extends AbstractLabelProvider { - /** Static values that determines column types. **/ - /** - * This value is for rule criticity column. - **/ - public final static int SEVERITY = 0; - /** - * This value is for rule name column. - **/ - public final static int NAME = 1; - /** - * This value is for error's line column. - **/ - public final static int LINE = 2; - /** - * This value is for number of violations column. - **/ - public final static int NB_VIOL = 3; - /** - * This value is for location column. - **/ - public final static int MESSAGE = 4; - /** - * Class name - */ - private static final String CLASS = RuleTreeViewerLabelProvider.class.getName(); - - /** - * Constructor with integer parameter which represents the column created. - * - * @param pType the column to create - */ - public RuleTreeViewerLabelProvider(final int pType) { - super(pType); - final String method = "RuleTreeViewerLabelProvider"; - ICodeLogger.entering(CLASS, method, Integer.valueOf(pType)); - ICodeLogger.exiting(CLASS, method); - } - - /** - * This functions set the text for each element of a column. - * - * @param element the element store in the column - * @return the text to store in column case - */ - @Override - public String getText(final Object element) { - final String method = "getText"; - ICodeLogger.entering(CLASS, method, element); - String text = ""; - if (element instanceof IRuleDescriptor) { - switch (this.getType()) { - case SEVERITY: - break; - case NAME: - if (element instanceof FunctionRuleDescriptor) { - text = ((FunctionRuleDescriptor) element).getLocation(); - } else { - text = ((IRuleDescriptor) element).getName(); - } - break; - case LINE: - if (element instanceof FunctionRuleDescriptor) { - text = ((IRuleDescriptor) element).getValue().toString(); - } else { - text = "--"; - } - break; - case NB_VIOL: - if (element instanceof FunctionRuleDescriptor) { - text = "--"; - } else { - text = ((IRuleDescriptor) element).getValue().toString(); - } - break; - case MESSAGE: - if (element instanceof FunctionRuleDescriptor) { - text = ((FunctionRuleDescriptor) element).getMessage(); - } - break; - default: - final RuntimeException exception = new ArrayIndexOutOfBoundsException( - "Wrong column value for ViolationsLabelProvider class : " - + this.getType()); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - break; - } - } else { - final UnknownInstanceException exception = new UnknownInstanceException( - "getText method of ViolationsLabelProvider class has a " - + element.getClass().getName() - + " element, but it should be an IRuleDescriptor instance."); - ICodeLogger.error(CLASS, method, exception); - MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Internal Error", - "Contact support service : \n" + exception.getMessage()); - } - - ICodeLogger.exiting(CLASS, method, text); - return text; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ColumnLabelProvider#getImage(java.lang.Object) - */ - @Override - public Image getImage(final Object element) { - final String method = "getImage"; - ICodeLogger.entering(CLASS, method, element); - Image image = null; - if (this.getType() == SEVERITY && element instanceof RuleDescriptor) { - switch (((RuleDescriptor) element).getSeverity()) { - case UserPreferencesService.PREF_SEVERITY_ERROR_VALUE: - image = ImageFactory.getImage(ImageFactory.ERROR_SMALL); - break; - case UserPreferencesService.PREF_SEVERITY_WARNING_VALUE: - image = ImageFactory.getImage(ImageFactory.WARNING_SMALL); - break; - case UserPreferencesService.PREF_SEVERITY_INFO_VALUE: - default: - image = ImageFactory.getImage(ImageFactory.INFO_SMALL); - break; - } - } - - ICodeLogger.exiting(CLASS, method, image); - return image; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FileRuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FileRuleDescriptor.java deleted file mode 100755 index 1759608b..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FileRuleDescriptor.java +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor; - -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -import java.util.LinkedList; -import java.util.List; - -/** - * Class descriptor for rule's violations in a file. - */ -public class FileRuleDescriptor implements IRuleDescriptor, Cloneable { - - /** - * Class name - */ - private static final String CLASS = FileRuleDescriptor.class.getName(); - /** - * File's path. - **/ - private IPath filePath; - /** - * List of violations in the file. - **/ - private List descriptors; - - /** - * Empty constructor. - */ - public FileRuleDescriptor() { - final String method = "FileRuleDescriptor"; - ICodeLogger.entering(CLASS, method); - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor with the file's path. - * - * @param pFilePath the file's path. - */ - public FileRuleDescriptor(final IPath pFilePath) { - final String method = "FileRuleDescriptor"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the file's path. - * - * @return file's path - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.filePath); - return this.filePath; - } - - /** - * Getter for the descriptors. - * - * @return the descriptors - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.descriptors); - return this.descriptors; - } - - /** - * Setter for the file's path. - * - * @param pFilePath the file's path to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the descriptors. - * - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(final List pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = pDescriptors; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.metrics.IMetricDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - final String name = this.filePath.toFile().getName(); - ICodeLogger.exiting(CLASS, method, name); - return name; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getValue() - */ - @Override - public Integer getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - final Integer value = Integer.valueOf(this.descriptors.size()); - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getCriticity() - */ - @Override - public String getSeverity() { - final String method = "getSeverity"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, ""); - return ""; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof FileRuleDescriptor) { - isEqual = this.filePath.equals(((FileRuleDescriptor) object).getFilePath()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - assert false : "hashCode not designed"; - return this.descriptors.size(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public FileRuleDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final FileRuleDescriptor clone = (FileRuleDescriptor) super.clone(); - clone.setFilePath(this.filePath); - clone.setDescriptors(new LinkedList(this.descriptors)); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FunctionRuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FunctionRuleDescriptor.java deleted file mode 100755 index ddc16d33..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/FunctionRuleDescriptor.java +++ /dev/null @@ -1,240 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor; - -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.core.runtime.IPath; - -/** - * Descriptor for rule's violations in a function. - */ -public class FunctionRuleDescriptor implements IRuleDescriptor, Cloneable { - - /** - * Class name - */ - private static final String CLASS = FunctionRuleDescriptor.class.getName(); - /** - * Function containing the violation. - **/ - private String location; - /** - * Violation's message - */ - private String message; - /** - * Line of the violation. - **/ - private Integer value; - /** - * Path of the file containing the violation. - **/ - private IPath filePath; - /** - * Id of the violated rule. - **/ - private String ruleId; - - /** - * Empty constructor. - */ - public FunctionRuleDescriptor() { - final String method = "FunctionRuleDescriptor"; - ICodeLogger.entering(CLASS, method); - this.ruleId = ""; - this.location = ""; - this.message = ""; - this.value = Integer.valueOf(-1); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor with every attribute as parameter. - * - * @param pRuleId rule's id - * @param pFilePath file's path - * @param pLocation violation's location - * @param pMessage violation's message - * @param pValue violation's line - */ - public FunctionRuleDescriptor(final String pRuleId, final IPath pFilePath, - final String pLocation, final String pMessage, final Integer pValue) { - final String method = ""; - ICodeLogger.entering(CLASS, method, new Object[]{ - pRuleId, pFilePath, pLocation, pMessage, pValue - }); - this.ruleId = pRuleId; - this.filePath = pFilePath; - this.location = pLocation; - this.message = pMessage; - this.value = pValue; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the location. - * - * @return the location - */ - public String getLocation() { - final String method = "getLocation"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.location); - return this.location; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getValue() - */ - @Override - public Integer getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.value); - return this.value; - } - - /** - * Getter for file's path. - * - * @return the file's path - */ - public IPath getFilePath() { - final String method = "getFilePath"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.filePath); - return this.filePath; - } - - /** - * Getter for the id. - * - * @return the id - */ - public String getRuleId() { - final String method = "getRuleId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.ruleId); - return this.ruleId; - } - - /** - * Setter for the location. - * - * @param pLocation the location to set - */ - public void setLocation(final String pLocation) { - final String method = "setLocation"; - ICodeLogger.entering(CLASS, method, pLocation); - this.location = pLocation; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the line. - * - * @param pValue line's violation - */ - public void setValue(final Integer pValue) { - final String method = "setValue"; - ICodeLogger.entering(CLASS, method, pValue); - this.value = pValue; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the file's path. - * - * @param pFilePath the file's path to set - */ - public void setFilePath(final IPath pFilePath) { - final String method = "setFilePath"; - ICodeLogger.entering(CLASS, method, pFilePath); - this.filePath = pFilePath; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for rule's id. - * - * @param pRuleId the id to set - */ - public void setRuleId(final String pRuleId) { - final String method = "setRuleId"; - ICodeLogger.entering(CLASS, method, pRuleId); - this.ruleId = pRuleId; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.location); - return this.location; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getCriticity() - */ - @Override - public String getSeverity() { - final String method = "getSeverity"; - ICodeLogger.entering(CLASS, method); - final String severity = UserPreferencesService.getCheckerSeverity(this.getRuleId()); - ICodeLogger.exiting(CLASS, method, severity); - return severity; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public FunctionRuleDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final FunctionRuleDescriptor clone = (FunctionRuleDescriptor) super.clone(); - clone.setRuleId(this.ruleId); - clone.setFilePath(this.filePath); - clone.setLocation(this.location); - clone.setMessage(this.message); - clone.setValue(this.value); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } - - /** - * @return function rule message - */ - public String getMessage() { - final String method = "getMessage"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, message); - return message; - } - - /** - * @param message - */ - public void setMessage(final String message) { - final String method = "setMessage"; - ICodeLogger.entering(CLASS, method, message); - this.message = message; - ICodeLogger.exiting(CLASS, method); - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/IRuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/IRuleDescriptor.java deleted file mode 100755 index 5cb138f2..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/IRuleDescriptor.java +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor; - -/** - * Interface which represents any level of a rule description. It could describe - * the rule, a file or a violation. This interface is mainly used to display - * results in the ViolationsView. - */ -public interface IRuleDescriptor { - /** - * Returns the name of this descriptor. - * - * @return the name - */ - String getName(); - - /** - * Returns the value of this descriptor. - * - * @return the value - */ - Integer getValue(); - - /** - * Returns the criticity of the rule associated to this descriptor. - * - * @return the criticity - */ - String getSeverity(); -} \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/RuleDescriptor.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/RuleDescriptor.java deleted file mode 100755 index 20f53db6..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/RuleDescriptor.java +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor; - -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.icode.logger.ICodeLogger; - -import java.util.LinkedList; -import java.util.List; - -/** - * Class for general description of a rule for a - * {@link fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.RuleTreeViewer} - * . - */ -public class RuleDescriptor implements IRuleDescriptor, Cloneable { - - /** - * Class name - */ - private static final String CLASS = RuleDescriptor.class.getName(); - /** - * Rule's id. - **/ - private String ruleId; - /** - * Rule's name. - **/ - private String name; - /** - * List of analyzed files with their violations. - **/ - private List descriptors; - - /** - * Empty constructor. - */ - public RuleDescriptor() { - final String method = "RuleDescriptor"; - ICodeLogger.entering(CLASS, method); - - this.ruleId = ""; - this.name = ""; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Constructor with the id and the name. - * - * @param pRuleId rule's id - * @param pName rule's name - */ - public RuleDescriptor(final String pRuleId, final String pName) { - final String method = "RuleDescriptor"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pRuleId, pName - }); - this.ruleId = pRuleId; - this.name = pName; - this.descriptors = new LinkedList(); - ICodeLogger.exiting(CLASS, method); - } - - /** - * Getter for the id. - * - * @return rule's id - */ - public String getRuleId() { - final String method = "getRuleId"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.ruleId); - return this.ruleId; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getName() - */ - @Override - public String getName() { - final String method = "getName"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.name); - return this.name; - } - - /** - * Getter for the descriptors. - * - * @return the descriptors - */ - public List getDescriptors() { - final String method = "getDescriptors"; - ICodeLogger.entering(CLASS, method); - ICodeLogger.exiting(CLASS, method, this.descriptors); - return this.descriptors; - } - - /** - * Setter for the id. - * - * @param pRuleId the id to set - */ - public void setRuleId(final String pRuleId) { - final String method = "setRuleId"; - ICodeLogger.entering(CLASS, method, pRuleId); - this.ruleId = pRuleId; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the name - * - * @param pName the name to set - */ - public void setName(final String pName) { - final String method = "setName"; - ICodeLogger.entering(CLASS, method, pName); - this.name = pName; - ICodeLogger.exiting(CLASS, method); - } - - /** - * Setter for the descriptors - * - * @param pDescriptors the descriptors to set - */ - public void setDescriptors(final List pDescriptors) { - final String method = "setDescriptors"; - ICodeLogger.entering(CLASS, method, pDescriptors); - this.descriptors = pDescriptors; - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getValue() - */ - @Override - public Integer getValue() { - final String method = "getValue"; - ICodeLogger.entering(CLASS, method); - Integer value = Integer.valueOf(0); - for (final FileRuleDescriptor descriptor : this.descriptors) { - value = Integer.valueOf(value.intValue() + descriptor.getValue().intValue()); - } - ICodeLogger.exiting(CLASS, method, value); - return value; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.rules.IRuleDescriptor#getCriticity() - */ - @Override - public String getSeverity() { - final String method = "getSeverity"; - ICodeLogger.entering(CLASS, method); - final String severity = UserPreferencesService.getCheckerSeverity(this.ruleId); - ICodeLogger.exiting(CLASS, method, severity); - return severity; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(final Object object) { - final String method = "equals"; - ICodeLogger.entering(CLASS, method, object); - final boolean isEqual; - if (object instanceof RuleDescriptor) { - isEqual = this.name.equals(((RuleDescriptor) object).getName()); - } else { - isEqual = false; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(isEqual)); - return isEqual; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - assert false : "hashCode not designed"; - return this.descriptors.size(); - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ - @Override - public RuleDescriptor clone() throws CloneNotSupportedException { - final String method = "clone"; - ICodeLogger.entering(CLASS, method); - final RuleDescriptor clone = (RuleDescriptor) super.clone(); - clone.setRuleId(this.ruleId); - clone.setName(this.name); - clone.setDescriptors(new LinkedList(this.descriptors)); - ICodeLogger.exiting(CLASS, method, clone); - return clone; - } -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/package-info.java deleted file mode 100755 index 27478b45..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/descriptor/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Descriptor for the {@link RuleTreeViewer} - */ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * Descriptor for the {@link RuleTreeViewer} - */ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor; diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/RuleViewerFilter.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/RuleViewerFilter.java deleted file mode 100755 index 2d489ce4..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/RuleViewerFilter.java +++ /dev/null @@ -1,161 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.filter; - -import fr.cnes.analysis.tools.ui.preferences.UserPreferencesService; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.IUpdatableAnalysisFilter; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FileRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.FunctionRuleDescriptor; -import fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.descriptor.RuleDescriptor; -import fr.cnes.icode.logger.ICodeLogger; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerFilter; - -/** - * This class is a filter to apply on RuleTreeViewers. - */ -public class RuleViewerFilter extends ViewerFilter implements IUpdatableAnalysisFilter { - - /** - * Class name - */ - private static final String CLASS = RuleViewerFilter.class.getName(); - /** - * String filtered - */ - private String searchString = ""; - /** - * Is the filter focusing a file ? - */ - private boolean filteringFile = false; - /** - * Is the filter focusing a Rule ? - */ - private boolean filteringRule = false; - /** - * Should we show violation of Warning criticity ? - */ - private boolean showWarning = true; - /** - * Should we show violation of Error criticity ? - */ - private boolean showError = true; - /** - * Should we show violation of Info criticity ? - */ - private boolean showInfo = true; - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers. - * Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public boolean select(final Viewer pViewer, final Object pParentElement, - final Object pElement) { - final String method = "select"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pViewer, pParentElement, pElement - }); - boolean show = false; - /* - * Setting filtering level - */ - if (pElement instanceof RuleDescriptor) { - final RuleDescriptor rule = (RuleDescriptor) pElement; - if (checkSeverity(rule)) { - - if (rule.getName().toUpperCase().contains(searchString.toUpperCase())) { - show = true; - filteringRule = true; - } else { - show = false; - for (FileRuleDescriptor file : rule.getDescriptors()) { - if (file.getFilePath().toString().toUpperCase() - .contains(searchString.toUpperCase())) { - show = true; - filteringFile = true; - - } else { - for (FunctionRuleDescriptor function : file.getDescriptors()) { - if (function.getName().toUpperCase() - .contains(searchString.toUpperCase())) { - show = true; - } - } - } - } - } - } - } else if (pElement instanceof FileRuleDescriptor) { - final FileRuleDescriptor file = (FileRuleDescriptor) pElement; - if (file.getFilePath().toString().toUpperCase().contains(searchString.toUpperCase()) - || filteringRule) { - show = true; - } else { - for (FunctionRuleDescriptor function : file.getDescriptors()) { - if (function.getName().toUpperCase().contains(searchString.toUpperCase())) { - show = true; - } - } - } - } else if (pElement instanceof FunctionRuleDescriptor) { - final FunctionRuleDescriptor function = (FunctionRuleDescriptor) pElement; - show = function.getName().toUpperCase().contains(searchString.toUpperCase()) - || filteringFile || filteringRule; - } - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(show)); - return show; - - } - - /** - * @param rule to verify severity compliance - * @return severity compliance of the rule. - */ - private boolean checkSeverity(RuleDescriptor rule) { - final String method = "checkSeverity"; - ICodeLogger.entering(CLASS, method, rule); - final boolean checked = (rule.getSeverity() - .equals(UserPreferencesService.PREF_SEVERITY_WARNING_VALUE) && showWarning) - || (rule.getSeverity() - .equals(UserPreferencesService.PREF_SEVERITY_ERROR_VALUE) - && showError) - || (rule.getSeverity() - .equals(UserPreferencesService.PREF_SEVERITY_INFO_VALUE) - && showInfo); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(checked)); - return checked; - } - - /* - * (non-Javadoc) - * - * @see fr.cnes.analysis.tools.ui.view.violation.treeviewer. - * IUpdatableAnalysisFilter#update(java.lang.String, boolean, boolean, - * boolean) - */ - @Override - public void update(final String pSearchString, final boolean pShowInfo, - final boolean pShowWarning, final boolean pShowError) { - final String method = "update"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pSearchString, Boolean.valueOf(pShowInfo), Boolean.valueOf(pShowWarning), - Boolean.valueOf(pShowError) - }); - this.searchString = pSearchString; - this.showError = pShowError; - this.showWarning = pShowWarning; - this.showInfo = pShowInfo; - filteringRule = false; - filteringFile = false; - ICodeLogger.exiting(CLASS, method); - - } - -} \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/package-info.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/package-info.java deleted file mode 100755 index eba3146e..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/view/violation/treeviewer/rule/filter/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -/** - * - */ -package fr.cnes.analysis.tools.ui.view.violation.treeviewer.rule.filter; \ No newline at end of file diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizard.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizard.java deleted file mode 100755 index 9a56d5be..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizard.java +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.wizard.export; - -import fr.cnes.icode.logger.ICodeLogger; -import fr.cnes.icode.services.export.ExportService; -import org.eclipse.core.resources.IFile; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.IExportWizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.dialogs.WizardNewFileCreationPage; - -/** - * This Wizard contains and handle the different Wizard Page to export analysis - * data of the Violations view. When {@link #performFinish()} is called, the - * {@link CheckerFileCreationExportWizardPage} export the result in the format - * chosen by the user. - * - *

- * Available formats are defined by the - * {@link fr.cnes.analysis.tools.export.ExportService} service using - * {@link ExportService#getAvailableFormats()}. - *

- * - *

- * To add a new format to export, it's necessary to contribute to the - * {@link ExportService} service. - *

- * - * @version 3.0 - * @since 2.0 - */ -public class CheckerExportWizard extends Wizard implements IExportWizard, INewWizard { - - /** - * Class name - */ - private static final String CLASS = CheckerExportWizard.class.getName(); - /** - * The main page containing the radio to choose the export's format. - */ - private CheckerExportWizardPage mainPage; - /** - * The class that will be used to export the file - **/ - private CheckerFileCreationExportWizardPage fileCreationPage; - /** - * The selection of elements to build the NewFileWizardPage classes - */ - private IStructuredSelection selection; - /** - * Exporter service - */ - private ExportService exporter; - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, - * org.eclipse.jface.viewers.IStructuredSelection) - */ - @Override - public void init(IWorkbench pWorkbench, IStructuredSelection pSelection) { - final String method = "init"; - ICodeLogger.entering(CLASS, method, new Object[]{ - pWorkbench, pSelection - }); - this.selection = pSelection; - this.exporter = new ExportService(); - /* - * We force previous and next buttons as we don't use the default order - * of page selection that is the one in which each page were added and - * also because we willn't use all pages that we've added to the Wizard. - */ - this.setForcePreviousAndNextButtons(true); - - ICodeLogger.exiting(CLASS, method); - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.wizard.Wizard#performFinish() - */ - @Override - public boolean performFinish() { - final String method = "performFinish"; - ICodeLogger.entering(CLASS, method); - final IFile file = ((WizardNewFileCreationPage) this.getContainer().getCurrentPage()) - .createNewFile(); - final boolean performFinish = (file != null); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(performFinish)); - return performFinish; - - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.wizard.Wizard#addPages() - */ - @Override - public void addPages() { - final String method = "addPages"; - ICodeLogger.entering(CLASS, method); - mainPage = new CheckerExportWizardPage(selection, exporter); - if (exporter.getAvailableFormats().size() > 0) { - fileCreationPage = new CheckerFileCreationExportWizardPage(selection, "unknown"); - } - this.addPage(mainPage); - this.addPage(fileCreationPage); - ICodeLogger.exiting(CLASS, method); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.wizard.Wizard#canFinish() - */ - @Override - public boolean canFinish() { - final String method = "canFinish"; - ICodeLogger.entering(CLASS, method); - final boolean canFinish = this.getContainer().getCurrentPage().isPageComplete(); - ICodeLogger.exiting(CLASS, method, Boolean.valueOf(canFinish)); - return canFinish; - } - -} diff --git a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizardPage.java b/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizardPage.java deleted file mode 100755 index 3eab183e..00000000 --- a/icode-ide/fr.cnes.analysis.tools.ui/src/fr/cnes/analysis/tools/ui/wizard/export/CheckerExportWizardPage.java +++ /dev/null @@ -1,254 +0,0 @@ -/************************************************************************************************/ -/* i-Code CNES is a static code analyzer. */ -/* This software is a free software, under the terms of the Eclipse Public License version 1.0. */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/************************************************************************************************/ -package fr.cnes.analysis.tools.ui.wizard.export; - -import fr.cnes.icode.logger.ICodeLogger; -import fr.cnes.icode.services.export.ExportService; -import fr.cnes.icode.services.export.exception.NoContributorMatchingException; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.IWizardPage; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; - -import java.util.*; -import java.util.Map.Entry; - -/** - * This class is the main page of the {@link CheckerExportWizard}. It's - * responsible of suggesting available formats for export to the user using - * {@link ExportService#getAvailableFormats()} and indicating the chosen format to the - * next page {@link CheckerFileCreationExportWizardPage}. - * - * @version 3.0 - * @since 2.0 - */ -public class CheckerExportWizardPage extends WizardPage { - - /** - * Class name - */ - private static final String CLASS = CheckerExportWizard.class.getName(); - - /** - * Exporter service in charge of the analysis - */ - private ExportService exporter; - - /** - * Buttons list of all buttons offering available format for exportation. - */ - private List