From c4f796f006242a2cb6d9422367d7d6c46fcf9b2d Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 15 Nov 2023 16:28:49 -0500 Subject: [PATCH 01/43] Fix NPE in QuickAssistProcessorUtil (#926) * Fix NPE in QuickAssistProcessorUtil - fixes #917 - fix API errors in JDT UI build --- .../internal/ui/text/correction/QuickAssistProcessorUtil.java | 4 ++-- org.eclipse.jdt.ui/build.properties | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessorUtil.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessorUtil.java index 93b2dc573cd..4eadabc5f7e 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessorUtil.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessorUtil.java @@ -532,7 +532,7 @@ public static boolean isDeprecatedMethodCallWithReplacement(ASTNode node) { } List tags= javadoc.tags(); for (TagElement tag : tags) { - if (tag.getTagName().equals("@deprecated")) { //$NON-NLS-1$ + if ("@deprecated".equals(tag.getTagName())) { //$NON-NLS-1$ List fragments= tag.fragments(); if (fragments.size() < 2) { return false; @@ -541,7 +541,7 @@ public static boolean isDeprecatedMethodCallWithReplacement(ASTNode node) { String text= textElement.getText().toLowerCase().trim(); if (text.endsWith("use") || text.endsWith("replace by")) { //$NON-NLS-1$ //$NON-NLS-2$ if (fragments.get(1) instanceof TagElement tagElement) { - if (tagElement.getTagName().equals("@link")) { //$NON-NLS-1$ + if ("@link".equals(tagElement.getTagName())) { //$NON-NLS-1$ List linkFragments= tagElement.fragments(); if (linkFragments.size() == 1) { IDocElement linkFragment= linkFragments.get(0); diff --git a/org.eclipse.jdt.ui/build.properties b/org.eclipse.jdt.ui/build.properties index 00a48f3a872..847ef61bd5b 100644 --- a/org.eclipse.jdt.ui/build.properties +++ b/org.eclipse.jdt.ui/build.properties @@ -39,3 +39,4 @@ src.excludes = jar in jar loader/ jars.compile.order = . customBuildCallbacks = customBuildCallbacks.xml javacWarnings..=-unavoidableGenericProblems +output.. = bin/ From 0f81d5d408953eeafd981a9f222ee50d65a73134 Mon Sep 17 00:00:00 2001 From: Noopur Gupta Date: Mon, 27 Nov 2023 10:51:23 +0530 Subject: [PATCH 02/43] Add release workflow --- .github/workflows/updateRelease.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/updateRelease.yml diff --git a/.github/workflows/updateRelease.yml b/.github/workflows/updateRelease.yml new file mode 100644 index 00000000000..986065d577a --- /dev/null +++ b/.github/workflows/updateRelease.yml @@ -0,0 +1,12 @@ +name: Update to next release +on: + milestone: + types: [created] + +jobs: + update: + if: contains(github.event.milestone.description, ‘Release’) + permissions: + pull-requests: write + contents: write + uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/updateRelease.yml@master \ No newline at end of file From 3c9ac092cf2a8e5f94e69955959b2f22528f0db0 Mon Sep 17 00:00:00 2001 From: Noopur Gupta Date: Mon, 27 Nov 2023 11:01:07 +0530 Subject: [PATCH 03/43] Add release workflow - fix quotes --- .github/workflows/updateRelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/updateRelease.yml b/.github/workflows/updateRelease.yml index 986065d577a..05564f48ec6 100644 --- a/.github/workflows/updateRelease.yml +++ b/.github/workflows/updateRelease.yml @@ -5,7 +5,7 @@ on: jobs: update: - if: contains(github.event.milestone.description, ‘Release’) + if: contains(github.event.milestone.description, 'Release') permissions: pull-requests: write contents: write From f86d5a9bbfd405ff0163534de7383ea0bf9aa9c2 Mon Sep 17 00:00:00 2001 From: noopur2507 Date: Mon, 27 Nov 2023 05:39:22 +0000 Subject: [PATCH 04/43] Update for release 4.31 --- org.eclipse.jdt.astview.feature/pom.xml | 2 +- org.eclipse.jdt.astview/pom.xml | 2 +- org.eclipse.jdt.bcoview.feature/pom.xml | 2 +- org.eclipse.jdt.bcoview/pom.xml | 2 +- org.eclipse.jdt.core.manipulation/pom.xml | 2 +- org.eclipse.jdt.jeview.feature/pom.xml | 2 +- org.eclipse.jdt.jeview/pom.xml | 2 +- org.eclipse.jdt.junit.core/pom.xml | 2 +- org.eclipse.jdt.junit.runtime/pom.xml | 2 +- org.eclipse.jdt.junit/pom.xml | 2 +- org.eclipse.jdt.junit4.runtime/pom.xml | 2 +- org.eclipse.jdt.junit5.runtime/pom.xml | 2 +- org.eclipse.jdt.text.tests/pom.xml | 2 +- org.eclipse.jdt.ui.examples.projects/pom.xml | 2 +- org.eclipse.jdt.ui.junit.sampleproject/pom.xml | 2 +- org.eclipse.jdt.ui.tests.refactoring/pom.xml | 2 +- org.eclipse.jdt.ui.tests/pom.xml | 2 +- org.eclipse.jdt.ui.unittest.junit.feature/pom.xml | 2 +- org.eclipse.jdt.ui.unittest.junit/pom.xml | 2 +- org.eclipse.jdt.ui/pom.xml | 2 +- pom.xml | 2 +- tests-pom/pom.xml | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/org.eclipse.jdt.astview.feature/pom.xml b/org.eclipse.jdt.astview.feature/pom.xml index cd34e85fc0b..7884cd36ed3 100644 --- a/org.eclipse.jdt.astview.feature/pom.xml +++ b/org.eclipse.jdt.astview.feature/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt.feature org.eclipse.jdt.astview.feature diff --git a/org.eclipse.jdt.astview/pom.xml b/org.eclipse.jdt.astview/pom.xml index 69e9d471b58..888c3525315 100644 --- a/org.eclipse.jdt.astview/pom.xml +++ b/org.eclipse.jdt.astview/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.astview diff --git a/org.eclipse.jdt.bcoview.feature/pom.xml b/org.eclipse.jdt.bcoview.feature/pom.xml index ffcc697c57b..96270d5831d 100644 --- a/org.eclipse.jdt.bcoview.feature/pom.xml +++ b/org.eclipse.jdt.bcoview.feature/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt.feature org.eclipse.jdt.bcoview.feature diff --git a/org.eclipse.jdt.bcoview/pom.xml b/org.eclipse.jdt.bcoview/pom.xml index aff47a74d54..db3ad3909dc 100644 --- a/org.eclipse.jdt.bcoview/pom.xml +++ b/org.eclipse.jdt.bcoview/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.bcoview diff --git a/org.eclipse.jdt.core.manipulation/pom.xml b/org.eclipse.jdt.core.manipulation/pom.xml index b6b03ade510..7f9f91a703a 100644 --- a/org.eclipse.jdt.core.manipulation/pom.xml +++ b/org.eclipse.jdt.core.manipulation/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.core.manipulation diff --git a/org.eclipse.jdt.jeview.feature/pom.xml b/org.eclipse.jdt.jeview.feature/pom.xml index 98ac4d9a238..9813abdfdf1 100644 --- a/org.eclipse.jdt.jeview.feature/pom.xml +++ b/org.eclipse.jdt.jeview.feature/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt.feature org.eclipse.jdt.jeview.feature diff --git a/org.eclipse.jdt.jeview/pom.xml b/org.eclipse.jdt.jeview/pom.xml index 6d1e37c0d84..b5c7a1cd044 100644 --- a/org.eclipse.jdt.jeview/pom.xml +++ b/org.eclipse.jdt.jeview/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.jeview diff --git a/org.eclipse.jdt.junit.core/pom.xml b/org.eclipse.jdt.junit.core/pom.xml index 832d9dec33b..ff1ba416055 100644 --- a/org.eclipse.jdt.junit.core/pom.xml +++ b/org.eclipse.jdt.junit.core/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.junit.core diff --git a/org.eclipse.jdt.junit.runtime/pom.xml b/org.eclipse.jdt.junit.runtime/pom.xml index d37cead8b16..afa6824430f 100644 --- a/org.eclipse.jdt.junit.runtime/pom.xml +++ b/org.eclipse.jdt.junit.runtime/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.junit.runtime diff --git a/org.eclipse.jdt.junit/pom.xml b/org.eclipse.jdt.junit/pom.xml index 8912def13ac..eecb0a028a5 100644 --- a/org.eclipse.jdt.junit/pom.xml +++ b/org.eclipse.jdt.junit/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.junit diff --git a/org.eclipse.jdt.junit4.runtime/pom.xml b/org.eclipse.jdt.junit4.runtime/pom.xml index 2aea22ec6c8..f55a4171e68 100644 --- a/org.eclipse.jdt.junit4.runtime/pom.xml +++ b/org.eclipse.jdt.junit4.runtime/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.junit4.runtime diff --git a/org.eclipse.jdt.junit5.runtime/pom.xml b/org.eclipse.jdt.junit5.runtime/pom.xml index eee729c8323..fa755b1582f 100644 --- a/org.eclipse.jdt.junit5.runtime/pom.xml +++ b/org.eclipse.jdt.junit5.runtime/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.junit5.runtime diff --git a/org.eclipse.jdt.text.tests/pom.xml b/org.eclipse.jdt.text.tests/pom.xml index 1b3cc14f0cd..bda257a6f47 100644 --- a/org.eclipse.jdt.text.tests/pom.xml +++ b/org.eclipse.jdt.text.tests/pom.xml @@ -15,7 +15,7 @@ tests-pom eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT ../tests-pom/ org.eclipse.jdt diff --git a/org.eclipse.jdt.ui.examples.projects/pom.xml b/org.eclipse.jdt.ui.examples.projects/pom.xml index 3e267e137c8..bd07b6e36e9 100644 --- a/org.eclipse.jdt.ui.examples.projects/pom.xml +++ b/org.eclipse.jdt.ui.examples.projects/pom.xml @@ -11,7 +11,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.ui.examples.projects diff --git a/org.eclipse.jdt.ui.junit.sampleproject/pom.xml b/org.eclipse.jdt.ui.junit.sampleproject/pom.xml index 8e58c6e8768..0bc6906e00d 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/pom.xml +++ b/org.eclipse.jdt.ui.junit.sampleproject/pom.xml @@ -19,7 +19,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt.ui org.eclipse.jdt.ui.junit.sampleproject diff --git a/org.eclipse.jdt.ui.tests.refactoring/pom.xml b/org.eclipse.jdt.ui.tests.refactoring/pom.xml index a722cd0860b..6bf602b3a9e 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/pom.xml +++ b/org.eclipse.jdt.ui.tests.refactoring/pom.xml @@ -14,7 +14,7 @@ tests-pom eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT ../tests-pom/ org.eclipse.jdt diff --git a/org.eclipse.jdt.ui.tests/pom.xml b/org.eclipse.jdt.ui.tests/pom.xml index 6985fd84544..8c1ac10f5d0 100644 --- a/org.eclipse.jdt.ui.tests/pom.xml +++ b/org.eclipse.jdt.ui.tests/pom.xml @@ -15,7 +15,7 @@ tests-pom eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT ../tests-pom/ org.eclipse.jdt diff --git a/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml b/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml index 746f498df0b..7111ba0809d 100644 --- a/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml +++ b/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml @@ -16,7 +16,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt.feature org.eclipse.jdt.ui.unittest.junit.feature diff --git a/org.eclipse.jdt.ui.unittest.junit/pom.xml b/org.eclipse.jdt.ui.unittest.junit/pom.xml index ade94227d6c..5aa2d663104 100644 --- a/org.eclipse.jdt.ui.unittest.junit/pom.xml +++ b/org.eclipse.jdt.ui.unittest.junit/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.ui.unittest.junit diff --git a/org.eclipse.jdt.ui/pom.xml b/org.eclipse.jdt.ui/pom.xml index 150b3170e36..1d302237ffb 100644 --- a/org.eclipse.jdt.ui/pom.xml +++ b/org.eclipse.jdt.ui/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT org.eclipse.jdt org.eclipse.jdt.ui diff --git a/pom.xml b/pom.xml index e8d171b022c..8c1cca029f2 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ org.eclipse eclipse-platform-parent - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT ../eclipse-platform-parent diff --git a/tests-pom/pom.xml b/tests-pom/pom.xml index 1adb565925d..3c33d520a40 100644 --- a/tests-pom/pom.xml +++ b/tests-pom/pom.xml @@ -14,7 +14,7 @@ eclipse.jdt.ui eclipse.jdt.ui - 4.30.0-SNAPSHOT + 4.31.0-SNAPSHOT tests-pom pom From 4c3694f80cfb6442fbe22aef6d6ddb7a386f152c Mon Sep 17 00:00:00 2001 From: Rahul Mohanan Date: Tue, 28 Nov 2023 08:32:33 +0530 Subject: [PATCH 05/43] Comparator errors in I20231127-0750 tracked in https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1557 --- org.eclipse.jdt.ui/forceQualifierUpdate.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.ui/forceQualifierUpdate.txt b/org.eclipse.jdt.ui/forceQualifierUpdate.txt index 390bad6521f..b7a65bf57f1 100644 --- a/org.eclipse.jdt.ui/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.ui/forceQualifierUpdate.txt @@ -16,4 +16,5 @@ Comparator errors in I20220902-1100 Comparator errors in I20230307-0840 Comparator errors in I20230607-0720 Bug 527899 [9] Implement JEP 280: Indify String Concatenation -Comparator errors in I20230906-0400 \ No newline at end of file +Comparator errors in I20230906-0400 +Comparator errors in I20231127-0750 \ No newline at end of file From bdd3fa6f26a6e53c8b9108552b2568306e1f562c Mon Sep 17 00:00:00 2001 From: Rahul Mohanan <121536011+MohananRahul@users.noreply.github.com> Date: Tue, 28 Nov 2023 19:08:10 +0530 Subject: [PATCH 06/43] Version Bump for 4.31 (#943) --- org.eclipse.jdt.ui/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.ui/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF index 48b7a70de6d..0e86b6b9710 100644 --- a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.ui; singleton:=true -Bundle-Version: 3.31.0.qualifier +Bundle-Version: 3.31.100.qualifier Bundle-Activator: org.eclipse.jdt.internal.ui.JavaPlugin Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName diff --git a/org.eclipse.jdt.ui/pom.xml b/org.eclipse.jdt.ui/pom.xml index 1d302237ffb..4617a34aa4c 100644 --- a/org.eclipse.jdt.ui/pom.xml +++ b/org.eclipse.jdt.ui/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.ui - 3.31.0-SNAPSHOT + 3.31.100-SNAPSHOT eclipse-plugin -warn:-deprecation,unavoidableGenericProblems From 440dc9da1d409466a53f172508c82784208bbb1f Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Mon, 13 Nov 2023 10:12:35 -0500 Subject: [PATCH 07/43] Move refactoring contribution extensions to jdt.core.manipulation - Also version bump jdt.core.manipulation Signed-off-by: Rob Stryker --- .../META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.core.manipulation/plugin.xml | 119 ++++++++++++++++- org.eclipse.jdt.core.manipulation/pom.xml | 2 +- org.eclipse.jdt.ui/plugin.xml | 122 ------------------ 4 files changed, 120 insertions(+), 125 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF index 28b748354b2..9bf99e75912 100644 --- a/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.core.manipulation Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.core.manipulation; singleton:=true -Bundle-Version: 1.20.0.qualifier +Bundle-Version: 1.21.0.qualifier Bundle-Vendor: %providerName Bundle-Activator: org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin Bundle-Localization: plugin diff --git a/org.eclipse.jdt.core.manipulation/plugin.xml b/org.eclipse.jdt.core.manipulation/plugin.xml index 91b63467369..048b9f8425b 100644 --- a/org.eclipse.jdt.core.manipulation/plugin.xml +++ b/org.eclipse.jdt.core.manipulation/plugin.xml @@ -31,6 +31,123 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jdt.core.manipulation/pom.xml b/org.eclipse.jdt.core.manipulation/pom.xml index 7f9f91a703a..fd6de9b548e 100644 --- a/org.eclipse.jdt.core.manipulation/pom.xml +++ b/org.eclipse.jdt.core.manipulation/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt org.eclipse.jdt.core.manipulation - 1.20.0-SNAPSHOT + 1.21.0-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.ui/plugin.xml b/org.eclipse.jdt.ui/plugin.xml index 1920e079585..a7d1c0dd402 100644 --- a/org.eclipse.jdt.ui/plugin.xml +++ b/org.eclipse.jdt.ui/plugin.xml @@ -5877,128 +5877,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: Tue, 28 Nov 2023 22:02:57 +0100 Subject: [PATCH 08/43] Fix JavaSource hover not displayed from ClassFileEditor. Fixes #936 (#937) * Fix JavaSource hover not displayed from ClassFileEditor. Fixes #936 * Bump up JDT UI --------- Co-authored-by: Jeff Johnston --- .../javaeditor/SemanticHighlightingReconciler.java | 12 +++++++++++- .../java/hover/SourceViewerInformationControl.java | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java index 5e13fefc7e3..526981ab1a0 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java @@ -541,7 +541,9 @@ public void install(JavaEditor editor, ISourceViewer sourceViewer, SemanticHighl ((CompilationUnitEditor)fEditor).addReconcileListener(this); } } else if (fEditor != null) { - fSourceViewer.addTextInputListener(this); + if (registerAsSourceViewerTextInputListener()) { + fSourceViewer.addTextInputListener(this); + } scheduleJob(); } } @@ -554,6 +556,14 @@ protected boolean registerAsEditorReconcilingListener() { return true; } + /** + * Decides if this reconciler should also register itself as a text input listener on the source viewer as part of {@link #install} process. + * @return whether this instance should register itself as a text input listener on the source viewer + */ + protected boolean registerAsSourceViewerTextInputListener() { + return true; + } + /** * Uninstall this reconciler from the editor */ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java index 98ce7f56e2f..9f407513eea 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java @@ -726,13 +726,18 @@ protected SemanticHighlightingReconciler createSemanticHighlightingReconciler() @Override protected ITypeRoot getElement() { - return fInput.fRootElement; + return fInput == null ? null : fInput.fRootElement; } @Override protected boolean registerAsEditorReconcilingListener() { return false; } + + @Override + protected boolean registerAsSourceViewerTextInputListener() { + return false; + } }; } From f61311dd3405a5950c61ede8b7d21c16682afc1b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 28 Nov 2023 16:27:16 -0500 Subject: [PATCH 09/43] Enable StringBuffer to Text Block quick assist (#934) * Enable StringBuffer to Text Block quick assist - fix logic in QuickAssistProcessor.getStringConcatToTextBlockProposal() to also support StringBuffer or StringBuilder variable declaration that can be converted to Text Block - add new test to AssistQuickFixTest15 - fixes #882 * Bump up JDT UI tests --- org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.ui.tests/pom.xml | 2 +- .../tests/quickfix/AssistQuickFixTest15.java | 56 +++++++++++++++++++ .../text/correction/QuickAssistProcessor.java | 8 +++ 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF index a0ac773cf5f..029b52d3035 100644 --- a/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui.tests Bundle-ManifestVersion: 2 Bundle-Name: %Plugin.name Bundle-SymbolicName: org.eclipse.jdt.ui.tests; singleton:=true -Bundle-Version: 3.15.200.qualifier +Bundle-Version: 3.15.300.qualifier Bundle-Activator: org.eclipse.jdt.testplugin.JavaTestPlugin Bundle-Vendor: %Plugin.providerName Bundle-Localization: plugin diff --git a/org.eclipse.jdt.ui.tests/pom.xml b/org.eclipse.jdt.ui.tests/pom.xml index 8c1ac10f5d0..256bf2b3baa 100644 --- a/org.eclipse.jdt.ui.tests/pom.xml +++ b/org.eclipse.jdt.ui.tests/pom.xml @@ -20,7 +20,7 @@ org.eclipse.jdt org.eclipse.jdt.ui.tests - 3.15.200-SNAPSHOT + 3.15.300-SNAPSHOT eclipse-test-plugin true diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest15.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest15.java index 33445bb0805..7857546d3a4 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest15.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest15.java @@ -429,6 +429,62 @@ public void testConcatToTextBlock7() throws Exception { assertExpectedExistInProposals(proposals, new String[] { expected }); } + @Test + public void testConcatToTextBlock8() throws Exception { + fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); + fJProject1.setRawClasspath(projectSetup.getDefaultClasspath(), null); + JavaProjectHelper.set15CompilerOptions(fJProject1, false); + fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src"); + + StringBuilder buf= new StringBuilder(); + buf.append("module test {\n"); + buf.append("}\n"); + IPackageFragment def= fSourceFolder.createPackageFragment("", false, null); + def.createCompilationUnit("module-info.java", buf.toString(), false, null); + + IPackageFragment pack= fSourceFolder.createPackageFragment("test", false, null); + buf= new StringBuilder(); + buf.append("package test;\n"); + buf.append("public class Cls {\n"); + buf.append(" public void foo() {\n"); + buf.append(" StringBuilder buf3= new StringBuilder();\n"); + buf.append(" buf3.append(\"public void foo() {\\n\"); //$NON-NLS-1$\n"); + buf.append(" buf3.append(\" return null;\\n\"); //$NON-NLS-1$\n"); + buf.append(" buf3.append(\"}\\n\"); //$NON-NLS-1$\n"); + buf.append(" buf3.append(\"\\n\"); //$NON-NLS-1$\n"); + buf.append(" // comment 1\n"); + buf.append(" String k = buf3.toString();\n"); + buf.append(" \n"); + buf.append(" }\n"); + buf.append("}\n"); + ICompilationUnit cu= pack.createCompilationUnit("Cls.java", buf.toString(), false, null); + + int index= buf.indexOf("StringBuilder"); + IInvocationContext ctx= getCorrectionContext(cu, index, 4); + assertNoErrors(ctx); + ArrayList proposals= collectAssists(ctx, false); + + buf= new StringBuilder(); + buf.append("package test;\n"); + buf.append("public class Cls {\n"); + buf.append(" public void foo() {\n"); + buf.append(" String str = \"\"\"\n"); + buf.append(" \tpublic void foo() {\n"); + buf.append(" \t return null;\n"); + buf.append(" \t}\n"); + buf.append(" \t\n"); + buf.append(" \t\"\"\"; //$NON-NLS-1$\n"); + buf.append(" // comment 1\n"); + buf.append(" String k = str;\n"); + buf.append(" \n"); + buf.append(" }\n"); + buf.append("}\n"); + String expected= buf.toString(); + + assertProposalExists(proposals, FixMessages.StringConcatToTextBlockFix_convert_msg); + assertExpectedExistInProposals(proposals, new String[] { expected }); + } + @Test public void testNoConcatToTextBlock1() throws Exception { fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin"); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java index 7627b93b8bb..f5008d03ea0 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java @@ -3832,6 +3832,7 @@ private static boolean getStringConcatToTextBlockProposal(IInvocationContext con if (node instanceof Assignment || node instanceof VariableDeclarationFragment || node instanceof FieldDeclaration + || node instanceof VariableDeclarationStatement || node instanceof InfixExpression) { exp= node; } else { @@ -3839,10 +3840,16 @@ private static boolean getStringConcatToTextBlockProposal(IInvocationContext con if (parent instanceof Assignment || parent instanceof VariableDeclarationFragment || parent instanceof FieldDeclaration + || parent instanceof VariableDeclarationStatement || parent instanceof InfixExpression) { exp= parent; } } + + if (exp == null) { + exp= ASTNodes.getFirstAncestorOrNull(node, FieldDeclaration.class, VariableDeclarationStatement.class); + } + if (exp == null) return false; @@ -3856,6 +3863,7 @@ private static boolean getStringConcatToTextBlockProposal(IInvocationContext con Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); Map options= new HashMap<>(); options.put(CleanUpConstants.STRINGCONCAT_TO_TEXTBLOCK, CleanUpOptions.TRUE); + options.put(CleanUpConstants.STRINGCONCAT_STRINGBUFFER_STRINGBUILDER, CleanUpOptions.TRUE); ICleanUp cleanUp= new StringConcatToTextBlockCleanUp(options); FixCorrectionProposal proposal= new FixCorrectionProposal(fix, cleanUp, IProposalRelevance.CONVERT_TO_TEXT_BLOCK, image, context); resultingCollections.add(proposal); From e76bc7c9fb7a38ee222893cc15a9d37d01ee3f6e Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 28 Nov 2023 17:22:06 -0500 Subject: [PATCH 10/43] Fix Externalize Strings when input is a Text Block (#918) * Fix Externalize Strings when input is a Text Block - fixes: #906 - fix NLSHint.stripQuotes() to recognize a text block - add new NLSHintStripQuotesTest class * Add additional tests to NLSHintStripQuotesTest * Bump up o.e.jdt.ui.tests.refactoring --- .../corext/refactoring/nls/NLSHint.java | 275 +++++++++++++++++- .../META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.ui.tests.refactoring/pom.xml | 2 +- .../nls/NLSHintStripQuotesTest.java | 112 +++++++ .../tests/refactoring/nls/NLSTestSuite.java | 3 +- 5 files changed, 386 insertions(+), 8 deletions(-) create mode 100644 org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSHintStripQuotesTest.java diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHint.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHint.java index 392a5ac56e1..d60f27fa92d 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHint.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHint.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -40,6 +40,7 @@ import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; +import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.CompilationUnit; @@ -48,6 +49,8 @@ import org.eclipse.jdt.core.dom.SimpleName; import org.eclipse.jdt.core.manipulation.SharedASTProviderCore; +import org.eclipse.jdt.internal.corext.util.JavaModelUtil; + /** * calculates hints for the nls-refactoring out of a compilation unit. @@ -215,9 +218,9 @@ private NLSSubstitution[] createSubstitutions(NLSLine[] lines, Properties props, AccessorClassReference accessorClassReference= NLSHintHelper.getAccessorClassReference(astRoot, nlsElement); if (accessorClassReference == null) { // no accessor class => not translated - result.add(new NLSSubstitution(NLSSubstitution.IGNORED, stripQuotes(nlsElement.getValue()), nlsElement)); + result.add(new NLSSubstitution(NLSSubstitution.IGNORED, stripQuotes(nlsElement.getValue(), fAccessorPackage.getJavaProject()), nlsElement)); } else { - String key= stripQuotes(nlsElement.getValue()); + String key= stripQuotes(nlsElement.getValue(), fAccessorPackage.getJavaProject()); String value= props.getProperty(key); result.add(new NLSSubstitution(NLSSubstitution.EXTERNALIZED, key, value, nlsElement, accessorClassReference)); } @@ -225,7 +228,7 @@ private NLSSubstitution[] createSubstitutions(NLSLine[] lines, Properties props, String key= nlsElement.getValue(); result.add(new NLSSubstitution(NLSSubstitution.EXTERNALIZED, key, props.getProperty(key), nlsElement, nlsElement.getAccessorClassReference())); } else { - result.add(new NLSSubstitution(NLSSubstitution.INTERNALIZED, stripQuotes(nlsElement.getValue()), nlsElement)); + result.add(new NLSSubstitution(NLSSubstitution.INTERNALIZED, stripQuotes(nlsElement.getValue(), fAccessorPackage.getJavaProject()), nlsElement)); } } } @@ -257,7 +260,12 @@ private static AccessorClassReference findFirstAccessorReference(NLSLine[] lines return null; } - private static String stripQuotes(String str) { + public static String stripQuotes(String str, IJavaProject project) { + if (JavaModelUtil.is15OrHigher(project)) { + if (str.startsWith("\"\"\"") && str.endsWith("\"\"\"")) { //$NON-NLS-1$ //$NON-NLS-2$ + return getTextBlock(str.substring(3, str.length() - 3)); + } + } return str.substring(1, str.length() - 1); } @@ -294,5 +302,262 @@ public NLSSubstitution[] getSubstitutions() { return fSubstitutions; } + private static char[] normalize(char[] content) { + StringBuilder result = new StringBuilder(); + boolean isCR = false; + for (char c : content) { + switch (c) { + case '\r': + result.append(c); + isCR = true; + break; + case '\n': + if (!isCR) { + result.append(c); + } + isCR = false; + break; + default: + result.append(c); + isCR = false; + break; + } + } + return result.toString().toCharArray(); + } + + private static String getTextBlock(String x) { + // 1. Normalize line endings + char[] all = normalize(x.toCharArray()); + // 2. Split into lines. Consider both \n and \r as line separators + char[][] lines = CharOperation.splitOn('\n', all); + int size = lines.length; + List list = new ArrayList<>(lines.length); + for(int i = 1; i < lines.length; i++) { + char[] line = lines[i]; + if (i + 1 == size && line.length == 0) { + list.add(line); + break; + } + char[][] sub = CharOperation.splitOn('\r', line); + if (sub.length == 0) { + list.add(line); + } else { + for (char[] cs : sub) { + list.add(cs); + } + } + } + size = list.size(); + lines = list.toArray(new char[size][]); + + // 3. Handle incidental white space + // 3.1. Split into lines and identify determining lines + int prefix = -1; + for(int i = 0; i < size; i++) { + char[] line = lines[i]; + boolean blank = true; + int whitespaces = 0; + for (char c : line) { + if (blank) { + if (Character.isWhitespace(c)) { + whitespaces++; + } else { + blank = false; + } + } + } + // The last line with closing delimiter is part of the + // determining line list even if empty + if (!blank || (i+1 == size)) { + if (prefix < 0 || whitespaces < prefix) { + prefix = whitespaces; + } + } + } + // 3.2. Remove the common white space prefix + // 4. Handle escape sequences that are not already done in getNextToken0() + if (prefix == -1) + prefix = 0; + StringBuilder result = new StringBuilder(); + boolean newLine = false; + for(int i = 0; i < lines.length; i++) { + char[] l = lines[i]; + // Remove the common prefix from each line + // And remove all trailing whitespace + // Finally append the \n at the end of the line (except the last line) + int length = l.length; + int trail = length; + for(;trail > 0;) { + if (!Character.isWhitespace(l[trail-1])) { + break; + } + trail--; + } + if (i >= (size -1)) { + if (newLine) result.append('\n'); + if (trail < prefix) + continue; + newLine = getLineContent(result, l, prefix, trail-1, false, true); + } else { + if (i > 0 && newLine) + result.append('\n'); + if (trail <= prefix) { + newLine = true; + } else { + boolean merge = length > 0 && l[length - 1] == '\\'; + newLine = getLineContent(result, l, prefix, trail-1, merge, false); + } + } + } + return result.toString(); + + } + // This method is for handling the left over escaped characters during the first + // scanning (scanForStringLiteral). Admittedly this goes over the text block + // content again char by char, but this is required in order to correctly + // treat all the white space and line endings + private static boolean getLineContent(StringBuilder result, char[] line, int start, int end, boolean merge, boolean lastLine) { + int lastPointer = 0; + for(int i = start; i < end;) { + char c = line[i]; + if (c != '\\') { + i++; + continue; + } + if (i < end) { + if (lastPointer + 1 <= i) { + result.append(CharOperation.subarray(line, lastPointer == 0 ? start : lastPointer, i)); + } + char next = line[++i]; + switch (next) { + case '\\' : + result.append('\\'); + if (i == end) + merge = false; + break; + case 's' : + result.append(' '); + break; + case '"': + result.append('"'); + break; + case 'b' : + result.append('\b'); + break; + case 'n' : + result.append('\n'); + break; + case 'r' : + result.append('\r'); + break; + case 't' : + result.append('\t'); + break; + case 'f' : + result.append('\f'); + break; + default : + // Direct copy from scanEscapeCharacter + int pos = i + 1; + int number = getHexadecimalValue(next); + if (number >= 0 && number <= 7) { + boolean zeroToThreeNot = number > 3; + if (Character.isDigit(next = line[pos])) { + pos++; + int digit = getHexadecimalValue(next); + if (digit >= 0 && digit <= 7) { + number = (number * 8) + digit; + if (Character.isDigit(next = line[pos])) { + pos++; + if (zeroToThreeNot) { + // has read \NotZeroToThree OctalDigit Digit --> ignore last character + } else { + digit = getHexadecimalValue(next); + if (digit >= 0 && digit <= 7){ // has read \ZeroToThree OctalDigit OctalDigit + number = (number * 8) + digit; + } else { + // has read \ZeroToThree OctalDigit NonOctalDigit --> ignore last character + } + } + } else { + // has read \OctalDigit NonDigit--> ignore last character + } + } else { + // has read \OctalDigit NonOctalDigit--> ignore last character + } + } else { + // has read \OctalDigit --> ignore last character + } + if (number < 255) { + next = (char) number; + } + result.append(next); + lastPointer = i = pos; + continue; + } else { + // Dealing with just '\' + result.append(c); + lastPointer = i; + continue; + } + } + lastPointer = ++i; + } + } + end = merge ? end : end >= line.length ? end : end + 1; + char[] chars = lastPointer == 0 ? + CharOperation.subarray(line, start, end) : + CharOperation.subarray(line, lastPointer, end); + // The below check is because CharOperation.subarray tend to return null when the + // boundaries produce a zero sized char[] + if (chars != null && chars.length > 0) + result.append(chars); + return (!merge && !lastLine); + } + private static int getHexadecimalValue(char c) { + switch(c) { + case '0' : + return 0; + case '1' : + return 1; + case '2' : + return 2; + case '3' : + return 3; + case '4' : + return 4; + case '5' : + return 5; + case '6' : + return 6; + case '7' : + return 7; + case '8' : + return 8; + case '9' : + return 9; + case 'A' : + case 'a' : + return 10; + case 'B' : + case 'b' : + return 11; + case 'C' : + case 'c' : + return 12; + case 'D' : + case 'd' : + return 13; + case 'E' : + case 'e' : + return 14; + case 'F' : + case 'f' : + return 15; + default: + return -1; + } + } } diff --git a/org.eclipse.jdt.ui.tests.refactoring/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.tests.refactoring/META-INF/MANIFEST.MF index 4103c12a24e..92dbd737ab5 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui.tests.refactoring/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui.tests.refactoring Bundle-ManifestVersion: 2 Bundle-Name: %Plugin.name Bundle-SymbolicName: org.eclipse.jdt.ui.tests.refactoring; singleton:=true -Bundle-Version: 3.15.200.qualifier +Bundle-Version: 3.15.300.qualifier Bundle-Activator: org.eclipse.jdt.ui.tests.refactoring.infra.RefactoringTestPlugin Bundle-ActivationPolicy: lazy Bundle-Vendor: %Plugin.providerName diff --git a/org.eclipse.jdt.ui.tests.refactoring/pom.xml b/org.eclipse.jdt.ui.tests.refactoring/pom.xml index 6bf602b3a9e..61d21d39aab 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/pom.xml +++ b/org.eclipse.jdt.ui.tests.refactoring/pom.xml @@ -19,7 +19,7 @@ org.eclipse.jdt org.eclipse.jdt.ui.tests.refactoring - 3.15.200-SNAPSHOT + 3.15.300-SNAPSHOT eclipse-test-plugin ${project.artifactId} diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSHintStripQuotesTest.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSHintStripQuotesTest.java new file mode 100644 index 00000000000..254d0c50c62 --- /dev/null +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSHintStripQuotesTest.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * Copyright (c) 2023 Red Hat Inc. and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat Inc. - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.ui.tests.refactoring.nls; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; + +import org.eclipse.jdt.testplugin.JavaProjectHelper; + +import org.eclipse.jdt.core.IJavaProject; + +import org.eclipse.jdt.internal.corext.refactoring.nls.NLSHint; + +import org.eclipse.jdt.ui.tests.core.rules.Java15ProjectTestSetup; +import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup; + +public class NLSHintStripQuotesTest { + + @Rule + public ProjectTestSetup pts= new ProjectTestSetup(); + + @Rule + public Java15ProjectTestSetup pts15= new Java15ProjectTestSetup(); + + private IJavaProject javaProject; + private IJavaProject javaProject15; + + + @Before + public void setUp() throws Exception { + javaProject= pts.getProject(); + javaProject15= pts15.getProject(); + } + + @After + public void tearDown() throws Exception { + JavaProjectHelper.clear(javaProject, pts.getDefaultClasspath()); + JavaProjectHelper.clear(javaProject15, pts15.getDefaultClasspath()); + } + + @Test + public void test01() throws Exception { + String x= "\"abc\n\""; + String y= NLSHint.stripQuotes(x, javaProject.getJavaProject()); + String expected= "abc\n"; + assertEquals(expected, y); + } + @Test + public void test02() throws Exception { + String x= "\"\"\"abc\n\"\"\""; + String y= NLSHint.stripQuotes(x, javaProject.getJavaProject()); + String expected= "\"\"abc\n\"\""; + assertEquals(expected, y); + } + @Test + public void test03() throws Exception { + String x="\"\"\"\nabc\ndef\n\"\"\""; + String y= NLSHint.stripQuotes(x, javaProject15.getJavaProject()); + String expected= "abc\ndef\n"; + assertEquals(expected, y); + } + @Test + public void test04() throws Exception { + String x="\"\"\" \nabc\\s\ndef\n\"\"\""; + String y= NLSHint.stripQuotes(x, javaProject15.getJavaProject()); + String expected= "abc \ndef\n"; + assertEquals(expected, y); + } + @Test + public void test05() throws Exception { + String x="\"\"\" \n abc\\s\n def\n \"\"\""; + String y= NLSHint.stripQuotes(x, javaProject15.getJavaProject()); + String expected= "abc \ndef\n"; + assertEquals(expected, y); + } + @Test + public void test06() throws Exception { + String x="\"\"\" \nabc \\s\ndef\n\"\"\""; + String y= NLSHint.stripQuotes(x, javaProject15.getJavaProject()); + String expected= "abc \ndef\n"; + assertEquals(expected, y); + } + @Test + public void test07() throws Exception { + String x="\"\"\" \nabc \\\ndef\n\"\"\""; + String y= NLSHint.stripQuotes(x, javaProject15.getJavaProject()); + String expected= "abc def\n"; + assertEquals(expected, y); + } + @Test + public void test08() throws Exception { + String x="\"\"\" \n abc\ndef\n\"\"\""; + String y= NLSHint.stripQuotes(x, javaProject15.getJavaProject()); + String expected= " abc\ndef\n"; + assertEquals(expected, y); + } +} diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSTestSuite.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSTestSuite.java index 6675ebbbe1f..8f70ff33b2d 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSTestSuite.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/nls/NLSTestSuite.java @@ -34,7 +34,8 @@ PropertyFileDocumentModellTest.class, SimpleLineReaderTest.class, NLSHolderTest.class, - NLSSubstitutionTest.class + NLSSubstitutionTest.class, + NLSHintStripQuotesTest.class, }) public class NLSTestSuite { } From df956193ab076f65199421c5e0ef651f3049d159 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 28 Nov 2023 18:40:59 -0500 Subject: [PATCH 11/43] Allow generate constructor using fields on class with no fields (#905) * Allow generate constructor using fields on class with no fields - add new constructor to SourceActionDialog to accept flag that allows empty tree and pass this on to super class - remove zero fields test in GenerateConstructorUsingFieldsAction - add new test to GenerateConstructorUsingFieldsTest --- .../GenerateConstructorUsingFieldsTest.java | 22 ++++++++++++++++++- org.eclipse.jdt.ui/META-INF/MANIFEST.MF | 1 + ...ConstructorUsingFieldsSelectionDialog.java | 4 ++-- .../ui/dialogs/SourceActionDialog.java | 11 +++++++--- ...nerateNewConstructorUsingFieldsAction.java | 11 ++-------- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java index 88f74a6e9e3..f53a8be5dbe 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -707,6 +707,26 @@ public void test15() throws Exception { "}\r\n" + "", unit.getSource()); } + @Test + public void test16() throws Exception { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=552556 + + ICompilationUnit a= fPackageP.createCompilationUnit("A.java", "package p;\r\n" + + "\r\n" + + "public class A {\r\n" + + "}", true, null); + IType typeA= a.getType("A"); + + runOperation(typeA, new IField[] {}, null, null, false, false, Modifier.PUBLIC); + + compareSource("package p;\r\n" + + "\r\n" + + "public class A {\r\n" + + "\r\n" + + " public A() {\r\n" + + " super();\r\n" + + " }\r\n" + + "}", a.getSource()); + } @Test public void insertAt1() throws Exception { diff --git a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF index 0e86b6b9710..f8419e5c56a 100644 --- a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF @@ -112,6 +112,7 @@ Require-Bundle: org.eclipse.jface.text;bundle-version="[3.20.0,4.0.0)", org.eclipse.ui;bundle-version="[3.117.0,4.0.0)", org.eclipse.ui.console;bundle-version="[3.4.0,4.0.0)", + org.eclipse.ui.workbench;bundle-version="[3.131.0, 4.0.0)", org.eclipse.ui.workbench.texteditor;bundle-version="[3.10.0,4.0.0)", org.eclipse.ui.ide;bundle-version="[3.15.0,4.0.0)", org.eclipse.ui.views;bundle-version="[3.3.100,4.0.0)", diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/GenerateConstructorUsingFieldsSelectionDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/GenerateConstructorUsingFieldsSelectionDialog.java index a2cd41eb43f..42c0b5abc0b 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/GenerateConstructorUsingFieldsSelectionDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/GenerateConstructorUsingFieldsSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -111,7 +111,7 @@ public void selectionChanged(SelectionChangedEvent event) { private static final int UP_INDEX= 0; public GenerateConstructorUsingFieldsSelectionDialog(Shell parent, ILabelProvider labelProvider, GenerateConstructorUsingFieldsContentProvider contentProvider, CompilationUnitEditor editor, IType type, IMethodBinding[] superConstructors) throws JavaModelException { - super(parent, labelProvider, contentProvider, editor, type, true); + super(parent, labelProvider, contentProvider, editor, type, true, true); fTreeViewerAdapter= new GenerateConstructorUsingFieldsTreeViewerAdapter(); fSuperConstructors= superConstructors; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java index 2d75ab31fcb..3556d977fd7 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -131,9 +131,14 @@ public class SourceActionDialog extends CheckedTreeSelectionDialog { private boolean fHasUserChangedPositionIndex; private List fAllowedVisibilities; + public SourceActionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, CompilationUnitEditor editor, + IType type, boolean isConstructor) throws JavaModelException { + this(parent, labelProvider, contentProvider, editor, type, isConstructor, false); + } - public SourceActionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, CompilationUnitEditor editor, IType type, boolean isConstructor) throws JavaModelException { - super(parent, labelProvider, contentProvider); + public SourceActionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, CompilationUnitEditor editor, + IType type, boolean isConstructor, boolean allowEmptyTree) throws JavaModelException { + super(parent, labelProvider, contentProvider, allowEmptyTree); fEditor= editor; fContentProvider= contentProvider; fType= type; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateNewConstructorUsingFieldsAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateNewConstructorUsingFieldsAction.java index 557f9983a6b..41b6d916469 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateNewConstructorUsingFieldsAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateNewConstructorUsingFieldsAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -287,10 +287,8 @@ public void run(ITextSelection selection) { if (type != null) { if (type.isRecord()) { MessageDialog.openInformation(getShell(), ActionMessages.GenerateConstructorUsingFieldsAction_error_title, ActionMessages.GenerateConstructorUsingFieldsAction_record_not_applicable); - } else if (type.getFields().length > 0) { - run(type, new IField[0], true); } else { - MessageDialog.openInformation(getShell(), ActionMessages.GenerateConstructorUsingFieldsAction_error_title, ActionMessages.GenerateConstructorUsingFieldsAction_typeContainsNoFields_message); + run(type, new IField[0], true); } return; } @@ -357,11 +355,6 @@ void run(IType type, IField[] selectedFields, boolean activated) throws CoreExce selected.add(curr); } } - if (fieldsToBindings.isEmpty()) { - MessageDialog.openInformation(getShell(), ActionMessages.GenerateConstructorUsingFieldsAction_error_title, ActionMessages.GenerateConstructorUsingFieldsAction_typeContainsNoFields_message); - notifyResult(false); - return; - } ArrayList fields= new ArrayList<>(); for (IField field : type.getFields()) { From 137f84f326ecb0e0b4663b634915e592b31c7cdc Mon Sep 17 00:00:00 2001 From: Federico Jeanne <2205684+fedejeanne@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:10:00 +0100 Subject: [PATCH 12/43] Remove empty if-statement in PathVisitor::extend2EndOfLoop(ASTNode) (#909) Extract the conditions into variables and merge the removed if with the following else-if to make its intention a bit clearer. --- .../refactoring/util/ChangedValueChecker.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/util/ChangedValueChecker.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/util/ChangedValueChecker.java index d1fbda8f601..b86a8f2468a 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/util/ChangedValueChecker.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/util/ChangedValueChecker.java @@ -369,10 +369,15 @@ private void extend2EndOfLoop(ASTNode node) { || temp instanceof ForStatement || temp instanceof DoStatement) { int offset= temp.getStartPosition(); int length= temp.getLength(); - if (offset < startOffset && offset + length > startOffset) - ; - else if (offset <= endOffset && offset + length >= endOffset) { - endOffset= offset + length; + int newEndOffset= offset + length; + + // the current offset is too low (< startOffset) and the new one could fall inside it + boolean cond1= offset < startOffset && newEndOffset > startOffset; + + // the current offset could be inside the range and the new one would fall outside of it (>= endOffset) + boolean cond2= offset <= endOffset && newEndOffset >= endOffset; + if (!cond1 && cond2) { + endOffset= newEndOffset; } } temp= temp.getParent(); From d04cefe7990edef1b35cb5d24932bba6347dc470 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Tue, 14 Nov 2023 21:11:03 -0500 Subject: [PATCH 13/43] Cache the list of names whose favorite static imports we have resolved. - Do not recompute favorite static imports for an unknown type - Reuse compilation unit working copy in code completion logic Signed-off-by: Roland Grunberg --- .../OrganizeImportsOperation.java | 30 +++++- .../internal/corext/util/JavaModelUtil.java | 75 +++----------- ...taticImportFavoritesCompletionInvoker.java | 98 +++++++++++++++++++ 3 files changed, 139 insertions(+), 64 deletions(-) create mode 100644 org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/OrganizeImportsOperation.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/OrganizeImportsOperation.java index 99b39c7d7de..aaa8c803536 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/OrganizeImportsOperation.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/OrganizeImportsOperation.java @@ -74,6 +74,7 @@ import org.eclipse.jdt.internal.corext.dom.ASTNodes; import org.eclipse.jdt.internal.corext.dom.Bindings; import org.eclipse.jdt.internal.corext.dom.ScopeAnalyzer; +import org.eclipse.jdt.internal.corext.util.StaticImportFavoritesCompletionInvoker; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.corext.util.JdtFlags; @@ -512,6 +513,7 @@ public int findInContext(String qualifier, String name, int kind) { private CompilationUnit fASTRoot; private final boolean fAllowSyntaxErrors; + private Collection fResolvedStaticFavoriteImports; /** * Creates a new OrganizeImportsOperation operation. @@ -537,6 +539,7 @@ public OrganizeImportsOperation(ICompilationUnit cu, CompilationUnit astRoot, bo fNumberOfImportsRemoved= 0; fParsingError= null; + fResolvedStaticFavoriteImports = new HashSet<>(); } /** @@ -673,8 +676,20 @@ private void addStaticImports( Collection staticReferences, ImportRewrite importRewrite, UnresolvableImportMatcher unresolvableImportMatcher) { + + String pref= JavaManipulation.getPreference(JavaManipulationPlugin.CODEASSIST_FAVORITE_STATIC_MEMBERS, importRewrite.getCompilationUnit().getJavaProject()); + String[] favourites= new String [0]; + if (pref != null && !pref.isBlank()) { + favourites= pref.split(";"); //$NON-NLS-1$ + } + + ICompilationUnit cu= importRewrite.getCompilationUnit().getPrimary(); + StaticImportFavoritesCompletionInvoker ex= new StaticImportFavoritesCompletionInvoker(cu, favourites); + for (SimpleName name : staticReferences) { + boolean isMethod= name.getParent() instanceof MethodInvocation; IBinding binding= name.resolveBinding(); + if (binding != null) { importRewrite.addStaticImport(binding); } else { @@ -693,19 +708,19 @@ private void addStaticImports( } } if (unresolvableImports.isEmpty()) { - String pref= JavaManipulation.getPreference(JavaManipulationPlugin.CODEASSIST_FAVORITE_STATIC_MEMBERS, importRewrite.getCompilationUnit().getJavaProject()); if (pref == null || pref.isBlank()) { continue; } - String[] favourites= pref.split(";"); //$NON-NLS-1$ if (favourites.length == 0) { continue; } try { // check favourite static imports - boolean isMethod= name.getParent() instanceof MethodInvocation; - ICompilationUnit cu= importRewrite.getCompilationUnit().getPrimary(); - String[] staticFavourites= JavaModelUtil.getStaticImportFavorites(cu, identifier, isMethod, favourites); + if (fResolvedStaticFavoriteImports.contains(identifier)) { + continue; + } + String[] staticFavourites= ex.getStaticImportFavorites(identifier, isMethod); + fResolvedStaticFavoriteImports.add(identifier); if (staticFavourites.length > 0) { String qualifiedTypeName= Signature.getQualifier(staticFavourites[0]); importRewrite.addStaticImport(qualifiedTypeName, identifier, !isMethod); @@ -716,6 +731,11 @@ private void addStaticImports( } } } + try { + ex.destroy(); + } catch (JavaModelException e) { + // ignore + } } diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java index 863f37ab06b..8d39dce7646 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java @@ -19,21 +19,24 @@ import java.util.HashSet; import java.util.Map; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IStorage; -import org.eclipse.core.resources.ResourceAttributes; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.SubMonitor; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IStorage; +import org.eclipse.core.resources.ResourceAttributes; + +import org.eclipse.text.edits.TextEdit; + +import org.eclipse.ltk.core.refactoring.resource.Resources; + import org.eclipse.jdt.core.ClasspathContainerInitializer; -import org.eclipse.jdt.core.CompletionProposal; -import org.eclipse.jdt.core.CompletionRequestor; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IClasspathEntry; @@ -55,13 +58,13 @@ import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.compiler.CharOperation; + import org.eclipse.jdt.internal.core.manipulation.JavaManipulationMessages; + import org.eclipse.jdt.launching.IVMInstall; import org.eclipse.jdt.launching.IVMInstall2; import org.eclipse.jdt.launching.JavaRuntime; import org.eclipse.jdt.launching.environments.IExecutionEnvironment; -import org.eclipse.ltk.core.refactoring.resource.Resources; -import org.eclipse.text.edits.TextEdit; /** * Utility methods for the Java Model. @@ -1324,55 +1327,9 @@ private JavaModelUtil() { } public static String[] getStaticImportFavorites(ICompilationUnit cu, final String elementName, boolean isMethod, String[] favorites) throws JavaModelException { - StringBuilder dummyCU= new StringBuilder(); - String packName= cu.getParent().getElementName(); - IType type= cu.findPrimaryType(); - if (type == null) - return new String[0]; - - if (packName.length() > 0) { - dummyCU.append("package ").append(packName).append(';'); //$NON-NLS-1$ - } - dummyCU.append("public class ").append(type.getElementName()).append("{\n static {\n").append(elementName); // static initializer //$NON-NLS-1$//$NON-NLS-2$ - int offset= dummyCU.length(); - dummyCU.append("\n}\n }"); //$NON-NLS-1$ - - ICompilationUnit newCU= null; - try { - newCU= cu.getWorkingCopy(null); - newCU.getBuffer().setContents(dummyCU.toString()); - - final HashSet result= new HashSet<>(); - - CompletionRequestor requestor= new CompletionRequestor(true) { - @Override - public void accept(CompletionProposal proposal) { - if (elementName.equals(new String(proposal.getName()))) { - for (CompletionProposal curr : proposal.getRequiredProposals()) { - if (curr.getKind() == CompletionProposal.METHOD_IMPORT || curr.getKind() == CompletionProposal.FIELD_IMPORT) { - result.add(concatenateName(Signature.toCharArray(curr.getDeclarationSignature()), curr.getName())); - } - } - } - } - }; - - if (isMethod) { - requestor.setIgnored(CompletionProposal.METHOD_REF, false); - requestor.setAllowsRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.METHOD_IMPORT, true); - } else { - requestor.setIgnored(CompletionProposal.FIELD_REF, false); - requestor.setAllowsRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.FIELD_IMPORT, true); - } - requestor.setFavoriteReferences(favorites); - - newCU.codeComplete(offset, requestor, new NullProgressMonitor()); - - return result.toArray(new String[result.size()]); - } finally { - if (newCU != null) { - newCU.discardWorkingCopy(); - } - } + StaticImportFavoritesCompletionInvoker ex = new StaticImportFavoritesCompletionInvoker(cu, favorites); + String[] result = ex.getStaticImportFavorites(elementName, isMethod); + ex.destroy(); + return result; } } diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java new file mode 100644 index 00000000000..d4a8a770b51 --- /dev/null +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2023 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copied from original {@link JavaModelUtil#getStaticImportFavorites(ICompilationUnit, String, boolean, String[])} + * + *******************************************************************************/ +package org.eclipse.jdt.internal.corext.util; + +import java.util.HashSet; + +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jdt.core.CompletionProposal; +import org.eclipse.jdt.core.CompletionRequestor; +import org.eclipse.jdt.core.ICompilationUnit; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.Signature; + +/** + * Copied from {@link JavaModelUtil#getStaticImportFavorites(ICompilationUnit, String, boolean, String[])} + * If code completion needs to be called multiple times on a given compilation unit, + * this class will perform the operations more efficiently by re-using a working copy. + */ +public class StaticImportFavoritesCompletionInvoker { + private ICompilationUnit fCu; + private ICompilationUnit fNewCU; + private String[] fFavourites; + + public StaticImportFavoritesCompletionInvoker (ICompilationUnit cu, String[] favourites) { + fCu= cu; + fFavourites= favourites; + } + + public void destroy () throws JavaModelException { + if (fNewCU != null) { + fNewCU.discardWorkingCopy(); + } + } + + public String [] getStaticImportFavorites (final String elementName, boolean isMethod) throws JavaModelException { + if (fNewCU == null) { + fNewCU= fCu.getWorkingCopy(null); + } + + String[] res = createNewCompilationUnit(elementName); + String dummyCuContent = res[0]; + int offset= Integer.parseInt(res[1]); + fNewCU.getBuffer().setContents(dummyCuContent); + final HashSet result= new HashSet<>(); + CompletionRequestor requestor= new CompletionRequestor(true) { + @Override + public void accept(CompletionProposal proposal) { + if (elementName.equals(new String(proposal.getName()))) { + for (CompletionProposal curr : proposal.getRequiredProposals()) { + if (curr.getKind() == CompletionProposal.METHOD_IMPORT || curr.getKind() == CompletionProposal.FIELD_IMPORT) { + result.add(JavaModelUtil.concatenateName(Signature.toCharArray(curr.getDeclarationSignature()), curr.getName())); + } + } + } + } + }; + + if (isMethod) { + requestor.setIgnored(CompletionProposal.METHOD_REF, false); + requestor.setAllowsRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.METHOD_IMPORT, true); + } else { + requestor.setIgnored(CompletionProposal.FIELD_REF, false); + requestor.setAllowsRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.FIELD_IMPORT, true); + } + requestor.setFavoriteReferences(fFavourites); + fNewCU.codeComplete(offset, requestor, new NullProgressMonitor()); + return result.toArray(new String[result.size()]); + } + + private String[] createNewCompilationUnit (final String elementName) { + StringBuilder dummyCU= new StringBuilder(); + String packName= fCu.getParent().getElementName(); + IType type= fCu.findPrimaryType(); + if (type == null) + return null; + + if (packName.length() > 0) { + dummyCU.append("package ").append(packName).append(';'); //$NON-NLS-1$ + } + dummyCU.append("public class ").append(type.getElementName()).append("{\n static {\n").append(elementName); // static initializer //$NON-NLS-1$//$NON-NLS-2$ + String offset = Integer.toString(dummyCU.length()); + dummyCU.append("\n}\n }"); //$NON-NLS-1$ + return new String [] {dummyCU.toString(), offset}; + } +} From e9f77d0de1cc9a1063c0894258d4e8c3bf3752ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 22 Nov 2023 09:08:06 +0100 Subject: [PATCH 14/43] Javadoc: fix unclosed --- .../refactoring/structure/ChangeSignatureProcessor.java | 2 +- .../src/org/eclipse/jsp/JspPluginImages.java | 4 ++-- .../jdt/internal/corext/buildpath/ClasspathModifier.java | 2 +- .../jdt/internal/ui/refactoring/TextInputWizardPage.java | 2 +- .../jdt/internal/ui/jarpackager/JarFileExportOperation.java | 4 ++-- .../eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java | 4 ++-- .../internal/ui/text/spelling/engine/ISpellCheckIterator.java | 2 +- .../jdt/internal/ui/text/spelling/engine/ISpellEvent.java | 2 +- .../jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java | 2 +- .../jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java index a9cb55527b2..a8495c0e6c0 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java @@ -2534,7 +2534,7 @@ private void insertTag(TagElement tag, TagElement previousTag, ListRewrite tagsR /** * @param tags existing tags * @param tagName name of tag to add - * @return the TagElement just before a new TagElement with name + * @return the TagElement just before a new TagElement with name * tagName, or null. */ private TagElement findTagElementToInsertAfter(List tags, String tagName) { diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java index 735833724a7..0c9db17d87c 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java @@ -138,7 +138,7 @@ public static ImageRegistry initializeImageRegistry() { } /** - * Returns the Image identified by the given key, + * Returns the Image identified by the given key, * or null if it does not exist. */ public static Image getImage(String key) { @@ -146,7 +146,7 @@ public static Image getImage(String key) { } /** - * Returns the ImageDescriptor identified by the given key, + * Returns the ImageDescriptor identified by the given key, * or null if it does not exist. */ public static ImageDescriptor getImageDescriptor(String key) { diff --git a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java index cb161e4a042..f1c8a97b243 100644 --- a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java +++ b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java @@ -350,7 +350,7 @@ public static CPListElement getClasspathEntry(List elements, IPac * fragment root could be created. * * @param resource the resource to be converted - * @return the resource as + * @return the resource as * IPackageFragment,or null * if failed to convert */ diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/TextInputWizardPage.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/TextInputWizardPage.java index a2677416254..fbb554b2fdb 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/TextInputWizardPage.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/TextInputWizardPage.java @@ -121,7 +121,7 @@ public String getInitialValue() { /** * Performs input validation. Returns a RefactoringStatus which - * describes the result of input validation. Null is interpreted + * describes the result of input validation. Null is interpreted * as no error. */ protected RefactoringStatus validateTextField(String text){ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java index 5a3970e9845..e7e8b49cb50 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java @@ -813,7 +813,7 @@ private Iterator getClassesIn(IContainer classContainer) throws CoreE * or an extension defined as Java source. * * @param file the file to test - * @return a true if the given resource is a Java file + * @return a true if the given resource is a Java file */ private boolean isJavaFile(IResource file) { return file != null @@ -827,7 +827,7 @@ private boolean isJavaFile(IResource file) { * The resource must be a file whose file name ends with ".class". * * @param file the file to test - * @return a true if the given resource is a class file + * @return a true if the given resource is a class file */ private boolean isClassFile(IResource file) { return file != null diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java index 1cc2de2708b..0fd09f4d48c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java @@ -130,11 +130,11 @@ public interface IJavaAnnotation { int getId(); /** - * Returns the marker type associated to this problem or null if no marker type + * Returns the marker type associated to this problem or null if no marker type * can be evaluated. See also {@link CategorizedProblem#getMarkerType()}. * * @return the type of the marker which would be associated to the problem or - * null if no marker type can be evaluated. + * null if no marker type can be evaluated. */ String getMarkerType(); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellCheckIterator.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellCheckIterator.java index d757d7d0a55..9e583332be9 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellCheckIterator.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellCheckIterator.java @@ -40,7 +40,7 @@ public interface ISpellCheckIterator extends Iterator { /** * Does the current word start a new sentence? * - * @return true iff the current word starts a new sentence, false otherwise + * @return true iff the current word starts a new sentence, false otherwise */ boolean startsSentence(); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellEvent.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellEvent.java index 2e2e0d69ddd..5c3b375b87f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellEvent.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/ISpellEvent.java @@ -61,7 +61,7 @@ public interface ISpellEvent { /** * Does the incorrectly spelled word start a new sentence? * - * @return true iff the word starts a new sentence, false otherwise + * @return true iff the word starts a new sentence, false otherwise */ boolean isStart(); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java index a0d7f27cb1c..3de806f85a1 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java @@ -1202,7 +1202,7 @@ private void internalSelectType(IMember elem, boolean reveal) { /* * When the input changed or the hierarchy pane becomes visible, - * updateHierarchyViewer brings up the correct view and refreshes + * updateHierarchyViewer brings up the correct view and refreshes * the current tree */ private void updateHierarchyViewer(final boolean doExpand) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java index d4d776acae3..ccaecea3bcd 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java @@ -451,7 +451,7 @@ private ArrayList getCPListElements(IClasspathEntry[] classpathEn // -------- public api -------- /** - * @return Returns the Java project. Can return null if the page has not + * @return Returns the Java project. Can return null if the page has not * been initialized. */ public IJavaProject getJavaProject() { From d217be896fcadcd6509ccde5e571f2d54518ba50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 28 Nov 2023 14:06:56 +0100 Subject: [PATCH 15/43] CodeFormatCleanUp: mention the resource that caused Exception for example https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1624 --- .../internal/ui/fix/CodeFormatCleanUp.java | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CodeFormatCleanUp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CodeFormatCleanUp.java index d24541cb334..2d3512bcfc8 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CodeFormatCleanUp.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CodeFormatCleanUp.java @@ -17,6 +17,7 @@ import java.util.Map; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Status; import org.eclipse.jface.text.IRegion; @@ -53,20 +54,25 @@ public ICleanUpFix createFix(CleanUpContext context) throws CoreException { if (compilationUnit == null) return null; - IRegion[] regions; - if (context instanceof MultiLineCleanUpContext) { - regions= ((MultiLineCleanUpContext)context).getRegions(); - } else { - regions= null; + try { + IRegion[] regions; + if (context instanceof MultiLineCleanUpContext) { + regions= ((MultiLineCleanUpContext)context).getRegions(); + } else { + regions= null; + } + boolean removeWhitespaces= isEnabled(CleanUpConstants.FORMAT_REMOVE_TRAILING_WHITESPACES); + return CodeFormatFix.createCleanUp(compilationUnit, + regions, + isEnabled(CleanUpConstants.FORMAT_SOURCE_CODE), + removeWhitespaces && isEnabled(CleanUpConstants.FORMAT_REMOVE_TRAILING_WHITESPACES_ALL), + removeWhitespaces && isEnabled(CleanUpConstants.FORMAT_REMOVE_TRAILING_WHITESPACES_IGNORE_EMPTY), + isEnabled(CleanUpConstants.FORMAT_CORRECT_INDENTATION)); + } catch (CoreException e) { + throw new CoreException(Status.error("Error formating " + compilationUnit.getPath(), e)); //$NON-NLS-1$ + } catch (RuntimeException e) { + throw new RuntimeException("Error formating " + compilationUnit.getPath(), e); //$NON-NLS-1$ } - - boolean removeWhitespaces= isEnabled(CleanUpConstants.FORMAT_REMOVE_TRAILING_WHITESPACES); - return CodeFormatFix.createCleanUp(compilationUnit, - regions, - isEnabled(CleanUpConstants.FORMAT_SOURCE_CODE), - removeWhitespaces && isEnabled(CleanUpConstants.FORMAT_REMOVE_TRAILING_WHITESPACES_ALL), - removeWhitespaces && isEnabled(CleanUpConstants.FORMAT_REMOVE_TRAILING_WHITESPACES_IGNORE_EMPTY), - isEnabled(CleanUpConstants.FORMAT_CORRECT_INDENTATION)); } @Override From 19a3a4874a81df63625acfc5d6969b23ff9fdccc Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Wed, 29 Nov 2023 10:41:02 -0500 Subject: [PATCH 16/43] Work around API tooling warning regarding unnecessary minor bump. - jdt.core.manipulation received an unnecessary minor version bump, where a service bump was sufficient Signed-off-by: Roland Grunberg --- org.eclipse.jdt.core.manipulation/.settings/.api_filters | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.eclipse.jdt.core.manipulation/.settings/.api_filters b/org.eclipse.jdt.core.manipulation/.settings/.api_filters index a42165f7e4b..82ebfc0c616 100644 --- a/org.eclipse.jdt.core.manipulation/.settings/.api_filters +++ b/org.eclipse.jdt.core.manipulation/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + From d5943955e6a1f63807f0857f294e6b6009bdea63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 8 Nov 2023 15:43:03 +0100 Subject: [PATCH 17/43] build.properties: add output.. = bin/ to avoid false positive API errors in tycho builds --- org.eclipse.jdt.ui/build.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/org.eclipse.jdt.ui/build.properties b/org.eclipse.jdt.ui/build.properties index 847ef61bd5b..4277e47a069 100644 --- a/org.eclipse.jdt.ui/build.properties +++ b/org.eclipse.jdt.ui/build.properties @@ -35,6 +35,7 @@ source.. = core refactoring/,\ ui refactoring/,\ core extension/,\ internal compatibility/ +output.. = bin/ src.excludes = jar in jar loader/ jars.compile.order = . customBuildCallbacks = customBuildCallbacks.xml From 8384a318b12f0028b3c8ee1cb8fae7f8695b79d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 7 Nov 2023 13:49:49 +0100 Subject: [PATCH 18/43] Remove blank Javadoc This commit cleans up Javadoc that does not add information. It resolves ecj warnings: `Javadoc: Description expected after ...` It helps to prevent future empty javadoc by disabling missingJavaDoc warnings. This resolves `Javadoc: Missing ...` The modification is a result of regular expression search&replace: in files `*.java` `^[\s]*\*[\s]*(@return|@param[\s]*[^\s]+|@throws[\s]*[^\s]+)\R([\s]*\*[\s]*@|[\s]*\*/\R)` ->`$2` `^([\s]*\*[\s]*\R)([\s]*\*/\R)` ->`$2` `^[\S\t ]*/\*\*\R[\s]*\*/\R` ->`` in files `org.eclipse.jdt.core.prefs` `org\.eclipse\.jdt\.core\.compiler\.problem\.missingJavadoc(Comments|Tags)\=[^\s]*` ->`org\.eclipse\.jdt\.core\.compiler\.problem\.missingJavadoc$1\=ignore` excludes files in org.eclipse.jdt.text.tests/testResources org.eclipse.jdt.ui.tests.refactoring/resources --- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../eclipse/jdt/astview/EditorUtility.java | 3 - .../jdt/astview/TreeInfoCollector.java | 3 - .../jdt/astview/views/ASTAttribute.java | 3 - .../eclipse/jdt/astview/views/Binding.java | 3 - .../jdt/astview/views/BindingProperty.java | 3 - .../jdt/astview/views/CommentsProperty.java | 3 - .../jdt/astview/views/ProblemNode.java | 3 - .../jdt/astview/views/ProblemsProperty.java | 3 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jdt/internal/common/HelperVisitor.java | 2145 ----------------- .../common/HelperVisitorProvider.java | 1 - .../jdt/internal/common/LambdaASTVisitor.java | 3 - .../jdt/internal/common/ReferenceHolder.java | 6 - .../jdt/internal/common/VisitorEnum.java | 312 --- .../manipulation/CodeTemplateContextType.java | 2 - .../jarpackager/JarPackagerUtilCore.java | 6 - .../internal/ui/browsing/LogicalPackage.java | 1 - .../ui/fix/UnusedCodeCleanUpCore.java | 1 - .../JavadocTagsSubProcessorCore.java | 3 - .../ModifierCorrectionSubProcessorCore.java | 2 - .../text/correction/ProblemLocationCore.java | 3 - .../internal/ui/util/PatternConstructor.java | 5 - .../corext/callhierarchy/CallLocation.java | 6 - .../CallSearchResultCollector.java | 1 - .../corext/callhierarchy/MethodCall.java | 12 - .../corext/callhierarchy/MethodWrapper.java | 1 - .../corext/dom/HierarchicalASTVisitor.java | 2 - .../dom/fragments/ASTFragmentFactory.java | 2 - .../corext/dom/fragments/IASTFragment.java | 1 - .../dom/fragments/IExpressionFragment.java | 1 - .../internal/corext/fix/StringFixCore.java | 1 - .../corext/fix/UnusedCodeFixCore.java | 1 - .../internal/corext/fix/UpdateProperty.java | 3 - .../corext/fix/helper/WhileToForEach.java | 1 - .../internal/corext/refactoring/Checks.java | 30 - .../CollectingSearchRequestor.java | 1 - .../CuCollectingSearchRequestor.java | 2 - .../delegates/DelegateCreator.java | 10 - .../generics/InferTypeArgumentsTCModel.java | 7 - .../generics/ParametricStructureComputer.java | 2 - .../refactoring/rename/MethodChecks.java | 2 - .../refactoring/rename/RenameAnalyzeUtil.java | 3 - .../rename/RenamingNameSuggestor.java | 3 - .../refactoring/structure/BodyUpdater.java | 5 - .../structure/MemberCheckUtil.java | 1 - .../tagging/IDelegateUpdating.java | 1 - .../ITypeConstraintFactory.java | 3 - .../CollectionElementVariable2.java | 1 - .../refactoring/typeconstraints2/TTypes.java | 2 - .../corext/refactoring/util/JavadocUtil.java | 5 - .../code/IntroduceFactoryRefactoring.java | 28 - .../code/IntroduceIndirectionRefactoring.java | 2 - .../refactoring/code/SnippetFinder.java | 1 - .../rename/RefactoringHandleTransplanter.java | 2 - .../rename/RenameTypeProcessor.java | 2 - .../rename/RenameVirtualMethodProcessor.java | 1 - .../reorg/DeleteChangeCreator.java | 1 - .../structure/ChangeTypeRefactoring.java | 32 - .../structure/ExtractSupertypeProcessor.java | 1 - .../IRefactoringProcessorIdsCore.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../org/eclipse/jdt/jeview/EditorUtility.java | 3 - .../eclipse/jdt/jeview/views/JEAttribute.java | 3 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../util/XmlProcessorFactoryJdtJunit.java | 1 - .../JUnitLaunchConfigurationDelegate.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jdt/internal/junit/runner/MessageIds.java | 1 - .../junit/runner/junit3/JUnit3Identifier.java | 3 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../junit/ui/FailureTableDisplay.java | 3 - .../jdt/internal/junit/ui/TextualTrace.java | 3 - .../jdt/internal/junit/util/LayoutUtil.java | 1 - .../junit/wizards/NewTestSuiteWizardPage.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../codemining/CodeMiningTriggerTest.java | 5 - .../performance/JavaExpandSelectionTest.java | 2 - .../performance/JavaFormatterProjectTest.java | 2 - .../tests/performance/JavaFormatterTest.java | 2 - ...nnotatedJavaEditorInvocationCountTest.java | 8 - .../ScrollAnnotatedJavaEditorTest.java | 8 - .../performance/ScrollJavaEditorTest.java | 12 - .../performance/ScrollTextEditorTest.java | 12 - .../ScrollVerticalRuler1000Test.java | 4 - .../ScrollVerticalRuler100Test.java | 4 - .../ScrollVerticalRuler5000Test.java | 4 - .../TypingInvocationCountTest.java | 16 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../core/indexsearch/SearchEngine.java | 4 - .../examples/jspeditor/DocumentAdapter.java | 2 - .../JspTranslatorResultCollector.java | 8 - .../text/source/translation/ITagHandler.java | 1 - .../text/source/translation/ITranslator.java | 2 - .../src/org/eclipse/jsp/JspUIPlugin.java | 2 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../java/junit/extensions/RepeatedTest.java | 1 - .../java/junit/extensions/TestDecorator.java | 1 - .../main/java/junit/framework/TestSuite.java | 2 - .../main/java/junit/samples/money/IMoney.java | 1 - .../main/java/junit/samples/money/Money.java | 1 - .../src/test/java/junit/samples/AllTests.java | 1 - .../test/java/junit/samples/SimpleTest.java | 1 - .../test/java/junit/samples/VectorTest.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jdt/ui/tests/CustomBaseRunner.java | 2 - .../ChangeTypeRefactoringTests.java | 1 - .../refactoring/InferTypeArgumentsTests.java | 4 - .../IntroduceFactoryTestsBase.java | 16 - .../IntroduceIndirectionTests.java | 4 - .../refactoring/IntroduceParameterTests.java | 2 - .../RenameNonPrivateFieldTests.java | 3 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jdt/ui/tests/chkpii/ChkpiiTests.java | 1 - .../JavaElementLightweightDecorator.java | 3 - .../MyClasspathContainerInitializer.java | 3 - .../ui/examples/MyQuickAssistProcessor.java | 3 - .../jdt/ui/examples/MyQuickFixProcessor.java | 3 - .../jdt/ui/leaktest/ReferenceInfo.java | 1 - .../leaktest/reftracker/IdentityHashSet.java | 3 - .../reftracker/ReferencedArrayElement.java | 3 - .../reftracker/ReferencedFieldElement.java | 3 - .../jdt/ui/tests/performance/FileTool.java | 4 - .../jdt/testplugin/JavaProjectHelper.java | 18 - .../eclipse/jdt/testplugin/StringAsserts.java | 3 - .../jdt/testplugin/util/VerifyDialog.java | 1 - .../internal/common/ExpectationTracer.java | 6 - .../jdt/ui/tests/browsing/MockPluginView.java | 1 - .../jdt/ui/tests/browsing/TestDelta.java | 8 - .../CallHierarchyTestHelper.java | 15 - .../jdt/ui/tests/core/ASTNodesInsertTest.java | 2 - .../jdt/ui/tests/core/BindingsNameTest.java | 2 - .../jdt/ui/tests/core/CallHierarchyTest.java | 8 - .../jdt/ui/tests/core/ScopeAnalyzerTest.java | 2 - .../ui/tests/core/rules/LeakTestSetup.java | 3 - .../source/AddUnimplementedMethodsTest.java | 3 - .../GenerateConstructorUsingFieldsTest.java | 28 - .../source/GenerateDelegateMethodsTest.java | 24 - .../source/GenerateGettersSettersTest.java | 24 - .../source/GenerateGettersSettersTest16.java | 4 - .../source/GenerateHashCodeEqualsTest.java | 58 - .../tests/core/source/SourceActionTests.java | 1 - .../tests/core/source/SourceTestCase16.java | 1 - .../packageview/ContentProviderTests1.java | 6 - .../packageview/ContentProviderTests2.java | 6 - .../packageview/ContentProviderTests3.java | 6 - .../packageview/ContentProviderTests4.java | 6 - .../ui/tests/packageview/MockPluginView.java | 3 - .../tests/packageview/PackageCacheTest.java | 1 - .../jdt/ui/tests/packageview/TestDelta.java | 1 - .../jdt/ui/tests/quickfix/CleanUpTest1d8.java | 10 - .../LocalCorrectionsQuickFixTest.java | 6 - .../jdt/ui/tests/quickfix/QuickFixTest.java | 24 - .../quickfix/SerialVersionQuickFixTest.java | 3 - .../jdt/ui/tests/quickfix/UtilitiesTest.java | 3 - .../jdt/ui/tests/search/FileAdapterTest.java | 2 - .../jdt/ui/tests/search/ParticipantTest.java | 2 - .../jdt/ui/tests/search/TestParticipant.java | 2 - .../tests/search/TreeContentProviderTest.java | 2 - .../tests/search/WorkspaceReferenceTest.java | 2 - .../ui/tests/wizardapi/NewTypeWizardTest.java | 3 - .../tests/wizardapi/NewTypeWizardTest17.java | 3 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../corext/buildpath/ClasspathModifier.java | 33 - .../corext/template/java/CodeTemplates.java | 3 - .../corext/template/java/JavaFormatter.java | 12 - .../jdt/internal/corext/util/TypeFilter.java | 6 - .../corext/refactoring/reorg/ReorgUtils.java | 1 - .../ui/refactoring/RefactoringSaveHelper.java | 1 - .../refactoring/ChangeExceptionHandler.java | 1 - .../ui/refactoring/DelegateUIHelper.java | 1 - .../ExtractSupertypeMemberPage.java | 1 - .../ui/refactoring/ParameterEditDialog.java | 4 - .../actions/InlineConstantAction.java | 2 - .../refactoring/nls/AccessorDescription.java | 3 - .../nls/ExternalizeWizardPage.java | 6 - .../ui/refactoring/nls/RenameKeysDialog.java | 6 - ...ourceFolderSelectionDialogButtonField.java | 2 - .../nls/search/NLSSearchEditorOpener.java | 2 - .../reorg/RenameTypeWizardInputPage.java | 1 - ...ypeWizardSimilarElementsOptionsDialog.java | 1 - .../RenameTypeWizardSimilarElementsPage.java | 1 - .../jdt/internal/ui/IJavaHelpContextIds.java | 1 - .../ui/actions/BlockCommentAction.java | 3 - .../jdt/internal/ui/actions/IndentAction.java | 2 - .../CallHierarchyContentProvider.java | 6 - .../callhierarchy/CallHierarchyViewPart.java | 4 - .../ui/callhierarchy/CallHierarchyViewer.java | 3 - ...andWithConstructorsConfigurationBlock.java | 1 - .../ui/callhierarchy/LocationViewer.java | 3 - .../JavaElementReferenceConverter.java | 2 - .../JavaAddElementFromHistoryImpl.java | 4 - .../compare/JavaElementHistoryPageSource.java | 2 - .../internal/ui/dialogs/DialogsMessages.java | 3 - .../dialogs/GenerateHashCodeEqualsDialog.java | 2 - .../filtertable/FilterViewerComparator.java | 1 - .../ui/filtertable/JavaFilterTable.java | 1 - .../internal/ui/filtertable/SWTFactory.java | 1 - .../internal/ui/fix/CleanUpFixWrapper.java | 1 - .../jdt/internal/ui/fix/Java50CleanUp.java | 1 - .../jdt/internal/ui/fix/StringCleanUp.java | 1 - .../internal/ui/fix/UnusedCodeCleanUp.java | 1 - .../ui/fix/UseIteratorToForLoopCleanUp.java | 2 - .../jarpackager/CheckboxTreeAndListGroup.java | 35 - .../ui/jarpackager/JarOptionsPage.java | 1 - .../ui/jarpackager/ManifestProvider.java | 1 - .../JavadocConsoleLineTracker.java | 3 - .../javadocexport/JavadocOptionsManager.java | 1 - .../ui/javadocexport/JavadocWriter.java | 1 - .../ClassFileMarkerAnnotationModel.java | 3 - .../EditorHighlightingSynchronizer.java | 1 - .../internal/ui/javaeditor/IndentUtil.java | 2 - .../ui/javaeditor/SemanticHighlightings.java | 3 - ...JavaMethodParameterCodeMiningProvider.java | 1 - .../MembersOrderPreferenceCache.java | 2 - .../preferences/OverlayPreferenceStore.java | 1 - .../ui/preferences/PreferencesAccess.java | 3 - .../formatter/ModifyDialogTabPage.java | 4 - .../preferences/formatter/ProfileManager.java | 5 - .../preferences/formatter/ProfileStore.java | 5 - .../PropertiesAssistContext.java | 1 - .../PropertyKeyHyperlink.java | 1 - .../internal/ui/search/JavaSearchPage.java | 3 - .../search/SearchParticipantDescriptor.java | 2 - .../ui/search/SearchParticipantRecord.java | 2 - .../ui/text/JavaPartitionScanner.java | 1 - .../ui/text/SingleTokenJavaScanner.java | 3 - .../AdvancedQuickAssistProcessor.java | 2 - .../correction/JavadocTagsSubProcessor.java | 3 - .../LocalCorrectionsSubProcessor.java | 2 - .../ModifierCorrectionSubProcessor.java | 2 - .../ui/text/correction/ProblemLocation.java | 3 - .../QuickAssistLightBulbUpdater.java | 3 - .../text/correction/QuickAssistProcessor.java | 2 - .../ui/text/correction/QuickFixProcessor.java | 2 - .../SuppressWarningsSubProcessor.java | 3 - .../java/AbstractJavaCompletionProposal.java | 1 - .../java/hover/AnnotationExpandHover.java | 4 - .../hover/AnnotationExpansionControl.java | 3 - ...JavadocContentAssistInvocationContext.java | 3 - .../contentassist/MultiVariableGuess.java | 5 - .../contentassist/VariablePosition.java | 3 - .../AbstractHierarchyViewerSorter.java | 2 - .../typehierarchy/HierarchyViewerSorter.java | 2 - .../typehierarchy/TypeHierarchyViewPart.java | 1 - .../jdt/internal/ui/util/JavaUIHelp.java | 1 - .../ui/util/MainMethodSearchEngine.java | 3 - .../ui/util/XmlProcessorFactoryJdtUi.java | 1 - .../ui/viewsupport/ImageImageDescriptor.java | 2 - .../ui/wizards/ClassPathDetector.java | 2 - .../wizards/buildpaths/BuildPathSupport.java | 3 - .../buildpaths/CPListElementAttribute.java | 2 - .../ClasspathContainerDefaultPage.java | 2 - .../ClasspathContainerDescriptor.java | 2 - .../ClasspathContainerSelectionPage.java | 2 - .../buildpaths/ClasspathContainerWizard.java | 2 - .../ExternalAnnotationsAttachmentDialog.java | 1 - .../buildpaths/FolderSelectionDialog.java | 2 - .../buildpaths/ModuleAddExportsDialog.java | 1 - .../buildpaths/ModuleAddReadsDialog.java | 1 - .../MultipleFolderSelectionDialog.java | 5 - .../buildpaths/SourceAttachmentDialog.java | 1 - .../buildpaths/UserLibraryWizardPage.java | 3 - .../ClasspathModifierQueries.java | 4 - .../DialogPackageExplorerActionGroup.java | 1 - .../NewSourceContainerWorkbookPage.java | 3 - .../RemoveLinkedFolderDialog.java | 1 - .../WorkingSetFilterActionGroup.java | 1 - .../ui/workingsets/WorkingSetModel.java | 1 - .../eclipse/jdt/ui/PreferenceConstants.java | 2 - .../refactoring/IRefactoringProcessorIds.java | 1 - .../java/correction/CUCorrectionProposal.java | 3 - .../ui/wizards/NewContainerWizardPage.java | 1 - 277 files changed, 16 insertions(+), 3517 deletions(-) diff --git a/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs index 6ebd17f9e6d..57390f27448 100644 --- a/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/EditorUtility.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/EditorUtility.java index 2a875ed0a23..87933262935 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/EditorUtility.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/EditorUtility.java @@ -27,9 +27,6 @@ import org.eclipse.jdt.ui.JavaUI; -/** - * - */ public class EditorUtility { private EditorUtility() { super(); diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/TreeInfoCollector.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/TreeInfoCollector.java index e0abdaf0fcd..4fb9145086e 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/TreeInfoCollector.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/TreeInfoCollector.java @@ -17,9 +17,6 @@ import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.CompilationUnit; -/** - * - */ public class TreeInfoCollector { public static class NodeCounter extends ASTVisitor { diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTAttribute.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTAttribute.java index 3747f57e341..dd2fea1ac6a 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTAttribute.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTAttribute.java @@ -17,9 +17,6 @@ import org.eclipse.jdt.core.dom.ASTNode; -/** - * - */ public abstract class ASTAttribute { protected static final Object[] EMPTY= new Object[0]; diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java index 6c4a24439fb..56077aa6cd2 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java @@ -36,9 +36,6 @@ import org.eclipse.jdt.core.dom.PrimitiveType; import org.eclipse.jdt.core.dom.StringLiteral; -/** - * - */ public class Binding extends ASTAttribute { private final IBinding fBinding; diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java index ac8e06c22ca..b6b28d1fa4c 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java @@ -20,9 +20,6 @@ import org.eclipse.jdt.core.dom.IBinding; -/** - * - */ public class BindingProperty extends ASTAttribute { private final String fName; diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/CommentsProperty.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/CommentsProperty.java index 134eb0d9880..17d5575a44c 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/CommentsProperty.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/CommentsProperty.java @@ -20,9 +20,6 @@ import org.eclipse.jdt.core.dom.Comment; import org.eclipse.jdt.core.dom.CompilationUnit; -/** - * - */ public class CommentsProperty extends ASTAttribute { private final CompilationUnit fRoot; diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemNode.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemNode.java index a659c45c1d0..8f281a6ad3b 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemNode.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemNode.java @@ -23,9 +23,6 @@ import org.eclipse.jdt.core.compiler.CategorizedProblem; import org.eclipse.jdt.core.compiler.IProblem; -/** - * - */ public class ProblemNode extends ASTAttribute { private final IProblem fProblem; diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemsProperty.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemsProperty.java index a38ae56a333..18f4bc7ba27 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemsProperty.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ProblemsProperty.java @@ -19,9 +19,6 @@ import org.eclipse.jdt.core.dom.CompilationUnit; -/** - * - */ public class ProblemsProperty extends ASTAttribute { private final CompilationUnit fRoot; diff --git a/org.eclipse.jdt.bcoview/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.bcoview/.settings/org.eclipse.jdt.core.prefs index 9600c06ef19..627eb2e0c28 100644 --- a/org.eclipse.jdt.bcoview/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.bcoview/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs index a25987c67f8..284f9764517 100644 --- a/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs @@ -76,7 +76,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java index 3ea19f4bc45..b854f5fdb4f 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java @@ -36,9 +36,6 @@ public class HelperVisitor,V,T> { ASTVisitor astvisitor; - /** - * - */ public E dataholder; /** @@ -80,9 +77,6 @@ public Map> getConsumermap() { return consumermap; } - /** - * - */ public Set nodesprocessed; /** @@ -720,7 +714,6 @@ public BiPredicate addMethodInvocation(BiPredicate addYieldStatement(BiPredicate addAnnotationTypeDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.AnnotationTypeDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addAnnotationTypeMemberDeclaration( BiConsumer bc) { return consumermap.put(VisitorEnum.AnnotationTypeMemberDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addAnonymousClassDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.AnonymousClassDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addArrayAccess(BiConsumer bc) { return consumermap.put(VisitorEnum.ArrayAccess, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addArrayCreation(BiConsumer bc) { return consumermap.put(VisitorEnum.ArrayCreation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addArrayInitializer(BiConsumer bc) { return consumermap.put(VisitorEnum.ArrayInitializer, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addArrayType(BiConsumer bc) { return consumermap.put(VisitorEnum.ArrayType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addAssertStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.AssertStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addAssignment(BiConsumer bc) { return consumermap.put(VisitorEnum.Assignment, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addBlock(BiConsumer bc) { return consumermap.put(VisitorEnum.Block, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addBlockComment(BiConsumer bc) { return consumermap.put(VisitorEnum.BlockComment, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addBooleanLiteral(BiConsumer bc) { return consumermap.put(VisitorEnum.BooleanLiteral, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addBreakStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.BreakStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addCastExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.CastExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addCatchClause(BiConsumer bc) { return consumermap.put(VisitorEnum.CatchClause, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addCharacterLiteral(BiConsumer bc) { return consumermap.put(VisitorEnum.CharacterLiteral, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addClassInstanceCreation(BiConsumer bc) { return consumermap.put(VisitorEnum.ClassInstanceCreation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addCompilationUnit(BiConsumer bc) { return consumermap.put(VisitorEnum.CompilationUnit, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addConditionalExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.ConditionalExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addConstructorInvocation(BiConsumer bc) { return consumermap.put(VisitorEnum.ConstructorInvocation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addContinueStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.ContinueStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addCreationReference(BiConsumer bc) { return consumermap.put(VisitorEnum.CreationReference, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addDimension(BiConsumer bc) { return consumermap.put(VisitorEnum.Dimension, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addDoStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.DoStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addEmptyStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.EmptyStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addEnhancedForStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.EnhancedForStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addEnumConstantDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.EnumConstantDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addEnumDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.EnumDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addExportsDirective(BiConsumer bc) { return consumermap.put(VisitorEnum.ExportsDirective, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addExpressionMethodReference(BiConsumer bc) { return consumermap.put(VisitorEnum.ExpressionMethodReference, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addExpressionStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.ExpressionStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addFieldAccess(BiConsumer bc) { return consumermap.put(VisitorEnum.FieldAccess, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addFieldDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.FieldDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addForStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.ForStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addIfStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.IfStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addImportDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.ImportDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addInfixExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.InfixExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addInitializer(BiConsumer bc) { return consumermap.put(VisitorEnum.Initializer, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addInstanceofExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.InstanceofExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addIntersectionType(BiConsumer bc) { return consumermap.put(VisitorEnum.IntersectionType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addJavadoc(BiConsumer bc) { return consumermap.put(VisitorEnum.Javadoc, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addLabeledStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.LabeledStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addLambdaExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.LambdaExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addLineComment(BiConsumer bc) { return consumermap.put(VisitorEnum.LineComment, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMarkerAnnotation(BiConsumer bc) { return consumermap.put(VisitorEnum.MarkerAnnotation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMemberRef(BiConsumer bc) { return consumermap.put(VisitorEnum.MemberRef, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMemberValuePair(BiConsumer bc) { return consumermap.put(VisitorEnum.MemberValuePair, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMethodRef(BiConsumer bc) { return consumermap.put(VisitorEnum.MethodRef, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMethodRefParameter(BiConsumer bc) { return consumermap.put(VisitorEnum.MethodRefParameter, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMethodDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.MethodDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addMethodInvocation(BiConsumer bc) { return consumermap.put(VisitorEnum.MethodInvocation, bc); } - /** - * - * @param methodname - * @param bc - * @return - */ public BiConsumer addMethodInvocation(String methodname, BiConsumer bc) { this.consumerdata.put(VisitorEnum.MethodInvocation, methodname); return consumermap.put(VisitorEnum.MethodInvocation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addModifier(BiConsumer bc) { return consumermap.put(VisitorEnum.Modifier, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addModuleDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.ModuleDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addModuleModifier(BiConsumer bc) { return consumermap.put(VisitorEnum.ModuleModifier, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addNameQualifiedType(BiConsumer bc) { return consumermap.put(VisitorEnum.NameQualifiedType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addNormalAnnotation(BiConsumer bc) { return consumermap.put(VisitorEnum.NormalAnnotation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addNullLiteral(BiConsumer bc) { return consumermap.put(VisitorEnum.NullLiteral, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addNumberLiteral(BiConsumer bc) { return consumermap.put(VisitorEnum.NumberLiteral, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addOpensDirective(BiConsumer bc) { return consumermap.put(VisitorEnum.OpensDirective, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addPackageDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.PackageDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addParameterizedType(BiConsumer bc) { return consumermap.put(VisitorEnum.ParameterizedType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addParenthesizedExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.ParenthesizedExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addPatternInstanceofExpression( BiConsumer bc) { return consumermap.put(VisitorEnum.PatternInstanceofExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addPostfixExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.PostfixExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addPrefixExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.PrefixExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addProvidesDirective(BiConsumer bc) { return consumermap.put(VisitorEnum.ProvidesDirective, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addPrimitiveType(BiConsumer bc) { return consumermap.put(VisitorEnum.PrimitiveType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addQualifiedName(BiConsumer bc) { return consumermap.put(VisitorEnum.QualifiedName, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addQualifiedType(BiConsumer bc) { return consumermap.put(VisitorEnum.QualifiedType, bc); } @@ -1923,334 +1565,153 @@ public BiConsumer addQualifiedType(BiConsumer addRequiresDirective(BiConsumer bc) { return consumermap.put(VisitorEnum.RequiresDirective, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addRecordDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.RecordDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addReturnStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.ReturnStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSimpleName(BiConsumer bc) { return consumermap.put(VisitorEnum.SimpleName, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSimpleType(BiConsumer bc) { return consumermap.put(VisitorEnum.SimpleType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSingleMemberAnnotation(BiConsumer bc) { return consumermap.put(VisitorEnum.SingleMemberAnnotation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSingleVariableDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.SingleVariableDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addStringLiteral(BiConsumer bc) { return consumermap.put(VisitorEnum.StringLiteral, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSuperConstructorInvocation( BiConsumer bc) { return consumermap.put(VisitorEnum.SuperConstructorInvocation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSuperFieldAccess(BiConsumer bc) { return consumermap.put(VisitorEnum.SuperFieldAccess, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSuperMethodInvocation(BiConsumer bc) { return consumermap.put(VisitorEnum.SuperMethodInvocation, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSuperMethodReference(BiConsumer bc) { return consumermap.put(VisitorEnum.SuperMethodReference, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSwitchCase(BiConsumer bc) { return consumermap.put(VisitorEnum.SwitchCase, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSwitchExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.SwitchExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSwitchStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.SwitchStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addSynchronizedStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.SynchronizedStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTagElement(BiConsumer bc) { return consumermap.put(VisitorEnum.TagElement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTextBlock(BiConsumer bc) { return consumermap.put(VisitorEnum.TextBlock, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTextElement(BiConsumer bc) { return consumermap.put(VisitorEnum.TextElement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addThisExpression(BiConsumer bc) { return consumermap.put(VisitorEnum.ThisExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addThrowStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.ThrowStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTryStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.TryStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTypeDeclaration(BiConsumer bc) { return consumermap.put(VisitorEnum.TypeDeclaration, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTypeDeclarationStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.TypeDeclarationStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTypeLiteral(BiConsumer bc) { return consumermap.put(VisitorEnum.TypeLiteral, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTypeMethodReference(BiConsumer bc) { return consumermap.put(VisitorEnum.TypeMethodReference, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addTypeParameter(BiConsumer bc) { return consumermap.put(VisitorEnum.TypeParameter, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addUnionType(BiConsumer bc) { return consumermap.put(VisitorEnum.UnionType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addUsesDirective(BiConsumer bc) { return consumermap.put(VisitorEnum.UsesDirective, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addVariableDeclarationExpression( BiConsumer bc) { return consumermap.put(VisitorEnum.VariableDeclarationExpression, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addVariableDeclarationStatement( BiConsumer bc) { return consumermap.put(VisitorEnum.VariableDeclarationStatement, bc); } - /** - * - * @param class1 - * @param bc - * @return - */ public BiConsumer addVariableDeclarationStatement(Class class1, BiConsumer bc) { this.consumerdata.put(VisitorEnum.VariableDeclarationStatement, class1); return consumermap.put(VisitorEnum.VariableDeclarationStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addVariableDeclarationFragment( BiConsumer bc) { return consumermap.put(VisitorEnum.VariableDeclarationFragment, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addWhileStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.WhileStatement, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addWildcardType(BiConsumer bc) { return consumermap.put(VisitorEnum.WildcardType, bc); } - /** - * - * @param bc - * @return - */ public BiConsumer addYieldStatement(BiConsumer bc) { return consumermap.put(VisitorEnum.YieldStatement, bc); } @@ -2260,7 +1721,6 @@ public BiConsumer addYieldStatement(BiConsumer bs, BiConsumer bc) { @@ -2271,7 +1731,6 @@ public void addAnnotationTypeDeclaration(BiPredicate bs, BiConsumer bc) { @@ -2282,7 +1741,6 @@ public void addAnnotationTypeMemberDeclaration(BiPredicate bs, BiConsumer bc) { @@ -2293,7 +1751,6 @@ public void addAnonymousClassDeclaration(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ArrayAccess, bs); @@ -2303,7 +1760,6 @@ public void addArrayAccess(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ArrayCreation, bs); @@ -2313,7 +1769,6 @@ public void addArrayCreation(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ArrayInitializer, bs); @@ -2323,7 +1778,6 @@ public void addArrayInitializer(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addArrayType(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ArrayType, bs); @@ -2333,7 +1787,6 @@ public void addArrayType(BiPredicate bs, BiConsumer /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addAssertStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.AssertStatement, bs); @@ -2343,7 +1796,6 @@ public void addAssertStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.Assignment, bs); @@ -2353,7 +1805,6 @@ public void addAssignment(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.Block, bs); @@ -2363,7 +1814,6 @@ public void addBlock(BiPredicate bs, BiConsumer bc) { /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addBlockComment(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.BlockComment, bs); @@ -2373,7 +1823,6 @@ public void addBlockComment(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.BooleanLiteral, bs); @@ -2383,7 +1832,6 @@ public void addBooleanLiteral(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.BreakStatement, bs); @@ -2393,7 +1841,6 @@ public void addBreakStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.CastExpression, bs); @@ -2403,7 +1850,6 @@ public void addCastExpression(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.CatchClause, bs); @@ -2413,7 +1859,6 @@ public void addCatchClause(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.CharacterLiteral, bs); @@ -2423,7 +1868,6 @@ public void addCharacterLiteral(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addClassInstanceCreation(BiPredicate bs, BiConsumer bc) { @@ -2434,7 +1878,6 @@ public void addClassInstanceCreation(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addCompilationUnit(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.CompilationUnit, bs); @@ -2444,7 +1887,6 @@ public void addCompilationUnit(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -2455,7 +1897,6 @@ public void addConditionalExpression(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addConstructorInvocation(BiPredicate bs, BiConsumer bc) { @@ -2466,7 +1907,6 @@ public void addConstructorInvocation(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addContinueStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ContinueStatement, bs); @@ -2476,7 +1916,6 @@ public void addContinueStatement(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addCreationReference(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.CreationReference, bs); @@ -2486,7 +1925,6 @@ public void addCreationReference(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addDimension(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.Dimension, bs); @@ -2496,7 +1934,6 @@ public void addDimension(BiPredicate bs, BiConsumer /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addDoStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.DoStatement, bs); @@ -2506,7 +1943,6 @@ public void addDoStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.EmptyStatement, bs); @@ -2516,7 +1952,6 @@ public void addEmptyStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -2527,7 +1962,6 @@ public void addEnhancedForStatement(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addEnumConstantDeclaration(BiPredicate bs, BiConsumer bc) { @@ -2538,7 +1972,6 @@ public void addEnumConstantDeclaration(BiPredicate b /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addEnumDeclaration(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.EnumDeclaration, bs); @@ -2548,7 +1981,6 @@ public void addEnumDeclaration(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ExportsDirective, bs); @@ -2558,7 +1990,6 @@ public void addExportsDirective(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addExpressionMethodReference(BiPredicate bs, BiConsumer bc) { @@ -2569,7 +2000,6 @@ public void addExpressionMethodReference(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ExpressionStatement, bs); @@ -2579,7 +2009,6 @@ public void addExpressionStatement(BiPredicate bs, BiCon /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addFieldAccess(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.FieldAccess, bs); @@ -2589,7 +2018,6 @@ public void addFieldAccess(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.FieldDeclaration, bs); @@ -2599,7 +2027,6 @@ public void addFieldDeclaration(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addForStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ForStatement, bs); @@ -2609,7 +2036,6 @@ public void addForStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.IfStatement, bs); @@ -2619,7 +2045,6 @@ public void addIfStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ImportDeclaration, bs); @@ -2629,7 +2054,6 @@ public void addImportDeclaration(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addInfixExpression(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.InfixExpression, bs); @@ -2639,7 +2063,6 @@ public void addInfixExpression(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.Initializer, bs); @@ -2649,7 +2072,6 @@ public void addInitializer(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -2660,7 +2082,6 @@ public void addInstanceofExpression(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addIntersectionType(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.IntersectionType, bs); @@ -2670,7 +2091,6 @@ public void addIntersectionType(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addJavadoc(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.Javadoc, bs); @@ -2680,7 +2100,6 @@ public void addJavadoc(BiPredicate bs, BiConsumer bc) { /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addLabeledStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.LabeledStatement, bs); @@ -2690,7 +2109,6 @@ public void addLabeledStatement(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addLambdaExpression(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.LambdaExpression, bs); @@ -2700,7 +2118,6 @@ public void addLambdaExpression(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addLineComment(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.LineComment, bs); @@ -2710,7 +2127,6 @@ public void addLineComment(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MarkerAnnotation, bs); @@ -2720,7 +2136,6 @@ public void addMarkerAnnotation(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addMemberRef(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MemberRef, bs); @@ -2730,7 +2145,6 @@ public void addMemberRef(BiPredicate bs, BiConsumer /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addMemberValuePair(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MemberValuePair, bs); @@ -2740,7 +2154,6 @@ public void addMemberValuePair(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MethodRef, bs); @@ -2750,7 +2163,6 @@ public void addMethodRef(BiPredicate bs, BiConsumer /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addMethodRefParameter(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MethodRefParameter, bs); @@ -2760,7 +2172,6 @@ public void addMethodRefParameter(BiPredicate bs, BiConsu /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addMethodDeclaration(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MethodDeclaration, bs); @@ -2769,9 +2180,7 @@ public void addMethodDeclaration(BiPredicate bs, BiConsume /** * - * @param methodname * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addMethodInvocation(String methodname, BiPredicate bs, BiConsumer bc) { @@ -2783,7 +2192,6 @@ public void addMethodInvocation(String methodname, BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.MethodInvocation, bs); @@ -2793,7 +2201,6 @@ public void addMethodInvocation(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addModifier(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.Modifier, bs); @@ -2803,7 +2210,6 @@ public void addModifier(BiPredicate bs, BiConsumer bc) /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addModuleDeclaration(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ModuleDeclaration, bs); @@ -2813,7 +2219,6 @@ public void addModuleDeclaration(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addModuleModifier(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ModuleModifier, bs); @@ -2823,7 +2228,6 @@ public void addModuleModifier(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.NameQualifiedType, bs); @@ -2833,7 +2237,6 @@ public void addNameQualifiedType(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addNormalAnnotation(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.NormalAnnotation, bs); @@ -2843,7 +2246,6 @@ public void addNormalAnnotation(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addNullLiteral(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.NullLiteral, bs); @@ -2853,7 +2255,6 @@ public void addNullLiteral(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.NumberLiteral, bs); @@ -2863,7 +2264,6 @@ public void addNumberLiteral(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.OpensDirective, bs); @@ -2873,7 +2273,6 @@ public void addOpensDirective(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.PackageDeclaration, bs); @@ -2883,7 +2282,6 @@ public void addPackageDeclaration(BiPredicate bs, BiConsu /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addParameterizedType(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ParameterizedType, bs); @@ -2893,7 +2291,6 @@ public void addParameterizedType(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addParenthesizedExpression(BiPredicate bs, BiConsumer bc) { @@ -2904,7 +2301,6 @@ public void addParenthesizedExpression(BiPredicate b /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addPatternInstanceofExpression(BiPredicate bs, BiConsumer bc) { @@ -2915,7 +2311,6 @@ public void addPatternInstanceofExpression(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.PostfixExpression, bs); @@ -2925,7 +2320,6 @@ public void addPostfixExpression(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addPrefixExpression(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.PrefixExpression, bs); @@ -2935,7 +2329,6 @@ public void addPrefixExpression(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addProvidesDirective(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ProvidesDirective, bs); @@ -2945,7 +2338,6 @@ public void addProvidesDirective(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addPrimitiveType(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.PrimitiveType, bs); @@ -2955,7 +2347,6 @@ public void addPrimitiveType(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.QualifiedName, bs); @@ -2965,7 +2356,6 @@ public void addQualifiedName(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.QualifiedType, bs); @@ -2981,7 +2371,6 @@ public void addQualifiedType(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -2992,7 +2381,6 @@ public void addRequiresDirective(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addRecordDeclaration(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.RecordDeclaration, bs); @@ -3002,7 +2390,6 @@ public void addRecordDeclaration(BiPredicate bs, BiConsume /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addReturnStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ReturnStatement, bs); @@ -3012,7 +2399,6 @@ public void addReturnStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.SimpleName, bs); @@ -3022,7 +2408,6 @@ public void addSimpleName(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.SimpleType, bs); @@ -3032,7 +2417,6 @@ public void addSimpleType(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -3043,7 +2427,6 @@ public void addSingleMemberAnnotation(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addSingleVariableDeclaration(BiPredicate bs, BiConsumer bc) { @@ -3054,7 +2437,6 @@ public void addSingleVariableDeclaration(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.StringLiteral, bs); @@ -3064,7 +2446,6 @@ public void addStringLiteral(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -3075,7 +2456,6 @@ public void addSuperConstructorInvocation(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.SuperFieldAccess, bs); @@ -3085,7 +2465,6 @@ public void addSuperFieldAccess(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addSuperMethodInvocation(BiPredicate bs, BiConsumer bc) { @@ -3096,7 +2475,6 @@ public void addSuperMethodInvocation(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addSuperMethodReference(BiPredicate bs, BiConsumer bc) { @@ -3107,7 +2485,6 @@ public void addSuperMethodReference(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addSwitchCase(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.SwitchCase, bs); @@ -3117,7 +2494,6 @@ public void addSwitchCase(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.SwitchExpression, bs); @@ -3127,7 +2503,6 @@ public void addSwitchExpression(BiPredicate bs, BiConsumer< /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addSwitchStatement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.SwitchStatement, bs); @@ -3137,7 +2512,6 @@ public void addSwitchStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -3148,7 +2522,6 @@ public void addSynchronizedStatement(BiPredicate bs, /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addTagElement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TagElement, bs); @@ -3158,7 +2531,6 @@ public void addTagElement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TextBlock, bs); @@ -3168,7 +2540,6 @@ public void addTextBlock(BiPredicate bs, BiConsumer /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addTextElement(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TextElement, bs); @@ -3178,7 +2549,6 @@ public void addTextElement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ThisExpression, bs); @@ -3188,7 +2558,6 @@ public void addThisExpression(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.ThrowStatement, bs); @@ -3198,7 +2567,6 @@ public void addThrowStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TryStatement, bs); @@ -3208,7 +2576,6 @@ public void addTryStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TypeDeclaration, bs); @@ -3218,7 +2585,6 @@ public void addTypeDeclaration(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -3229,7 +2595,6 @@ public void addTypeDeclarationStatement(BiPredicate /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addTypeLiteral(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TypeLiteral, bs); @@ -3239,7 +2604,6 @@ public void addTypeLiteral(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TypeMethodReference, bs); @@ -3249,7 +2613,6 @@ public void addTypeMethodReference(BiPredicate bs, BiCon /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addTypeParameter(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.TypeParameter, bs); @@ -3259,7 +2622,6 @@ public void addTypeParameter(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.UnionType, bs); @@ -3269,7 +2631,6 @@ public void addUnionType(BiPredicate bs, BiConsumer /** * * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public void addUsesDirective(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.UsesDirective, bs); @@ -3279,7 +2640,6 @@ public void addUsesDirective(BiPredicate bs, BiConsumer bs, BiConsumer bc) { @@ -3290,7 +2650,6 @@ public void addVariableDeclarationExpression(BiPredicate bs, BiConsumer bc) { @@ -3300,9 +2659,7 @@ public void addVariableDeclarationStatement(BiPredicate class1, BiPredicate bs, BiConsumer bc) { @@ -3315,7 +2672,6 @@ public void addVariableDeclarationStatement(Class class1, BiPredicate bs, BiConsumer bc) { @@ -3326,7 +2682,6 @@ public void addVariableDeclarationFragment(BiPredicate bs, BiConsumer bc) { predicatemap.put(VisitorEnum.WhileStatement, bs); @@ -3336,7 +2691,6 @@ public void addWhileStatement(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.WildcardType, bs); @@ -3346,7 +2700,6 @@ public void addWildcardType(BiPredicate bs, BiConsumer bs, BiConsumer bc) { predicatemap.put(VisitorEnum.YieldStatement, bs); @@ -3357,14 +2710,8 @@ public void addYieldStatement(BiPredicate bs, BiConsumer - * @param - * @param cu - * @param myset - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callVisitor(ASTNode cu, EnumSet myset, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -3378,11 +2725,6 @@ public static void callVisitor(ASTNode cu, EnumSet myset, Re /** * - * @param - * @param - * @param cu - * @param myset - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3398,13 +2740,7 @@ public static void callVisitor(ASTNode cu, EnumSet myset, Re /** * - * @param - * @param - * @param cu - * @param myset - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callVisitor(ASTNode cu, EnumSet myset, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -3418,10 +2754,6 @@ public static void callVisitor(ASTNode cu, EnumSet myset, Re /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3435,10 +2767,6 @@ public static void callAnnotationTypeDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3452,10 +2780,6 @@ public static void callAnnotationTypeMemberDeclarationVisitor(ASTNode nod /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3469,10 +2793,6 @@ public static void callAnonymousClassDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3486,10 +2806,6 @@ public static void callArrayAccessVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3503,10 +2819,6 @@ public static void callArrayCreationVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3520,10 +2832,6 @@ public static void callArrayInitializerVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3537,10 +2845,6 @@ public static void callArrayTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3554,10 +2858,6 @@ public static void callAssertStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3571,10 +2871,6 @@ public static void callAssignmentVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3588,10 +2884,6 @@ public static void callBlockVisitor(ASTNode node, ReferenceHolder d /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3605,10 +2897,6 @@ public static void callBlockCommentVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3622,10 +2910,6 @@ public static void callBooleanLiteralVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3639,10 +2923,6 @@ public static void callBreakStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3656,10 +2936,6 @@ public static void callCastExpressionVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3673,10 +2949,6 @@ public static void callCatchClauseVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3690,10 +2962,6 @@ public static void callCharacterLiteralVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3707,10 +2975,6 @@ public static void callClassInstanceCreationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3724,10 +2988,6 @@ public static void callCompilationUnitVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3741,10 +3001,6 @@ public static void callConditionalExpressionVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3758,10 +3014,6 @@ public static void callConstructorInvocationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3775,10 +3027,6 @@ public static void callContinueStatementVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3792,10 +3040,6 @@ public static void callCreationReferenceVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3809,10 +3053,6 @@ public static void callDimensionVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3826,10 +3066,6 @@ public static void callDoStatementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3843,10 +3079,6 @@ public static void callEmptyStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3860,10 +3092,6 @@ public static void callEnhancedForStatementVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3877,10 +3105,6 @@ public static void callEnumConstantDeclarationVisitor(ASTNode node, Refer /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3894,10 +3118,6 @@ public static void callEnumDeclarationVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3911,10 +3131,6 @@ public static void callExportsDirectiveVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3928,10 +3144,6 @@ public static void callExpressionMethodReferenceVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3945,10 +3157,6 @@ public static void callExpressionStatementVisitor(ASTNode node, Reference /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3962,10 +3170,6 @@ public static void callFieldAccessVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3979,10 +3183,6 @@ public static void callFieldDeclarationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -3996,10 +3196,6 @@ public static void callForStatementVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4013,10 +3209,6 @@ public static void callIfStatementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4030,10 +3222,6 @@ public static void callImportDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4047,10 +3235,6 @@ public static void callInfixExpressionVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4064,10 +3248,6 @@ public static void callInitializerVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4081,10 +3261,6 @@ public static void callInstanceofExpressionVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4098,10 +3274,6 @@ public static void callIntersectionTypeVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4115,10 +3287,6 @@ public static void callJavadocVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4132,10 +3300,6 @@ public static void callLabeledStatementVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4149,10 +3313,6 @@ public static void callLambdaExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4166,10 +3326,6 @@ public static void callLineCommentVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4183,10 +3339,6 @@ public static void callMarkerAnnotationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4200,10 +3352,6 @@ public static void callMemberRefVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4217,10 +3365,6 @@ public static void callMemberValuePairVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4234,10 +3378,6 @@ public static void callMethodRefVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4251,10 +3391,6 @@ public static void callMethodRefParameterVisitor(ASTNode node, ReferenceH /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4268,10 +3404,6 @@ public static void callMethodDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4285,11 +3417,6 @@ public static void callMethodInvocationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param methodname - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4303,10 +3430,6 @@ public static void callMethodInvocationVisitor(String methodname, ASTNode /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4320,10 +3443,6 @@ public static void callModifierVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4337,10 +3456,6 @@ public static void callModuleDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4354,10 +3469,6 @@ public static void callModuleModifierVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4371,10 +3482,6 @@ public static void callNameQualifiedTypeVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4388,10 +3495,6 @@ public static void callNormalAnnotationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4405,10 +3508,6 @@ public static void callNullLiteralVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4422,10 +3521,6 @@ public static void callNumberLiteralVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4439,10 +3534,6 @@ public static void callOpensDirectiveVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4456,10 +3547,6 @@ public static void callPackageDeclarationVisitor(ASTNode node, ReferenceH /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4473,10 +3560,6 @@ public static void callParameterizedTypeVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4490,10 +3573,6 @@ public static void callParenthesizedExpressionVisitor(ASTNode node, Refer /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4507,10 +3586,6 @@ public static void callPatternInstanceofExpressionVisitor(ASTNode node, R /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4524,10 +3599,6 @@ public static void callPostfixExpressionVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4541,10 +3612,6 @@ public static void callPrefixExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4558,10 +3625,6 @@ public static void callProvidesDirectiveVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4575,10 +3638,6 @@ public static void callPrimitiveTypeVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4592,10 +3651,6 @@ public static void callQualifiedNameVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4611,10 +3666,6 @@ public static void callQualifiedTypeVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4629,10 +3680,6 @@ public static void callRequiresDirectiveVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4646,10 +3693,6 @@ public static void callRecordDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4663,10 +3706,6 @@ public static void callReturnStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4680,10 +3719,6 @@ public static void callSimpleNameVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4697,10 +3732,6 @@ public static void callSimpleTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4714,10 +3745,6 @@ public static void callSingleMemberAnnotationVisitor(ASTNode node, Refere /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4731,10 +3758,6 @@ public static void callSingleVariableDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4748,10 +3771,6 @@ public static void callStringLiteralVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4765,10 +3784,6 @@ public static void callSuperConstructorInvocationVisitor(ASTNode node, Re /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4782,10 +3797,6 @@ public static void callSuperFieldAccessVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4799,10 +3810,6 @@ public static void callSuperMethodInvocationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4816,10 +3823,6 @@ public static void callSuperMethodReferenceVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4833,10 +3836,6 @@ public static void callSwitchCaseVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4850,10 +3849,6 @@ public static void callSwitchExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4867,10 +3862,6 @@ public static void callSwitchStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4884,10 +3875,6 @@ public static void callSynchronizedStatementVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4901,10 +3888,6 @@ public static void callTagElementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4918,10 +3901,6 @@ public static void callTextBlockVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4935,10 +3914,6 @@ public static void callTextElementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4952,10 +3927,6 @@ public static void callThisExpressionVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4969,10 +3940,6 @@ public static void callThrowStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -4986,10 +3953,6 @@ public static void callTryStatementVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5003,10 +3966,6 @@ public static void callTypeDeclarationVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5020,10 +3979,6 @@ public static void callTypeDeclarationStatementVisitor(ASTNode node, Refe /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5037,10 +3992,6 @@ public static void callTypeLiteralVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5054,10 +4005,6 @@ public static void callTypeMethodReferenceVisitor(ASTNode node, Reference /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5071,10 +4018,6 @@ public static void callTypeParameterVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5088,10 +4031,6 @@ public static void callUnionTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5105,10 +4044,6 @@ public static void callUsesDirectiveVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5122,10 +4057,6 @@ public static void callVariableDeclarationExpressionVisitor(ASTNode node, /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5139,11 +4070,6 @@ public static void callVariableDeclarationStatementVisitor(ASTNode node, /** * - * @param - * @param - * @param class1 - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5157,10 +4083,6 @@ public static void callVariableDeclarationStatementVisitor(Class class /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5174,10 +4096,6 @@ public static void callVariableDeclarationFragmentVisitor(ASTNode node, R /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5191,10 +4109,6 @@ public static void callWhileStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5208,10 +4122,6 @@ public static void callWildcardTypeVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression */ @@ -5225,12 +4135,7 @@ public static void callYieldStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callAnnotationTypeDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5242,12 +4147,7 @@ public static void callAnnotationTypeDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callAnnotationTypeMemberDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5259,12 +4159,7 @@ public static void callAnnotationTypeMemberDeclarationVisitor(ASTNode nod /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callAnonymousClassDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5276,12 +4171,7 @@ public static void callAnonymousClassDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callArrayAccessVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5293,12 +4183,7 @@ public static void callArrayAccessVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callArrayCreationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5310,12 +4195,7 @@ public static void callArrayCreationVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callArrayInitializerVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5327,12 +4207,7 @@ public static void callArrayInitializerVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callArrayTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5344,12 +4219,7 @@ public static void callArrayTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callAssertStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5361,12 +4231,7 @@ public static void callAssertStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callAssignmentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5378,12 +4243,7 @@ public static void callAssignmentVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callBlockVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5395,12 +4255,7 @@ public static void callBlockVisitor(ASTNode node, ReferenceHolder d /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callBlockCommentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5412,12 +4267,7 @@ public static void callBlockCommentVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callBooleanLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5429,12 +4279,7 @@ public static void callBooleanLiteralVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callBreakStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5446,12 +4291,7 @@ public static void callBreakStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callCastExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5463,12 +4303,7 @@ public static void callCastExpressionVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callCatchClauseVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5480,12 +4315,7 @@ public static void callCatchClauseVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callCharacterLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5497,12 +4327,7 @@ public static void callCharacterLiteralVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callClassInstanceCreationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5514,12 +4339,7 @@ public static void callClassInstanceCreationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callCompilationUnitVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5531,12 +4351,7 @@ public static void callCompilationUnitVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callConditionalExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5548,12 +4363,7 @@ public static void callConditionalExpressionVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callConstructorInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5565,12 +4375,7 @@ public static void callConstructorInvocationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callContinueStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5582,12 +4387,7 @@ public static void callContinueStatementVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callCreationReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5599,12 +4399,7 @@ public static void callCreationReferenceVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callDimensionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5616,12 +4411,7 @@ public static void callDimensionVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callDoStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5633,12 +4423,7 @@ public static void callDoStatementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callEmptyStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5650,12 +4435,7 @@ public static void callEmptyStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callEnhancedForStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5667,12 +4447,7 @@ public static void callEnhancedForStatementVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callEnumConstantDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5684,12 +4459,7 @@ public static void callEnumConstantDeclarationVisitor(ASTNode node, Refer /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callEnumDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5701,12 +4471,7 @@ public static void callEnumDeclarationVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callExportsDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5718,12 +4483,7 @@ public static void callExportsDirectiveVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callExpressionMethodReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5735,12 +4495,7 @@ public static void callExpressionMethodReferenceVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callExpressionStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5752,12 +4507,7 @@ public static void callExpressionStatementVisitor(ASTNode node, Reference /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callFieldAccessVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5769,12 +4519,7 @@ public static void callFieldAccessVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callFieldDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5786,12 +4531,7 @@ public static void callFieldDeclarationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callForStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5803,12 +4543,7 @@ public static void callForStatementVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callIfStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5820,12 +4555,7 @@ public static void callIfStatementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callImportDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5837,12 +4567,7 @@ public static void callImportDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callInfixExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5854,12 +4579,7 @@ public static void callInfixExpressionVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callInitializerVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5871,12 +4591,7 @@ public static void callInitializerVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callInstanceofExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5888,12 +4603,7 @@ public static void callInstanceofExpressionVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callIntersectionTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5905,12 +4615,7 @@ public static void callIntersectionTypeVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callJavadocVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5922,12 +4627,7 @@ public static void callJavadocVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callLabeledStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5939,12 +4639,7 @@ public static void callLabeledStatementVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callLambdaExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5956,12 +4651,7 @@ public static void callLambdaExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callLineCommentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5973,12 +4663,7 @@ public static void callLineCommentVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMarkerAnnotationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -5990,12 +4675,7 @@ public static void callMarkerAnnotationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMemberRefVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6007,12 +4687,7 @@ public static void callMemberRefVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMemberValuePairVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6024,12 +4699,7 @@ public static void callMemberValuePairVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMethodRefVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6041,12 +4711,7 @@ public static void callMethodRefVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMethodRefParameterVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6058,12 +4723,7 @@ public static void callMethodRefParameterVisitor(ASTNode node, ReferenceH /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMethodDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6075,12 +4735,7 @@ public static void callMethodDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callMethodInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6092,12 +4747,7 @@ public static void callMethodInvocationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callModifierVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6109,12 +4759,7 @@ public static void callModifierVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callModuleDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6126,12 +4771,7 @@ public static void callModuleDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callModuleModifierVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6143,12 +4783,7 @@ public static void callModuleModifierVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callNameQualifiedTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6160,12 +4795,7 @@ public static void callNameQualifiedTypeVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callNormalAnnotationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6177,12 +4807,7 @@ public static void callNormalAnnotationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callNullLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6194,12 +4819,7 @@ public static void callNullLiteralVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callNumberLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6211,12 +4831,7 @@ public static void callNumberLiteralVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callOpensDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6228,12 +4843,7 @@ public static void callOpensDirectiveVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callPackageDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6245,12 +4855,7 @@ public static void callPackageDeclarationVisitor(ASTNode node, ReferenceH /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callParameterizedTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6262,12 +4867,7 @@ public static void callParameterizedTypeVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callParenthesizedExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6279,12 +4879,7 @@ public static void callParenthesizedExpressionVisitor(ASTNode node, Refer /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callPatternInstanceofExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6296,12 +4891,7 @@ public static void callPatternInstanceofExpressionVisitor(ASTNode node, R /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callPostfixExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6313,12 +4903,7 @@ public static void callPostfixExpressionVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callPrefixExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6330,12 +4915,7 @@ public static void callPrefixExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callProvidesDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6347,12 +4927,7 @@ public static void callProvidesDirectiveVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callPrimitiveTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6364,12 +4939,7 @@ public static void callPrimitiveTypeVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callQualifiedNameVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6381,12 +4951,7 @@ public static void callQualifiedNameVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callQualifiedTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6400,12 +4965,7 @@ public static void callQualifiedTypeVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callRequiresDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, @@ -6418,12 +4978,7 @@ public static void callRequiresDirectiveVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callRecordDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6435,12 +4990,7 @@ public static void callRecordDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callReturnStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6452,12 +5002,7 @@ public static void callReturnStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSimpleNameVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6469,12 +5014,7 @@ public static void callSimpleNameVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSimpleTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6486,12 +5026,7 @@ public static void callSimpleTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSingleMemberAnnotationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6503,12 +5038,7 @@ public static void callSingleMemberAnnotationVisitor(ASTNode node, Refere /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSingleVariableDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6520,12 +5050,7 @@ public static void callSingleVariableDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callStringLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6537,12 +5062,7 @@ public static void callStringLiteralVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSuperConstructorInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6554,12 +5074,7 @@ public static void callSuperConstructorInvocationVisitor(ASTNode node, Re /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSuperFieldAccessVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6571,12 +5086,7 @@ public static void callSuperFieldAccessVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSuperMethodInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6588,12 +5098,7 @@ public static void callSuperMethodInvocationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSuperMethodReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6605,12 +5110,7 @@ public static void callSuperMethodReferenceVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSwitchCaseVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6622,12 +5122,7 @@ public static void callSwitchCaseVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSwitchExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6639,12 +5134,7 @@ public static void callSwitchExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSwitchStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6656,12 +5146,7 @@ public static void callSwitchStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callSynchronizedStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6673,12 +5158,7 @@ public static void callSynchronizedStatementVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTagElementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6690,12 +5170,7 @@ public static void callTagElementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTextBlockVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6707,12 +5182,7 @@ public static void callTextBlockVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTextElementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6724,12 +5194,7 @@ public static void callTextElementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callThisExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6741,12 +5206,7 @@ public static void callThisExpressionVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callThrowStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6758,12 +5218,7 @@ public static void callThrowStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTryStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6775,12 +5230,7 @@ public static void callTryStatementVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTypeDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6792,12 +5242,7 @@ public static void callTypeDeclarationVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTypeDeclarationStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6809,12 +5254,7 @@ public static void callTypeDeclarationStatementVisitor(ASTNode node, Refe /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTypeLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6826,12 +5266,7 @@ public static void callTypeLiteralVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTypeMethodReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6843,12 +5278,7 @@ public static void callTypeMethodReferenceVisitor(ASTNode node, Reference /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callTypeParameterVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6860,12 +5290,7 @@ public static void callTypeParameterVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callUnionTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6877,12 +5302,7 @@ public static void callUnionTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callUsesDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6894,12 +5314,7 @@ public static void callUsesDirectiveVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callVariableDeclarationExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6911,12 +5326,7 @@ public static void callVariableDeclarationExpressionVisitor(ASTNode node, /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callVariableDeclarationStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6928,13 +5338,7 @@ public static void callVariableDeclarationStatementVisitor(ASTNode node, /** * - * @param - * @param - * @param class1 - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callVariableDeclarationStatementVisitor(Class class1, ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6946,12 +5350,7 @@ public static void callVariableDeclarationStatementVisitor(Class class /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callVariableDeclarationFragmentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6963,12 +5362,7 @@ public static void callVariableDeclarationFragmentVisitor(ASTNode node, R /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callWhileStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6980,12 +5374,7 @@ public static void callWhileStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callWildcardTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -6997,12 +5386,7 @@ public static void callWildcardTypeVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed - * @param bc */ public static void callYieldStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiConsumer> bc) { @@ -7014,13 +5398,8 @@ public static void callYieldStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callAnnotationTypeDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7033,13 +5412,8 @@ public static void callAnnotationTypeDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callAnnotationTypeMemberDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7052,13 +5426,8 @@ public static void callAnnotationTypeMemberDeclarationVisitor(ASTNode nod /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callAnonymousClassDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7071,13 +5440,8 @@ public static void callAnonymousClassDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callArrayAccessVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7089,13 +5453,8 @@ public static void callArrayAccessVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callArrayCreationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7107,13 +5466,8 @@ public static void callArrayCreationVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callArrayInitializerVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7126,13 +5480,8 @@ public static void callArrayInitializerVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callArrayTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7144,13 +5493,8 @@ public static void callArrayTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callAssertStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7163,13 +5507,8 @@ public static void callAssertStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callAssignmentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7181,13 +5520,8 @@ public static void callAssignmentVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callBlockVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7199,13 +5533,8 @@ public static void callBlockVisitor(ASTNode node, ReferenceHolder d /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callBlockCommentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7217,13 +5546,8 @@ public static void callBlockCommentVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callBooleanLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7236,13 +5560,8 @@ public static void callBooleanLiteralVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callBreakStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7255,13 +5574,8 @@ public static void callBreakStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callCastExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7274,13 +5588,8 @@ public static void callCastExpressionVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callCatchClauseVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7292,13 +5601,8 @@ public static void callCatchClauseVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callCharacterLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7311,13 +5615,8 @@ public static void callCharacterLiteralVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callClassInstanceCreationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7330,13 +5629,8 @@ public static void callClassInstanceCreationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callCompilationUnitVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7349,13 +5643,8 @@ public static void callCompilationUnitVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callConditionalExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7368,13 +5657,8 @@ public static void callConditionalExpressionVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callConstructorInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7387,13 +5671,8 @@ public static void callConstructorInvocationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callContinueStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7406,13 +5685,8 @@ public static void callContinueStatementVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callCreationReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7425,13 +5699,8 @@ public static void callCreationReferenceVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callDimensionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7443,13 +5712,8 @@ public static void callDimensionVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callDoStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7461,13 +5725,8 @@ public static void callDoStatementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callEmptyStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7480,13 +5739,8 @@ public static void callEmptyStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callEnhancedForStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7499,13 +5753,8 @@ public static void callEnhancedForStatementVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callEnumConstantDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7518,13 +5767,8 @@ public static void callEnumConstantDeclarationVisitor(ASTNode node, Refer /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callEnumDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7537,13 +5781,8 @@ public static void callEnumDeclarationVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callExportsDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7556,13 +5795,8 @@ public static void callExportsDirectiveVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callExpressionMethodReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7575,13 +5809,8 @@ public static void callExpressionMethodReferenceVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callExpressionStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7594,13 +5823,8 @@ public static void callExpressionStatementVisitor(ASTNode node, Reference /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callFieldAccessVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7612,13 +5836,8 @@ public static void callFieldAccessVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callFieldDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7631,13 +5850,8 @@ public static void callFieldDeclarationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callForStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7649,13 +5863,8 @@ public static void callForStatementVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callIfStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7667,13 +5876,8 @@ public static void callIfStatementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callImportDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7686,13 +5890,8 @@ public static void callImportDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callInfixExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7705,13 +5904,8 @@ public static void callInfixExpressionVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callInitializerVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7723,13 +5917,8 @@ public static void callInitializerVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callInstanceofExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7742,13 +5931,8 @@ public static void callInstanceofExpressionVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callIntersectionTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7761,13 +5945,8 @@ public static void callIntersectionTypeVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callJavadocVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7779,13 +5958,8 @@ public static void callJavadocVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callLabeledStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7798,13 +5972,8 @@ public static void callLabeledStatementVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callLambdaExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7817,13 +5986,8 @@ public static void callLambdaExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callLineCommentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7835,13 +5999,8 @@ public static void callLineCommentVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMarkerAnnotationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7854,13 +6013,8 @@ public static void callMarkerAnnotationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMemberRefVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7872,13 +6026,8 @@ public static void callMemberRefVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMemberValuePairVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7891,13 +6040,8 @@ public static void callMemberValuePairVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMethodRefVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7909,13 +6053,8 @@ public static void callMethodRefVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMethodRefParameterVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7928,13 +6067,8 @@ public static void callMethodRefParameterVisitor(ASTNode node, ReferenceH /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMethodDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7947,13 +6081,8 @@ public static void callMethodDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callMethodInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -7966,13 +6095,8 @@ public static void callMethodInvocationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callModifierVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -7984,13 +6108,8 @@ public static void callModifierVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callModuleDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8003,13 +6122,8 @@ public static void callModuleDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callModuleModifierVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8022,13 +6136,8 @@ public static void callModuleModifierVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callNameQualifiedTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8041,13 +6150,8 @@ public static void callNameQualifiedTypeVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callNormalAnnotationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8060,13 +6164,8 @@ public static void callNormalAnnotationVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callNullLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8078,13 +6177,8 @@ public static void callNullLiteralVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callNumberLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8096,13 +6190,8 @@ public static void callNumberLiteralVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callOpensDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8115,13 +6204,8 @@ public static void callOpensDirectiveVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callPackageDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8134,13 +6218,8 @@ public static void callPackageDeclarationVisitor(ASTNode node, ReferenceH /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callParameterizedTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8153,13 +6232,8 @@ public static void callParameterizedTypeVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callParenthesizedExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8172,13 +6246,8 @@ public static void callParenthesizedExpressionVisitor(ASTNode node, Refer /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callPatternInstanceofExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8191,13 +6260,8 @@ public static void callPatternInstanceofExpressionVisitor(ASTNode node, R /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callPostfixExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8210,13 +6274,8 @@ public static void callPostfixExpressionVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callPrefixExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8229,13 +6288,8 @@ public static void callPrefixExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callProvidesDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8248,13 +6302,8 @@ public static void callProvidesDirectiveVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callPrimitiveTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8266,13 +6315,8 @@ public static void callPrimitiveTypeVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callQualifiedNameVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8284,13 +6328,8 @@ public static void callQualifiedNameVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callQualifiedTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8304,13 +6343,8 @@ public static void callQualifiedTypeVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callRequiresDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, @@ -8324,13 +6358,8 @@ public static void callRequiresDirectiveVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callRecordDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8343,13 +6372,8 @@ public static void callRecordDeclarationVisitor(ASTNode node, ReferenceHo /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callReturnStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8362,13 +6386,8 @@ public static void callReturnStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSimpleNameVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8380,13 +6399,8 @@ public static void callSimpleNameVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSimpleTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8398,13 +6412,8 @@ public static void callSimpleTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSingleMemberAnnotationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8417,13 +6426,8 @@ public static void callSingleMemberAnnotationVisitor(ASTNode node, Refere /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSingleVariableDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8436,13 +6440,8 @@ public static void callSingleVariableDeclarationVisitor(ASTNode node, Ref /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callStringLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8454,13 +6453,8 @@ public static void callStringLiteralVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSuperConstructorInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8473,13 +6467,8 @@ public static void callSuperConstructorInvocationVisitor(ASTNode node, Re /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSuperFieldAccessVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8492,13 +6481,8 @@ public static void callSuperFieldAccessVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSuperMethodInvocationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8511,13 +6495,8 @@ public static void callSuperMethodInvocationVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSuperMethodReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8530,13 +6509,8 @@ public static void callSuperMethodReferenceVisitor(ASTNode node, Referenc /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSwitchCaseVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8548,13 +6522,8 @@ public static void callSwitchCaseVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSwitchExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8567,13 +6536,8 @@ public static void callSwitchExpressionVisitor(ASTNode node, ReferenceHol /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSwitchStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8586,13 +6550,8 @@ public static void callSwitchStatementVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callSynchronizedStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8605,13 +6564,8 @@ public static void callSynchronizedStatementVisitor(ASTNode node, Referen /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTagElementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8623,13 +6577,8 @@ public static void callTagElementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTextBlockVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8641,13 +6590,8 @@ public static void callTextBlockVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTextElementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8659,13 +6603,8 @@ public static void callTextElementVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callThisExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8678,13 +6617,8 @@ public static void callThisExpressionVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callThrowStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8697,13 +6631,8 @@ public static void callThrowStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTryStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8715,13 +6644,8 @@ public static void callTryStatementVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTypeDeclarationVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8734,13 +6658,8 @@ public static void callTypeDeclarationVisitor(ASTNode node, ReferenceHold /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTypeDeclarationStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8753,13 +6672,8 @@ public static void callTypeDeclarationStatementVisitor(ASTNode node, Refe /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTypeLiteralVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8771,13 +6685,8 @@ public static void callTypeLiteralVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTypeMethodReferenceVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8790,13 +6699,8 @@ public static void callTypeMethodReferenceVisitor(ASTNode node, Reference /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callTypeParameterVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8808,13 +6712,8 @@ public static void callTypeParameterVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callUnionTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8826,13 +6725,8 @@ public static void callUnionTypeVisitor(ASTNode node, ReferenceHolder - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callUsesDirectiveVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8844,13 +6738,8 @@ public static void callUsesDirectiveVisitor(ASTNode node, ReferenceHolder /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callVariableDeclarationExpressionVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8863,13 +6752,8 @@ public static void callVariableDeclarationExpressionVisitor(ASTNode node, /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callVariableDeclarationStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8882,14 +6766,8 @@ public static void callVariableDeclarationStatementVisitor(ASTNode node, /** * - * @param - * @param - * @param class1 - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callVariableDeclarationStatementVisitor(Class class1, ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8902,13 +6780,8 @@ public static void callVariableDeclarationStatementVisitor(Class class /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callVariableDeclarationFragmentVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8921,13 +6794,8 @@ public static void callVariableDeclarationFragmentVisitor(ASTNode node, R /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callWhileStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8940,13 +6808,8 @@ public static void callWhileStatementVisitor(ASTNode node, ReferenceHolde /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callWildcardTypeVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, BiConsumer> bc) { @@ -8958,13 +6821,8 @@ public static void callWildcardTypeVisitor(ASTNode node, ReferenceHolder< /** * - * @param - * @param - * @param node - * @param dataholder * @param nodesprocessed - set of nodes processed * @param bs - BiPredicate that can be assigned a lambda expression - * @param bc */ public static void callYieldStatementVisitor(ASTNode node, ReferenceHolder dataholder, Set nodesprocessed, BiPredicate> bs, @@ -8975,9 +6833,6 @@ public static void callYieldStatementVisitor(ASTNode node, ReferenceHolde hv.build(node); } - /** - * - */ public void clear() { this.consumermap.clear(); this.consumerdata.clear(); diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitorProvider.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitorProvider.java index e1553a66c16..dd1545a831e 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitorProvider.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitorProvider.java @@ -19,7 +19,6 @@ * @param - type of key in HelperVisitor mapping * @param - type of value in HelperVisitor mapping * @param - type that extends HelperVisitorProvider providing HelperVisitor mapping V -> T - * */ public interface HelperVisitorProvider> { /** diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/LambdaASTVisitor.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/LambdaASTVisitor.java index 517d60fdfb4..5dc9f5b17d6 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/LambdaASTVisitor.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/LambdaASTVisitor.java @@ -28,9 +28,6 @@ */ @SuppressWarnings("unchecked") public class LambdaASTVisitor, V, T> extends ASTVisitor { - /** - * - */ private final HelperVisitor helperVisitor; /** diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ReferenceHolder.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ReferenceHolder.java index f629801ccd3..4f23a2abf74 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ReferenceHolder.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ReferenceHolder.java @@ -29,16 +29,10 @@ */ public class ReferenceHolder extends ConcurrentHashMap implements HelperVisitorProvider> { - /** - * - */ private static final long serialVersionUID= 1L; HelperVisitor, V, T> hv; - /** - * - */ public ReferenceHolder() { } diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/VisitorEnum.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/VisitorEnum.java index efa0a8665c7..24fda26c064 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/VisitorEnum.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/VisitorEnum.java @@ -27,525 +27,213 @@ */ public enum VisitorEnum { - /** - * - */ AnnotationTypeDeclaration(ASTNode.ANNOTATION_TYPE_DECLARATION), - /** - * - */ AnnotationTypeMemberDeclaration(ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION), - /** - * - */ AnonymousClassDeclaration(ASTNode.ANONYMOUS_CLASS_DECLARATION), - /** - * - */ ArrayAccess(ASTNode.ARRAY_ACCESS), - /** - * - */ ArrayCreation(ASTNode.ARRAY_CREATION), - /** - * - */ ArrayInitializer(ASTNode.ARRAY_INITIALIZER), - /** - * - */ ArrayType(ASTNode.ARRAY_TYPE), - /** - * - */ AssertStatement(ASTNode.ASSERT_STATEMENT), - /** - * - */ Assignment(ASTNode.ASSIGNMENT), - /** - * - */ Block(ASTNode.BLOCK), - /** - * - */ BlockComment(ASTNode.BLOCK_COMMENT), - /** - * - */ BooleanLiteral(ASTNode.BOOLEAN_LITERAL), - /** - * - */ BreakStatement(ASTNode.BREAK_STATEMENT), - /** - * - */ CastExpression(ASTNode.CAST_EXPRESSION), - /** - * - */ CatchClause(ASTNode.CATCH_CLAUSE), - /** - * - */ CharacterLiteral(ASTNode.CHARACTER_LITERAL), - /** - * - */ ClassInstanceCreation(ASTNode.CLASS_INSTANCE_CREATION), - /** - * - */ CompilationUnit(ASTNode.COMPILATION_UNIT), - /** - * - */ ConditionalExpression(ASTNode.CONDITIONAL_EXPRESSION), - /** - * - */ ConstructorInvocation(ASTNode.CONSTRUCTOR_INVOCATION), - /** - * - */ ContinueStatement(ASTNode.CONTINUE_STATEMENT), - /** - * - */ CreationReference(ASTNode.CREATION_REFERENCE), - /** - * - */ Dimension(ASTNode.DIMENSION), - /** - * - */ DoStatement(ASTNode.DO_STATEMENT), - /** - * - */ EmptyStatement(ASTNode.EMPTY_STATEMENT), - /** - * - */ EnhancedForStatement(ASTNode.ENHANCED_FOR_STATEMENT), - /** - * - */ EnumConstantDeclaration(ASTNode.ENUM_CONSTANT_DECLARATION), - /** - * - */ EnumDeclaration(ASTNode.ENUM_DECLARATION), - /** - * - */ ExportsDirective(ASTNode.EXPORTS_DIRECTIVE), - /** - * - */ ExpressionMethodReference(ASTNode.EXPRESSION_METHOD_REFERENCE), - /** - * - */ ExpressionStatement(ASTNode.EXPRESSION_STATEMENT), - /** - * - */ FieldAccess(ASTNode.FIELD_ACCESS), - /** - * - */ FieldDeclaration(ASTNode.FIELD_DECLARATION), - /** - * - */ ForStatement(ASTNode.FOR_STATEMENT), - /** - * - */ IfStatement(ASTNode.IF_STATEMENT), - /** - * - */ ImportDeclaration(ASTNode.IMPORT_DECLARATION), - /** - * - */ InfixExpression(ASTNode.INFIX_EXPRESSION), - /** - * - */ Initializer(ASTNode.INITIALIZER), - /** - * - */ InstanceofExpression(ASTNode.INSTANCEOF_EXPRESSION), - /** - * - */ IntersectionType(ASTNode.INTERSECTION_TYPE), - /** - * - */ Javadoc(ASTNode.JAVADOC), - /** - * - */ LabeledStatement(ASTNode.LABELED_STATEMENT), - /** - * - */ LambdaExpression(ASTNode.LAMBDA_EXPRESSION), - /** - * - */ LineComment(ASTNode.LINE_COMMENT), - /** - * - */ MarkerAnnotation(ASTNode.MARKER_ANNOTATION), - /** - * - */ MemberRef(ASTNode.MEMBER_REF), - /** - * - */ MemberValuePair(ASTNode.MEMBER_VALUE_PAIR), - /** - * - */ MethodRef(ASTNode.METHOD_REF), - /** - * - */ MethodRefParameter(ASTNode.METHOD_REF_PARAMETER), - /** - * - */ MethodDeclaration(ASTNode.METHOD_DECLARATION), - /** - * - */ MethodInvocation(ASTNode.METHOD_INVOCATION), - /** - * - */ Modifier(ASTNode.MODIFIER), - /** - * - */ ModuleDeclaration(ASTNode.MODULE_DECLARATION), - /** - * - */ ModuleModifier(ASTNode.MODULE_MODIFIER), - /** - * - */ NameQualifiedType(ASTNode.NAME_QUALIFIED_TYPE), - /** - * - */ NormalAnnotation(ASTNode.NORMAL_ANNOTATION), - /** - * - */ NullLiteral(ASTNode.NULL_LITERAL), - /** - * - */ NumberLiteral(ASTNode.NUMBER_LITERAL), - /** - * - */ OpensDirective(ASTNode.OPENS_DIRECTIVE), - /** - * - */ PackageDeclaration(ASTNode.PACKAGE_DECLARATION), - /** - * - */ ParameterizedType(ASTNode.PARAMETERIZED_TYPE), - /** - * - */ ParenthesizedExpression(ASTNode.PARENTHESIZED_EXPRESSION), - /** - * - */ PatternInstanceofExpression(ASTNode.PATTERN_INSTANCEOF_EXPRESSION), - /** - * - */ PostfixExpression(ASTNode.POSTFIX_EXPRESSION), - /** - * - */ PrefixExpression(ASTNode.PREFIX_EXPRESSION), - /** - * - */ ProvidesDirective(ASTNode.PROVIDES_DIRECTIVE), - /** - * - */ PrimitiveType(ASTNode.PRIMITIVE_TYPE), - /** - * - */ QualifiedName(ASTNode.QUALIFIED_NAME), - /** - * - */ QualifiedType(ASTNode.QUALIFIED_TYPE), // ModuleQualifiedName(ASTNode.MODULE_QUALIFIED_NAME), - /** - * - */ RequiresDirective(ASTNode.REQUIRES_DIRECTIVE), - /** - * - */ RecordDeclaration(ASTNode.RECORD_DECLARATION), - /** - * - */ ReturnStatement(ASTNode.RETURN_STATEMENT), - /** - * - */ SimpleName(ASTNode.SIMPLE_NAME), - /** - * - */ SimpleType(ASTNode.SIMPLE_TYPE), - /** - * - */ SingleMemberAnnotation(ASTNode.SINGLE_MEMBER_ANNOTATION), - /** - * - */ SingleVariableDeclaration(ASTNode.SINGLE_VARIABLE_DECLARATION), - /** - * - */ StringLiteral(ASTNode.STRING_LITERAL), - /** - * - */ SuperConstructorInvocation(ASTNode.SUPER_CONSTRUCTOR_INVOCATION), - /** - * - */ SuperFieldAccess(ASTNode.SUPER_FIELD_ACCESS), - /** - * - */ SuperMethodInvocation(ASTNode.SUPER_METHOD_INVOCATION), - /** - * - */ SuperMethodReference(ASTNode.SUPER_METHOD_REFERENCE), - /** - * - */ SwitchCase(ASTNode.SWITCH_CASE), - /** - * - */ SwitchExpression(ASTNode.SWITCH_EXPRESSION), - /** - * - */ SwitchStatement(ASTNode.SWITCH_STATEMENT), - /** - * - */ SynchronizedStatement(ASTNode.SYNCHRONIZED_STATEMENT), - /** - * - */ TagElement(ASTNode.TAG_ELEMENT), - /** - * - */ TextBlock(ASTNode.TEXT_BLOCK), - /** - * - */ TextElement(ASTNode.TEXT_ELEMENT), - /** - * - */ ThisExpression(ASTNode.THIS_EXPRESSION), - /** - * - */ ThrowStatement(ASTNode.THROW_STATEMENT), - /** - * - */ TryStatement(ASTNode.TRY_STATEMENT), - /** - * - */ TypeDeclaration(ASTNode.TYPE_DECLARATION), - /** - * - */ TypeDeclarationStatement(ASTNode.TYPE_DECLARATION_STATEMENT), - /** - * - */ TypeLiteral(ASTNode.TYPE_LITERAL), - /** - * - */ TypeMethodReference(ASTNode.TYPE_METHOD_REFERENCE), - /** - * - */ TypeParameter(ASTNode.TYPE_PARAMETER), - /** - * - */ UnionType(ASTNode.UNION_TYPE), - /** - * - */ UsesDirective(ASTNode.USES_DIRECTIVE), - /** - * - */ VariableDeclarationExpression(ASTNode.VARIABLE_DECLARATION_EXPRESSION), - /** - * - */ VariableDeclarationStatement(ASTNode.VARIABLE_DECLARATION_STATEMENT), - /** - * - */ VariableDeclarationFragment(ASTNode.VARIABLE_DECLARATION_FRAGMENT), - /** - * - */ WhileStatement(ASTNode.WHILE_STATEMENT), - /** - * - */ WildcardType(ASTNode.WILDCARD_TYPE), - /** - * - */ YieldStatement(ASTNode.YIELD_STATEMENT); int nodetype; diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/core/manipulation/CodeTemplateContextType.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/core/manipulation/CodeTemplateContextType.java index ef18d4548bc..6e65d4e0eca 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/core/manipulation/CodeTemplateContextType.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/core/manipulation/CodeTemplateContextType.java @@ -33,8 +33,6 @@ import org.eclipse.jdt.internal.core.manipulation.util.BasicElementLabels; import org.eclipse.jdt.internal.corext.dom.TokenScanner; -/** - */ public class CodeTemplateContextType extends TemplateContextType { /* context types */ diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/jarpackager/JarPackagerUtilCore.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/jarpackager/JarPackagerUtilCore.java index d0206f58e01..80b6a16d925 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/jarpackager/JarPackagerUtilCore.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/jarpackager/JarPackagerUtilCore.java @@ -61,7 +61,6 @@ private JarPackagerUtilCore() { * @throws IOException If an I/O error occurred * * @since 1.14 - * */ public static void addEntry(JarEntry entry, InputStream content, JarOutputStream jarOutputStream) throws IOException { byte[] readBuffer= new byte[4096]; @@ -98,7 +97,6 @@ public static void addEntry(JarEntry entry, InputStream content, JarOutputStream * @param progressMonitor the progressMonitor * * @since 1.14 - * */ public static void writeArchive(ZipFile zipFile, boolean areDirectoryEntriesIncluded, boolean isCompressed, JarOutputStream jarOutputStream, @@ -145,7 +143,6 @@ public static void writeArchive(ZipFile zipFile, boolean areDirectoryEntriesIncl * @param status the MultiStatus saving the warnings during the process * * @since 1.14 - * */ private static void addFile(String destinationPath, ZipEntry jarEntry, ZipFile zipFile, boolean areDirectoryEntriesIncluded, boolean isCompressed, @@ -184,7 +181,6 @@ private static void addFile(String destinationPath, ZipEntry jarEntry, ZipFile z * @throws IOException If an I/O error occurred * * @since 1.14 - * */ public static void addZipEntry(ZipEntry zipEntry, ZipFile zipFile, String path, boolean areDirectoryEntriesIncluded, boolean isCompressed, @@ -261,7 +257,6 @@ public static void addDirectories(String destPath, JarOutputStream jarOutputStre * @throws CoreException if an error has occurred * * @since 1.14 - * */ public static void write(File file, IPath destinationPath, boolean areDirectoryEntriesIncluded, boolean isCompressed, JarOutputStream jarOutputStream, Set directories) throws CoreException { @@ -294,7 +289,6 @@ public static void write(File file, IPath destinationPath, boolean areDirectoryE * @throws IOException if an I/O error has occurred * * @since 1.14 - * */ private static void addFile(File file, IPath path, boolean areDirectoryEntriesIncluded, boolean isCompressed, JarOutputStream jarOutputStream, Set directories) throws IOException { diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/browsing/LogicalPackage.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/browsing/LogicalPackage.java index de8c3e3e6a1..355a5446a69 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/browsing/LogicalPackage.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/browsing/LogicalPackage.java @@ -76,7 +76,6 @@ public int size(){ * resides inside the same project as the other fragments in * the LogicalPackage. * - * @param fragment * @return boolean */ public boolean belongs(IPackageFragment fragment) { diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUpCore.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUpCore.java index a8907c3d501..b5af7350689 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUpCore.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUpCore.java @@ -37,7 +37,6 @@ /** * Create fixes which can remove unused code * see org.eclipse.jdt.internal.corext.fix.UnusedCodeFix - * */ public class UnusedCodeCleanUpCore extends AbstractMultiFixCore { diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessorCore.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessorCore.java index cad7b5dd329..6e050e9f9b1 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessorCore.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessorCore.java @@ -32,9 +32,6 @@ import org.eclipse.jdt.internal.corext.dom.ASTNodes; -/** - * - */ public class JavadocTagsSubProcessorCore { static Set getPreviousExceptionNames(List list, ASTNode missingNode) { Set previousNames= new HashSet<>(); diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessorCore.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessorCore.java index d660ad15124..63dcd5c940d 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessorCore.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessorCore.java @@ -43,8 +43,6 @@ import org.eclipse.jdt.internal.corext.fix.LinkedProposalModelCore; import org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroupCore; -/** - */ public class ModifierCorrectionSubProcessorCore { public static final String KEY_MODIFIER= "modifier"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ProblemLocationCore.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ProblemLocationCore.java index c8744937005..22dae42e22b 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ProblemLocationCore.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/ProblemLocationCore.java @@ -21,9 +21,6 @@ import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.NodeFinder; -/** - * - */ public class ProblemLocationCore implements IProblemLocationCore { private final int fId; diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/PatternConstructor.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/PatternConstructor.java index cb9951d850c..59d94af5a2d 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/PatternConstructor.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/PatternConstructor.java @@ -16,9 +16,6 @@ import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; -/** - * - */ public class PatternConstructor { @@ -33,7 +30,6 @@ private PatternConstructor() { * @param isCaseSensitive Set to true to create a case insensitive pattern * @param isRegexSearch true if the passed string already is a reg-ex pattern * @return The created pattern - * @throws PatternSyntaxException */ public static Pattern createPattern(String pattern, boolean isCaseSensitive, boolean isRegexSearch) throws PatternSyntaxException { if (!isRegexSearch) { @@ -53,7 +49,6 @@ public static Pattern createPattern(String pattern, boolean isCaseSensitive, boo * @param isCaseSensitive Set to true to create a case insensitive pattern * @param isRegexSearch true if the passed string already is a reg-ex pattern * @return The created pattern - * @throws PatternSyntaxException */ public static Pattern createPattern(String[] patterns, boolean isCaseSensitive, boolean isRegexSearch) throws PatternSyntaxException { StringBuffer pattern= new StringBuffer(); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallLocation.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallLocation.java index d00366a02a2..9c1bffbe615 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallLocation.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallLocation.java @@ -53,9 +53,6 @@ public IMember getCalledMember() { return fCalledMember; } - /** - * - */ public int getEnd() { return fEnd; } @@ -64,9 +61,6 @@ public IMember getMember() { return fMember; } - /** - * - */ public int getStart() { return fStart; } diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallSearchResultCollector.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallSearchResultCollector.java index 2ab3af77369..9bc574ee5a6 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallSearchResultCollector.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallSearchResultCollector.java @@ -70,7 +70,6 @@ protected Map createCalledMethodsData() { /** * Method isIgnored. - * @param enclosingElement * @return boolean */ private boolean isIgnored(IMember enclosingElement) { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodCall.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodCall.java index a04e7977f52..fe7d3f8914a 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodCall.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodCall.java @@ -25,9 +25,6 @@ public class MethodCall { private List fCallLocations; private boolean potential; - /** - * @param enclosingElement - */ public MethodCall(IMember enclosingElement) { this(enclosingElement, false); } @@ -44,9 +41,6 @@ public MethodCall(IMember enclosingElement, boolean potential) { } - /** - * - */ public Collection getCallLocations() { return fCallLocations; } @@ -70,16 +64,10 @@ public String getKey() { return getMember().getHandleIdentifier(); } - /** - * - */ public IMember getMember() { return fMember; } - /** - * @param location - */ public void addCallLocation(CallLocation location) { if (fCallLocations == null) { fCallLocations = new ArrayList<>(); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java index f83511f1a60..b18b3bd5584 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java @@ -31,7 +31,6 @@ /** * This class represents the general parts of a method call (either to or from a * method). - * */ public abstract class MethodWrapper extends PlatformObject { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java index 57e16c791fb..8ba102638ca 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java @@ -54,7 +54,6 @@ * exactly analogous to the dispatching behaviour obtained when method implementations are added to * the same ASTNode descendant classes. *

- * */ // @see JDTUIHelperClasses /* @@ -63,7 +62,6 @@ * The structure and behaviour of this class is * verified reflectively by * org.eclipse.jdt.ui.tests.core.HierarchicalASTVisitorTest - * */ public abstract class HierarchicalASTVisitor extends ASTVisitor { //TODO: check callers for handling of comments diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java index 76955bbe72e..484d0028f2d 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java @@ -42,7 +42,6 @@ * See the documentation of the factory methods. * * @see IASTFragment - * */ public class ASTFragmentFactory { @@ -76,7 +75,6 @@ public static IASTFragment createFragmentForFullSubtree(ASTNode node) { * @return IASTFragment A fragment whose source range is range within * compilation unit cu, residing somewhere within the * AST subtree identified by scope. - * @throws JavaModelException */ public static IASTFragment createFragmentForSourceRange(ISourceRange range, ASTNode scope, ICompilationUnit cu) throws JavaModelException { SelectionAnalyzer sa= new SelectionAnalyzer(Selection.createFromStartLength(range.getOffset(), range.getLength()), false); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IASTFragment.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IASTFragment.java index 9b22a6c4a92..bc71248e4a3 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IASTFragment.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IASTFragment.java @@ -38,7 +38,6 @@ * sub-fragments (fragments contained within a * parent fragment, including the parent itself) * which 'match' another given fragment. - * */ public interface IASTFragment { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IExpressionFragment.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IExpressionFragment.java index dc126e3c9d7..62d7748ab23 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IExpressionFragment.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/fragments/IExpressionFragment.java @@ -42,7 +42,6 @@ public interface IExpressionFragment extends IASTFragment { * the copied node. * @return a copy of this IExpressionFragment, ready for use in the given * rewrite - * @throws JavaModelException */ Expression createCopyTarget(ASTRewrite rewrite, boolean removeSurroundingParenthesis) throws JavaModelException; } diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java index b0acdd4c2e6..3f3d294e731 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java @@ -49,7 +49,6 @@ * Supported: * Add missing $NON-NLS$ tag * Remove unnecessary $NON-NLS$ tag - * */ public class StringFixCore implements IProposableFix, ICleanUpFixCore { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFixCore.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFixCore.java index ba482253e1f..ed89eeee2fe 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFixCore.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFixCore.java @@ -171,7 +171,6 @@ public void rewriteAST(CompilationUnitRewrite cuRewrite, LinkedProposalModelCore /** * Removes the unused type parameter. - * */ public static class RemoveUnusedTypeParameterOperation extends CompilationUnitRewriteOperation { private final SimpleName fUnusedName; diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UpdateProperty.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UpdateProperty.java index 62985690362..393d529c607 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UpdateProperty.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/UpdateProperty.java @@ -69,7 +69,6 @@ public enum UpdateProperty { * System.getProperty("file.encoding"); * to * Charset.defaultCharset().displayName(); since Java 1.5 - * */ FILE_ENCODING("file.encoding", //$NON-NLS-1$ Charset.class, @@ -86,7 +85,6 @@ public enum UpdateProperty { * System.getProperty("path.separator"); * to * File.pathSeparator; - * */ PATH_SEPARATOR("path.separator", //$NON-NLS-1$ null, @@ -215,7 +213,6 @@ public boolean visit(final MethodInvocation visited) { * System.getProperty("path.separator"); * System.getProperty("file.separator"); * System.getProperty("line.separator"); - * */ if (ASTNodes.usesGivenSignature(visited, System.class.getCanonicalName(), METHOD_GET_PROPERTY, String.class.getCanonicalName())) { Expression expression= (Expression) visited.arguments().get(0); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/helper/WhileToForEach.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/helper/WhileToForEach.java index 18c9e799837..c5d32fb6ba1 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/helper/WhileToForEach.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/helper/WhileToForEach.java @@ -72,7 +72,6 @@ * Find: while (it.hasNext()){ System.out.println(it.next()); } * * Rewrite: for(Object o:collection) { System.out.println(o); }); - * */ public class WhileToForEach extends AbstractTool { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java index 76944b6f6f4..55dab8ea6d2 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java @@ -101,9 +101,6 @@ private Checks(){ /** * Checks if method will have a constructor name after renaming. - * @param method - * @param newMethodName - * @param newTypeName * @return RefactoringStatus with WARNING severity if * the give method will have a constructor name after renaming * null otherwise. @@ -322,9 +319,6 @@ private static RefactoringStatus checkForMainAndNativeMethods(IMethod[] methods) /** * Checks if the new method is already used in the given type. - * @param type - * @param methodName - * @param parameters * @return the status */ public static RefactoringStatus checkMethodInType(ITypeBinding type, String methodName, ITypeBinding[] parameters) { @@ -350,10 +344,6 @@ public static RefactoringStatus checkMethodInType(ITypeBinding type, String meth *
  • if the new method overrides a method defined in the given type or in one of its * super classes.
  • * - * @param type - * @param methodName - * @param returnType - * @param parameters * @return the status */ public static RefactoringStatus checkMethodInHierarchy(ITypeBinding type, String methodName, ITypeBinding returnType, ITypeBinding[] parameters) { @@ -483,12 +473,7 @@ public static RefactoringStatus checkName(String name, IStatus status) { * Finds a method in a type * This searches for a method with the same name and signature. Parameter types are only * compared by the simple name, no resolving for the fully qualified type name is done - * @param name - * @param parameterCount - * @param isConstructor - * @param type * @return The first found method or null, if nothing found - * @throws JavaModelException */ public static IMethod findMethod(String name, int parameterCount, boolean isConstructor, IType type) throws JavaModelException { return findMethod(name, parameterCount, isConstructor, type.getMethods()); @@ -498,10 +483,7 @@ public static IMethod findMethod(String name, int parameterCount, boolean isCons * Finds a method in a type. * Searches for a method with the same name and the same parameter count. * Parameter types are not compared. - * @param method - * @param type * @return The first found method or null, if nothing found - * @throws JavaModelException */ public static IMethod findMethod(IMethod method, IType type) throws JavaModelException { return findMethod(method.getElementName(), method.getParameterTypes().length, method.isConstructor(), type.getMethods()); @@ -511,10 +493,7 @@ public static IMethod findMethod(IMethod method, IType type) throws JavaModelExc * Finds a method in an array of methods. * Searches for a method with the same name and the same parameter count. * Parameter types are not compared. - * @param method - * @param methods * @return The first found method or null, if nothing found - * @throws JavaModelException */ public static IMethod findMethod(IMethod method, IMethod[] methods) throws JavaModelException { return findMethod(method.getElementName(), method.getParameterTypes().length, method.isConstructor(), methods); @@ -538,10 +517,7 @@ public static IMethod findMethod(String name, int parameters, boolean isConstruc * Finds a method in a type. * This searches for a method with the same name and signature. Parameter types are only * compared by the simple name, no resolving for the fully qualified type name is done - * @param method - * @param type * @return The first found method or null, if nothing found - * @throws JavaModelException */ public static IMethod findSimilarMethod(IMethod method, IType type) throws JavaModelException { return findSimilarMethod(method, type.getMethods()); @@ -551,10 +527,7 @@ public static IMethod findSimilarMethod(IMethod method, IType type) throws JavaM * Finds a method in an array of methods. * This searches for a method with the same name and signature. Parameter types are only * compared by the simple name, no resolving for the fully qualified type name is done - * @param method - * @param methods * @return The first found method or null, if nothing found - * @throws JavaModelException */ public static IMethod findSimilarMethod(IMethod method, IMethod[] methods) throws JavaModelException { boolean isConstructor= method.isConstructor(); @@ -603,7 +576,6 @@ else if (! cu.isStructureKnown()) * units are to be removed. * @param status a refactoring status to collect errors and problems * @return the array of search result groups - * @throws JavaModelException */ public static SearchResultGroup[] excludeCompilationUnits(SearchResultGroup[] grouped, RefactoringStatus status) throws JavaModelException{ List result= new ArrayList<>(); @@ -788,7 +760,6 @@ public static RefactoringStatus validateEdit(ICompilationUnit unit, Object conte * Moreover, if it is a IMember it must not be binary. * The returned RefactoringStatus has ERROR severity if * it is not possible to modify the element. - * @param javaElement * @return the status * @throws JavaModelException * @@ -896,7 +867,6 @@ public static boolean isException(IType iType, IProgressMonitor pm) throws JavaM } /** - * @param e * @return int * Checks.IS_RVALUE if e is an rvalue * Checks.IS_RVALUE_GUESSED if e is guessed as an rvalue diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java index 5a3e7a48dbf..c93fcf0f464 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java @@ -75,7 +75,6 @@ public void collectMatch(SearchMatch match) { * * @param match the match to test * @return true iff the given match should not be collected - * @throws CoreException */ public boolean filterMatch(SearchMatch match) throws CoreException { if (fBinaryRefs == null) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java index 6e85bfb3241..0330ea6e85b 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java @@ -59,8 +59,6 @@ protected IScanner getScanner(ICompilationUnit unit) { /** * This is an internal method. Do not call from subclasses! * Use {@link #collectMatch(SearchMatch)} instead. - * @param match - * @throws CoreException * @deprecated */ @Deprecated diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java index cfc7de6f6a5..f2840d8f2b2 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java @@ -107,7 +107,6 @@ *

    * * @since 3.2 - * */ public abstract class DelegateCreator { @@ -122,7 +121,6 @@ public abstract class DelegateCreator { * ASTRewrite (add or replace). * * 2) A new CuRewrite from which we'll only use the ASTRewrite to build the new delegate. - * */ private CompilationUnitRewrite fOriginalRewrite; private CompilationUnitRewrite fDelegateRewrite; @@ -237,7 +235,6 @@ public void setInsertBefore(boolean insertBefore) { /** * Initializes the creator. Must set the "new" name of the element if not * already set. - * */ protected abstract void initialize(); @@ -247,7 +244,6 @@ public void setInsertBefore(boolean insertBefore) { * * @param declaration the member declaration * @return the body of the delegate - * @throws JavaModelException */ protected abstract ASTNode createBody(BodyDeclaration declaration) throws JavaModelException; @@ -259,7 +255,6 @@ public void setInsertBefore(boolean insertBefore) { * * @param declaration the member declaration * @return the javadoc link node - * @throws JavaModelException */ protected abstract ASTNode createDocReference(BodyDeclaration declaration) throws JavaModelException; @@ -313,7 +308,6 @@ protected String getNewElementName() { * * All references to the new member will contain the new name of the member * and/or new declaring type, if any. - * */ public void prepareDelegate() throws JavaModelException { Assert.isNotNull(fDelegateRewrite); @@ -343,8 +337,6 @@ public void prepareDelegate() throws JavaModelException { /** * Creates the javadoc for the delegate. - * - * @throws JavaModelException */ private void createJavadoc() throws JavaModelException { TagElement tag= getDelegateJavadocTag(fDeclaration); @@ -361,8 +353,6 @@ private void createJavadoc() throws JavaModelException { /** * Performs the actual rewriting and adds an edit to the ASTRewrite set with * {@link #setSourceRewrite(CompilationUnitRewrite)}. - * - * @throws JavaModelException */ public void createEdit() throws JavaModelException { try { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java index 525463ab08f..a2889c948da 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java @@ -109,8 +109,6 @@ public InferTypeArgumentsTCModel() { * their constituent ConstraintVariables and ConstraintOperators. Can be used to e.g. * avoid creation of constraints for assignments between built-in types. * - * @param cv1 - * @param cv2 * @return true iff the type constraint should really be created */ protected boolean keep(ConstraintVariable2 cv1, ConstraintVariable2 cv2) { @@ -140,7 +138,6 @@ protected boolean keep(ConstraintVariable2 cv1, ConstraintVariable2 cv2) { } /** - * @param cv * @return a List of ITypeConstraint2s where cv is used */ @SuppressWarnings("unchecked") @@ -429,9 +426,6 @@ public ParameterTypeVariable2 makeParameterTypeVariable(IMethodBinding methodBin /** * Make a ParameterTypeVariable2 from a method declaration. * The constraint variable is always stored if it passes the type filter. - * @param methodBinding - * @param parameterIndex - * @param cu * @return the ParameterTypeVariable2, or null */ public ParameterTypeVariable2 makeDeclaredParameterTypeVariable(IMethodBinding methodBinding, int parameterIndex, ICompilationUnit cu) { @@ -688,7 +682,6 @@ private void makeFixedSupertypeElementVariables(ConstraintVariable2 expressionCv * the type variable E in referenceCV. * * @param expressionCv the type constraint variable of an expression - * @param methodTypeVariables * @param referenceCv the type constraint variable of a type reference * @param reference the declared type reference */ diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/ParametricStructureComputer.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/ParametricStructureComputer.java index 1848e8ddd15..34f886c8a9c 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/ParametricStructureComputer.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/generics/ParametricStructureComputer.java @@ -325,8 +325,6 @@ private void updateElementVarStructureFromParent(ConstraintVariable2 v) { /** * Updates the structure of the parent container variable of the given * CollectionElementVariable2 from the structure of 'v1'. - * @param elemVar - * @param v1 */ private void updateParentContainerStructureFrom(CollectionElementVariable2 elemVar, ConstraintVariable2 v1) { ConstraintVariable2 elemContainer= elemVar.getParentConstraintVariable(); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/MethodChecks.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/MethodChecks.java index 4517b3ca127..8bc527bb99b 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/MethodChecks.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/MethodChecks.java @@ -50,7 +50,6 @@ private MethodChecks(){ * * @param method a method * @return true iff the method could a virtual method - * @throws JavaModelException */ public static boolean isVirtual(IMethod method) throws JavaModelException { if (method.isConstructor()) @@ -145,7 +144,6 @@ public static IMethod overridesAnotherMethod(IMethod method, ITypeHierarchy hier * @param typeHierarchy a ITypeHierarchy of the declaring type of the method. May be null * @param monitor an IProgressMonitor * @return the topmost method of the ripple, or null if none - * @throws JavaModelException */ public static IMethod getTopmostMethod(IMethod method, ITypeHierarchy typeHierarchy, IProgressMonitor monitor) throws JavaModelException { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java index c6c00649ad1..9d7d25b425f 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java @@ -307,8 +307,6 @@ private static void analyzeChanges(ICompilationUnit cu, TextChange change, /** * - * @param change - * @param oldMatches * @return Map <Integer updatedOffset, SearchMatch oldMatch> */ private static Map getUpdatedChangeOffsets(TextChange change, SearchMatch[] oldMatches) { @@ -325,7 +323,6 @@ private static Map getUpdatedChangeOffsets(TextChange chan /** * - * @param change * @return Map <Integer oldOffset, Integer updatedOffset> */ private static Map getEditChangeOffsetUpdates(TextChange change) { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java index 8595502cc2f..49882e63590 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenamingNameSuggestor.java @@ -99,7 +99,6 @@ * * * @since 3.2 - * */ public class RenamingNameSuggestor { @@ -136,7 +135,6 @@ public class RenamingNameSuggestor { * type name, for example "handies" for "Handy" or "phones" for "MobilePhone". * The target name will be transformed as well, i.e. conversion like * "fHandies" -> "fPhones" are supported. - * */ public static final int STRATEGY_EXACT= 1; @@ -448,7 +446,6 @@ private boolean isLegalChar(char c) { * "JavaElementName" => { "Java", "Element", "Name } * * "ASTNode" => { "AST", "Node" } - * */ private String[] getSuffixes(String typeName) { List suffixes= new ArrayList<>(); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/BodyUpdater.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/BodyUpdater.java index 6cf38c7578b..e0edaaf9b5e 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/BodyUpdater.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/BodyUpdater.java @@ -27,11 +27,6 @@ public abstract class BodyUpdater { * Updates the body of a method declaration. This method is called by the * {@link ChangeSignatureProcessor} and allows implementors to refactor the body * of the given method declaration. - * - * @param methodDeclaration - * @param cuRewrite - * @param result - * @throws CoreException */ public abstract void updateBody(MethodDeclaration methodDeclaration, CompilationUnitRewrite cuRewrite, RefactoringStatus result) throws CoreException; diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/MemberCheckUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/MemberCheckUtil.java index 6f27c070442..6202d05363c 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/MemberCheckUtil.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/structure/MemberCheckUtil.java @@ -154,7 +154,6 @@ private static boolean typeNameExistsInEnclosingTypeChain(IType type, String typ * @param method the method to find * @param allMethods the methods to look at * @return The found method or null, if nothing found - * @throws JavaModelException */ public static IMethod findMethod(IMethod method, IMethod[] allMethods) throws JavaModelException { String name= method.getElementName(); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/tagging/IDelegateUpdating.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/tagging/IDelegateUpdating.java index 746701c6c8e..ed09bca0737 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/tagging/IDelegateUpdating.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/tagging/IDelegateUpdating.java @@ -18,7 +18,6 @@ * appropriate delegates for the refactored elements. * * @since 3.2 - * */ public interface IDelegateUpdating { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ITypeConstraintFactory.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ITypeConstraintFactory.java index 89bdab8a5ba..ee2ddf085d0 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ITypeConstraintFactory.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ITypeConstraintFactory.java @@ -29,9 +29,6 @@ public interface ITypeConstraintFactory { * their constituent ConstraintVariables and ConstraintOperators. Can be used to e.g. * avoid creation of constraints for assignments between built-in types. * - * @param v1 - * @param v2 - * @param operator * @return whether the constraint should not be created */ boolean filter(ConstraintVariable v1, ConstraintVariable v2, ConstraintOperator operator); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/CollectionElementVariable2.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/CollectionElementVariable2.java index 43ee4636927..03d27904c68 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/CollectionElementVariable2.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/CollectionElementVariable2.java @@ -32,7 +32,6 @@ public final class CollectionElementVariable2 extends ConstraintVariable2 { /** * @param parentCv the parent constraint variable * @param typeVariable the type variable for this constraint - * @param declarationTypeVariableIndex */ public CollectionElementVariable2(ConstraintVariable2 parentCv, ITypeBinding typeVariable, int declarationTypeVariableIndex) { super(null); diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/TTypes.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/TTypes.java index 6b25f0d547d..6d225463af5 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/TTypes.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/typeconstraints2/TTypes.java @@ -124,8 +124,6 @@ public static Iterator getAllSuperTypesIterator(TType type) { } /** - * @param rhs - * @param lhs * @return true iff an expression of type 'rhs' can be assigned to a variable of type 'lhs'. * Type arguments of generic / raw / parameterized types are not considered. */ diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/util/JavadocUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/util/JavadocUtil.java index 088d547adb2..7d7cf9e7d7c 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/util/JavadocUtil.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/util/JavadocUtil.java @@ -81,11 +81,6 @@ public static boolean shouldAddParamJavadoc(MethodDeclaration methodDeclaration) /** * Adds a "param" javadoc tag for a new last parameter if necessary. - * @param parameterName - * @param methodDeclaration - * @param astRewrite - * @param javaProject - * @param groupDescription */ public static void addParamJavadoc(String parameterName, MethodDeclaration methodDeclaration, ASTRewrite astRewrite, IJavaProject javaProject, TextEditGroup groupDescription) { diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java index 559b73c055d..e929fc2c5e7 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java @@ -307,9 +307,7 @@ private ASTNode getTargetNode(ICompilationUnit unit, int offset, int length) { /** * Determines what kind of AST node was selected, and returns an error status * if the kind of node is inappropriate for this refactoring. - * @param pm * @return a RefactoringStatus indicating whether the selection is valid - * @throws JavaModelException */ private RefactoringStatus checkSelection(IProgressMonitor pm) throws JavaModelException { try { @@ -391,7 +389,6 @@ public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws Core } /** - * @param searchHits * @return the set of compilation units that will be affected by this * particular invocation of this refactoring. This in general includes * the class containing the constructor in question, as well as all @@ -414,8 +411,6 @@ private ICompilationUnit[] collectAffectedUnits(SearchResultGroup[] searchHits) } /** - * @param ctor - * @param methodBinding * @return a SearchPattern that finds all calls to the constructor * identified by the argument methodBinding. */ @@ -452,7 +447,6 @@ private IJavaSearchScope createSearchScope(IMethod ctor, IMethodBinding binding) } /** - * @param groups * @return an array of SearchResultGroup's like the argument, * but omitting those groups that have no corresponding compilation unit * (i.e. are binary and therefore can't be modified). @@ -474,11 +468,7 @@ private SearchResultGroup[] excludeBinaryUnits(SearchResultGroup[] groups) { /** * Search for all calls to the given IMethodBinding in the project * that contains the compilation unit fCUHandle. - * @param methodBinding - * @param pm - * @param status * @return an array of SearchResultGroup's that identify the search matches - * @throws JavaModelException */ private SearchResultGroup[] searchForCallsTo(IMethodBinding methodBinding, IProgressMonitor pm, RefactoringStatus status) throws JavaModelException { IMethod method= (IMethod) methodBinding.getJavaElement(); @@ -502,10 +492,8 @@ private SearchResultGroup[] searchForCallsTo(IMethodBinding methodBinding, IProg * constructor signature to search for * @param pm an IProgressMonitor to use during this potentially * lengthy operation - * @param status * @return an array of SearchResultGroup's identifying all * calls to the given constructor signature - * @throws JavaModelException */ private SearchResultGroup[] findAllCallsTo(IMethodBinding ctorBinding, IProgressMonitor pm, RefactoringStatus status) throws JavaModelException { SearchResultGroup[] groups= excludeBinaryUnits(searchForCallsTo(ctorBinding, pm, status)); @@ -795,9 +783,7 @@ private void copyTypeParameters(AST ast, MethodDeclaration newMethod) { } /** - * @param argType * @param extraDims number of extra array dimensions to add to the resulting type - * @param ast * @return a Type that describes the given ITypeBinding. If the binding * refers to an object type, use the import rewriter to determine whether * the reference requires a new import, or instead needs to be qualified.
    @@ -887,7 +873,6 @@ private void rewriteFactoryMethodCall(ClassInstanceCreation ctorCall, ASTRewrite } /** - * @param unit * @return true iff the given ICompilationUnit is the unit * containing the original constructor */ @@ -907,9 +892,6 @@ private boolean shouldProtectConstructor() { /** * Creates and adds the necessary change to make the constructor method protected. - * @param unitAST - * @param unitRewriter - * @param declGD * @return false iff the constructor didn't exist (i.e. was implicit) */ private boolean protectConstructor(CompilationUnit unitAST, ASTRewrite unitRewriter, TextEditGroup declGD) { @@ -927,10 +909,8 @@ private boolean protectConstructor(CompilationUnit unitAST, ASTRewrite unitRewri * SearchResultGroup to implement the refactoring transformation * to the given CompilationUnitChange. * @param rg the SearchResultGroup for which changes should be created - * @param unitHandle * @param unitChange the CompilationUnitChange object for the compilation unit in question * @return true iff a change has been added - * @throws CoreException */ private boolean addAllChangesFor(SearchResultGroup rg, ICompilationUnit unitHandle, CompilationUnitChange unitChange) throws CoreException { // ICompilationUnit unitHandle= rg.getCompilationUnit(); @@ -976,7 +956,6 @@ private boolean addAllChangesFor(SearchResultGroup rg, ICompilationUnit unitHand } /** - * @param unitHandle * @return an AST for the given compilation unit handle.
    * If this is the unit containing the selection or the unit in which the factory * is to reside, checks the appropriate field (fCU or fFactoryCU, @@ -1006,7 +985,6 @@ private CompilationUnit getASTFor(ICompilationUnit unitHandle) { * @param unit the CompilationUnit to be rewritten * @param unitRewriter the rewriter * @param unitChange the compilation unit change - * @throws CoreException * @return true iff at least one constructor call site was rewritten. */ private boolean replaceConstructorCalls(SearchResultGroup rg, CompilationUnit unit, ASTRewrite unitRewriter, CompilationUnitChange unitChange) throws CoreException { @@ -1049,11 +1027,7 @@ private void rewriteJavadocReference(MethodRef javadocRef, ASTRewrite unitRewrit * Look "in the vicinity" of the given range to find the ClassInstanceCreation * node that this search hit identified. Necessary because the SearchEngine * doesn't always cough up text extents that NodeFinder.perform() agrees with. - * @param start - * @param length - * @param unitAST * @return return a {@link ClassInstanceCreation} or a {@link MethodRef} or null if this is really a constructor->constructor call (e.g. "this(...)") - * @throws CoreException */ private ASTNode getCtorCallAt(int start, int length, CompilationUnit unitAST) throws CoreException { ICompilationUnit unitHandle= ASTCreator.getCu(unitAST); @@ -1243,7 +1217,6 @@ public RefactoringStatus setNewMethodName(String newMethodName) { } /** - * @param methodName * @return a RefactoringStatus that identifies whether the * the name newMethodName is available to use as the name of * the new factory method within the factory-owner class (either a to-be- @@ -1272,7 +1245,6 @@ public boolean canProtectConstructor() { /** * If the argument is true, change the visibility of the constructor to * protected, thereby encapsulating it. - * @param protectConstructor */ public void setProtectConstructor(boolean protectConstructor) { fProtectConstructor = protectConstructor; diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java index 09e6cfa6fe7..9310a3a1186 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java @@ -146,7 +146,6 @@ * enclosing types as well. However, the latter is only possible if the target method is from source. * * @since 3.2 - * */ public class IntroduceIndirectionRefactoring extends Refactoring { @@ -1027,7 +1026,6 @@ private RefactoringStatus updateMethodInvocation(MethodInvocation originalInvoca * @param enclosing the enclosing member of the original method invocation * @param unitRewriter the rewrite * @return resulting status - * */ private RefactoringStatus qualifyThisExpression(ThisExpression expr, MethodInvocation originalInvocation, IMember enclosing, CompilationUnitRewrite unitRewriter) { diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java index a7e632f84f4..69f0d929461 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java @@ -93,7 +93,6 @@ public boolean isEmpty() { * Tests whether the node to be replaced is invalid. * * @return true if the node is invalid, false otherwise - * */ public boolean isInvalidNode() { ASTNode first= fNodes.get(0); diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringHandleTransplanter.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringHandleTransplanter.java index b3e1bfb341e..a48e3635676 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringHandleTransplanter.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringHandleTransplanter.java @@ -38,7 +38,6 @@ * The returned handle exists in the target model state. * * @since 3.2 - * */ public class RefactoringHandleTransplanter { @@ -64,7 +63,6 @@ public RefactoringHandleTransplanter(IType oldType, IType newType, MapjavaElements
    , or null iff * javaElements does not contain package fragments * @return the created change - * @throws CoreException */ static Change createDeleteChange(TextChangeManager manager, IResource[] resources, IJavaElement[] javaElements, String changeName, List packageDeletes) throws CoreException { diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java index 5041a31e3ec..492eed660c6 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java @@ -535,9 +535,6 @@ public Change createChange(IProgressMonitor pm) throws CoreException { /** * Apply all changes related to a single ICompilationUnit * @param icu the compilation unit - * @param vars - * @param unitChange - * @throws CoreException */ private void addAllChangesFor(ICompilationUnit icu, Set vars, CompilationUnitChange unitChange) throws CoreException { CompilationUnit unit= new RefactoringASTParser(IASTSharedValues.SHARED_AST_LEVEL).parse(icu, true); @@ -612,8 +609,6 @@ private void updateType(CompilationUnit cu, Type oldType, CompilationUnitChange /** * Creates the appropriate ParameterizedType node. Recursion is needed to * handle the nested case (e.g., Vector>). - * @param ast - * @param typeBinding * @return the created type */ private Type createParameterizedType(AST ast, ITypeBinding typeBinding){ @@ -794,7 +789,6 @@ private static String nodeTypeNotSupported() { /** * The selection corresponds to a SingleVariableDeclaration - * @param svd * @return the message */ private String singleVariableDeclarationSelected(SingleVariableDeclaration svd) { @@ -969,7 +963,6 @@ private String simpleNameSelected(SimpleName simpleName) { /** * Find a ConstraintVariable that corresponds to the selected ASTNode. - * @param pm * @return the ConstraintVariable */ private ConstraintVariable findConstraintVariableForSelectedNode(IProgressMonitor pm) { @@ -1030,10 +1023,7 @@ private boolean matchesSelection(ConstraintVariable cv){ * expression. In addition to the expression itself, this consists of * any expression that is defines-equal to it, and any expression equal * to it. - * @param cv - * @param pm * @return the constraint variables - * @throws CoreException */ private Collection findRelevantConstraintVars(ConstraintVariable cv, IProgressMonitor pm) throws CoreException { pm.beginTask(RefactoringCoreMessages.ChangeTypeRefactoring_analyzingMessage, 150); @@ -1081,10 +1071,7 @@ private static ConstraintVariable match(ConstraintVariable matchee, ConstraintVa /** * Select the type constraints that involve the selected ASTNode. - * @param relevantConstraintVars - * @param pm * @return the result - * @throws CoreException */ private Collection findRelevantConstraints(Collection relevantConstraintVars, IProgressMonitor pm) throws CoreException { @@ -1159,12 +1146,7 @@ static String print(Collection types){ /** * Determines the set of types for which a set of type constraints is satisfied. - * @param originalType - * @param relevantVars - * @param relevantConstraints - * @param pm * @return the valid types - * @throws JavaModelException */ private Collection computeValidTypes(ITypeBinding originalType, Collection relevantVars, @@ -1241,12 +1223,7 @@ private boolean checkTypeParameterConflict(Collection releva /** * Determines if a given type satisfies a set of type constraints. - * @param type - * @param relevantVars - * @param constraints - * @param pm * @return true if a the type satisfies a set of type constraints. - * @throws JavaModelException */ private boolean isValid(ITypeBinding type, Collection relevantVars, @@ -1349,8 +1326,6 @@ private ITypeBinding findType(ConstraintVariable cv) { /** * Gather constraints associated with a set of compilation units. - * @param referringCus - * @param pm * @return the constraints */ private Collection getConstraints(ICompilationUnit[] referringCus, IProgressMonitor pm) { @@ -1398,7 +1373,6 @@ private List getConstraints(ICompilationUnit unit) { * @param astRoot the AST * @param rootEdit the resulting edit * @return the type name to use - * @throws CoreException */ private String updateImports(CompilationUnit astRoot, MultiTextEdit rootEdit) throws CoreException{ ImportRewrite rewrite= StubUtility.createImportRewrite(astRoot, true); @@ -1493,8 +1467,6 @@ public Collection getValidTypeNames() { * Find the ASTNode for the given source text selection, if it is a type * declaration, or null otherwise. * @param unit The compilation unit in which the selection was made - * @param offset - * @param length * @return ASTNode */ private ASTNode getTargetNode(ICompilationUnit unit, int offset, int length) { @@ -1509,7 +1481,6 @@ private ASTNode getTargetNode(ICompilationUnit unit, int offset, int length) { * method calls, field accesses. * @param pm the monitor * @return the affected units - * @throws CoreException */ private ICompilationUnit[] collectAffectedUnits(IProgressMonitor pm) throws CoreException { // BUG: currently, no type constraints are generated for methods that are related @@ -1605,7 +1576,6 @@ public void setSelectedType(ITypeBinding type){ /** * Determines if a constraint variable corresponds to the constant "null". - * @param cv * @return true if the constraint variable corresponds to the constant "null". */ private static boolean isNull(ConstraintVariable cv) { @@ -1625,7 +1595,6 @@ void printCollection(String title, Collection l) { /** * Returns the compilation units that contain the search results. - * @param groups * @return the CUs */ private ICompilationUnit[] getCus(SearchResultGroup[] groups) { @@ -1643,7 +1612,6 @@ private ICompilationUnit[] getCus(SearchResultGroup[] groups) { /** * This always includes the type itself. It will include type * Object for any type other than Object - * @param type * @return the super types */ public Set getAllSuperTypes(ITypeBinding type){ diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java index 74e023a114b..465bd4281bf 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java @@ -703,7 +703,6 @@ public boolean visit(Assignment node) { * java.lang.Object) is available * @param declaringDeclaration * the declaration of the declaring type - * @param declaringRewrite * @param status * the refactoring status * @param monitor diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIdsCore.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIdsCore.java index 4c926dc0b1f..76ce3a435f0 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIdsCore.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIdsCore.java @@ -129,7 +129,6 @@ public interface IRefactoringProcessorIdsCore { * (and of other Java elements or resources) are available * through the interfaces {@link IJavaElementMapper} and {@link IResourceMapper}, which can be retrieved from the * processor using the getAdapter() method.

    - * */ String RENAME_TYPE_PROCESSOR= "org.eclipse.jdt.ui.renameTypeProcessor"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs index 6ebd17f9e6d..57390f27448 100644 --- a/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/EditorUtility.java b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/EditorUtility.java index fd32b1dbdd3..8e7f58b296f 100644 --- a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/EditorUtility.java +++ b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/EditorUtility.java @@ -29,9 +29,6 @@ import org.eclipse.jdt.ui.JavaUI; -/** - * - */ public class EditorUtility { private EditorUtility() { super(); diff --git a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEAttribute.java b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEAttribute.java index 88c3b63b757..7cb0d3bfdcc 100644 --- a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEAttribute.java +++ b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEAttribute.java @@ -14,9 +14,6 @@ package org.eclipse.jdt.jeview.views; -/** - * - */ public abstract class JEAttribute { protected static final JEAttribute[] EMPTY= new JEAttribute[0]; diff --git a/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs index 87de214a58a..6592e1dbbb9 100644 --- a/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/XmlProcessorFactoryJdtJunit.java b/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/XmlProcessorFactoryJdtJunit.java index 27592366b8b..2672e3612d0 100644 --- a/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/XmlProcessorFactoryJdtJunit.java +++ b/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/XmlProcessorFactoryJdtJunit.java @@ -74,7 +74,6 @@ public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWi * external entities. The builder is not thread safe. * * @return javax.xml.parsers.DocumentBuilder - * @throws ParserConfigurationException */ public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException { return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder(); diff --git a/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java b/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java index 38b96bb2a09..d8848ef89d7 100644 --- a/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java +++ b/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java @@ -680,7 +680,6 @@ public String[][] getClasspathAndModulepath(ILaunchConfiguration configuration) * launch(...)} has been replaced with the call to * {@link JUnitLaunchConfigurationDelegate#getClasspathAndModulepath(ILaunchConfiguration) * getClasspathAndModulepath(ILaunchConfiguration)}. - * */ @Override @Deprecated diff --git a/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs index 39f4c5c7657..7d1a755a4ee 100644 --- a/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/MessageIds.java b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/MessageIds.java index 0f6c41cf99f..85846953a90 100644 --- a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/MessageIds.java +++ b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/MessageIds.java @@ -121,7 +121,6 @@ public class MessageIds { * uniqueId = the unique ID of the test provided by JUnit launcher, otherwise an empty string *
    * See: ITestRunListener2#testTreeEntry - * */ public static final String TEST_TREE= "%TSTTREE"; //$NON-NLS-1$ /** diff --git a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3Identifier.java b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3Identifier.java index 5c7ef7eea80..d032d4ca665 100644 --- a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3Identifier.java +++ b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/junit3/JUnit3Identifier.java @@ -14,9 +14,6 @@ * (bug 102632: [JUnit] Support for JUnit 4.) *******************************************************************************/ -/** - * - */ package org.eclipse.jdt.internal.junit.runner.junit3; import org.eclipse.jdt.internal.junit.runner.ITestIdentifier; diff --git a/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs index 7f5427e86f3..f2082f1cde6 100644 --- a/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTableDisplay.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTableDisplay.java index cd4248ba1dc..5ed798f8b74 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTableDisplay.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTableDisplay.java @@ -11,9 +11,6 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -/** - * - */ package org.eclipse.jdt.internal.junit.ui; import org.eclipse.swt.SWT; diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TextualTrace.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TextualTrace.java index 1207e0a74b8..4f17d445c25 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TextualTrace.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TextualTrace.java @@ -11,9 +11,6 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -/** - * - */ package org.eclipse.jdt.internal.junit.ui; import java.io.BufferedReader; diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/LayoutUtil.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/LayoutUtil.java index d76a1e08c70..4a123cd9342 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/LayoutUtil.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/LayoutUtil.java @@ -133,7 +133,6 @@ public static void setHorizontalGrabbing(Control control) { * Sets the vertical grabbing of a control to true. Assumes that GridData is used. * * @param control the control - * */ public static void setVerticalGrabbing(Control control) { Object ld= control.getLayoutData(); diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java index 9485615ff62..7ef79aa62fe 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java @@ -116,7 +116,6 @@ public class NewTestSuiteWizardPage extends NewTypeWizardPage { /** * Field ID of the junit5 toggle field. - * */ private final static String JUNIT5TOGGLE= PAGE_NAME + ".junit5toggle"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.junit4.runtime/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit4.runtime/.settings/org.eclipse.jdt.core.prefs index e1b72545de3..5499b8ffed0 100644 --- a/org.eclipse.jdt.junit4.runtime/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit4.runtime/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.junit5.runtime/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit5.runtime/.settings/org.eclipse.jdt.core.prefs index ec6876da763..a12f955d4b3 100644 --- a/org.eclipse.jdt.junit5.runtime/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit5.runtime/.settings/org.eclipse.jdt.core.prefs @@ -72,7 +72,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs index 784d3471014..e213f9e828f 100644 --- a/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/codemining/CodeMiningTriggerTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/codemining/CodeMiningTriggerTest.java index a47d1a1df58..1390b14c2aa 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/codemining/CodeMiningTriggerTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/codemining/CodeMiningTriggerTest.java @@ -149,11 +149,6 @@ public void testPullCodeMining() throws Exception { /** * Disables Java reconciler (after AST is parsed) but keeps the default code mining * mechanics working. - * @param editor - * @throws NoSuchMethodException - * @throws IllegalAccessException - * @throws InvocationTargetException - * */ private void disableCodeMiningReconciler(JavaEditor editor) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Method method = JavaEditor.class.getDeclaredMethod("uninstallJavaCodeMining"); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaExpandSelectionTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaExpandSelectionTest.java index bebce643f10..70e77a9a8b7 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaExpandSelectionTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaExpandSelectionTest.java @@ -71,8 +71,6 @@ protected void tearDown() throws Exception { /** * Measures the time to semantically expand the selection in a large * file in the Java editor. - * - * @throws Exception */ public void test() throws Exception { measure(getNullPerformanceMeter(), getWarmUpRuns()); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterProjectTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterProjectTest.java index c4872fade4b..af28c974641 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterProjectTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterProjectTest.java @@ -62,8 +62,6 @@ protected void setUp() throws Exception { /** * Measures the time to convert line delimiters of a project. - * - * @throws Exception */ public void test() throws Exception { measure(getNullPerformanceMeter(), getWarmUpRuns()); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterTest.java index 3a35ce52af5..259747a1da9 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/JavaFormatterTest.java @@ -64,8 +64,6 @@ protected void tearDown() throws Exception { /** * Measures the time to format a large compilation unit. - * - * @throws Exception */ public void test() throws Exception { measure(getNullPerformanceMeter(), getWarmUpRuns()); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorInvocationCountTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorInvocationCountTest.java index c9eba6a08fe..e98ed34e516 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorInvocationCountTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorInvocationCountTest.java @@ -54,8 +54,6 @@ protected void setUp(AbstractTextEditor editor) throws Exception { /** * Measure the number of invocations of {@link org.eclipse.jface.text.source.AnnotationPainter#paintControl(PaintEvent)} * while scrolling page wise with error annotations in the Java editor. - * - * @throws Exception */ public void testPageWise() throws Exception { measure(PAGE_WISE, createInvocationCountPerformanceMeter(), 0, 1); @@ -64,8 +62,6 @@ public void testPageWise() throws Exception { /** * Measure the number of invocations of {@link org.eclipse.jface.text.source.AnnotationPainter#paintControl(PaintEvent)} * while scrolling line wise with error annotations in the Java editor. - * - * @throws Exception */ public void testLineWise() throws Exception { measure(LINE_WISE, createInvocationCountPerformanceMeter(), 0, 1); @@ -75,8 +71,6 @@ public void testLineWise() throws Exception { * Measure the number of invocations of {@link org.eclipse.jface.text.source.AnnotationPainter#paintControl(PaintEvent)} * while scrolling and selecting line wise with error annotations in the * Java editor. - * - * @throws Exception */ public void testLineWiseSelect() throws Exception { measure(LINE_WISE_SELECT, createInvocationCountPerformanceMeter(), 0, 1); @@ -86,8 +80,6 @@ public void testLineWiseSelect() throws Exception { * Measure the number of invocations of {@link org.eclipse.jface.text.source.AnnotationPainter#paintControl(PaintEvent)} * while scrolling line wise without moving the caret with error * annotations in the Java editor. - * - * @throws Exception */ public void testLineWiseNoCaretMove() throws Exception { measure(LINE_WISE_NO_CARET_MOVE, createInvocationCountPerformanceMeter(), 0, 1); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorTest.java index c6d3ca35cfc..c33e842545d 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollAnnotatedJavaEditorTest.java @@ -37,8 +37,6 @@ public static Test setUpTest(Test someTest) { /** * Measure the time spent while scrolling page wise with error * annotations in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorPageWise() throws Exception { measure(PAGE_WISE); @@ -47,8 +45,6 @@ public void testScrollJavaEditorPageWise() throws Exception { /** * Measure the time spent while scrolling line wise with error * annotations in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorLineWiseMoveCaret1() throws Exception { measure(LINE_WISE); @@ -57,8 +53,6 @@ public void testScrollJavaEditorLineWiseMoveCaret1() throws Exception { /** * Measure the time spent while scrolling and selecting line wise with * error annotations in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorLineWiseSelect1() throws Exception { measure(LINE_WISE_SELECT); @@ -67,8 +61,6 @@ public void testScrollJavaEditorLineWiseSelect1() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret with error annotations in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorLineWise1() throws Exception { measure(LINE_WISE_NO_CARET_MOVE); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollJavaEditorTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollJavaEditorTest.java index a206b58336a..d3eb771e3bb 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollJavaEditorTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollJavaEditorTest.java @@ -38,8 +38,6 @@ protected String getEditor() { /** * Measure the time spent while scrolling page wise in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorPageWise() throws Exception { measure(PAGE_WISE); @@ -47,8 +45,6 @@ public void testScrollJavaEditorPageWise() throws Exception { /** * Measure the time spent while scrolling line wise in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorLineWiseMoveCaret2() throws Exception { measure(LINE_WISE); @@ -57,8 +53,6 @@ public void testScrollJavaEditorLineWiseMoveCaret2() throws Exception { /** * Measure the time spent while scrolling and selecting line wise in the * Java editor. - * - * @throws Exception */ public void testScrollJavaEditorLineWiseSelect2() throws Exception { measure(LINE_WISE_SELECT); @@ -67,8 +61,6 @@ public void testScrollJavaEditorLineWiseSelect2() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret in the Java editor. - * - * @throws Exception */ public void testScrollJavaEditorLineWise2() throws Exception { measure(LINE_WISE_NO_CARET_MOVE); @@ -77,8 +69,6 @@ public void testScrollJavaEditorLineWise2() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret in the Java editor, holding the key combination down. - * - * @throws Exception */ public void testScrollJavaEditorLineWiseSelectHoldKeys() throws Exception { if (BUG_HOLDING_SCROLL_TESTS_DISABLED) { @@ -91,8 +81,6 @@ public void testScrollJavaEditorLineWiseSelectHoldKeys() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret in the Java editor, holding the key combination down. - * - * @throws Exception */ public void testScrollJavaEditorLineWiseHoldKeys() throws Exception { if (BUG_HOLDING_SCROLL_TESTS_DISABLED) { diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollTextEditorTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollTextEditorTest.java index 9373800aa67..359347e1627 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollTextEditorTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollTextEditorTest.java @@ -38,8 +38,6 @@ protected String getEditor() { /** * Measure the time spent while scrolling page wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorPageWise() throws Exception { measure(PAGE_WISE); @@ -47,8 +45,6 @@ public void testScrollTextEditorPageWise() throws Exception { /** * Measure the time spent while scrolling line wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorLineWiseMoveCaret2() throws Exception { measure(LINE_WISE); @@ -57,8 +53,6 @@ public void testScrollTextEditorLineWiseMoveCaret2() throws Exception { /** * Measure the time spent while scrolling and selecting line wise in the * text editor. - * - * @throws Exception */ public void testScrollTextEditorLineWiseSelect2() throws Exception { measure(LINE_WISE_SELECT); @@ -67,8 +61,6 @@ public void testScrollTextEditorLineWiseSelect2() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret in the text editor. - * - * @throws Exception */ public void testScrollTextEditorLineWise2() throws Exception { measure(LINE_WISE_NO_CARET_MOVE); @@ -77,8 +69,6 @@ public void testScrollTextEditorLineWise2() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret in the text editor, holding the key combination down. - * - * @throws Exception */ public void testScrollTextEditorLineWiseSelectHoldKeys() throws Exception { if (BUG_HOLDING_SCROLL_TESTS_DISABLED) { @@ -91,8 +81,6 @@ public void testScrollTextEditorLineWiseSelectHoldKeys() throws Exception { /** * Measure the time spent while scrolling line wise without moving the * caret in the text editor. - * - * @throws Exception */ public void testScrollTextEditorLineWiseHoldKeys() throws Exception { if (BUG_HOLDING_SCROLL_TESTS_DISABLED) { diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler1000Test.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler1000Test.java index f1eccc8904e..ef40a9bfde9 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler1000Test.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler1000Test.java @@ -35,8 +35,6 @@ protected int getNumberOfAnnotations() { /** * Measure the time spent while scrolling page wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorPageWise() throws Exception { measure(PAGE_WISE); @@ -44,8 +42,6 @@ public void testScrollTextEditorPageWise() throws Exception { /** * Measure the time spent while scrolling line wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorLineWiseMoveCaret2() throws Exception { measure(LINE_WISE); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler100Test.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler100Test.java index c99be50ab6d..60457693dbb 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler100Test.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler100Test.java @@ -35,8 +35,6 @@ protected int getNumberOfAnnotations() { /** * Measure the time spent while scrolling page wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorPageWise() throws Exception { measure(PAGE_WISE); @@ -44,8 +42,6 @@ public void testScrollTextEditorPageWise() throws Exception { /** * Measure the time spent while scrolling line wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorLineWiseMoveCaret2() throws Exception { measure(LINE_WISE); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler5000Test.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler5000Test.java index 635bd1a2eb7..64cc52815c3 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler5000Test.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRuler5000Test.java @@ -35,8 +35,6 @@ protected int getNumberOfAnnotations() { /** * Measure the time spent while scrolling page wise in the text editor. - * - * @throws Exception */ public void testScrollTextEditorPageWise() throws Exception { measure(PAGE_WISE); @@ -44,8 +42,6 @@ public void testScrollTextEditorPageWise() throws Exception { /** * Measure the time spent while scrolling line wise in the text editor. - * - * @throws Exception */ // This test is too slow // public void testScrollTextEditorLineWiseMoveCaret2() throws Exception { diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TypingInvocationCountTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TypingInvocationCountTest.java index 6c4fbfcf716..8375aafa079 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TypingInvocationCountTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TypingInvocationCountTest.java @@ -155,8 +155,6 @@ public void setEditor(AbstractTextEditor editor) { /** * Counts number of repaints when typing before one annotation on the * same line. - * - * @throws Exception */ public void test00() throws Exception { measure(4, 22, ' '); @@ -165,8 +163,6 @@ public void test00() throws Exception { /** * Counts number of repaints when typing after one annotation on the * same line while a matching bracket is shown. - * - * @throws Exception */ public void test01() throws Exception { measure(4, 23, SWT.BS, true); @@ -175,8 +171,6 @@ public void test01() throws Exception { /** * Counts number of repaints when typing after one annotation on the * same line. - * - * @throws Exception */ public void test02() throws Exception { measure(4, 32, ' '); @@ -185,8 +179,6 @@ public void test02() throws Exception { /** * Counts number of repaints when typing after one annotation on the * same line while a matching bracket is shown. - * - * @throws Exception */ public void test03() throws Exception { measure(4, 33, SWT.BS, true); @@ -195,8 +187,6 @@ public void test03() throws Exception { /** * Counts number of repaints when typing before two annotations on the * same line. - * - * @throws Exception */ public void test10() throws Exception { measure(6, 22, ' '); @@ -205,8 +195,6 @@ public void test10() throws Exception { /** * Counts number of repaints when typing after two annotations on the * same line while a matching bracket is shown. - * - * @throws Exception */ public void test11() throws Exception { measure(6, 23, SWT.BS, true); @@ -215,8 +203,6 @@ public void test11() throws Exception { /** * Counts number of repaints when typing after two annotations on the * same line. - * - * @throws Exception */ public void test12() throws Exception { measure(6, 40, ' '); @@ -225,8 +211,6 @@ public void test12() throws Exception { /** * Counts number of repaints when typing after two annotations on the * same line while a matching bracket is shown. - * - * @throws Exception */ public void test13() throws Exception { measure(6, 41, SWT.BS, true); diff --git a/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs index 33e6349a0f4..3e5400a4056 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs @@ -67,7 +67,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/core/indexsearch/SearchEngine.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/core/indexsearch/SearchEngine.java index 372a8855416..ec480023577 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/core/indexsearch/SearchEngine.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/core/indexsearch/SearchEngine.java @@ -89,10 +89,6 @@ public void queryPrefix(HashSet results, String w) { private SearchEngine() { } - /** - * - * @return - */ public static SearchEngine getSearchEngine() { if (fgSearchEngine == null) fgSearchEngine= new SearchEngine(); diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/DocumentAdapter.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/DocumentAdapter.java index a56ce3604ab..d915d718a16 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/DocumentAdapter.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/DocumentAdapter.java @@ -28,8 +28,6 @@ public class DocumentAdapter implements IReconcilableModel { /** * Creates a text model adapter for the given document. - * - * @param document */ public DocumentAdapter(IDocument document) { fDocument= document; diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JspTranslatorResultCollector.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JspTranslatorResultCollector.java index 99e0dbec8f5..3a874598a59 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JspTranslatorResultCollector.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JspTranslatorResultCollector.java @@ -33,14 +33,6 @@ public class JspTranslatorResultCollector implements ITranslatorResultCollector private ArrayList fDeclarationLines= new ArrayList(); private ArrayList fLocalDeclarationLines= new ArrayList(); - /** - * @param declarations - * @param localDeclarations - * @param content - * @param declarationLines - * @param localDeclarationLines - * @param contentLines - */ public JspTranslatorResultCollector(StringBuffer declarations, StringBuffer localDeclarations, StringBuffer content, ArrayList declarationLines, ArrayList localDeclarationLines, ArrayList contentLines) { fDeclarations= declarations; fLocalDeclarations= localDeclarations; diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITagHandler.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITagHandler.java index daecea03caa..12519567b37 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITagHandler.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITagHandler.java @@ -75,7 +75,6 @@ public interface ITagHandler { * * @param resultCollector the translator's result collector * @param sourceLineNumber the line number of the attribute in the source or -1 if unknown - * @throws IOException */ void processEndTag(ITranslatorResultCollector resultCollector, int sourceLineNumber) throws IOException; diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITranslator.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITranslator.java index eb208cbc748..31afa2c5736 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITranslator.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jface/text/source/translation/ITranslator.java @@ -35,8 +35,6 @@ public interface ITranslator { * * @param reader the reader to access the source * @param name the name of the translated source or null if none - * @return - * @throws IOException */ String translate(Reader reader, String name) throws IOException; diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspUIPlugin.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspUIPlugin.java index 36852474b57..2888fc61fcb 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspUIPlugin.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspUIPlugin.java @@ -43,8 +43,6 @@ import org.eclipse.ui.editors.text.TextEditorPreferenceConstants; -/** - */ public class JspUIPlugin extends AbstractUIPlugin implements IResourceChangeListener { /** diff --git a/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs index 72178b861d9..350cf24f7a6 100644 --- a/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs @@ -59,7 +59,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/RepeatedTest.java b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/RepeatedTest.java index 54b7b6dd54e..0469470458d 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/RepeatedTest.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/RepeatedTest.java @@ -18,7 +18,6 @@ /** * A Decorator that runs a test repeatedly. - * */ public class RepeatedTest extends TestDecorator { private final int fTimesRepeat; diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/TestDecorator.java b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/TestDecorator.java index aff8db525c1..2103c4bd168 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/TestDecorator.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/extensions/TestDecorator.java @@ -20,7 +20,6 @@ * A Decorator for Tests. Use TestDecorator as the base class for defining new * test decorators. Test decorator subclasses can be introduced to add behaviour * before or after a test is run. - * */ public class TestDecorator extends Assert implements Test { protected Test fTest; diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/framework/TestSuite.java b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/framework/TestSuite.java index 2c620e94cd3..3e2303c0d58 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/framework/TestSuite.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/framework/TestSuite.java @@ -248,8 +248,6 @@ public Enumeration tests() { return fTests.elements(); } - /** - */ public String toString() { if (getName() != null) return getName(); diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/IMoney.java b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/IMoney.java index 4624d5e8d10..dd687c3a54c 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/IMoney.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/IMoney.java @@ -16,7 +16,6 @@ /** * The common interface for simple Monies and MoneyBags - * */ public interface IMoney { /** diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/Money.java b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/Money.java index e4006df50c7..e2324724436 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/Money.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/samples/money/Money.java @@ -16,7 +16,6 @@ /** * A simple Money. - * */ public class Money implements IMoney { diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/AllTests.java b/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/AllTests.java index 30c10e99df5..0eae8260bce 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/AllTests.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/AllTests.java @@ -18,7 +18,6 @@ /** * TestSuite that runs all the sample tests - * */ public class AllTests { diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/SimpleTest.java b/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/SimpleTest.java index 05f23f0eaf8..3ae175e3f8c 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/SimpleTest.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/SimpleTest.java @@ -18,7 +18,6 @@ /** * Some simple tests. - * */ public class SimpleTest extends TestCase { protected int fValue1; diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/VectorTest.java b/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/VectorTest.java index 665b12f8dc0..65b02de44c4 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/VectorTest.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/test/java/junit/samples/VectorTest.java @@ -19,7 +19,6 @@ /** * A sample test case, testing java.util.Vector. - * */ public class VectorTest extends TestCase { protected Vector fEmpty; diff --git a/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs index 784d3471014..e213f9e828f 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java index 876dcad2890..ded89198c74 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java @@ -19,8 +19,6 @@ public class CustomBaseRunner extends BlockJUnit4ClassRunner { /** - * @param klass - * @throws InitializationError * @since */ public CustomBaseRunner(Class klass) throws InitializationError { diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeTypeRefactoringTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeTypeRefactoringTests.java index 9d91f894cae..c89e632d043 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeTypeRefactoringTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeTypeRefactoringTests.java @@ -43,7 +43,6 @@ /** * @author rfuhrer, tip - * */ public class ChangeTypeRefactoringTests extends GenericRefactoringTest { private static final String REFACTORING_PATH= "ChangeTypeRefactoring/"; diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InferTypeArgumentsTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InferTypeArgumentsTests.java index b5d61820bcd..bc071dfc484 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InferTypeArgumentsTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InferTypeArgumentsTests.java @@ -84,11 +84,7 @@ private void performCu(int expectedInitialStatus, int expectedFinalStatus) throw } /** - * @param elements - * @param expectedInitialStatus - * @param expectedFinalStatus * @return true iff performed - * @throws CoreException */ private boolean perform(IJavaElement[] elements, int expectedInitialStatus, int expectedFinalStatus) throws CoreException { InferTypeArgumentsRefactoring refactoring= ((RefactoringAvailabilityTester.isInferTypeArgumentsAvailable(elements)) ? new InferTypeArgumentsRefactoring(elements) : null); diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java index c29c13c7eb8..c1af7a99374 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java @@ -99,11 +99,7 @@ private String getTestFileName(boolean positive, boolean input) { * Produces a compilation unit from an input source file whose name * is based on the testcase name. * Test files are assumed to be located in the resources directory. - * @param pack - * @param positive - * @param input * @return the ICompilationUnit created from the specified test file - * @throws Exception */ @SuppressWarnings("javadoc") private ICompilationUnit createCUForSimpleTest(IPackageFragment pack, @@ -143,11 +139,7 @@ private String getBugTestFileName(IJavaProject project, IPackageFragment pack, S * the caller. * Test files are assumed to be located in the resources directory. * @param project can be null if only 1 project exists in the test workspace - * @param pack - * @param baseName - * @param input * @return the ICompilationUnit created from the specified test file - * @throws Exception */ @SuppressWarnings("javadoc") private ICompilationUnit createCUForBugTestCase(IJavaProject project, @@ -168,9 +160,7 @@ private ICompilationUnit createCUForBugTestCase(IJavaProject project, * i.e. the first occurrences of SELECTION_START_HERALD and * SELECTION_END_HERALD. Fails an assertion if either of these * markers is not present in the source string. - * @param source * @return an ISourceRange representing the marked selection - * @throws Exception */ @SuppressWarnings("javadoc") private ISourceRange findSelectionInSource(String source) throws Exception { @@ -243,7 +233,6 @@ private void doSingleUnitTestWithWarning(boolean protectConstructor, ICompilatio * to a source file whose name is the test name (minus the "test" prefix). * Test files are assumed to be located in the resources directory. * @param protectConstructor true iff IntroduceFactoryRefactoring should make the constructor private - * @throws Exception */ @SuppressWarnings("javadoc") void singleUnitHelper(boolean protectConstructor) @@ -262,7 +251,6 @@ void singleUnitHelper(boolean protectConstructor) * Test files are assumed to be located in the resources directory. * @param baseFileName the base file name * @param protectConstructor true iff IntroduceFactoryRefactoring should make the constructor private - * @throws Exception */ @SuppressWarnings("javadoc") protected void singleUnitBugHelper(String baseFileName, boolean protectConstructor) @@ -286,7 +274,6 @@ protected void singleUnitBugHelperWithWarning(String baseFileName, boolean prote * the generated factory method, class, and interface, as appropriate. * @param factoryMethodName the name to use for the generated factory method * @param factoryClassName the name of the factory class - * @throws Exception */ @SuppressWarnings("javadoc") void namesHelper(String factoryMethodName, String factoryClassName) @@ -324,7 +311,6 @@ void namesHelper(String factoryMethodName, String factoryClassName) * @param fileName the base name of the source file (minus the "_in" suffix) * @param pack an IPackageFragment for the containing package * @return the ICompilationUnit for the newly-created unit - * @throws Exception */ @SuppressWarnings("javadoc") private ICompilationUnit createCUFromFileName(String fileName, IPackageFragment pack) throws Exception { @@ -371,7 +357,6 @@ private void doMultiUnitTest(ICompilationUnit[] CUs, String testPath, String[] o * Test files are assumed to be located in the resources directory. * @param staticFactoryMethod true iff IntroduceFactoryRefactoring should make the factory method static * @param inputFileBaseNames an array of input source file base names - * @throws Exception */ @SuppressWarnings("javadoc") void multiUnitHelper(boolean staticFactoryMethod, String[] inputFileBaseNames) @@ -398,7 +383,6 @@ void multiUnitHelper(boolean staticFactoryMethod, String[] inputFileBaseNames) * @param inputFileBaseNames an array of input source file base names * @param factoryClassName the fully-qualified name of the class to receive the factory method, or null * if the factory method is to be placed on the class defining the given constructor - * @throws Exception */ @SuppressWarnings("javadoc") void multiUnitBugHelper(boolean staticFactoryMethod, String[] inputFileBaseNames, String factoryClassName) diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceIndirectionTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceIndirectionTests.java index 8fe0153acfd..251643d871b 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceIndirectionTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceIndirectionTests.java @@ -72,10 +72,6 @@ protected String getRefactoringPath() { * @param shouldWarn if true, warnings will be expected in the result * @param shouldError if true, errors will be expected in the result * @param shouldFail if true, fatal errors will be expected in the result - * @throws Exception - * @throws JavaModelException - * @throws CoreException - * @throws IOException */ private void helper(String[] topLevelName, String newName, String qTypeName, int startLine, int startColumn, int endLine, int endColumn, boolean updateReferences, boolean shouldWarn, boolean shouldError, boolean shouldFail) throws Exception, JavaModelException, CoreException, IOException { diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceParameterTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceParameterTests.java index 3646207eea3..62bbe372505 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceParameterTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceParameterTests.java @@ -55,9 +55,7 @@ protected String getResourceLocation() { /** * get names from comment in source "//name: guessedName -> nameToUse" *
    relies on tabwidth == 4 - * @param cu * @return {"guessedName", "nameToUse"} or null iff no name comment found - * @throws Exception */ private String[] getNames(ICompilationUnit cu) throws Exception { String source= cu.getSource(); diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameNonPrivateFieldTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameNonPrivateFieldTests.java index 996a9727c93..ea7f94d599c 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameNonPrivateFieldTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameNonPrivateFieldTests.java @@ -112,9 +112,6 @@ private void helper1() throws Exception{ /** * Configure options by setting instance fields to non-default values. - * @param fieldName - * @param newFieldName - * @throws Exception */ private void helper2(String fieldName, String newFieldName) throws Exception { helper2(fieldName, newFieldName, false); diff --git a/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs index 784d3471014..e213f9e828f 100644 --- a/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.ui.tests/chkpii/org/eclipse/jdt/ui/tests/chkpii/ChkpiiTests.java b/org.eclipse.jdt.ui.tests/chkpii/org/eclipse/jdt/ui/tests/chkpii/ChkpiiTests.java index df148aa182e..36bb48cda99 100644 --- a/org.eclipse.jdt.ui.tests/chkpii/org/eclipse/jdt/ui/tests/chkpii/ChkpiiTests.java +++ b/org.eclipse.jdt.ui.tests/chkpii/org/eclipse/jdt/ui/tests/chkpii/ChkpiiTests.java @@ -355,7 +355,6 @@ private int parseEndOfSummary(String aLine) { /** * Constructor for EmptyDirectoriesTest. - * */ public ChkpiiTests() { fLogDirectoryName= getPluginDirectory() + "chkpiiResults" + File.separator; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/JavaElementLightweightDecorator.java b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/JavaElementLightweightDecorator.java index 0f2376a92f5..f98a98b2c5e 100644 --- a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/JavaElementLightweightDecorator.java +++ b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/JavaElementLightweightDecorator.java @@ -46,9 +46,6 @@ import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; -/** - * - */ public class JavaElementLightweightDecorator extends LabelProvider implements ILightweightLabelDecorator { private class FileBufferListener implements IFileBufferListener { diff --git a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyClasspathContainerInitializer.java b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyClasspathContainerInitializer.java index 920347e633a..b7883854d75 100644 --- a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyClasspathContainerInitializer.java +++ b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyClasspathContainerInitializer.java @@ -23,9 +23,6 @@ import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; -/** - * - */ public class MyClasspathContainerInitializer extends ClasspathContainerInitializer { public static ClasspathContainerInitializer initializerDelegate; diff --git a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickAssistProcessor.java b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickAssistProcessor.java index 55b7f995052..fe436c36bf2 100644 --- a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickAssistProcessor.java +++ b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickAssistProcessor.java @@ -53,9 +53,6 @@ import org.eclipse.jdt.internal.ui.JavaPluginImages; -/** - * - */ public class MyQuickAssistProcessor implements IQuickAssistProcessor { private boolean getConvertProposal(IInvocationContext context, List result) { diff --git a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickFixProcessor.java b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickFixProcessor.java index 5ea44c9cf5f..6a927c5da85 100644 --- a/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickFixProcessor.java +++ b/org.eclipse.jdt.ui.tests/examples/org/eclipse/jdt/ui/examples/MyQuickFixProcessor.java @@ -26,9 +26,6 @@ import org.eclipse.jdt.internal.ui.text.correction.IProblemLocationCore; import org.eclipse.jdt.internal.ui.text.correction.proposals.ReplaceCorrectionProposal; -/** - * - */ public class MyQuickFixProcessor implements IQuickFixProcessor { /* Active on files with the name A.java diff --git a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/ReferenceInfo.java b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/ReferenceInfo.java index bff2f16bcc7..c9c575683b1 100644 --- a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/ReferenceInfo.java +++ b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/ReferenceInfo.java @@ -22,7 +22,6 @@ /** * Result element with information to the link to the root element - * */ public class ReferenceInfo { diff --git a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/IdentityHashSet.java b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/IdentityHashSet.java index eb9f5c610c5..f39afde88f6 100644 --- a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/IdentityHashSet.java +++ b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/IdentityHashSet.java @@ -16,9 +16,6 @@ import java.util.Arrays; -/** - * - */ public class IdentityHashSet { private Object[] fObjects; diff --git a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedArrayElement.java b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedArrayElement.java index 7e69fc56f57..9687a6b8eb0 100644 --- a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedArrayElement.java +++ b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedArrayElement.java @@ -15,9 +15,6 @@ package org.eclipse.jdt.ui.leaktest.reftracker; -/** - * - */ public class ReferencedArrayElement extends ReferencedObject { private final ReferencedObject fPrevious; diff --git a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedFieldElement.java b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedFieldElement.java index 9b9ac90206a..3edccf6700a 100644 --- a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedFieldElement.java +++ b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferencedFieldElement.java @@ -17,9 +17,6 @@ import java.lang.reflect.Field; -/** - * - */ public class ReferencedFieldElement extends ReferencedObject { private final ReferencedObject fPrevious; diff --git a/org.eclipse.jdt.ui.tests/performance/org/eclipse/jdt/ui/tests/performance/FileTool.java b/org.eclipse.jdt.ui.tests/performance/org/eclipse/jdt/ui/tests/performance/FileTool.java index aa048b98f34..8ccd4b7c3fb 100644 --- a/org.eclipse.jdt.ui.tests/performance/org/eclipse/jdt/ui/tests/performance/FileTool.java +++ b/org.eclipse.jdt.ui.tests/performance/org/eclipse/jdt/ui/tests/performance/FileTool.java @@ -48,7 +48,6 @@ public class FileTool { * * @param zipFile the zip file to unzip * @param dstDir the destination directory - * @throws IOException */ public static void unzip(ZipFile zipFile, File dstDir) throws IOException { @@ -113,7 +112,6 @@ public static String changeSeparator(String path, char oldSeparator, char newSep * * @param source the given source file * @param destination the given destination file - * @throws IOException */ public static void transferData(File source, File destination) throws IOException { destination.getParentFile().mkdirs(); @@ -146,7 +144,6 @@ public static void transferData(File source, File destination) throws IOExceptio * * @param source the given source stream * @param destination the given destination stream - * @throws IOException */ public static void transferData(InputStream source, OutputStream destination) throws IOException { int bytesRead = 0; @@ -163,7 +160,6 @@ public static void transferData(InputStream source, OutputStream destination) th * * @param src the given source file * @param dst the given destination file - * @throws IOException */ public static void copy(File src, File dst) throws IOException { if(src.isDirectory()){ diff --git a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java index 37a91d60b68..0e433023470 100644 --- a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java +++ b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java @@ -187,9 +187,6 @@ public static IJavaProject createJavaProject(String projectName, String binFolde * @param srcContainerName the source container name * @param outputFolderName the output folder name * @return the IJavaProject - * @throws CoreException - * @throws IOException - * @throws InvocationTargetException * @since 3.1 */ public static IJavaProject createJavaProjectWithJUnitSource(String projectName, String srcContainerName, String outputFolderName) throws CoreException, IOException, InvocationTargetException { @@ -839,7 +836,6 @@ public static void removeSourceContainer(IJavaProject jproject, String container * @param jproject The parent project * @param path The path of the library to add * @return The handle of the created root - * @throws JavaModelException */ public static IPackageFragmentRoot addLibrary(IJavaProject jproject, IPath path) throws JavaModelException { return addLibrary(jproject, path, null, null); @@ -852,7 +848,6 @@ public static IPackageFragmentRoot addLibrary(IJavaProject jproject, IPath path) * @param sourceAttachPath The source attachment path * @param sourceAttachRoot The source attachment root path * @return The handle of the created root - * @throws JavaModelException */ public static IPackageFragmentRoot addLibrary(IJavaProject jproject, IPath path, IPath sourceAttachPath, IPath sourceAttachRoot) throws JavaModelException { IClasspathEntry cpe= JavaCore.newLibraryEntry(path, sourceAttachPath, sourceAttachRoot); @@ -868,12 +863,9 @@ public static IPackageFragmentRoot addLibrary(IJavaProject jproject, IPath path, /** * Copies the library into the project and adds it as library entry. * @param jproject The parent project - * @param jarPath * @param sourceAttachPath The source attachment path * @param sourceAttachRoot The source attachment root path * @return The handle of the created root - * @throws IOException - * @throws CoreException */ public static IPackageFragmentRoot addLibraryWithImport(IJavaProject jproject, IPath jarPath, IPath sourceAttachPath, IPath sourceAttachRoot) throws IOException, CoreException { IProject project= jproject.getProject(); @@ -893,11 +885,9 @@ public static IPackageFragmentRoot addLibraryWithImport(IJavaProject jproject, I /** * Creates and adds a class folder to the class path. * @param jproject The parent project - * @param containerName * @param sourceAttachPath The source attachment path * @param sourceAttachRoot The source attachment root path * @return The handle of the created root - * @throws CoreException */ public static IPackageFragmentRoot addClassFolder(IJavaProject jproject, String containerName, IPath sourceAttachPath, IPath sourceAttachRoot) throws CoreException { IProject project= jproject.getProject(); @@ -920,14 +910,9 @@ public static IPackageFragmentRoot addClassFolder(IJavaProject jproject, String * Creates and adds a class folder to the class path and imports all files * contained in the given ZIP file. * @param jproject The parent project - * @param containerName * @param sourceAttachPath The source attachment path * @param sourceAttachRoot The source attachment root path - * @param zipFile * @return The handle of the created root - * @throws IOException - * @throws CoreException - * @throws InvocationTargetException */ public static IPackageFragmentRoot addClassFolderWithImport(IJavaProject jproject, String containerName, IPath sourceAttachPath, IPath sourceAttachRoot, File zipFile) throws IOException, CoreException, InvocationTargetException { try (ZipFile file= new ZipFile(zipFile)) { @@ -944,7 +929,6 @@ public static IPackageFragmentRoot addClassFolderWithImport(IJavaProject jprojec * * @param jproject target * @return the new package fragment root - * @throws CoreException */ public static IPackageFragmentRoot addRTJar(IJavaProject jproject) throws CoreException { return addRTJar15(jproject); @@ -1040,7 +1024,6 @@ public static IPackageFragmentRoot addRTJar_17(IJavaProject jproject, boolean en * @param sourceAttachPath The source attachment path (variable path) * @param sourceAttachRoot The source attachment root path (variable path) * @return The added package fragment root - * @throws JavaModelException */ public static IPackageFragmentRoot addVariableEntry(IJavaProject jproject, IPath path, IPath sourceAttachPath, IPath sourceAttachRoot) throws JavaModelException { IClasspathEntry cpe= JavaCore.newVariableEntry(path, sourceAttachPath, sourceAttachRoot); @@ -1159,7 +1142,6 @@ public static void addToClasspath(IJavaProject jproject, IClasspathEntry cpe) th /** * @param rtStubsPath the path to the RT stubs * @return a rt.jar (stubs only) - * @throws CoreException */ public static IPath[] findRtJar(IPath rtStubsPath) throws CoreException { File rtStubs= JavaTestPlugin.getDefault().getFileInPlugin(rtStubsPath); diff --git a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/StringAsserts.java b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/StringAsserts.java index e1adc2e14de..ce9238de987 100644 --- a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/StringAsserts.java +++ b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/StringAsserts.java @@ -23,9 +23,6 @@ public class StringAsserts { - /** - * - */ public StringAsserts() { super(); } diff --git a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/util/VerifyDialog.java b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/util/VerifyDialog.java index 7f6f6756a4e..26fa9a64f07 100644 --- a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/util/VerifyDialog.java +++ b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/util/VerifyDialog.java @@ -224,7 +224,6 @@ public String getFailureText() { * Can't open the verification dialog without a specified * test dialog, this simply returns a failure and prevents * opening. Should use open(Dialog) instead. - * */ @Override public int open() { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/internal/common/ExpectationTracer.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/internal/common/ExpectationTracer.java index 42aa1fb3193..8b066113b99 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/internal/common/ExpectationTracer.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/internal/common/ExpectationTracer.java @@ -26,15 +26,9 @@ public class ExpectationTracer extends ConcurrentHashMap imp public Stack stack = new Stack<>(); - /** - * - */ private static final long serialVersionUID = 1L; HelperVisitor hv; - /** - * - */ public ExpectationTracer() { } diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/MockPluginView.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/MockPluginView.java index 312f36e506c..cc650fffc14 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/MockPluginView.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/MockPluginView.java @@ -91,7 +91,6 @@ protected boolean isInListState(){ /** * Set the view is in flat or hierarchical state. - * @param state */ static void setListState(boolean state){ fgListState= state; diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/TestDelta.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/TestDelta.java index 7173aff36b5..34ef33e5c0f 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/TestDelta.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/browsing/TestDelta.java @@ -113,7 +113,6 @@ public IResourceDelta[] getResourceDeltas() { /** * Set the affected children of this Delta. - * @param children */ public void setAffectedChildren(IJavaElementDelta[] children) { fAffectedChildren= children; @@ -122,8 +121,6 @@ public void setAffectedChildren(IJavaElementDelta[] children) { /** * Create the parent deltas for an IPackageFragment. * - * @param frag - * @param delta * @return TestDelta */ public static TestDelta createParentDeltas(IPackageFragment frag, TestDelta delta) { @@ -147,9 +144,6 @@ public static TestDelta createParentDeltas(IPackageFragment frag, TestDelta delt * Create a delta for a list of ICompilationUnits, all the parent deltas * from the JavaModel down are created as well. * - * @param cu - * @param parent - * @param action * @return IJavaElementDelta */ public static IJavaElementDelta createCUDelta(ICompilationUnit[] cu, IPackageFragment parent, int action) { @@ -167,8 +161,6 @@ public static IJavaElementDelta createCUDelta(ICompilationUnit[] cu, IPackageFra /** * Creates a delta for a PackageFragment from the JavaModel down. * - * @param frag - * @param action * @return IJavaElementDelta */ public static IJavaElementDelta createDelta(IPackageFragment frag, int action) { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java index 8503e171108..30d377c30e8 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java @@ -616,37 +616,22 @@ public MethodWrapper findMethodWrapper(IMethod method, Object[] methodWrappers) return thirdLevelMethodWrapper; } - /** - * @return - */ public IJavaProject getJavaProject2() { return fJavaProject2; } - /** - * @return - */ public IPackageFragment getPackage1() { return fPack1; } - /** - * @return - */ public IPackageFragment getPackage2() { return fPack2; } - /** - * @return - */ public IType getType1() { return fType1; } - /** - * @return - */ public IType getType2() { return fType2; } diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ASTNodesInsertTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ASTNodesInsertTest.java index 62385c20e6b..45321585ecd 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ASTNodesInsertTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ASTNodesInsertTest.java @@ -47,8 +47,6 @@ import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup; -/** - */ public class ASTNodesInsertTest extends CoreTests { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/BindingsNameTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/BindingsNameTest.java index 8980147e18e..134bf20a7b4 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/BindingsNameTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/BindingsNameTest.java @@ -41,8 +41,6 @@ import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup; -/** - */ public class BindingsNameTest { @Rule public ProjectTestSetup pts= new ProjectTestSetup(); diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CallHierarchyTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CallHierarchyTest.java index 9bac1e61975..558bafca2fe 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CallHierarchyTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CallHierarchyTest.java @@ -223,7 +223,6 @@ public void recursiveCallees() throws Exception { /** * Tests calls that origin from an inner class - * @throws Exception */ @Test public void innerClassCallers() throws Exception { @@ -250,7 +249,6 @@ public void innerClassCallers() throws Exception { /** * Tests callees that enter an inner class - * @throws Exception */ @Test public void innerClassCalleesEntering() throws Exception { @@ -277,7 +275,6 @@ public void innerClassCalleesEntering() throws Exception { /** * Tests callees that exits an inner class - * @throws Exception */ @Test public void innerClassCalleesExiting() throws Exception { @@ -304,7 +301,6 @@ public void innerClassCalleesExiting() throws Exception { /** * Tests calls that origin from an inner class - * @throws Exception */ @Test public void anonymousInnerClassCallers() throws Exception { @@ -324,7 +320,6 @@ public void anonymousInnerClassCallers() throws Exception { /** * Tests calls that origin from an inner class - * @throws Exception */ @Test public void anonymousInnerClassOnInterfaceCallees() throws Exception { @@ -345,7 +340,6 @@ public void anonymousInnerClassOnInterfaceCallees() throws Exception { /** * Tests calls that origin from an inner class - * @throws Exception */ @Test public void anonymousInnerClassInsideMethodCallees() throws Exception { @@ -373,7 +367,6 @@ public void anonymousInnerClassInsideMethodCallees() throws Exception { /** * Tests calls that origin from an inner class - * @throws Exception */ @Test public void anonymousInnerClassOnClassCallees() throws Exception { @@ -394,7 +387,6 @@ public void anonymousInnerClassOnClassCallees() throws Exception { /** * Tests calls that origin from a static initializer block. - * @throws Exception */ @Test public void initializerCallers() throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ScopeAnalyzerTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ScopeAnalyzerTest.java index b269bdfa267..b997156d945 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ScopeAnalyzerTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ScopeAnalyzerTest.java @@ -40,8 +40,6 @@ import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup; -/** - */ public class ScopeAnalyzerTest extends CoreTests { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/LeakTestSetup.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/LeakTestSetup.java index 998203ec232..ec9f7956329 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/LeakTestSetup.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/LeakTestSetup.java @@ -16,9 +16,6 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.ui.intro.IIntroManager; -/** - * - */ public class LeakTestSetup extends JUnitSourceSetup { private static LeakTestSetup fgCurrentSetup= null; diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/AddUnimplementedMethodsTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/AddUnimplementedMethodsTest.java index 811d28715e7..2e803ceaaae 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/AddUnimplementedMethodsTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/AddUnimplementedMethodsTest.java @@ -380,7 +380,6 @@ public void bug480682() throws Exception { } /** - * @throws Exception * @deprecated tests deprecated API */ @Deprecated @@ -390,7 +389,6 @@ public void jLS3() throws Exception { } /** - * @throws Exception * @deprecated tests deprecated API */ @Deprecated @@ -406,7 +404,6 @@ public void jLS8() throws Exception { /** * @param astLevel AST.JLS* - * @throws Exception * @deprecated tests deprecated API */ @Deprecated diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java index f53a8be5dbe..acec34517db 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateConstructorUsingFieldsTest.java @@ -56,7 +56,6 @@ * Tests generation of constructors using fields * * @see org.eclipse.jdt.internal.corext.codemanipulation.AddCustomConstructorOperation - * */ public class GenerateConstructorUsingFieldsTest extends SourceTestCase { @Rule @@ -125,8 +124,6 @@ private void runIt(String topLevelTypeName, String[] fieldNames, String source, /** * Tests simple constructor generation with one field - * - * @throws Exception */ @Test public void test01() throws Exception { @@ -158,8 +155,6 @@ public void test01() throws Exception { /** * Tests adding two fields with identically named classes from different packages - * - * @throws Exception */ @Ignore("see bug 113052 (import issue)") @Test @@ -214,8 +209,6 @@ public void test02() throws Exception { /** * Ensure field ordering stays constant - * - * @throws Exception */ @Test public void test03() throws Exception { @@ -256,8 +249,6 @@ public void test03() throws Exception { /** * Test insertion between two methods - * - * @throws Exception */ @Test public void test04() throws Exception { @@ -295,8 +286,6 @@ public void test04() throws Exception { /** * Without comments - * - * @throws Exception */ @Test public void test05() throws Exception { @@ -325,8 +314,6 @@ public void test05() throws Exception { /** * With a different modifier - * - * @throws Exception */ @Test public void test06() throws Exception { @@ -355,8 +342,6 @@ public void test06() throws Exception { /** * Omitting the super constructor - * - * @throws Exception */ @Test public void test07() throws Exception { @@ -384,8 +369,6 @@ public void test07() throws Exception { /** * Type variables; generic types in fields - * - * @throws Exception */ @Test public void test08() throws Exception { @@ -433,8 +416,6 @@ public void test08() throws Exception { /** * Enums - * - * @throws Exception */ @Test public void test09() throws Exception { @@ -464,8 +445,6 @@ public void test09() throws Exception { /** * Final uninitialized fields - * - * @throws Exception */ @Test public void test10() throws Exception { @@ -494,8 +473,6 @@ public void test10() throws Exception { /** * Verify JDT code conventions are followed, see bug 111801 - * - * @throws Exception */ @Test public void test11() throws Exception { @@ -532,8 +509,6 @@ public void test11() throws Exception { /** * Name clashing fun with super constructors - * @throws Exception - * */ @Test public void test12() throws Exception { @@ -582,8 +557,6 @@ public void test12() throws Exception { /** * Generic types in parameters of super constructor - * - * @throws Exception */ @Test public void test13() throws Exception { @@ -634,7 +607,6 @@ public void test13() throws Exception { /** * Inner types - * @throws Exception */ @Test public void test14() throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateDelegateMethodsTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateDelegateMethodsTest.java index c1f4fd411c6..b1aba4fac7e 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateDelegateMethodsTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateDelegateMethodsTest.java @@ -51,7 +51,6 @@ /** * Tests generation of delegate methods - * */ public class GenerateDelegateMethodsTest extends SourceTestCase { @Rule @@ -107,8 +106,6 @@ public void runOperation(IType type, IField[] fields, IMethod[] methods) throws /** * Tests normal delegate method generation. - * - * @throws Exception */ @Test public void test01() throws Exception { @@ -196,8 +193,6 @@ public void test01() throws Exception { /** * Test insertion in-between two existing methods (before foo3). - * - * @throws Exception */ @Test public void test02() throws Exception { @@ -300,8 +295,6 @@ public void test02() throws Exception { /** * Test insertion of imports - * - * @throws Exception */ @Test public void test03() throws Exception { @@ -360,8 +353,6 @@ public void test03() throws Exception { /** * Tests generic types - * - * @throws Exception */ @Test public void test04() throws Exception { @@ -419,8 +410,6 @@ public void test04() throws Exception { /** * Tests generic methods - * - * @throws Exception */ @Test public void test05() throws Exception { @@ -468,8 +457,6 @@ public void test05() throws Exception { /** * * Test enum types - * - * @throws Exception */ @Test public void test06() throws Exception { @@ -519,8 +506,6 @@ public void test06() throws Exception { /** * Test generation in inner types. - * - * @throws Exception */ @Test public void test07() throws Exception { @@ -569,8 +554,6 @@ public void test07() throws Exception { * Test generation in anonymous types * * See also bug 112440 (bug only affects gui, however). - * - * @throws Exception */ @Test public void test08() throws Exception { @@ -611,8 +594,6 @@ public void test08() throws Exception { /** * Test delegate generation on type variable typed field - * - * @throws Exception */ @Test public void test09() throws Exception { @@ -658,8 +639,6 @@ public void test09() throws Exception { /** * Test delegate generation in secondary types - * - * @throws Exception */ @Test public void test10() throws Exception { @@ -702,8 +681,6 @@ public void test10() throws Exception { /** * Test delegate generation in secondary types with final methods - * - * @throws Exception */ @Test public void test11() throws Exception { @@ -762,7 +739,6 @@ public void test11() throws Exception { * Test generation from interface both with and without default methods * * @throws Exception CoreException, JavaModelException or IOException - * */ @Test public void test12() throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest.java index a6f5762bcf7..859fabb74a1 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest.java @@ -52,7 +52,6 @@ * Tests generation of getters and setters. * * @see org.eclipse.jdt.internal.corext.codemanipulation.AddGetterSetterOperation - * */ public class GenerateGettersSettersTest extends SourceTestCase { @Rule @@ -78,8 +77,6 @@ private IType createNewType(String fQName) throws JavaModelException { * @param sort enable sort * @param visibility visibility for new methods * @param sibling element to insert before - * @throws CoreException - * */ private void runOperation(IType type, IField[] getters, IField[] setters, IField[] gettersAndSetters, boolean sort, int visibility, IJavaElement sibling) throws CoreException { @@ -113,8 +110,6 @@ private void runOperation(IField[] getters, IField[] setters, IField[] gettersAn /** * Tests normal getter/setter generation for one field. - * - * @throws Exception */ @Test public void test0() throws Exception { @@ -146,8 +141,6 @@ public void test0() throws Exception { /** * Tests normal getter/setter generation for one field. - * - * @throws Exception */ @Test public void doneWithSmartIs() throws Exception { @@ -179,8 +172,6 @@ public void doneWithSmartIs() throws Exception { /** * Tests normal getter/setter generation for one field. - * - * @throws Exception */ @Test public void isDoneWithSmartIs() throws Exception { @@ -212,8 +203,6 @@ public void isDoneWithSmartIs() throws Exception { /** * Tests normal getter/setter generation for one field. - * - * @throws Exception */ @Test public void doneWithoutSmartIs() throws Exception { @@ -250,8 +239,6 @@ public void doneWithoutSmartIs() throws Exception { /** * Tests normal getter/setter generation for one field. - * - * @throws Exception */ @Test public void isDoneWithoutSmartIs() throws Exception { @@ -288,7 +275,6 @@ public void isDoneWithoutSmartIs() throws Exception { /** * No setter for final fields (if skipped by user, as per parameter) - * @throws Exception */ @Test public void test1() throws Exception { @@ -320,7 +306,6 @@ public void test1() throws Exception { /** * Tests if full-qualified field declaration type is also full-qualified in setter parameter. - * @throws Exception */ @Test public void test2() throws Exception { @@ -354,7 +339,6 @@ public void test2() throws Exception { /** * Test parameterized types in field declarations - * @throws Exception */ @Test public void test3() throws Exception { @@ -399,7 +383,6 @@ public void test3() throws Exception { /** * Tests enum typed fields - * @throws Exception */ @Test public void test4() throws Exception { @@ -434,7 +417,6 @@ public void test4() throws Exception { /** * Test generation for more than one field - * @throws Exception */ @Test public void test5() throws Exception { @@ -520,7 +502,6 @@ public void test5() throws Exception { /** * Some more fields, this time sorted - * @throws Exception */ @Test public void test6() throws Exception { @@ -579,7 +560,6 @@ public void test6() throws Exception { /** * Test getter/setter generation in anonymous type - * @throws Exception */ @Test public void test7() throws Exception { @@ -630,7 +610,6 @@ public void test7() throws Exception { /** * Tests other modifiers for the generated getters - * @throws Exception */ @Test public void test8() throws Exception { @@ -655,7 +634,6 @@ public void test8() throws Exception { /** * Verify existing getters are not overwritten, and setters are created - * @throws Exception */ @Test public void test9() throws Exception { @@ -703,7 +681,6 @@ public void test9() throws Exception { /** * Test creation for combined field declarations; creating a pair of accessors for * one variable and only a setter for another. - * @throws Exception */ @Test public void test10() throws Exception { @@ -752,7 +729,6 @@ public void test10() throws Exception { /** * Tests insertion of members before a certain method. - * @throws Exception */ @Test public void test11() throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest16.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest16.java index 28653817630..9bd2eee6b72 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest16.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateGettersSettersTest16.java @@ -37,7 +37,6 @@ * Tests generation of getters and setters. * * @see org.eclipse.jdt.internal.corext.codemanipulation.AddGetterSetterOperation - * */ public class GenerateGettersSettersTest16 extends SourceTestCase16 { @Rule @@ -55,8 +54,6 @@ public class GenerateGettersSettersTest16 extends SourceTestCase16 { * @param sort enable sort * @param visibility visibility for new methods * @param sibling element to insert before - * @throws CoreException - * */ private void runOperation(IType type, IField[] getters, IField[] setters, IField[] gettersAndSetters, boolean sort, int visibility, IJavaElement sibling) throws CoreException { @@ -82,7 +79,6 @@ private void runOperation(IField[] getters, IField[] setters, IField[] gettersAn /** * No setter for final fields (if skipped by user, as per parameter) - * @throws Exception */ @Test public void testBug561413() throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateHashCodeEqualsTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateHashCodeEqualsTest.java index 221af0f4018..fb337885451 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateHashCodeEqualsTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/GenerateHashCodeEqualsTest.java @@ -54,7 +54,6 @@ /** * Tests generation of delegate methods - * */ public class GenerateHashCodeEqualsTest extends SourceTestCase { @Rule @@ -102,8 +101,6 @@ private IField[] getFields(IType type, String[] fieldNames) { /** * Test non-reference types (and Enum) in a direct subclass of Object - * - * @throws Exception */ @Test public void test01() throws Exception { @@ -190,8 +187,6 @@ public void test01() throws Exception { /** * Test non-reference types in an indrect subclass of Object - * - * @throws Exception */ @Test public void test02() throws Exception { @@ -251,8 +246,6 @@ public void test02() throws Exception { /** * Test reference types in a direct subclass of Object - * - * @throws Exception */ @Test public void test03() throws Exception { @@ -321,8 +314,6 @@ public void test03() throws Exception { /** * Test reference types in an indirect subclass of Object - * - * @throws Exception */ @Test public void test04() throws Exception { @@ -391,8 +382,6 @@ public void test04() throws Exception { /** * Test arrays - * - * @throws Exception */ @Test public void test05() throws Exception { @@ -450,8 +439,6 @@ public void test05() throws Exception { /** * Test insertion in-between two methods - * - * @throws Exception */ @Test public void test06() throws Exception { @@ -508,8 +495,6 @@ public void test06() throws Exception { /** * Some enums and generic field types... - * - * @throws Exception */ @Test public void test07() throws Exception { @@ -582,8 +567,6 @@ public void test07() throws Exception { /** * Two double fields - * - * @throws Exception */ @Test public void test08() throws Exception { @@ -637,8 +620,6 @@ public void test08() throws Exception { /** * "this" qualification for fields with the * same name as a newly introduced temporary - * - * @throws Exception */ @Test public void test09() throws Exception { @@ -704,8 +685,6 @@ public void test09() throws Exception { /** * Test non-reference types in a direct subclass of Object, using 'instanceof' comparison - * - * @throws Exception */ @Test public void test10() throws Exception { @@ -785,8 +764,6 @@ public void test10() throws Exception { /** * Test non-reference types in an indrect subclass of Object, using 'instanceof' comparison - * - * @throws Exception */ @Test public void test11() throws Exception { @@ -844,8 +821,6 @@ public void test11() throws Exception { /** * Test reference types in a direct subclass of Object, using 'instanceof' comparison - * - * @throws Exception */ @Test public void test12() throws Exception { @@ -913,8 +888,6 @@ public void test12() throws Exception { /** * Test that multiple applications yield same result (without super calls) * (https://bugs.eclipse.org/bugs/show_bug.cgi?id=154417) - * - * @throws Exception */ @Test public void test13() throws Exception { @@ -985,8 +958,6 @@ public void test13() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using non-array instance variables and Enum - * - * @throws Exception */ @Test public void hashCodeEqualsIn17() throws Exception { @@ -1053,8 +1024,6 @@ public void hashCodeEqualsIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using unique non-array instance variables - * - * @throws Exception */ @Test public void hashCodeEqualsUniqueFieldIn17() throws Exception { @@ -1102,8 +1071,6 @@ public void hashCodeEqualsUniqueFieldIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using non-array instance variables with 'instanceof' comparison - * - * @throws Exception */ @Test public void hashCodeEqualsInstanceOfIn17() throws Exception { @@ -1164,8 +1131,6 @@ public void hashCodeEqualsInstanceOfIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using 1-dim array amongst other instance variables - * - * @throws Exception */ @Test public void hashCodeEqualsArrayIn17() throws Exception { @@ -1235,7 +1200,6 @@ public void hashCodeEqualsArrayIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using 1-dim Cloneable array amongst other instance variables - * @throws Exception */ @Test public void hashCodeEqualsCloneableArrayIn17() throws Exception { @@ -1305,7 +1269,6 @@ public void hashCodeEqualsCloneableArrayIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using 1-dim Serializable array amongst other instance variables - * @throws Exception */ @Test public void hashCodeEqualsSerializableArrayIn17() throws Exception { @@ -1377,7 +1340,6 @@ public void hashCodeEqualsSerializableArrayIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using 1-dim Object array amongst other instance variables - * @throws Exception */ @Test public void hashCodeEqualsObjectArrayIn17() throws Exception { @@ -1447,7 +1409,6 @@ public void hashCodeEqualsObjectArrayIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using 1-dim type variable arrays extending Serializable and Number - * @throws Exception */ @Test public void hashCodeEqualsTypeVariableArrayIn17() throws Exception { @@ -1500,7 +1461,6 @@ public void hashCodeEqualsTypeVariableArrayIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using multidimensional array amongst other instance variables - * @throws Exception */ @Test public void hashCodeEqualsMultiArrayIn17() throws Exception { @@ -1570,8 +1530,6 @@ public void hashCodeEqualsMultiArrayIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using both multidimensional and 1-dimensional primitive arrays amongst other instance variables - * - * @throws Exception */ @Test public void hashCodeEqualsVariousArraysIn17() throws Exception { @@ -1644,8 +1602,6 @@ public void hashCodeEqualsVariousArraysIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls * Using ONLY multidimensional and 1-dimensional arrays as instance variables - * - * @throws Exception */ @Test public void hashCodeEqualsOnlyArraysIn17() throws Exception { @@ -1696,8 +1652,6 @@ public void hashCodeEqualsOnlyArraysIn17() throws Exception { /** * Test member types - * - * @throws Exception */ @Test public void enclosingInstance() throws Exception { @@ -1756,8 +1710,6 @@ public void enclosingInstance() throws Exception { /** * Test member types with J7+ Objects.hash and Objects.equals method calls - * - * @throws Exception */ @Test public void enclosingInstanceIn17() throws Exception { @@ -1818,8 +1770,6 @@ public void enclosingInstanceIn17() throws Exception { /** * Test non-reference types in a direct subclass of Object - * - * @throws Exception */ @Test public void thenWithBlocks() throws Exception { @@ -1883,8 +1833,6 @@ public void thenWithBlocks() throws Exception { /** * Test reference types in an subclass - * - * @throws Exception */ @Test public void subTypeAndArraysIn14() throws Exception { @@ -1992,8 +1940,6 @@ public void subTypeAndArraysIn14() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls Using sub-type - * - * @throws Exception */ @Test public void subTypeIn17() throws Exception { @@ -2059,8 +2005,6 @@ public void subTypeIn17() throws Exception { /** * Test with J7+ Objects.hash and Objects.equals method calls with class with "other" field * (https://bugs.eclipse.org/bugs/show_bug.cgi?id=561517) - * - * @throws Exception */ public void otherFieldIn17() throws Exception { ICompilationUnit a= fPackageP.createCompilationUnit("A.java", "package p;\r\n" + @@ -2104,8 +2048,6 @@ public void otherFieldIn17() throws Exception { /** * Test implementation based only on super class - * - * @throws Exception */ @Test public void subTypeNoFields() throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceActionTests.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceActionTests.java index 72385a16a2e..5db2188e7a8 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceActionTests.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceActionTests.java @@ -22,7 +22,6 @@ /** * * Tests for the actions in the source menu - * */ @RunWith(Suite.class) @Suite.SuiteClasses({ diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceTestCase16.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceTestCase16.java index c82dfacc4d3..d052bf50dac 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceTestCase16.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/source/SourceTestCase16.java @@ -48,7 +48,6 @@ * Tests generation of getters and setters. * * @see org.eclipse.jdt.internal.corext.codemanipulation.AddGetterSetterOperation - * */ public class SourceTestCase16 { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests1.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests1.java index 1fe4b1de926..71436e6fcab 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests1.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests1.java @@ -445,8 +445,6 @@ public void tearDown() throws Exception { /** * Method compareArrays. Both arrays must be of IPackageFragments or compare will fail. - * @param children - * @param expectedChildren * @return boolean */ private boolean compareArrays(Object[] children, Object[] expectedChildren) { @@ -470,8 +468,6 @@ private boolean compareArrays(Object[] children, Object[] expectedChildren) { /** * Method contains. - * @param res - * @param expectedChildren * @return boolean */ private boolean contains(IResource res, Object[] expectedChildren) { @@ -488,8 +484,6 @@ private boolean contains(IResource res, Object[] expectedChildren) { /** * Method contains. - * @param fragment - * @param expectedChildren * @return boolean */ private boolean contains(IJavaElement fragment, Object[] expectedChildren) { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests2.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests2.java index 6eb87988f62..99914fff34c 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests2.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests2.java @@ -307,8 +307,6 @@ public void tearDown() throws Exception { /** * Method compareArrays. Both arrays must be of IPackageFragments or compare will fail. - * @param children - * @param expectedChildren * @return boolean */ private boolean compareArrays(Object[] children, Object[] expectedChildren) { @@ -330,8 +328,6 @@ private boolean compareArrays(Object[] children, Object[] expectedChildren) { } /** * Method contains. - * @param res - * @param expectedChildren * @return boolean */ private boolean contains(IResource res, Object[] expectedChildren) { @@ -347,8 +343,6 @@ private boolean contains(IResource res, Object[] expectedChildren) { /** * Method contains. - * @param fragment - * @param expectedChildren * @return boolean */ private boolean contains(IJavaElement fragment, Object[] expectedChildren) { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests3.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests3.java index eb2b94a0305..abfbc3e8ff2 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests3.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests3.java @@ -436,8 +436,6 @@ public void tearDown() throws Exception { /** * Method compareArrays. Both arrays must be of IPackageFragments or compare will fail. - * @param children - * @param expectedChildren * @return boolean */ private boolean compareArrays(Object[] children, Object[] expectedChildren) { @@ -459,8 +457,6 @@ private boolean compareArrays(Object[] children, Object[] expectedChildren) { } /** * Method contains. - * @param res - * @param expectedChildren * @return boolean */ private boolean contains(IResource res, Object[] expectedChildren) { @@ -476,8 +472,6 @@ private boolean contains(IResource res, Object[] expectedChildren) { /** * Method contains. - * @param fragment - * @param expectedChildren * @return boolean */ private boolean contains(IJavaElement fragment, Object[] expectedChildren) { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests4.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests4.java index 5a5973df98e..740619d49ef 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests4.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests4.java @@ -321,8 +321,6 @@ public void tearDown() throws Exception { /** * Method compareArrays. Both arrays must be of IPackageFragments or compare will fail. - * @param children - * @param expectedChildren * @return boolean */ private boolean compareArrays(Object[] children, Object[] expectedChildren) { @@ -344,8 +342,6 @@ private boolean compareArrays(Object[] children, Object[] expectedChildren) { } /** * Method contains. - * @param res - * @param expectedChildren * @return boolean */ private boolean contains(IResource res, Object[] expectedChildren) { @@ -361,8 +357,6 @@ private boolean contains(IResource res, Object[] expectedChildren) { /** * Method contains. - * @param fragment - * @param expectedChildren * @return boolean */ private boolean contains(IJavaElement fragment, Object[] expectedChildren) { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/MockPluginView.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/MockPluginView.java index 0cff3bd978d..afba5621f6f 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/MockPluginView.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/MockPluginView.java @@ -214,9 +214,6 @@ public void setFolding(boolean fold) { JavaPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.APPEARANCE_FOLD_PACKAGES_IN_PACKAGE_EXPLORER, fold); } - /** - * - */ public void clear() { fRefreshedObjects.clear(); fRemovedObjects.clear(); diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/PackageCacheTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/PackageCacheTest.java index a4232251ce0..5bb05824c0a 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/PackageCacheTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/PackageCacheTest.java @@ -40,7 +40,6 @@ /** * Tests for {@link PackageCache}. - * */ public class PackageCacheTest { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/TestDelta.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/TestDelta.java index adbb49b1cc1..5d075c03562 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/TestDelta.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/TestDelta.java @@ -25,7 +25,6 @@ /** * @author Jen's account - * */ public class TestDelta implements IJavaElementDelta { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java index 71ca53cec02..6be93828e20 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest1d8.java @@ -4642,8 +4642,6 @@ public void testWhileGenericSubtype() throws Exception { /** * https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/109 - * - * @throws CoreException */ @Test public void testWhileIssue109_EntrySet() throws CoreException { @@ -4684,8 +4682,6 @@ public void testWhileIssue109_EntrySet() throws CoreException { /** * https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/109 - * - * @throws CoreException */ @Test public void testWhileIssue109_EntrySet_2() throws CoreException { @@ -4724,8 +4720,6 @@ public void testWhileIssue109_EntrySet_2() throws CoreException { /** * https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/109 - * - * @throws CoreException */ @Test public void testWhileIssue109_EntrySet_3() throws CoreException { @@ -4764,8 +4758,6 @@ public void testWhileIssue109_EntrySet_3() throws CoreException { /** * https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/120 - * - * @throws CoreException */ @Test public void testWhileIssue120_CollectionTypeResolution() throws CoreException { @@ -4805,8 +4797,6 @@ public void testWhileIssue120_CollectionTypeResolution() throws CoreException { /** * https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/190 - * - * @throws CoreException */ @Test public void testWhileIssue190_MultipleWhileLoops() throws CoreException { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java index 70b620a2e53..3430659ed89 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java @@ -12076,8 +12076,6 @@ public void testUnusedTypeParameter3() throws Exception { /** * Tests if the quick fix to loop over a variable name is added correctly. The complete * functionality of the for loop generation is tested in {@link AssistQuickFixTest} - * - * @throws Exception */ @Ignore("Bug 434188: [quick fix] shows sign of quick fix, but says no suggestions available.") @Test @@ -12140,8 +12138,6 @@ public void testLoopOverAddedToFixesForVariable() throws Exception { /** * Tests if the quick fix to loop over a method invocation is added correctly. The complete * functionality of the for loop generation is tested in {@link AssistQuickFixTest} - * - * @throws Exception */ @Ignore("Bug 434188: [quick fix] shows sign of quick fix, but says no suggestions available.") @Test @@ -12204,8 +12200,6 @@ public void testLoopOverAddedToFixesForMethodInvocation() throws Exception { /** * Tests if the quick fix to loop over a method invocation is added correctly. The complete * functionality of the for loop generation is tested in {@link AssistQuickFixTest} - * - * @throws Exception */ @Ignore("Bug 434188: [quick fix] shows sign of quick fix, but says no suggestions available.") @Test diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest.java index a2df8e62bf4..4515df4c81e 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest.java @@ -85,8 +85,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.RenameRefactoringProposal; import org.eclipse.jdt.internal.ui.text.template.contentassist.SurroundWithTemplateProposal; -/** - */ public class QuickFixTest { protected static String MODULE_INFO_FILE_CONTENT = "" @@ -197,11 +195,6 @@ protected static final ArrayList collectCorrections(ICo /** * Bad design: only collects corrections for the first problem! - * @param cu - * @param astRoot - * @param nProblems - * @return - * @throws CoreException */ protected static final ArrayList collectCorrections(ICompilationUnit cu, CompilationUnit astRoot, int nProblems) throws CoreException { return collectCorrections(cu, astRoot, nProblems, null); @@ -213,12 +206,6 @@ protected static final ArrayList collectCorrections(ICo /** * Bad design: only collects corrections for the first problem! - * @param cu - * @param astRoot - * @param nProblems - * @param context - * @return - * @throws CoreException */ protected static final ArrayList collectCorrections(ICompilationUnit cu, CompilationUnit astRoot, int nProblems, AssistContext context) throws CoreException { return collectCorrections(cu, astRoot, nProblems, 0, context); @@ -257,10 +244,6 @@ protected static void assertNumberOfProblems(int nProblems, IProblem[] problems) /** * Bad design: only collects corrections for the first problem! - * @param cu - * @param nProblems - * @return - * @throws CoreException */ protected static final ArrayList collectCorrections2(ICompilationUnit cu, int nProblems) throws CoreException { @@ -636,13 +619,6 @@ protected void assertLinkedChoicesContains(ICompletionProposal proposal, String * Computes the number of warnings the java file "filename" has. * Then check if the "preview" source code has the same number of warnings. * Throw error if the number changes. - * - * @param pack - * @param preview - * @param className - * @param filename - * @param fSourceFolder - * @throws JavaModelException */ protected void assertNoAdditionalProblems(IPackageFragment pack, String preview, String className, String filename, IPackageFragmentRoot fSourceFolder) throws JavaModelException { Hashtable options= JavaCore.getOptions(); diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/SerialVersionQuickFixTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/SerialVersionQuickFixTest.java index 576c007e79a..410feec9f27 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/SerialVersionQuickFixTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/SerialVersionQuickFixTest.java @@ -47,9 +47,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; -/** - * - */ public class SerialVersionQuickFixTest extends QuickFixTest { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UtilitiesTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UtilitiesTest.java index 7f10f11a8a1..40cfab3b71a 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UtilitiesTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UtilitiesTest.java @@ -50,9 +50,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; -/** - * - */ public class UtilitiesTest extends QuickFixTest { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/FileAdapterTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/FileAdapterTest.java index 601f3bae37b..c1ec249a4bb 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/FileAdapterTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/FileAdapterTest.java @@ -30,8 +30,6 @@ import org.eclipse.jdt.internal.ui.search.JavaSearchQuery; import org.eclipse.jdt.internal.ui.search.JavaSearchResult; -/** - */ public class FileAdapterTest { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/ParticipantTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/ParticipantTest.java index 91026bf5d92..dac6b015e4e 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/ParticipantTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/ParticipantTest.java @@ -38,8 +38,6 @@ import org.eclipse.jdt.internal.ui.search.SearchParticipantRecord; import org.eclipse.jdt.internal.ui.search.SearchParticipantsExtensionPoint; -/** - */ public class ParticipantTest { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TestParticipant.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TestParticipant.java index c7198274ef7..adb218adcfe 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TestParticipant.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TestParticipant.java @@ -36,8 +36,6 @@ import org.eclipse.jdt.internal.ui.JavaPluginImages; -/** - */ public class TestParticipant implements IQueryParticipant { private static final Random fgRandom= new Random(); private final IMatchPresentation fUIParticipant; diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TreeContentProviderTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TreeContentProviderTest.java index a28b8f9c9a7..8ebd6812de0 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TreeContentProviderTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/TreeContentProviderTest.java @@ -47,8 +47,6 @@ import org.eclipse.jdt.internal.ui.search.JavaSearchResultPage; import org.eclipse.jdt.internal.ui.search.LevelTreeContentProvider; -/** - */ public class TreeContentProviderTest { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/WorkspaceReferenceTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/WorkspaceReferenceTest.java index 0b1eebeb7ee..e07fc2ec09a 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/WorkspaceReferenceTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/search/WorkspaceReferenceTest.java @@ -20,8 +20,6 @@ import org.eclipse.jdt.ui.tests.core.rules.JUnitSourceSetup; -/** - */ public class WorkspaceReferenceTest { @Rule diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java index 712421bbbdf..ead1806aa9a 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest.java @@ -70,9 +70,6 @@ import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - * - */ public class NewTypeWizardTest { private IJavaProject fJProject1; private IPackageFragmentRoot fSourceFolder; diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java index 513ab78b28e..2e791114dfe 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/wizardapi/NewTypeWizardTest17.java @@ -64,9 +64,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - * - */ public class NewTypeWizardTest17 { private IJavaProject fJProject1, fJProject2; diff --git a/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs index 2f8d5330849..0d07f6034c0 100644 --- a/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs @@ -78,7 +78,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs index 7f5427e86f3..f2082f1cde6 100644 --- a/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private diff --git a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java index f1c8a97b243..a6434bfa1d1 100644 --- a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java +++ b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/buildpath/ClasspathModifier.java @@ -309,7 +309,6 @@ private static void include(CPJavaProject cpProject, IPath path) { * @param project the Java project to get it's build path entries from * @return a list of CPListElements corresponding to the * build path entries of the project - * @throws JavaModelException */ public static List getExistingEntries(IJavaProject project) throws JavaModelException { ArrayList newClassPath= new ArrayList<>(); @@ -330,7 +329,6 @@ public static List getExistingEntries(IJavaProject project) throw * a CPListElement * @return the CPListElement found in the list (matching by using the path) or * the roots own IClasspathEntry converted to a CPListElement. - * @throws JavaModelException */ public static CPListElement getClasspathEntry(List elements, IPackageFragmentRoot root) throws JavaModelException { IClasspathEntry entry= root.getRawClasspathEntry(); @@ -369,7 +367,6 @@ public static IPackageFragment getFragment(IResource resource) { * @param project the Java project * @param monitor progress monitor, can be null * @return resolved fragment root, or null the resource is not (in) a source folder - * @throws JavaModelException */ public static IPackageFragmentRoot getFragmentRoot(IResource resource, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { IJavaElement javaElem= null; @@ -402,11 +399,9 @@ public static IPackageFragmentRoot getFragmentRoot(IResource resource, IJavaProj * * @param path the path to find a build path entry for * @param project the Java project - * @param entryKind * @return the IClasspathEntry corresponding * to the path or null if there * is no such entry - * @throws JavaModelException */ public static IClasspathEntry getClasspathEntryFor(IPath path, IJavaProject project, int entryKind) throws JavaModelException { for (IClasspathEntry entry : project.getRawClasspath()) { @@ -438,7 +433,6 @@ public static boolean isDefaultOutputFolder(CPListElementAttribute attrib) { * @param monitor progress monitor, can be null * @return true if the current selection is included, * false otherwise. - * @throws JavaModelException */ public static boolean isIncluded(IJavaElement selection, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -462,7 +456,6 @@ public static boolean isIncluded(IJavaElement selection, IJavaProject project, I * @param project the Java project * @return true if the resource is excluded, * false otherwise - * @throws JavaModelException */ public static boolean isExcluded(IResource resource, IJavaProject project) throws JavaModelException { IPackageFragmentRoot root= getFragmentRoot(resource, project, null); @@ -483,7 +476,6 @@ public static boolean isExcluded(IResource resource, IJavaProject project) throw * @param project the Java project * @return true if there is an excluded parent, * false otherwise - * @throws JavaModelException */ public static boolean parentExcluded(IResource resource, IJavaProject project) throws JavaModelException { if (resource.getFullPath().equals(project.getPath())) @@ -512,7 +504,6 @@ public static boolean parentExcluded(IResource resource, IJavaProject project) t * @param root the root to examine the output location for * @return true if the root uses the default output folder, false * otherwise. - * @throws JavaModelException */ public static boolean hasDefaultOutputFolder(IPackageFragmentRoot root) throws JavaModelException { return root.getRawClasspathEntry().getOutputLocation() == null; @@ -526,7 +517,6 @@ public static boolean hasDefaultOutputFolder(IPackageFragmentRoot root) throws J * @param monitor progress monitor, can be null * @return true if at least one outputfolder * is set, false otherwise - * @throws JavaModelException */ public static boolean hasOutputFolders(IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -586,7 +576,6 @@ public static String escapeSpecialChars(String value) { * @param project the project to test * @return true if project is a source folder * false otherwise. - * @throws JavaModelException */ public static boolean isSourceFolder(IJavaProject project) throws JavaModelException { return ClasspathModifier.getClasspathEntryFor(project.getPath(), project, IClasspathEntry.CPE_SOURCE) != null; @@ -607,12 +596,8 @@ public static boolean isDefaultFragment(IPackageFragment fragment) { /** * Determines whether the inclusion filter of the element's source folder is empty * or not - * @param resource - * @param project - * @param monitor * @return true if the inclusion filter is empty, * false otherwise. - * @throws JavaModelException */ public static boolean includeFiltersEmpty(IResource resource, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -639,7 +624,6 @@ public static boolean includeFiltersEmpty(IResource resource, IJavaProject proje * @param root the fragment root to be inspected * @return true inclusion or exclusion filter set, * false otherwise. - * @throws JavaModelException */ public static boolean filtersSet(IPackageFragmentRoot root) throws JavaModelException { if (root == null) @@ -658,13 +642,9 @@ public static boolean filtersSet(IPackageFragmentRoot root) throws JavaModelExce * Add a resource to the build path. * * @param resource the resource to be added to the build path - * @param existingEntries - * @param newEntries * @param project the Java project * @param monitor progress monitor, can be null * @return returns the new element of type IPackageFragmentRoot that has been added to the build path - * @throws CoreException - * @throws OperationCanceledException */ public static CPListElement addToClasspath(IResource resource, List existingEntries, List newEntries, IJavaProject project, IProgressMonitor monitor) throws OperationCanceledException, CoreException { if (monitor == null) @@ -686,7 +666,6 @@ public static CPListElement addToClasspath(IResource resource, Listtrue
    if the file is an archive, false * otherwise - * @throws JavaModelException */ public static boolean isArchive(IFile file, IJavaProject project) throws JavaModelException { if (!ArchiveFileFilter.isArchivePath(file.getFullPath(), true)) @@ -700,13 +679,9 @@ public static boolean isArchive(IFile file, IJavaProject project) throws JavaMod * Add a Java element to the build path. * * @param javaElement element to be added to the build path - * @param existingEntries - * @param newEntries * @param project the Java project * @param monitor progress monitor, can be null * @return returns the new element of type IPackageFragmentRoot that has been added to the build path - * @throws CoreException - * @throws OperationCanceledException */ public static CPListElement addToClasspath(IJavaElement javaElement, List existingEntries, List newEntries, IJavaProject project, IProgressMonitor monitor) throws OperationCanceledException, CoreException { if (monitor == null) @@ -799,7 +774,6 @@ public static List removeFilters(IPath path, IJavaProject project * @param project the Java project * @param monitor progress monitor, can be null * @return a IResource corresponding to the excluded element - * @throws JavaModelException */ private static IResource exclude(String name, IPath fullPath, CPListElement entry, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -842,7 +816,6 @@ private static IResource exclude(String name, IPath fullPath, CPListElement entr * @param newEntries a list of new build path entries * @param project the Java project * @param monitor progress monitor, can be null - * @throws JavaModelException */ public static void exclude(IPath path, List existingEntries, List newEntries, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -886,7 +859,6 @@ public static void exclude(IPath path, List existingEntries, List * @param monitor progress monitor, can be null * * @return the resulting IResource - * @throws JavaModelException */ public static IResource exclude(IJavaElement javaElement, CPListElement entry, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -912,8 +884,6 @@ public static IResource exclude(IJavaElement javaElement, CPListElement entry, I * IClasspathEntry of the resource's root. * @param project the Java project * @param monitor progress monitor, can be null - * @throws JavaModelException - * */ public static void unExclude(IResource resource, CPListElement entry, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -937,7 +907,6 @@ public static void unExclude(IResource resource, CPListElement entry, IJavaProje * @param entry the CPListElement to reset its filters for * @param project the Java project * @param monitor progress monitor, can be null - * @throws JavaModelException */ public static void resetFilters(IJavaElement element, CPListElement entry, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { if (monitor == null) @@ -968,7 +937,6 @@ public static void resetFilters(IJavaElement element, CPListElement entry, IJava * @param entry the CPListElement to be edited * @param project the Java project * @return an attribute representing the modified output folder - * @throws JavaModelException */ public static CPListElementAttribute resetOutputFolder(CPListElement entry, IJavaProject project) throws JavaModelException { entry.setAttribute(CPListElement.OUTPUT, null); @@ -1204,7 +1172,6 @@ private static IPath[] remove(IPath path, IPath[] paths, IProgressMonitor monito * @param monitor progress monitor, can be null * @return an array of paths which belong to subfolders * of path and which are on the build path - * @throws JavaModelException */ private static List getFoldersOnCP(IPath path, IJavaProject project, IProgressMonitor monitor) throws JavaModelException { List srcFolders= new ArrayList<>(); diff --git a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CodeTemplates.java b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CodeTemplates.java index 3e9e08c5cbd..560ac6bb232 100644 --- a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CodeTemplates.java +++ b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CodeTemplates.java @@ -72,21 +72,18 @@ private void create() { /** * Resets the template set. - * @throws CoreException */ public void reset() throws CoreException { } /** * Resets the template set with the default templates. - * @throws CoreException */ public void restoreDefaults() throws CoreException { } /** * Saves the template set. - * @throws CoreException */ public void save() throws CoreException { } diff --git a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaFormatter.java b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaFormatter.java index 63fcce06c06..d805fa4fbc3 100644 --- a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaFormatter.java +++ b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaFormatter.java @@ -84,8 +84,6 @@ private static final class VariableTracker { * Creates a new tracker. * * @param buffer the buffer to track - * @throws MalformedTreeException - * @throws BadLocationException */ public VariableTracker(TemplateBuffer buffer, IJavaProject project) throws MalformedTreeException, BadLocationException { Assert.isLegal(buffer != null); @@ -138,8 +136,6 @@ private void checkState() { * Restores any decorated regions and updates the buffer's variable offsets. * * @return the buffer. - * @throws MalformedTreeException - * @throws BadLocationException */ public TemplateBuffer updateBuffer() throws MalformedTreeException, BadLocationException { checkState(); @@ -252,9 +248,6 @@ public JavaFormatter(String lineDelimiter, int initialIndentLevel, boolean useCo /** * Formats the template buffer. - * @param buffer - * @param context - * @throws BadLocationException */ public void format(TemplateBuffer buffer, TemplateContext context) throws BadLocationException { try { @@ -272,11 +265,6 @@ public void format(TemplateBuffer buffer, TemplateContext context) throws BadLoc } } - /** - * @param document - * @param context - * @throws BadLocationException - */ private void internalFormat(IDocument document, TemplateContext context) throws BadLocationException { if (fUseCodeFormatter) { // try to format and fall back to indenting diff --git a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeFilter.java b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeFilter.java index 7f671f50882..9c5887a5d2a 100644 --- a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeFilter.java +++ b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeFilter.java @@ -28,9 +28,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.util.StringMatcher; -/** - * - */ public class TypeFilter implements IPropertyChangeListener { public static TypeFilter getDefault() { @@ -75,9 +72,6 @@ public static boolean isFiltered(TypeNameMatch match) { private StringMatcher[] fStringMatchers; - /** - * - */ public TypeFilter() { fStringMatchers= null; PreferenceConstants.getPreferenceStore().addPropertyChangeListener(this); diff --git a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java index 83d1fb2488a..efa3b0b4faf 100644 --- a/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java +++ b/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java @@ -30,7 +30,6 @@ private ReorgUtils() { * @param element the element to test * @return true if the element is a working set, false otherwise * @since 3.5 - * */ public static boolean isWorkingSet(Object element){ diff --git a/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java b/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java index 18cca599584..7770081c1e3 100644 --- a/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java +++ b/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java @@ -105,7 +105,6 @@ public RefactoringSaveHelper(int saveMode) { } /** - * @param shell * @return true if save was successful and refactoring can proceed; * false if the refactoring must be cancelled */ diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionHandler.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionHandler.java index 20a534d7eeb..559623c2cf0 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionHandler.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionHandler.java @@ -49,7 +49,6 @@ /** * Copy of org.eclipse.ltk.internal.ui.refactoring.ChangeExceptionHandler - * */ public class ChangeExceptionHandler { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/DelegateUIHelper.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/DelegateUIHelper.java index 1e12ce00c84..520764cfb2c 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/DelegateUIHelper.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/DelegateUIHelper.java @@ -30,7 +30,6 @@ * capable of creating delegates. * * @since 3.2 - * */ public class DelegateUIHelper { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractSupertypeMemberPage.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractSupertypeMemberPage.java index 63514941786..ef209760b5b 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractSupertypeMemberPage.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractSupertypeMemberPage.java @@ -397,7 +397,6 @@ protected void createSuperTypeField(final Composite parent) { * * @param parent * the parent control - * @throws JavaModelException */ protected void createSuperTypeList(final Composite parent) throws JavaModelException { createSpacer(parent); diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java index 2be46c1ea25..8f3434a306e 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java @@ -58,10 +58,6 @@ public class ParameterEditDialog extends StatusDialog { private Text fDefaultValue; /** - * @param parentShell - * @param parameter - * @param canEditType - * @param canEditDefault * @param context the IPackageFragment for type ContentAssist. * Can be null if canEditType is false. */ diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineConstantAction.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineConstantAction.java index e0916a4483c..fb14e72752c 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineConstantAction.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineConstantAction.java @@ -52,7 +52,6 @@ *

    * This class may be instantiated; it is not intended to be subclassed. *

    - * */ public class InlineConstantAction extends SelectionDispatchAction { @@ -122,7 +121,6 @@ public void selectionChanged(ITextSelection selection) { /** * Note: This method is for internal use only. Clients should not call this method. - * @param selection */ @Override public void selectionChanged(JavaTextSelection selection) { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/AccessorDescription.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/AccessorDescription.java index 755884d0d11..235d6684eb9 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/AccessorDescription.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/AccessorDescription.java @@ -26,9 +26,6 @@ import org.eclipse.jdt.internal.core.manipulation.util.BasicElementLabels; -/** - * - */ public class AccessorDescription { private final static String KEY_ACCESSOR_NAME= "accessorName"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/ExternalizeWizardPage.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/ExternalizeWizardPage.java index 05c21ae6b0a..a121e9b3d02 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/ExternalizeWizardPage.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/ExternalizeWizardPage.java @@ -1003,9 +1003,6 @@ private boolean hasNewOrMissingSubstitutions() { return false; } - /** - * - */ protected void doFilterCheckBoxPressed() { fTableViewer.refresh(); } @@ -1096,9 +1093,6 @@ protected void handleButtonPressed(Widget widget) { } } - /** - * - */ private void openRenameDialog() { IStructuredSelection sel= (IStructuredSelection) fTableViewer.getSelection(); List elementsToRename= getExternalizedElements(sel); diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/RenameKeysDialog.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/RenameKeysDialog.java index 1b7149146ca..75f0f2e382d 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/RenameKeysDialog.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/RenameKeysDialog.java @@ -26,18 +26,12 @@ import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField; -/** - * - */ public class RenameKeysDialog extends StatusDialog { private StringDialogField fNameField; private List fSelectedSubstitutions; private int fCommonPrefixLength; - /** - * @param parent - */ public RenameKeysDialog(Shell parent, List selectedSubstitutions) { super(parent); setTitle(NLSUIMessages.RenameKeysDialog_title); diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/SourceFolderSelectionDialogButtonField.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/SourceFolderSelectionDialogButtonField.java index afac27c50bc..92587f94239 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/SourceFolderSelectionDialogButtonField.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/SourceFolderSelectionDialogButtonField.java @@ -77,8 +77,6 @@ public void setSourceChangeListener(SourceChangeListener listener) { /** * tries to build a packagefragmentroot out of a string and sets the string into this * packagefragmentroot. - * - * @param rootString */ private IPackageFragmentRoot getRootFromString(String rootString) { if (rootString.length() == 0) { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchEditorOpener.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchEditorOpener.java index 388a164a361..9fd933dceef 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchEditorOpener.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchEditorOpener.java @@ -20,8 +20,6 @@ import org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener; -/** - */ public class NLSSearchEditorOpener extends JavaSearchEditorOpener { @Override protected Object getElementToOpen(Match match) { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardInputPage.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardInputPage.java index 5e95a9f9bcd..d233cca182a 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardInputPage.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardInputPage.java @@ -42,7 +42,6 @@ * Wizard page for renaming a type (with similarly named elements) * * @since 3.2 - * */ class RenameTypeWizardInputPage extends RenameInputWizardPage { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsOptionsDialog.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsOptionsDialog.java index 524534f46f8..c93ff421807 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsOptionsDialog.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsOptionsDialog.java @@ -36,7 +36,6 @@ * Option dialog for selecting a similarly named element renaming strategy * * @since 3.2 - * */ public class RenameTypeWizardSimilarElementsOptionsDialog extends MessageDialog { diff --git a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsPage.java b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsPage.java index 6a53fbe3137..12fbfd19762 100644 --- a/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsPage.java +++ b/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameTypeWizardSimilarElementsPage.java @@ -110,7 +110,6 @@ * type. * * @since 3.2 - * */ class RenameTypeWizardSimilarElementsPage extends UserInputWizardPage { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java index 95f47a93a85..cd4a0492e8f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java @@ -25,7 +25,6 @@ * This interface contains constants only; it is not intended to be implemented * or extended. *

    - * */ public interface IJavaHelpContextIds { String PREFIX= JavaUI.ID_PLUGIN + '.'; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/BlockCommentAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/BlockCommentAction.java index 99dcdfbc763..a0241d57f40 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/BlockCommentAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/BlockCommentAction.java @@ -50,9 +50,6 @@ public abstract class BlockCommentAction extends TextEditorAction { /** * Creates a new instance. - * @param bundle - * @param prefix - * @param editor */ public BlockCommentAction(ResourceBundle bundle, String prefix, ITextEditor editor) { super(bundle, prefix, editor); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java index 18284582749..8ecce721a10 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/IndentAction.java @@ -503,7 +503,6 @@ private static void removeIndentations(int count, int tabSize, StringBuffer buff * @param document the document to inspect * @param offset the offset where to start looking for slash pairs * @return the number of slash pairs. - * @throws BadLocationException * @since 3.4 */ private static int countLeadingSlashPairs(IDocument document, int offset) throws BadLocationException { @@ -577,7 +576,6 @@ private boolean indentLine(IDocument document, int line, int caret, JavaIndenter * @param scanner the scanner * @param partition the javadoc partition * @return the indent, or null if not computable - * @throws BadLocationException * @since 3.1 */ private static String computeJavadocIndent(IDocument document, int line, JavaHeuristicScanner scanner, ITypedRegion partition) throws BadLocationException { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java index e28ebebd94e..3fb2fdf113e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java @@ -462,18 +462,12 @@ void cancelJobs(MethodWrapper[] wrappers) { } } - /** - * - */ public void doneFetching() { if (fPart != null) { fPart.setCancelEnabled(false); } } - /** - * - */ public void startFetching() { if (fPart != null) { fPart.setCancelEnabled(true); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java index df23411a1df..38015d738c4 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java @@ -131,7 +131,6 @@ /** * This is the main view for the callers plugin. It builds a tree of callers/callees * and allows the user to double click an entry to go to the selected method. - * */ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyViewPart, ISelectionChangedListener { @@ -757,9 +756,6 @@ public void init(IViewSite site, IMemento memento) fMemento = memento; } - /** - * - */ public void refresh() { setCalleeRoots(null); setCallerRoots(null); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewer.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewer.java index 9a7ec961013..d143c2d97d2 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewer.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewer.java @@ -78,9 +78,6 @@ CallHierarchyViewPart getPart() { return fPart; } - /** - * - */ void setFocus() { getControl().setFocus(); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java index fb00b15033c..25036120932 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java @@ -86,7 +86,6 @@ private static class CallHierarchyTypesOrMembersDialog extends StatusDialog { /** * The change listener class for the dialog field and the string button dialog field. - * */ private class StringButtonAdapter implements IDialogFieldListener, IStringButtonAdapter { /* diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationViewer.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationViewer.java index a1fadc167c5..5f300cf4b5d 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationViewer.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationViewer.java @@ -134,9 +134,6 @@ public void focusGained(FocusEvent e) { return copyAction; } - /** - * - */ void clearViewer() { setInput(""); //$NON-NLS-1$ } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/commands/JavaElementReferenceConverter.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/commands/JavaElementReferenceConverter.java index 12e9ef628e0..e5a140c7244 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/commands/JavaElementReferenceConverter.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/commands/JavaElementReferenceConverter.java @@ -129,7 +129,6 @@ public Object convertToObject(String parameterValue) throws ParameterValueConver * * @param assertion * a boolean check for well-formedness - * @throws ParameterValueConversionException */ private void assertWellFormed(boolean assertion) throws ParameterValueConversionException { if (!assertion) { @@ -143,7 +142,6 @@ private void assertWellFormed(boolean assertion) throws ParameterValueConversion * * @param javaElement * an element to check for existence - * @throws ParameterValueConversionException */ private void assertExists(IJavaElement javaElement) throws ParameterValueConversionException { if ((javaElement == null) || (!javaElement.exists())) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistoryImpl.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistoryImpl.java index ce54667604a..b01f697627d 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistoryImpl.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistoryImpl.java @@ -240,12 +240,8 @@ public void run(ISelection selection) { /** * Creates a place holder ASTNode for the given element. - * @param rewriter - * @param element * @param delimiter the line delimiter - * @param project * @return a ASTNode or null - * @throws CoreException */ private ASTNode createASTNode(ASTRewrite rewriter, ITypedElement element, String delimiter, IJavaProject project) throws CoreException { if (element instanceof IStreamContentAccessor) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaElementHistoryPageSource.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaElementHistoryPageSource.java index b187c5765bb..75f283a8552 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaElementHistoryPageSource.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaElementHistoryPageSource.java @@ -39,8 +39,6 @@ public static JavaElementHistoryPageSource getInstance() { * @param je the Java element * @return true if there are editions available for the given Java element, * false otherwise - * - * */ public static boolean hasEdition(IJavaElement je) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/DialogsMessages.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/DialogsMessages.java index cb56cd9fc76..a169624d2b6 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/DialogsMessages.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/DialogsMessages.java @@ -16,9 +16,6 @@ import org.eclipse.osgi.util.NLS; -/** - * - */ public class DialogsMessages extends NLS { private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.dialogs.DialogsMessages"; //$NON-NLS-1$ private DialogsMessages() { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateHashCodeEqualsDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateHashCodeEqualsDialog.java index f9bd3bdce7b..2b8a59fe37f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateHashCodeEqualsDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateHashCodeEqualsDialog.java @@ -56,7 +56,6 @@ public class GenerateHashCodeEqualsDialog extends SourceActionDialog { * Content provider for the generate hashCode() and equals() tree viewer. * * @since 3.2 - * */ private static class GenerateHashCodeEqualsContentProvider implements ITreeContentProvider { @@ -100,7 +99,6 @@ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { * Validator for the input of the generate hashCode() and equals() dialog. * * @since 3.2 - * */ private static class GenerateHashCodeEqualsValidator implements ISelectionStatusValidator { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/FilterViewerComparator.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/FilterViewerComparator.java index a1d4acb7124..73f1903fd90 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/FilterViewerComparator.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/FilterViewerComparator.java @@ -24,7 +24,6 @@ /** * Comparator for {@link Filter} objects. * @since 3.26 - * */ public class FilterViewerComparator extends WorkbenchViewerComparator { @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/JavaFilterTable.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/JavaFilterTable.java index 9c40b9034ac..cf63a87c4ce 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/JavaFilterTable.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/JavaFilterTable.java @@ -88,7 +88,6 @@ public Object[] getElements(Object inputElement) { * Interface for encapsulating the storage of the {@link Filter}s * * @since 3.26 - * */ public interface FilterStorage { /** diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/SWTFactory.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/SWTFactory.java index f0f59a4f31c..fb9d411b284 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/SWTFactory.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filtertable/SWTFactory.java @@ -110,7 +110,6 @@ static Button createPushButton(Composite parent, String label, String tooltip, I * @param hspan the horizontal span to take up in the parent composite * @return the new label * @since 3.25 - * */ static Label createLabel(Composite parent, String text, int hspan) { Label l = new Label(parent, SWT.NONE); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpFixWrapper.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpFixWrapper.java index 94fb9de53db..7746234551c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpFixWrapper.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpFixWrapper.java @@ -29,7 +29,6 @@ /** * Class to wrap an ICleanUpFixCore and be used as an ICleanUpFix - * */ public class CleanUpFixWrapper implements ICleanUpFix { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java index 6932f3f25af..c118ebd995a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java @@ -39,7 +39,6 @@ /** * Create fixes which can transform pre Java50 code to Java50 code * @see org.eclipse.jdt.internal.corext.fix.Java50FixCore - * */ public class Java50CleanUp extends AbstractMultiFix { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java index 4521185eb54..1bff881870f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java @@ -38,7 +38,6 @@ /** * Create fixes which can solve problems in connection with Strings * @see org.eclipse.jdt.internal.corext.fix.StringFixCore - * */ public class StringCleanUp extends AbstractMultiFix { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUp.java index b3fdea1cc63..ff0a8f8b5e2 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUp.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UnusedCodeCleanUp.java @@ -34,7 +34,6 @@ /** * Create fixes which can remove unused code * @see org.eclipse.jdt.internal.corext.fix.UnusedCodeFix - * */ public class UnusedCodeCleanUp extends AbstractMultiFix { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UseIteratorToForLoopCleanUp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UseIteratorToForLoopCleanUp.java index 44e00810a9f..a5e6b92182e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UseIteratorToForLoopCleanUp.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/UseIteratorToForLoopCleanUp.java @@ -23,8 +23,6 @@ import org.eclipse.jdt.ui.cleanup.CleanUpOptions; import org.eclipse.jdt.ui.cleanup.CleanUpRequirements; import org.eclipse.jdt.ui.cleanup.ICleanUpFix; -/** - */ public class UseIteratorToForLoopCleanUp extends AbstractCleanUp { private final UseIteratorToForLoopCleanUpCore coreCleanUp= new UseIteratorToForLoopCleanUpCore(); public UseIteratorToForLoopCleanUp(final Map options) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java index 1c7fb58602d..0761ca76694 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java @@ -75,12 +75,6 @@ public class CheckboxTreeAndListGroup implements ICheckStateListener, ISelection * the width and/or height of the combined widget (to only hardcode one of the * sizing dimensions, specify the other dimension's value as -1) * @param parent parent composite - * @param rootObject - * @param treeContentProvider - * @param treeLabelProvider - * @param listContentProvider - * @param listLabelProvider - * @param style * @param width the width * @param height the height */ @@ -129,7 +123,6 @@ public void addCheckStateListener(ICheckStateListener listener) { /** * Adds the receiver and all of it's ancestors to the checkedStateStore if they * are not already there. - * @param treeElement */ private void addToHierarchyToCheckedStore(Object treeElement) { @@ -169,7 +162,6 @@ protected boolean areAllElementsChecked(Object treeElement) { /** * Iterates through the passed elements which are being realized for the first * time and check each one in the tree viewer as appropriate - * @param elements */ protected void checkNewTreeElements(Object[] elements) { for (Object currentElement : elements) { @@ -205,7 +197,6 @@ public void checkStateChanged(final CheckStateChangedEvent event) { * @param parent org.eclipse.swt.widgets.Composite * @param width int * @param height int - * @param style */ protected void createContents( Composite parent, @@ -408,7 +399,6 @@ public void addListFilter(ViewerFilter filter) { /** * Logically gray-check all ancestors of treeItem by ensuring that they * appear in the checked table - * @param treeElement */ protected void grayCheckHierarchy(Object treeElement) { @@ -426,7 +416,6 @@ protected void grayCheckHierarchy(Object treeElement) { } /** * Sets the initial checked state of the passed list element to true. - * @param element */ public void initialCheckListItem(Object element) { Object parent= fTreeContentProvider.getParent(element); @@ -438,7 +427,6 @@ public void initialCheckListItem(Object element) { /** * Sets the initial checked state of the passed element to true, * as well as to all of its children and associated list elements - * @param element */ public void initialCheckTreeItem(Object element) { treeItemChecked(element, true); @@ -453,9 +441,6 @@ protected void initialize() { * Callback that's invoked when the checked status of an item in the list * is changed by the user. Do not try and update the hierarchy if we are building the * initial list. - * @param listElement - * @param state - * @param updatingFromSelection */ protected void listItemChecked( Object listElement, @@ -486,7 +471,6 @@ protected void listItemChecked( /** * Notifies all checked state listeners that the passed element has had * its checked state changed to the passed state - * @param event */ protected void notifyCheckStateChangeListeners(CheckStateChangedEvent event) { Iterator listenersEnum= fListeners.iterator(); @@ -543,7 +527,6 @@ public void selectionChanged(final SelectionChangedEvent event) { /** * Selects or deselect all of the elements in the tree depending on the value of the selection * boolean. Be sure to update the displayed files as well. - * @param selection */ public void setAllSelections(final boolean selection) { @@ -568,7 +551,6 @@ public void setListProviders( } /** * Sets the sorter that is to be applied to self's list viewer - * @param comparator */ public void setListComparator(ViewerComparator comparator) { fListViewer.setComparator(comparator); @@ -576,8 +558,6 @@ public void setListComparator(ViewerComparator comparator) { /** * Sets the root of the widget to be new Root. Regenerate all of the tables and lists from this * value. - * - * @param newRoot */ public void setRoot(Object newRoot) { this.fRoot= newRoot; @@ -586,8 +566,6 @@ public void setRoot(Object newRoot) { /** * Sets the checked state of the passed tree element appropriately, and * do so recursively to all of its child tree elements as well - * @param treeElement - * @param state */ protected void setTreeChecked(Object treeElement, boolean state) { @@ -628,7 +606,6 @@ public void setTreeProviders( } /** * Sets the sorter that is to be applied to self's tree viewer - * @param sorter */ public void setTreeComparator(ViewerComparator sorter) { fTreeViewer.setComparator(sorter); @@ -648,7 +625,6 @@ protected void setWhiteChecked(Object treeElement, boolean isWhiteChecked) { } /** * Handle the collapsing of an element in a tree viewer - * @param event */ @Override public void treeCollapsed(TreeExpansionEvent event) { @@ -657,7 +633,6 @@ public void treeCollapsed(TreeExpansionEvent event) { /** * Handles the expansionsion of an element in a tree viewer - * @param event */ @Override public void treeExpanded(TreeExpansionEvent event) { @@ -675,8 +650,6 @@ public void treeExpanded(TreeExpansionEvent event) { /** * Callback that's invoked when the checked status of an item in the tree * is changed by the user. - * @param treeElement - * @param state */ protected void treeItemChecked(Object treeElement, boolean state) { @@ -697,7 +670,6 @@ protected void treeItemChecked(Object treeElement, boolean state) { } /** * Logically un-gray-check all ancestors of treeItem iff appropriate. - * @param treeElement */ protected void ungrayCheckHierarchy(Object treeElement) { if (!determineShouldBeAtLeastGrayChecked(treeElement)) @@ -709,7 +681,6 @@ protected void ungrayCheckHierarchy(Object treeElement) { } /** * Sets the checked state of self and all ancestors appropriately - * @param treeElement */ protected void updateHierarchy(Object treeElement) { @@ -815,7 +786,6 @@ private void handleUpdateSelection(Map> items) { /** * Checks if an element is grey checked. - * @param object * @return if an element is grey checked. */ public boolean isTreeItemGreyChecked(Object object) { @@ -824,15 +794,10 @@ public boolean isTreeItemGreyChecked(Object object) { /** * For a given element, expand its chidren to a level. - * @param object - * @param level */ public void expandTreeToLevel(Object object, int level) { fTreeViewer.expandToLevel(object, level); } - /** - * @param selection - */ public void setTreeSelection(ISelection selection) { fTreeViewer.setSelection(selection); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarOptionsPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarOptionsPage.java index ac26c055d77..9e9885d4a9c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarOptionsPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarOptionsPage.java @@ -95,7 +95,6 @@ public void handleEvent(Event e) { /** * Create an instance of this class - * @param jarPackage */ public JarOptionsPage(JarPackageData jarPackage) { super(PAGE_NAME); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/ManifestProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/ManifestProvider.java index b64052cd292..c1fcd576c16 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/ManifestProvider.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/ManifestProvider.java @@ -40,7 +40,6 @@ public class ManifestProvider implements IManifestProvider { * * @param jarPackage the JAR package specification * @return the manifest - * @throws CoreException */ @Override public Manifest create(JarPackageData jarPackage) throws CoreException { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocConsoleLineTracker.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocConsoleLineTracker.java index 2dd0792e620..baaf77d154e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocConsoleLineTracker.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocConsoleLineTracker.java @@ -92,9 +92,6 @@ private void revealLine(ITextEditor editor, int lineNumber) throws BadLocationEx private IConsole fConsole; - /** - * - */ public JavadocConsoleLineTracker() { } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocOptionsManager.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocOptionsManager.java index 35beee73b79..e3b40b51809 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocOptionsManager.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocOptionsManager.java @@ -456,7 +456,6 @@ private void loadFromXML(Element element) { * absolute it returns the path. If it encounters any difficulties in * creating the absolute path, the method returns null. * - * @param path * @return IPath */ private IPath makeAbsolutePathFromRelative(IPath path) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java index c4f66bcf28f..566e28e1339 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java @@ -57,7 +57,6 @@ public class JavadocWriter { * Create a JavadocWriter. * @param basePath The base path to which all path will be made relative (if * possible). If null, paths are not made relative. - * @param projects */ public JavadocWriter(IPath basePath, IJavaProject[] projects) { fBasePath= basePath; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java index fe2b15a945e..c399dd82371 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileMarkerAnnotationModel.java @@ -32,9 +32,6 @@ import org.eclipse.jdt.core.JavaCore; -/** - * - */ public class ClassFileMarkerAnnotationModel extends AbstractMarkerAnnotationModel implements IResourceChangeListener { protected IClassFile fClassFile; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorHighlightingSynchronizer.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorHighlightingSynchronizer.java index 9ac7bd66a6b..0e13c43a40b 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorHighlightingSynchronizer.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorHighlightingSynchronizer.java @@ -35,7 +35,6 @@ public class EditorHighlightingSynchronizer implements ILinkedModeListener { * * @param editor the java editor the occurrences markers of which will be * synchronized with the linked mode - * */ public EditorHighlightingSynchronizer(JavaEditor editor) { Assert.isLegal(editor != null); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java index afc1a1b274d..5fc18f2dcd0 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java @@ -177,7 +177,6 @@ public static IndentResult shiftLines(IDocument document, ILineRange lines, IJav * @param document the document * @param line the line * @param indent the indentation to insert - * @param commentlines * @throws BadLocationException on concurrent document modification */ private static void addIndent(IDocument document, int line, CharSequence indent, boolean[] commentlines, int relative) throws BadLocationException { @@ -438,7 +437,6 @@ private static boolean indentLine(IDocument document, int line, JavaIndenter ind * @param scanner the scanner * @param partition the comment partition * @return the indent, or null if not computable - * @throws BadLocationException */ private static String computeJavadocIndent(IDocument document, int line, JavaHeuristicScanner scanner, ITypedRegion partition) throws BadLocationException { if (line == 0) // impossible - the first line is never inside a javadoc comment diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java index 26a6a8b91b3..d83a3b3c548 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java @@ -1919,9 +1919,6 @@ public boolean consumes(final SemanticToken token) { } } - /** - * - */ static final class RestrictedIdentifiersHighlighting extends SemanticHighlighting { @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaMethodParameterCodeMiningProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaMethodParameterCodeMiningProvider.java index fcb30104bd4..ba08d15020c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaMethodParameterCodeMiningProvider.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaMethodParameterCodeMiningProvider.java @@ -43,7 +43,6 @@ * Java code mining provider to show method parameters code minings. * * @since 3.14 - * */ public class JavaMethodParameterCodeMiningProvider extends AbstractCodeMiningProvider { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/MembersOrderPreferenceCache.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/MembersOrderPreferenceCache.java index deb3841133f..4a7fde90be2 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/MembersOrderPreferenceCache.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/MembersOrderPreferenceCache.java @@ -22,8 +22,6 @@ import org.eclipse.jdt.ui.PreferenceConstants; -/** - */ public class MembersOrderPreferenceCache extends MembersOrderPreferenceCacheCommon implements IPropertyChangeListener { private IPreferenceStore fPreferenceStore; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OverlayPreferenceStore.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OverlayPreferenceStore.java index 2bd891084aa..66d4c8246d8 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OverlayPreferenceStore.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OverlayPreferenceStore.java @@ -503,7 +503,6 @@ public void setValue(String name, boolean value) { * Note: This method must be called before {@link #load()} is called. *

    * - * @param keys * @since 3.0 */ public void addKeys(OverlayKey[] keys) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesAccess.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesAccess.java index 701a3c4649f..f30304b6239 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesAccess.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesAccess.java @@ -27,9 +27,6 @@ import org.eclipse.ui.preferences.IWorkingCopyManager; -/** - * - */ public class PreferencesAccess { public static PreferencesAccess getOriginalPreferences() { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java index 6021cad18a5..fce917dd3cb 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java @@ -919,26 +919,22 @@ public void controlResized(ControlEvent e) { /** * This method is called after all controls have been allocated, including the preview. * It can be used to set the preview text and to create listeners. - * */ protected abstract void initializePage(); /** * This method is called when the deselect/select all buttons are pressed. * @param value true if set all, false if deselect all - * */ public void doSetAll(boolean value) {} /** * This method is called when the reset button is pressed. - * */ public void resetValues() {} /** * This method is called when the defaults buttons is pressed. - * */ public void setDefaults() {} diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java index 6fd094185a1..9285cbb423f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java @@ -368,7 +368,6 @@ public boolean isSharedProfile() { /** * Create and initialize a new profile manager. * @param profiles Initial custom profiles (List of type CustomProfile) - * @param profileVersioner */ public ProfileManager( List profiles, @@ -535,10 +534,6 @@ private Map readFromPreferenceStore(IScopeContext context, Profi } - /** - * @param uiPrefs - * @param allOptions - */ private void addAll(IEclipsePreferences uiPrefs, Map allOptions) { try { for (String key : uiPrefs.keys()) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileStore.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileStore.java index c42d4ce44b9..caf2bbfdbae 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileStore.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileStore.java @@ -159,7 +159,6 @@ public ProfileStore(String profilesKey, IProfileVersioner profileVersioner) { * @return Returns the collection of profiles currently stored in the preference store or * null if the loading failed. The elements are of type {@link ProfileManager.CustomProfile} * and are all updated to the latest version. - * @throws CoreException */ public List readProfiles(IScopeContext scope) throws CoreException { return readProfilesFromString(scope.getNode(JavaUI.ID_PLUGIN).get(fProfilesKey, null)); @@ -213,7 +212,6 @@ public List readProfilesFromString(String profiles) throws CoreExceptio * as collection or null if the file is not a profile file. * @param file The file to read from * @return returns a list of CustomProfile or null - * @throws CoreException */ public List readProfilesFromFile(File file) throws CoreException { try { @@ -232,7 +230,6 @@ public List readProfilesFromFile(File file) throws CoreException { * Load profiles from a XML stream and add them to a map or null if the source is not a profile store. * @param inputSource The input stream * @return returns a list of CustomProfile or null - * @throws CoreException */ public static List readProfilesFromStream(InputSource inputSource) throws CoreException { @@ -252,7 +249,6 @@ public static List readProfilesFromStream(InputSource inputSource) thro * @param profiles List of CustomProfile * @param file File to write * @param encoding the encoding to use - * @throws CoreException */ public void writeProfilesToFile(Collection profiles, File file, String encoding) throws CoreException { final OutputStream stream; @@ -273,7 +269,6 @@ public void writeProfilesToFile(Collection profiles, File file, String * @param profiles the list of CustomProfile * @param stream the stream to write to * @param encoding the encoding to use - * @throws CoreException */ public static void writeProfilesToStream(Collection profiles, OutputStream stream, String encoding, IProfileVersioner profileVersioner) throws CoreException { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesAssistContext.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesAssistContext.java index 769afecbb25..f5d9588270e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesAssistContext.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesAssistContext.java @@ -25,7 +25,6 @@ * The properties file quick assist context. * * @since 3.8 - * */ public class PropertiesAssistContext extends TextInvocationContext { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertyKeyHyperlink.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertyKeyHyperlink.java index cc0a2fb010d..1d699847331 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertyKeyHyperlink.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertyKeyHyperlink.java @@ -98,7 +98,6 @@ public class PropertyKeyHyperlink implements IHyperlink { /** * Note: this class KeyReference has a natural ordering that is inconsistent with equals - * */ private static class KeyReference extends PlatformObject implements IWorkbenchAdapter, Comparable { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java index b06b5e1ad46..a4766625d8a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java @@ -287,9 +287,6 @@ public static SearchPatternData create(IDialogSettings settings) { private int fMatchLocations; private Link fMatchLocationsLink; - /** - * - */ public JavaSearchPage() { fPreviousSearchPatterns= new ArrayList<>(); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantDescriptor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantDescriptor.java index d9d206f9047..5d435d7fca3 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantDescriptor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantDescriptor.java @@ -25,8 +25,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; -/** - */ public class SearchParticipantDescriptor { private static final String CLASS= "class"; //$NON-NLS-1$ private static final String NATURE= "nature"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantRecord.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantRecord.java index 2467bcee9fa..dfda72ac1c6 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantRecord.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchParticipantRecord.java @@ -16,8 +16,6 @@ import org.eclipse.jdt.ui.search.IQueryParticipant; -/** - */ public class SearchParticipantRecord { private SearchParticipantDescriptor fDescriptor; private IQueryParticipant fParticipant; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaPartitionScanner.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaPartitionScanner.java index b7e0b5ca4e4..65f46a30021 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaPartitionScanner.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaPartitionScanner.java @@ -67,7 +67,6 @@ static class EmptyCommentRule extends WordRule implements IPredicateRule { private IToken fSuccessToken; /** * Constructor for EmptyCommentRule. - * @param successToken */ public EmptyCommentRule(IToken successToken) { super(new EmptyCommentDetector()); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/SingleTokenJavaScanner.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/SingleTokenJavaScanner.java index c79190ae8ce..d898a270367 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/SingleTokenJavaScanner.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/SingleTokenJavaScanner.java @@ -24,9 +24,6 @@ import org.eclipse.jdt.ui.text.IColorManager; -/** - * - */ public final class SingleTokenJavaScanner extends AbstractJavaScanner{ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java index 9e64ed169e0..51a417c8eec 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java @@ -139,8 +139,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedCorrectionProposal; import org.eclipse.jdt.internal.ui.util.ASTHelper; -/** - */ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor { public AdvancedQuickAssistProcessor() { super(); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java index f011e83c9fe..c0d0db29518 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java @@ -84,9 +84,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedCorrectionProposal; import org.eclipse.jdt.internal.ui.text.correction.proposals.ReplaceCorrectionProposal; -/** - * - */ public class JavadocTagsSubProcessor { private static final class AddJavadocCommentProposal extends CUCorrectionProposal { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java index 511c0c6a26d..8bf354c8459 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java @@ -211,8 +211,6 @@ import org.eclipse.jdt.internal.ui.util.ASTHelper; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; -/** - */ public class LocalCorrectionsSubProcessor { private static final String RAW_TYPE_REFERENCE_ID= "org.eclipse.jdt.ui.correction.rawTypeReference"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java index 866461260de..531500fa613 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java @@ -89,8 +89,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.FixCorrectionProposal; import org.eclipse.jdt.internal.ui.text.correction.proposals.ModifierChangeCorrectionProposal; -/** - */ public class ModifierCorrectionSubProcessor { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java index f40a8cfbe4f..a3bda537658 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java @@ -22,9 +22,6 @@ import org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation; import org.eclipse.jdt.internal.ui.javaeditor.JavaMarkerAnnotation; -/** - * - */ public class ProblemLocation extends ProblemLocationCore implements IProblemLocation { public ProblemLocation(int offset, int length, IJavaAnnotation annotation) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java index 008d2323c72..335ea604513 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java @@ -53,9 +53,6 @@ import org.eclipse.jdt.internal.ui.viewsupport.ISelectionListenerWithAST; import org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager; -/** - * - */ public class QuickAssistLightBulbUpdater { public static class AssistAnnotation extends Annotation implements IAnnotationPresentation { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java index f5008d03ea0..b210280f93b 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java @@ -239,8 +239,6 @@ import org.eclipse.jdt.internal.ui.util.ASTHelper; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; -/** - */ public class QuickAssistProcessor implements IQuickAssistProcessor { public static final String SPLIT_JOIN_VARIABLE_DECLARATION_ID= "org.eclipse.jdt.ui.correction.splitJoinVariableDeclaration.assist"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java index de62fe5115c..7323ce2d1d2 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java @@ -62,8 +62,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.ReplaceCorrectionProposal; import org.eclipse.jdt.internal.ui.text.correction.proposals.TaskMarkerProposal; -/** - */ public class QuickFixProcessor implements IQuickFixProcessor { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java index 13e5fb3c811..e7cc0e7b3cb 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java @@ -60,9 +60,6 @@ import org.eclipse.jdt.internal.ui.JavaPluginImages; -/** - * - */ public class SuppressWarningsSubProcessor extends SuppressWarningsSubProcessorCore { static final String ADD_SUPPRESSWARNINGS_ID= SuppressWarningsSubProcessorCore.ADD_SUPPRESSWARNINGS_ID; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java index 47bdaccf030..2d6e4aa2b6a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java @@ -151,7 +151,6 @@ static final class ReferenceTracker { * @param document the document on which to track the reference position. * @param offset the offset * @throws BadLocationException if the offset describes an invalid range in this document - * */ public void preReplace(IDocument document, int offset) throws BadLocationException { fPosition.setOffset(offset); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpandHover.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpandHover.java index 1becfc915fc..ec79daae27a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpandHover.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpandHover.java @@ -125,10 +125,6 @@ public void annotationContextMenuAboutToShow(VerticalRulerEvent event, Menu menu /** * Creates a new hover instance. - * - * @param ruler - * @param access - * @param doubleClickListener */ public AnnotationExpandHover(CompositeRuler ruler, IAnnotationAccess access, IDoubleClickListener doubleClickListener) { fCompositeRuler= ruler; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java index f522921a75a..ad5756cc071 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java @@ -402,9 +402,6 @@ public void paintControl(PaintEvent e) { */ private final class HoverManager extends AbstractInformationControlManager { - /** - * - */ public HoverManager() { super(DefaultInformationControl::new); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAssistInvocationContext.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAssistInvocationContext.java index 6f8b56b7021..f7cdab1013e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAssistInvocationContext.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAssistInvocationContext.java @@ -30,9 +30,6 @@ public final class JavadocContentAssistInvocationContext extends JavaContentAssi private final int fFlags; /** - * @param viewer - * @param offset - * @param editor * @param flags see {@link org.eclipse.jdt.ui.text.java.IJavadocCompletionProcessor#RESTRICT_TO_MATCHING_CASE} */ public JavadocContentAssistInvocationContext(ITextViewer viewer, int offset, IEditorPart editor, int flags) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java index ed5297a2f7e..5f67ce8fc37 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java @@ -262,16 +262,11 @@ private void updateSlaves(MultiVariable variable, IDocument document, Object old } } - /** - * @param position - */ public void addSlave(VariablePosition position) { fPositions.put(position.getVariable(), position); } /** - * @param master - * @param slave * @since 3.3 */ public void addDependency(MultiVariable master, MultiVariable slave) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/VariablePosition.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/VariablePosition.java index 699f6307f3c..2d9f069cf91 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/VariablePosition.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/VariablePosition.java @@ -21,9 +21,6 @@ import org.eclipse.jface.text.link.ProposalPosition; -/** - * - */ public class VariablePosition extends ProposalPosition { private MultiVariableGuess fGuess; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/AbstractHierarchyViewerSorter.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/AbstractHierarchyViewerSorter.java index 5e09b47f5f2..ed1582c51cb 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/AbstractHierarchyViewerSorter.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/AbstractHierarchyViewerSorter.java @@ -29,8 +29,6 @@ import org.eclipse.jdt.internal.ui.viewsupport.SourcePositionComparator; -/** - */ public abstract class AbstractHierarchyViewerSorter extends ViewerComparator { private static final int OTHER= 1; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyViewerSorter.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyViewerSorter.java index 43fa8352785..2a09943785c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyViewerSorter.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/HierarchyViewerSorter.java @@ -16,8 +16,6 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; -/** - */ public class HierarchyViewerSorter extends AbstractHierarchyViewerSorter { private final TypeHierarchyLifeCycle fHierarchy; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java index 3de806f85a1..1dbe445fc90 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java @@ -572,7 +572,6 @@ public void setInputElements(IJavaElement[] javaElements) { /* * Changes the input to a new type - * @param inputElement */ private void updateInput(IJavaElement[] inputElements) { IJavaElement[] prevInput= fInputElements; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java index 850b65d741c..aa69905536f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaUIHelp.java @@ -87,7 +87,6 @@ public JavaUIHelpListener(JavaEditor editor, String contextId) { /* * @see HelpListener#helpRequested(HelpEvent) - * */ @Override public void helpRequested(HelpEvent e) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/MainMethodSearchEngine.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/MainMethodSearchEngine.java index 75e146855a9..f690902ebf8 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/MainMethodSearchEngine.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/MainMethodSearchEngine.java @@ -95,7 +95,6 @@ public void acceptSearchMatch(SearchMatch match) throws CoreException { * @param scope the search scope * @param style search style constants (see {@link IJavaElementSearchConstants}) * @return the types found - * @throws CoreException */ public IType[] searchMainMethods(IProgressMonitor pm, IJavaSearchScope scope, int style) throws CoreException { List typesFound= new ArrayList<>(200); @@ -118,8 +117,6 @@ public IType[] searchMainMethods(IProgressMonitor pm, IJavaSearchScope scope, in * @param scope the search scope * @param style style search style constants (see {@link IJavaElementSearchConstants}) * @return the types found - * @throws InvocationTargetException - * @throws InterruptedException */ public IType[] searchMainMethods(IRunnableContext context, final IJavaSearchScope scope, final int style) throws InvocationTargetException, InterruptedException { int allFlags= IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS | IJavaElementSearchConstants.CONSIDER_BINARIES; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/XmlProcessorFactoryJdtUi.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/XmlProcessorFactoryJdtUi.java index 16b16594ad3..44f76aa2f08 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/XmlProcessorFactoryJdtUi.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/XmlProcessorFactoryJdtUi.java @@ -74,7 +74,6 @@ public static synchronized DocumentBuilderFactory createDocumentBuilderFactoryWi * external entities. The builder is not thread safe. * * @return javax.xml.parsers.DocumentBuilder - * @throws ParserConfigurationException */ public static DocumentBuilder createDocumentBuilderWithErrorOnDOCTYPE() throws ParserConfigurationException { return DOCUMENT_BUILDER_FACTORY_ERROR_ON_DOCTYPE.newDocumentBuilder(); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ImageImageDescriptor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ImageImageDescriptor.java index 39a1e7b7ab4..43fc8b85978 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ImageImageDescriptor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ImageImageDescriptor.java @@ -18,8 +18,6 @@ import org.eclipse.jface.resource.ImageDescriptor; -/** - */ public class ImageImageDescriptor extends ImageDescriptor { private Image fImage; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java index b252a5ca488..b454f9f4b05 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java @@ -64,8 +64,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; -/** - */ public class ClassPathDetector implements IResourceProxyVisitor { private HashMap> fSourceFolders; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java index 4d4e4c4749a..dec4fe716b6 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java @@ -50,9 +50,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - * - */ public class BuildPathSupport { public static final String JRE_PREF_PAGE_ID= "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElementAttribute.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElementAttribute.java index 3c8510bbd6b..80ed570595a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElementAttribute.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElementAttribute.java @@ -29,8 +29,6 @@ import org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess; -/** - */ public class CPListElementAttribute { private CPListElement fParent; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDefaultPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDefaultPage.java index b46fb9b37ad..699d846b9e6 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDefaultPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDefaultPage.java @@ -41,8 +41,6 @@ import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField; -/** - */ public class ClasspathContainerDefaultPage extends NewElementWizardPage implements IClasspathContainerPage, IClasspathContainerPageExtension { private StringDialogField fEntryField; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDescriptor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDescriptor.java index 2841025abf9..41d6da3c24a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDescriptor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerDescriptor.java @@ -32,8 +32,6 @@ import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.util.CoreUtility; -/** - */ public class ClasspathContainerDescriptor { private IConfigurationElement fConfigElement; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerSelectionPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerSelectionPage.java index 00940e08660..365475b6f5f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerSelectionPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerSelectionPage.java @@ -35,8 +35,6 @@ import org.eclipse.jdt.internal.ui.util.SelectionUtil; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - */ public class ClasspathContainerSelectionPage extends WizardPage { private static final String DIALOGSTORE_SECTION= "ClasspathContainerSelectionPage"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerWizard.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerWizard.java index fcfc8f8dad9..1dc15be88f2 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerWizard.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathContainerWizard.java @@ -34,8 +34,6 @@ import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - */ public class ClasspathContainerWizard extends Wizard { private final ClasspathContainerDescriptor fPageDesc; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ExternalAnnotationsAttachmentDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ExternalAnnotationsAttachmentDialog.java index 0427d691bc7..3f7b4feb31e 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ExternalAnnotationsAttachmentDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ExternalAnnotationsAttachmentDialog.java @@ -33,7 +33,6 @@ /** * A dialog to configure the external annotations attachment of any classpath entry. - * */ public class ExternalAnnotationsAttachmentDialog extends StatusDialog { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/FolderSelectionDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/FolderSelectionDialog.java index 080ffac43fd..2926c5e0b39 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/FolderSelectionDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/FolderSelectionDialog.java @@ -40,8 +40,6 @@ import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - */ public class FolderSelectionDialog extends ElementTreeSelectionDialog implements ISelectionChangedListener { private Button fNewFolderButton; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddExportsDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddExportsDialog.java index f6cdbf8e5fd..7ae01ecc8b9 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddExportsDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddExportsDialog.java @@ -38,7 +38,6 @@ /** * A dialog to configure add-exports of a library. - * */ public class ModuleAddExportsDialog extends StatusDialog { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddReadsDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddReadsDialog.java index 40420cf621c..09f0866c99c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddReadsDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ModuleAddReadsDialog.java @@ -35,7 +35,6 @@ /** * A dialog to configure add-reads of a library. - * */ public class ModuleAddReadsDialog extends StatusDialog { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/MultipleFolderSelectionDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/MultipleFolderSelectionDialog.java index 3c55296f0e7..510b5cc5411 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/MultipleFolderSelectionDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/MultipleFolderSelectionDialog.java @@ -52,8 +52,6 @@ import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; -/** - */ public class MultipleFolderSelectionDialog extends SelectionStatusDialog implements ISelectionChangedListener { private CheckboxTreeViewer fViewer; @@ -194,9 +192,6 @@ protected CheckboxTreeViewer createTreeViewer(Composite parent) { - /** - * - */ protected void updateOKStatus() { computeResult(); if (getResult() != null) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentDialog.java index 1e710ff251f..c68893ab16b 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentDialog.java @@ -31,7 +31,6 @@ /** * A dialog to configure the source attachment of a library (class folder, archives * and variable entries). - * */ public class SourceAttachmentDialog extends StatusDialog { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/UserLibraryWizardPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/UserLibraryWizardPage.java index ee96ba42fd8..bdb4e21e0cf 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/UserLibraryWizardPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/UserLibraryWizardPage.java @@ -62,9 +62,6 @@ import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; -/** - * - */ public class UserLibraryWizardPage extends NewElementWizardPage implements IClasspathContainerPage, IClasspathContainerPageExtension, IClasspathContainerPageExtension2 { private CheckedListDialogField fLibrarySelector; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ClasspathModifierQueries.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ClasspathModifierQueries.java index fbce9467d5b..1d97f8902ef 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ClasspathModifierQueries.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ClasspathModifierQueries.java @@ -69,7 +69,6 @@ public static abstract class OutputFolderValidator { *
  • IPackageFragment
  • *
  • IFolder
  • * @param project the Java project - * @throws JavaModelException */ public OutputFolderValidator(List newElements, IJavaProject project) throws JavaModelException { fEntries= project.getRawClasspath(); @@ -194,7 +193,6 @@ public interface IInclusionExclusionQuery { * * @param element the element to get the * information from - * @param focusOnExcluded * @return true if changes * have been accepted and getInclusionPatter * or getExclusionPattern can @@ -257,8 +255,6 @@ public interface IOutputLocationQuery { * @param outputLocation desired output location for the * project * @return query giving information about output and source folders - * @throws JavaModelException - * */ OutputFolderQuery getOutputFolderQuery(IPath outputLocation) throws JavaModelException; } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/DialogPackageExplorerActionGroup.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/DialogPackageExplorerActionGroup.java index 9b2f192f2ac..bd8579bec4c 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/DialogPackageExplorerActionGroup.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/DialogPackageExplorerActionGroup.java @@ -61,7 +61,6 @@ public class DialogPackageExplorerActionGroup extends CompositeActionGroup { * * @param provider a information provider to pass necessary information * to the operations - * @param context * @param dialogPackageExplorer the package explorer for which to contribute the actions to * @param page the page showing the package explorer */ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/NewSourceContainerWorkbookPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/NewSourceContainerWorkbookPage.java index 11aa7871ecc..b5c69d1f56f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/NewSourceContainerWorkbookPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/NewSourceContainerWorkbookPage.java @@ -90,10 +90,7 @@ public class NewSourceContainerWorkbookPage extends BuildPathBasePage implements * containing hyperlinks that perform the same actions as those in the toolbar but * additionally with some short description. * - * @param classPathList - * @param outputLocationField * @param context a runnable context, can be null - * @param buildPathsBlock */ public NewSourceContainerWorkbookPage(ListDialogField classPathList, StringDialogField outputLocationField, IRunnableContext context, BuildPathsBlock buildPathsBlock) { fClassPathList= classPathList; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveLinkedFolderDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveLinkedFolderDialog.java index db1f2081c8a..bdd0e9fa0e9 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveLinkedFolderDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveLinkedFolderDialog.java @@ -38,7 +38,6 @@ /** * Dialog to prompt whether a linked folder should be deleted. - * */ class RemoveLinkedFolderDialog extends MessageDialog { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetFilterActionGroup.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetFilterActionGroup.java index 750d6af3a5b..bf886d634b8 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetFilterActionGroup.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetFilterActionGroup.java @@ -46,7 +46,6 @@ * Working set filter actions (set / clear) * * @since 2.0 - * */ public class WorkingSetFilterActionGroup extends ActionGroup implements IWorkingSetActionGroup { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java index 0a685ffdd42..402c293d4ff 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java @@ -442,7 +442,6 @@ public void setWorkingSets(IWorkingSet[] allWorkingSets, boolean isSortingEnable *

    * * @param workingSets the active working sets to be set - * */ public void setActiveWorkingSets(IWorkingSet[] workingSets) { Assert.isLegal(Arrays.asList(getAllWorkingSets()).containsAll(Arrays.asList(workingSets))); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java index 5e304e97556..8e94eec3ac3 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java @@ -2005,7 +2005,6 @@ private PreferenceConstants() { *

    * * @since 3.1 - * */ public final static String EDITOR_JAVADOC_KEYWORD_STRIKETHROUGH= IJavaColorConstants.JAVADOC_KEYWORD + EDITOR_STRIKETHROUGH_SUFFIX; @@ -3306,7 +3305,6 @@ private PreferenceConstants() { *

    * Value is of type Boolean. *

    - * */ public static final String BROWSING_LINK_VIEW_TO_EDITOR= "org.eclipse.jdt.ui.browsing.linktoeditor"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIds.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIds.java index 3405832b14d..9c13870b951 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIds.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/IRefactoringProcessorIds.java @@ -130,7 +130,6 @@ public interface IRefactoringProcessorIds { * (and of other Java elements or resources) are available * through the interfaces {@link IJavaElementMapper} and {@link IResourceMapper}, which can be retrieved from the * processor using the getAdapter() method.

    - * */ String RENAME_TYPE_PROCESSOR= IRefactoringProcessorIdsCore.RENAME_TYPE_PROCESSOR; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/correction/CUCorrectionProposal.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/correction/CUCorrectionProposal.java index 4b1955c85ca..cabf643e20a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/correction/CUCorrectionProposal.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/correction/CUCorrectionProposal.java @@ -262,7 +262,6 @@ protected synchronized TextChange createTextChange() throws CoreException { /** * @since 3.31 - * @return */ protected boolean useDelegateToCreateTextChange() { return true; @@ -271,7 +270,6 @@ protected boolean useDelegateToCreateTextChange() { /** * @since 3.31 * @return the text change - * @throws CoreException */ protected TextChange createTextChangeLocal() throws CoreException { TextChange change = fProposalCore.getNewChange(); @@ -284,7 +282,6 @@ protected TextChange createTextChangeLocal() throws CoreException { /** * @since 3.31 * @return a text change created via the delegate - * @throws CoreException */ protected TextChange createTextChangeViaDelegate() throws CoreException { if ((getDelegate()).getCurrentChange() instanceof TextChange change) { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java index 9b80fc8a84c..3a2f5c9b903 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java @@ -477,7 +477,6 @@ public IJavaProject getJavaProject() { * * @return the IPackageFragmentRoot or null if the current source * folder value is not a valid package fragment root - * */ public IPackageFragmentRoot getPackageFragmentRoot() { return fCurrRoot; From 6acdf4e9ce8d65dd06e1f1023d4ec872a7a3f321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Wed, 8 Nov 2023 16:19:05 +0100 Subject: [PATCH 19/43] version bump --- org.eclipse.jdt.astview.feature/feature.xml | 2 +- org.eclipse.jdt.astview.feature/pom.xml | 2 +- org.eclipse.jdt.astview/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.astview/pom.xml | 2 +- org.eclipse.jdt.bcoview.feature/feature.xml | 2 +- org.eclipse.jdt.bcoview.feature/pom.xml | 2 +- org.eclipse.jdt.bcoview/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.bcoview/pom.xml | 2 +- org.eclipse.jdt.jeview.feature/feature.xml | 2 +- org.eclipse.jdt.jeview.feature/pom.xml | 2 +- org.eclipse.jdt.jeview/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.jeview/pom.xml | 2 +- org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.junit.core/build.properties | 1 + org.eclipse.jdt.junit.core/pom.xml | 2 +- org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.junit.runtime/build.properties | 1 + org.eclipse.jdt.junit.runtime/pom.xml | 2 +- org.eclipse.jdt.junit/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.junit/build.properties | 1 + org.eclipse.jdt.junit/pom.xml | 2 +- org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.junit4.runtime/build.properties | 1 + org.eclipse.jdt.junit4.runtime/pom.xml | 2 +- org.eclipse.jdt.junit5.runtime/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.junit5.runtime/build.properties | 1 + org.eclipse.jdt.junit5.runtime/pom.xml | 2 +- org.eclipse.jdt.text.tests/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.text.tests/build.properties | 1 + org.eclipse.jdt.text.tests/pom.xml | 2 +- org.eclipse.jdt.ui.tests.refactoring/build.properties | 1 + org.eclipse.jdt.ui.tests/build.properties | 1 + org.eclipse.jdt.ui.unittest.junit.feature/feature.xml | 2 +- org.eclipse.jdt.ui.unittest.junit.feature/pom.xml | 2 +- org.eclipse.jdt.ui.unittest.junit/META-INF/MANIFEST.MF | 2 +- org.eclipse.jdt.ui.unittest.junit/build.properties | 1 + org.eclipse.jdt.ui.unittest.junit/pom.xml | 2 +- 37 files changed, 37 insertions(+), 28 deletions(-) diff --git a/org.eclipse.jdt.astview.feature/feature.xml b/org.eclipse.jdt.astview.feature/feature.xml index b8df3da7fb7..27af44df1f1 100644 --- a/org.eclipse.jdt.astview.feature/feature.xml +++ b/org.eclipse.jdt.astview.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jdt.astview.feature/pom.xml b/org.eclipse.jdt.astview.feature/pom.xml index 7884cd36ed3..6583a77985e 100644 --- a/org.eclipse.jdt.astview.feature/pom.xml +++ b/org.eclipse.jdt.astview.feature/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt.feature org.eclipse.jdt.astview.feature - 1.2.100-SNAPSHOT + 1.2.200-SNAPSHOT eclipse-feature diff --git a/org.eclipse.jdt.astview/META-INF/MANIFEST.MF b/org.eclipse.jdt.astview/META-INF/MANIFEST.MF index 0fa7cd77319..6db8e6cc9b7 100644 --- a/org.eclipse.jdt.astview/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.astview/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.astview Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.astview; singleton:=true -Bundle-Version: 1.6.50.qualifier +Bundle-Version: 1.6.100.qualifier Bundle-Activator: org.eclipse.jdt.astview.ASTViewPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/org.eclipse.jdt.astview/pom.xml b/org.eclipse.jdt.astview/pom.xml index 888c3525315..dd945c2f875 100644 --- a/org.eclipse.jdt.astview/pom.xml +++ b/org.eclipse.jdt.astview/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt org.eclipse.jdt.astview - 1.6.50-SNAPSHOT + 1.6.100-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.bcoview.feature/feature.xml b/org.eclipse.jdt.bcoview.feature/feature.xml index b85a3a834a2..0a9216125a6 100644 --- a/org.eclipse.jdt.bcoview.feature/feature.xml +++ b/org.eclipse.jdt.bcoview.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jdt.bcoview.feature/pom.xml b/org.eclipse.jdt.bcoview.feature/pom.xml index 96270d5831d..28daa357014 100644 --- a/org.eclipse.jdt.bcoview.feature/pom.xml +++ b/org.eclipse.jdt.bcoview.feature/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt.feature org.eclipse.jdt.bcoview.feature - 1.2.200-SNAPSHOT + 1.2.300-SNAPSHOT eclipse-feature diff --git a/org.eclipse.jdt.bcoview/META-INF/MANIFEST.MF b/org.eclipse.jdt.bcoview/META-INF/MANIFEST.MF index b3f604ededb..df6131a3b03 100644 --- a/org.eclipse.jdt.bcoview/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.bcoview/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.bcoview;singleton:=true -Bundle-Version: 1.2.200.qualifier +Bundle-Version: 1.2.300.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.jdt.bcoview.BytecodeOutlinePlugin Bundle-Vendor: %providerName diff --git a/org.eclipse.jdt.bcoview/pom.xml b/org.eclipse.jdt.bcoview/pom.xml index db3ad3909dc..e36081b6018 100644 --- a/org.eclipse.jdt.bcoview/pom.xml +++ b/org.eclipse.jdt.bcoview/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.bcoview - 1.2.200-SNAPSHOT + 1.2.300-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.jeview.feature/feature.xml b/org.eclipse.jdt.jeview.feature/feature.xml index 5f91d01a2cd..a8da88ad333 100644 --- a/org.eclipse.jdt.jeview.feature/feature.xml +++ b/org.eclipse.jdt.jeview.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jdt.jeview.feature/pom.xml b/org.eclipse.jdt.jeview.feature/pom.xml index 9813abdfdf1..c39da57e7eb 100644 --- a/org.eclipse.jdt.jeview.feature/pom.xml +++ b/org.eclipse.jdt.jeview.feature/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt.feature org.eclipse.jdt.jeview.feature - 1.1.200-SNAPSHOT + 1.1.300-SNAPSHOT eclipse-feature diff --git a/org.eclipse.jdt.jeview/META-INF/MANIFEST.MF b/org.eclipse.jdt.jeview/META-INF/MANIFEST.MF index afe43ae1392..d16232991e4 100644 --- a/org.eclipse.jdt.jeview/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.jeview/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.jeview Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.jeview; singleton:=true -Bundle-Version: 1.5.100.qualifier +Bundle-Version: 1.5.200.qualifier Bundle-Activator: org.eclipse.jdt.jeview.JEViewPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/org.eclipse.jdt.jeview/pom.xml b/org.eclipse.jdt.jeview/pom.xml index b5c7a1cd044..2c8abc52110 100644 --- a/org.eclipse.jdt.jeview/pom.xml +++ b/org.eclipse.jdt.jeview/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt org.eclipse.jdt.jeview - 1.5.100-SNAPSHOT + 1.5.200-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF index e85babef5c7..64aea9e6376 100644 --- a/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.junit.core Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.junit.core;singleton:=true -Bundle-Version: 3.13.0.qualifier +Bundle-Version: 3.13.100.qualifier Bundle-Activator: org.eclipse.jdt.internal.junit.JUnitCorePlugin Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName diff --git a/org.eclipse.jdt.junit.core/build.properties b/org.eclipse.jdt.junit.core/build.properties index 0aae0130e6b..0aa42e54103 100644 --- a/org.eclipse.jdt.junit.core/build.properties +++ b/org.eclipse.jdt.junit.core/build.properties @@ -18,6 +18,7 @@ bin.includes = plugin.xml,\ META-INF/ source.. = src/ +output.. = bin/ src.includes = about.html,\ schema/ diff --git a/org.eclipse.jdt.junit.core/pom.xml b/org.eclipse.jdt.junit.core/pom.xml index ff1ba416055..bf13288c785 100644 --- a/org.eclipse.jdt.junit.core/pom.xml +++ b/org.eclipse.jdt.junit.core/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt org.eclipse.jdt.junit.core - 3.13.0-SNAPSHOT + 3.13.100-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF b/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF index 827e4c42eba..24242221dad 100644 --- a/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.junit.runtime Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.junit.runtime;singleton:=true -Bundle-Version: 3.7.300.qualifier +Bundle-Version: 3.7.400.qualifier Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: org.eclipse.jdt.internal.junit.runner; diff --git a/org.eclipse.jdt.junit.runtime/build.properties b/org.eclipse.jdt.junit.runtime/build.properties index ce4ead6c601..2381bfa6265 100644 --- a/org.eclipse.jdt.junit.runtime/build.properties +++ b/org.eclipse.jdt.junit.runtime/build.properties @@ -12,6 +12,7 @@ # IBM Corporation - initial API and implementation ############################################################################### source.. = src/ +output.. = bin/ bin.includes = about.html,\ plugin.properties,\ diff --git a/org.eclipse.jdt.junit.runtime/pom.xml b/org.eclipse.jdt.junit.runtime/pom.xml index afa6824430f..ad35c57d6b8 100644 --- a/org.eclipse.jdt.junit.runtime/pom.xml +++ b/org.eclipse.jdt.junit.runtime/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.junit.runtime - 3.7.300-SNAPSHOT + 3.7.400-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.junit/META-INF/MANIFEST.MF b/org.eclipse.jdt.junit/META-INF/MANIFEST.MF index 32c2c0c73ed..cfc5f10ffbc 100644 --- a/org.eclipse.jdt.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.junit/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.junit Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.junit;singleton:=true -Bundle-Version: 3.16.200.qualifier +Bundle-Version: 3.16.300.qualifier Bundle-Activator: org.eclipse.jdt.internal.junit.ui.JUnitPlugin Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName diff --git a/org.eclipse.jdt.junit/build.properties b/org.eclipse.jdt.junit/build.properties index f66d00d8c06..1394a3309ce 100644 --- a/org.eclipse.jdt.junit/build.properties +++ b/org.eclipse.jdt.junit/build.properties @@ -20,6 +20,7 @@ bin.includes = plugin.xml,\ source.. = src/,\ internal compatibility/ +output.. = bin/ src.includes = about.html,\ schema/ diff --git a/org.eclipse.jdt.junit/pom.xml b/org.eclipse.jdt.junit/pom.xml index eecb0a028a5..f70dc766cc9 100644 --- a/org.eclipse.jdt.junit/pom.xml +++ b/org.eclipse.jdt.junit/pom.xml @@ -18,6 +18,6 @@ org.eclipse.jdt org.eclipse.jdt.junit - 3.16.200-SNAPSHOT + 3.16.300-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF b/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF index 308bbb162b4..75296c6b0d8 100644 --- a/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.jdt.junit4.runtime;singleton:=true -Bundle-Version: 1.3.0.qualifier +Bundle-Version: 1.3.100.qualifier Bundle-Localization: plugin Export-Package: org.eclipse.jdt.internal.junit4.runner;x-internal:=true Require-Bundle: org.junit;bundle-version="4.7.0", diff --git a/org.eclipse.jdt.junit4.runtime/build.properties b/org.eclipse.jdt.junit4.runtime/build.properties index d2019d8ec1d..19835551973 100644 --- a/org.eclipse.jdt.junit4.runtime/build.properties +++ b/org.eclipse.jdt.junit4.runtime/build.properties @@ -13,6 +13,7 @@ ############################################################################### source.. = src/ +output.. = bin/ src.includes = about.html bin.includes = about.html,\ plugin.properties,\ diff --git a/org.eclipse.jdt.junit4.runtime/pom.xml b/org.eclipse.jdt.junit4.runtime/pom.xml index f55a4171e68..31d9c700296 100644 --- a/org.eclipse.jdt.junit4.runtime/pom.xml +++ b/org.eclipse.jdt.junit4.runtime/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.junit4.runtime - 1.3.0-SNAPSHOT + 1.3.100-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.junit5.runtime/META-INF/MANIFEST.MF b/org.eclipse.jdt.junit5.runtime/META-INF/MANIFEST.MF index 1b684366f62..d26d2f05907 100644 --- a/org.eclipse.jdt.junit5.runtime/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.junit5.runtime/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.jdt.junit5.runtime;singleton:=true -Bundle-Version: 1.1.200.qualifier +Bundle-Version: 1.1.300.qualifier Bundle-Localization: plugin Export-Package: org.eclipse.jdt.internal.junit5.runner;x-internal:=true Require-Bundle: org.eclipse.jdt.junit.runtime;bundle-version="[3.5.0,4.0.0)", diff --git a/org.eclipse.jdt.junit5.runtime/build.properties b/org.eclipse.jdt.junit5.runtime/build.properties index 403608804cb..449276455e3 100644 --- a/org.eclipse.jdt.junit5.runtime/build.properties +++ b/org.eclipse.jdt.junit5.runtime/build.properties @@ -13,6 +13,7 @@ ############################################################################### source.. = src/ +output.. = bin/ src.includes = about.html bin.includes = about.html,\ plugin.properties,\ diff --git a/org.eclipse.jdt.junit5.runtime/pom.xml b/org.eclipse.jdt.junit5.runtime/pom.xml index fa755b1582f..41cb3bce200 100644 --- a/org.eclipse.jdt.junit5.runtime/pom.xml +++ b/org.eclipse.jdt.junit5.runtime/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.junit5.runtime - 1.1.200-SNAPSHOT + 1.1.300-SNAPSHOT eclipse-plugin diff --git a/org.eclipse.jdt.text.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.text.tests/META-INF/MANIFEST.MF index 6b0fc94b284..c6ccf5a1eba 100644 --- a/org.eclipse.jdt.text.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.text.tests/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.text.tests Bundle-ManifestVersion: 2 Bundle-Name: %Plugin.name Bundle-SymbolicName: org.eclipse.jdt.text.tests;singleton:=true -Bundle-Version: 3.14.200.qualifier +Bundle-Version: 3.14.300.qualifier Bundle-Activator: org.eclipse.jdt.text.tests.JdtTextTestPlugin Bundle-ActivationPolicy: lazy Bundle-Vendor: %Plugin.providerName diff --git a/org.eclipse.jdt.text.tests/build.properties b/org.eclipse.jdt.text.tests/build.properties index 50a368f0ec2..68faed04fc6 100644 --- a/org.eclipse.jdt.text.tests/build.properties +++ b/org.eclipse.jdt.text.tests/build.properties @@ -21,4 +21,5 @@ bin.includes = plugin.properties,\ src.includes = about.html source.. = src/ +output.. = bin/ javacWarnings..=-deadCode,-raw,-unchecked diff --git a/org.eclipse.jdt.text.tests/pom.xml b/org.eclipse.jdt.text.tests/pom.xml index bda257a6f47..f5c3193852b 100644 --- a/org.eclipse.jdt.text.tests/pom.xml +++ b/org.eclipse.jdt.text.tests/pom.xml @@ -20,7 +20,7 @@ org.eclipse.jdt org.eclipse.jdt.text.tests - 3.14.200-SNAPSHOT + 3.14.300-SNAPSHOT eclipse-test-plugin diff --git a/org.eclipse.jdt.ui.tests.refactoring/build.properties b/org.eclipse.jdt.ui.tests.refactoring/build.properties index 50b6312cb7c..70651cfa841 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/build.properties +++ b/org.eclipse.jdt.ui.tests.refactoring/build.properties @@ -19,4 +19,5 @@ bin.includes = plugin.xml,\ META-INF/,\ plugin.properties source.. = test cases/ +output.. = bin/ javacWarnings..=-deadCode,-raw,-unchecked diff --git a/org.eclipse.jdt.ui.tests/build.properties b/org.eclipse.jdt.ui.tests/build.properties index 2afa8ccc6a6..f6d3a132e95 100644 --- a/org.eclipse.jdt.ui.tests/build.properties +++ b/org.eclipse.jdt.ui.tests/build.properties @@ -24,4 +24,5 @@ source.. = examples/,\ ui/,\ leaks/,\ performance/ +output.. = bin/ javacWarnings..=-raw,-unchecked diff --git a/org.eclipse.jdt.ui.unittest.junit.feature/feature.xml b/org.eclipse.jdt.ui.unittest.junit.feature/feature.xml index b5e87b86e87..e8255a90688 100644 --- a/org.eclipse.jdt.ui.unittest.junit.feature/feature.xml +++ b/org.eclipse.jdt.ui.unittest.junit.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml b/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml index 7111ba0809d..2082ab4695a 100644 --- a/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml +++ b/org.eclipse.jdt.ui.unittest.junit.feature/pom.xml @@ -20,7 +20,7 @@ org.eclipse.jdt.feature org.eclipse.jdt.ui.unittest.junit.feature - 1.1.200-SNAPSHOT + 1.1.300-SNAPSHOT eclipse-feature diff --git a/org.eclipse.jdt.ui.unittest.junit/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.unittest.junit/META-INF/MANIFEST.MF index b551f33e352..358db2bf998 100644 --- a/org.eclipse.jdt.ui.unittest.junit/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui.unittest.junit/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui.unittest.junit Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.ui.unittest.junit;singleton:=true -Bundle-Version: 1.1.200.qualifier +Bundle-Version: 1.1.300.qualifier Bundle-Activator: org.eclipse.jdt.ui.unittest.junit.JUnitTestPlugin Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName diff --git a/org.eclipse.jdt.ui.unittest.junit/build.properties b/org.eclipse.jdt.ui.unittest.junit/build.properties index bd95f3e73b2..ea762472639 100644 --- a/org.eclipse.jdt.ui.unittest.junit/build.properties +++ b/org.eclipse.jdt.ui.unittest.junit/build.properties @@ -19,6 +19,7 @@ bin.includes = plugin.xml,\ META-INF/ source.. = src/ +output.. = bin/ src.includes = about.html diff --git a/org.eclipse.jdt.ui.unittest.junit/pom.xml b/org.eclipse.jdt.ui.unittest.junit/pom.xml index 5aa2d663104..31c8fe6b35f 100644 --- a/org.eclipse.jdt.ui.unittest.junit/pom.xml +++ b/org.eclipse.jdt.ui.unittest.junit/pom.xml @@ -18,7 +18,7 @@ org.eclipse.jdt org.eclipse.jdt.ui.unittest.junit - 1.1.200-SNAPSHOT + 1.1.300-SNAPSHOT eclipse-plugin true From 99bb183b0d9fb9cb423bb6362db8c3e3611d2c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Thu, 9 Nov 2023 08:41:22 +0100 Subject: [PATCH 20/43] fix various javadoc issues reduce ecj warnings in workspace --- .../internal/ui/javaeditor/SemanticToken.java | 6 +- ...ipantPreferenceConfigurationConstants.java | 3 +- .../text/correction/IProposalRelevance.java | 2 +- .../corext/callhierarchy/Implementors.java | 4 - .../internal/corext/refactoring/Checks.java | 1 - .../CollectingSearchRequestor.java | 1 - .../CuCollectingSearchRequestor.java | 4 +- .../delegates/DelegateFieldCreator.java | 4 +- .../src/org/eclipse/jsp/JspPluginImages.java | 4 +- .../jdt/ui/tests/CustomBaseRunner.java | 3 - .../jdt/testplugin/JavaProjectHelper.java | 1 - .../jdt/junit/tests/JUnitJUnitTests.java | 4 - .../junit/tests/LegacyTestRunListener.java | 114 -------------- .../tests/LegacyTestRunListenerTest.java | 145 ------------------ .../internal/corext/util/TypeInfoFilter.java | 2 +- .../jarpackager/CheckboxTreeAndListGroup.java | 2 - .../PropertiesFileDocumentProvider.java | 1 - .../java/hover/JavaInformationProvider.java | 2 +- .../eclipse/jdt/ui/PreferenceConstants.java | 35 +++-- 19 files changed, 35 insertions(+), 303 deletions(-) delete mode 100644 org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListener.java delete mode 100644 org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListenerTest.java diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/SemanticToken.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/SemanticToken.java index 4b2bc163b46..08ed2288fb5 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/SemanticToken.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/SemanticToken.java @@ -80,7 +80,7 @@ public CompilationUnit getRoot() { /** * Update this token with the given AST node. *

    - * NOTE: Allowed to be used by {@link SemanticHighlightingReconciler} only. + * Only to be used by org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler *

    * * @param node the AST simple name @@ -93,7 +93,7 @@ public void update(SimpleName node) { /** * Update this token with the given AST node. *

    - * NOTE: Allowed to be used by {@link SemanticHighlightingReconciler} only. + * Only to be used by org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler *

    * * @param literal the AST literal @@ -106,7 +106,7 @@ public void update(Expression literal) { /** * Clears this token. *

    - * NOTE: Allowed to be used by {@link SemanticHighlightingReconciler} only. + * Only to be used by org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler *

    */ public void clear() { diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantPreferenceConfigurationConstants.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantPreferenceConfigurationConstants.java index c8262e0aac7..8ed9ec035a2 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantPreferenceConfigurationConstants.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantPreferenceConfigurationConstants.java @@ -22,13 +22,12 @@ public interface SaveParticipantPreferenceConfigurationConstants { /** - * Preference prefix that is prepended to the id of {@link SaveParticipantDescriptor save participants}. + * Preference prefix that is prepended to the id of {@code SaveParticipantDescriptor save participants}. * *

    * Value is of type Boolean. *

    * - * @see SaveParticipantDescriptor * @since 1.20 */ public static final String EDITOR_SAVE_PARTICIPANT_PREFIX= "editor_save_participant_"; //$NON-NLS-1$ diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/IProposalRelevance.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/IProposalRelevance.java index ab94f2b0031..f0eba4c7888 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/IProposalRelevance.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/text/correction/IProposalRelevance.java @@ -19,7 +19,7 @@ /** * Interface defining relevance values for quick fixes/assists. * - * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() + * see org.eclipse.jdt.ui.text.java.IJavaCompletionProposall#getRelevance() * @since 3.9 */ public interface IProposalRelevance { diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/Implementors.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/Implementors.java index a0b358b18c9..e90338196ef 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/Implementors.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/callhierarchy/Implementors.java @@ -54,8 +54,6 @@ public static Implementors getInstance() { * instances are searched for. Also, only the first element of the elements * parameter is taken into consideration. * - * @param elements - * * @return An array of found implementing Java elements (currently only IMethod * instances) */ @@ -94,8 +92,6 @@ public IJavaElement[] searchForImplementors(IJavaElement[] elements, * Also, only the first element of the elements parameter is taken into * consideration. * - * @param elements - * * @return An array of found interfaces implemented by the declaring classes of the * specified Java elements (currently only IMethod instances) */ diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java index 55dab8ea6d2..91a6649ff63 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/Checks.java @@ -761,7 +761,6 @@ public static RefactoringStatus validateEdit(ICompilationUnit unit, Object conte * The returned RefactoringStatus has ERROR severity if * it is not possible to modify the element. * @return the status - * @throws JavaModelException * * @see IJavaElement#exists * @see IJavaElement#isReadOnly diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java index c93fcf0f464..45ddc7ce16a 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CollectingSearchRequestor.java @@ -53,7 +53,6 @@ public CollectingSearchRequestor(ReferencesInBinaryContext binaryRefs) { * all matches that make it through {@link #filterMatch(SearchMatch)}. * * @param match the found match - * @throws CoreException * * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch) */ diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java index 0330ea6e85b..d7046b0a62d 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/CuCollectingSearchRequestor.java @@ -58,8 +58,8 @@ protected IScanner getScanner(ICompilationUnit unit) { /** * This is an internal method. Do not call from subclasses! - * Use {@link #collectMatch(SearchMatch)} instead. - * @deprecated + * + * @deprecated Use {@link #collectMatch(SearchMatch)} instead. */ @Deprecated @Override diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java index 21349c1f7cc..72af2c43a48 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java @@ -34,7 +34,7 @@ /** * Delegate creator for static fields. Note that this implementation assumes a * field with only one fragment. See - * {@link MoveStaticMembersProcessor#getASTMembers(org.eclipse.ltk.core.refactoring.RefactoringStatus)} + * {@link MoveStaticMembersProcessor#getMembersToMove()} * for more information. * * @since 3.2 @@ -100,7 +100,7 @@ protected String getTextEditGroupLabel() { // ******************* INTERNAL HELPERS *************************** - private Expression createDelegateFieldInitializer(final FieldDeclaration declaration) throws JavaModelException { + private Expression createDelegateFieldInitializer(final FieldDeclaration declaration) { Assert.isNotNull(declaration); Expression qualification= getAccess(); diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java index 0c9db17d87c..589475e9555 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jsp/JspPluginImages.java @@ -128,11 +128,11 @@ public static ImageRegistry getImageRegistry() { * This may mean the same package directory as the package holding this class. * The images are declared using this.getClass() to ensure they are looked up via * this plugin class. - * @see JFace's ImageRegistry + * see JFace's ImageRegistry */ public static ImageRegistry initializeImageRegistry() { imageRegistry= new ImageRegistry(JspUIPlugin.getStandardDisplay()); - imageDescriptors = new HashMap(30); + imageDescriptors = new HashMap<>(30); declareImages(); return imageRegistry; } diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java index ded89198c74..4b2be7ab1e6 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/CustomBaseRunner.java @@ -18,9 +18,6 @@ import org.junit.runners.model.InitializationError; public class CustomBaseRunner extends BlockJUnit4ClassRunner { - /** - * @since - */ public CustomBaseRunner(Class klass) throws InitializationError { super(klass); try { diff --git a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java index 0e433023470..ef95bcacbc5 100644 --- a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java +++ b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java @@ -232,7 +232,6 @@ public static void set10CompilerOptions(IJavaProject project) { * Sets the compiler options to 11 for the given project. * * @param project the java project - * @param enable_preview_feature sets enable-preview compliance project option based on the value specified. * @since 4.18 */ public static void set11CompilerOptions(IJavaProject project) { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/JUnitJUnitTests.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/JUnitJUnitTests.java index d1aef52d6d4..6209063d94b 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/JUnitJUnitTests.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/JUnitJUnitTests.java @@ -43,10 +43,6 @@ JUnit4TestFinderTest16.class, TestSorting.class -/** - * @param suite the suite - * @deprecated to hide deprecation warning - */ //LegacyTestRunListenerTest.class }) public class JUnitJUnitTests { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListener.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListener.java deleted file mode 100644 index dccd924ddec..00000000000 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListener.java +++ /dev/null @@ -1,114 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2008 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jdt.junit.tests; - -import org.eclipse.jdt.junit.ITestRunListener; -import org.eclipse.jdt.junit.tests.AbstractTestRunListenerTest.TestRunLog; - -/** - * @deprecated - */ -@Deprecated -public class LegacyTestRunListener implements ITestRunListener { - - private final TestRunLog fLog; - - public LegacyTestRunListener(TestRunLog log) { - fLog= log; - } - - @Override - public void testRunStarted(int testCount) { - if (fLog != null) - fLog.add(testRunStartedMessage(testCount)); - } - public static String testRunStartedMessage(int testCount) { - return "testRunStarted(" + testCount + ")"; - } - - @Override - public void testRunEnded(long elapsedTime) { - if (fLog != null) { - fLog.add(testRunEndedMessage()); - fLog.setDone(); - } - } - public static String testRunEndedMessage() { - return "testRunEnded(" + ")"; - } - - @Override - public void testRunStopped(long elapsedTime) { - if (fLog != null) { - fLog.add(testRunStoppedMessage()); - fLog.setDone(); - } - } - public static String testRunStoppedMessage() { - return "testRunStopped(" + ")"; - } - - @Override - public void testStarted(String testId, String testName) { - if (fLog != null) - fLog.add(testStartedMessage(testId, testName)); - } - public static String testStartedMessage(String testId, String testName) { - return "testStarted(" + testId + "," + testName + ")"; - } - - @Override - public void testEnded(String testId, String testName) { - if (fLog != null) - fLog.add(testEndedMessage(testId, testName)); - } - public static String testEndedMessage(String testId, String testName) { - return "testEnded(" + testId + "," + testName + ")"; - } - - @Override - public void testFailed(int status, String testId, String testName, String trace) { - if (fLog != null) - fLog.add(testFailedMessage(status, testId, testName)); - } - public static String testFailedMessage(int status, String testId, String testName) { - return "testFailed(" + status + "," + testId + "," + testName + ")"; - } - - @Override - public void testRunTerminated() { - if (fLog != null) { - fLog.add(testRunTerminatedMessage()); - fLog.setDone(); - } - } - public static String testRunTerminatedMessage() { - return "testRunTerminated(" + ")"; - } - - @Override - public void testReran(String testId, String testClass, String testName, int status, String trace) { - if (fLog != null) - fLog.add(testReranMessage(testId, testClass, testName, status, trace)); - } - public static String testReranMessage(String testId, String testClass, String testName, int status, String trace) { - return "testFailed(" + testId + "," + testClass + "," + testName + "," + status + "," + escapeLinebreaks(trace) + ")"; - } - - private static String escapeLinebreaks(String trace) { - return trace.replaceAll("\\r", "\\r").replaceAll("\\n", "\\n"); - } - -} diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListenerTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListenerTest.java deleted file mode 100644 index 956d5e5c1fc..00000000000 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/LegacyTestRunListenerTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2008 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.jdt.junit.tests; - -import org.junit.Test; - -import org.eclipse.jdt.junit.ITestRunListener; -import org.eclipse.jdt.junit.JUnitCore; - -import org.eclipse.jdt.core.IType; - -/** - * @deprecated - */ -@Deprecated -public class LegacyTestRunListenerTest extends AbstractTestRunListenerTest { - - private String[] runTest(String source) throws Exception { - IType aTestCase= createType(source, "pack", "ATestCase.java"); - - TestRunLog log= new TestRunLog(); - - final LegacyTestRunListener testRunListener= new LegacyTestRunListener(log); - JUnitCore.addTestRunListener(testRunListener); - try { - return launchJUnit(aTestCase, log); - } finally { - JUnitCore.removeTestRunListener(testRunListener); - } - } - @Test - public void testOK() throws Exception { - String source= - "package pack;\n" + - "import junit.framework.TestCase;\n" + - "public class ATestCase extends TestCase {\n" + - " public void testSucceed() { }\n" + - "}"; - String[] expectedSequence= new String[] { - LegacyTestRunListener.testRunStartedMessage(1), - LegacyTestRunListener.testStartedMessage("2", "testSucceed(pack.ATestCase)"), - LegacyTestRunListener.testEndedMessage("2", "testSucceed(pack.ATestCase)"), - LegacyTestRunListener.testRunEndedMessage() - }; - String[] actual= runTest(source); - assertEqualLog(expectedSequence, actual); - } - @Test - public void testFail() throws Exception { - String source= - "package pack;\n" + - "import junit.framework.TestCase;\n" + - "public class ATestCase extends TestCase {\n" + - " public void testFail() { fail(); }\n" + - "}"; - String[] expectedSequence= new String[] { - LegacyTestRunListener.testRunStartedMessage(1), - LegacyTestRunListener.testStartedMessage("2", "testFail(pack.ATestCase)"), - LegacyTestRunListener.testFailedMessage(ITestRunListener.STATUS_FAILURE, "2", "testFail(pack.ATestCase)"), - LegacyTestRunListener.testEndedMessage("2", "testFail(pack.ATestCase)"), - LegacyTestRunListener.testRunEndedMessage() - }; - String[] actual= runTest(source); - assertEqualLog(expectedSequence, actual); - } - @Test - public void testSimpleTest() throws Exception { - String source= - "package pack;\n" + - "import junit.framework.*;\n" + - "\n" + - "public class ATestCase extends TestCase {\n" + - " protected int fValue1;\n" + - " protected int fValue2;\n" + - "\n" + - " public ATestCase(String name) {\n" + - " super(name);\n" + - " }\n" + - " protected void setUp() {\n" + - " fValue1= 2;\n" + - " fValue2= 3;\n" + - " }\n" + - " public static Test suite() {\n" + - " // ensure ordering:\n" + - " TestSuite result= new TestSuite(\"ATestCase\");\n" + - " result.addTest(new ATestCase(\"testAdd\"));\n" + - " result.addTest(new ATestCase(\"testDivideByZero\"));\n" + - " result.addTest(new ATestCase(\"testEquals\"));\n" + - " return result;\n" + - " }\n" + - " public void testAdd() {\n" + - " double result= fValue1 + fValue2;\n" + - " // forced failure result == 5\n" + - " assertTrue(result == 6);\n" + - " }\n" + - " public void testDivideByZero() {\n" + - " int zero= 0;\n" + - " int result= 8/zero;\n" + - " }\n" + - " public void testEquals() {\n" + - " assertEquals(12, 12);\n" + - " assertEquals(12L, 12L);\n" + - " assertEquals(new Long(12), new Long(12));\n" + - "\n" + - " assertEquals(\"Size\", 12, 13);\n" + - " assertEquals(\"Capacity\", 12.0, 11.99, 0.0);\n" + - " }\n" + - " public static void main (String[] args) {\n" + - " junit.textui.TestRunner.run(suite());\n" + - " }\n" + - "}"; - String[] expectedSequence= new String[] { - LegacyTestRunListener.testRunStartedMessage(3), - - LegacyTestRunListener.testStartedMessage("2", "testAdd(pack.ATestCase)"), - LegacyTestRunListener.testFailedMessage(ITestRunListener.STATUS_FAILURE, "2", "testAdd(pack.ATestCase)"), - LegacyTestRunListener.testEndedMessage("2", "testAdd(pack.ATestCase)"), - - LegacyTestRunListener.testStartedMessage("3", "testDivideByZero(pack.ATestCase)"), - LegacyTestRunListener.testFailedMessage(ITestRunListener.STATUS_ERROR, "3", "testDivideByZero(pack.ATestCase)"), - LegacyTestRunListener.testEndedMessage("3", "testDivideByZero(pack.ATestCase)"), - - LegacyTestRunListener.testStartedMessage("4", "testEquals(pack.ATestCase)"), - LegacyTestRunListener.testFailedMessage(ITestRunListener.STATUS_FAILURE, "4", "testEquals(pack.ATestCase)"), - LegacyTestRunListener.testEndedMessage("4", "testEquals(pack.ATestCase)"), - - LegacyTestRunListener.testRunEndedMessage() - }; - String[] actual= runTest(source); - assertEqualLog(expectedSequence, actual); - } - -} diff --git a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java index 6e6cb250a67..17419456098 100644 --- a/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java +++ b/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java @@ -196,7 +196,7 @@ public String getText() { *

    * WARNING: This is the reverse interpretation compared to * {@link org.eclipse.ui.dialogs.SearchPattern#isSubPattern(org.eclipse.ui.dialogs.SearchPattern)} - * and {@link org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter#isSubFilter}. + * and {@code org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter#isSubFilter}. *

    * * @param text another filter text diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java index 0761ca76694..2298fa5d1a5 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/CheckboxTreeAndListGroup.java @@ -714,8 +714,6 @@ public void updateSelections(final Map> items) { } /** * Returns the result of running the given elements through the filters. - * @param filters - * * @param elements the elements to filter * @return only the elements which all filters accept */ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileDocumentProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileDocumentProvider.java index 53f703e9bc8..d3877dd0826 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileDocumentProvider.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileDocumentProvider.java @@ -47,7 +47,6 @@ public class PropertiesFileDocumentProvider extends TextFileDocumentProvider { * @param element the file editor input * @return true if element defines a Java properties file, false * otherwise - * @throws CoreException * * @since 3.7 */ diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaInformationProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaInformationProvider.java index 0043c952123..fc78ac6901f 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaInformationProvider.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaInformationProvider.java @@ -50,7 +50,7 @@ public IRegion getSubject(ITextViewer textViewer, int offset) { /** * @see IInformationProvider#getInformation(ITextViewer, IRegion) - * @deprecated + * @deprecated use {@link IInformationProviderExtension#getInformation2(ITextViewer, IRegion)} */ @Deprecated @Override diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java index 8e94eec3ac3..34b00f8f7b6 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java @@ -22,17 +22,38 @@ import java.util.Locale; import java.util.StringTokenizer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.RGB; + import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.preferences.InstanceScope; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.JFacePreferences; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.jface.resource.JFaceResources; + +import org.eclipse.jface.text.contentassist.ContentAssistant; + +import org.eclipse.ui.PlatformUI; + +import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; +import org.eclipse.ui.texteditor.AbstractTextEditor; + import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.manipulation.CodeStyleConfiguration; import org.eclipse.jdt.core.manipulation.JavaManipulation; + import org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin; import org.eclipse.jdt.internal.core.manipulation.MembersOrderPreferenceCacheCommon; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettingsConstants; import org.eclipse.jdt.internal.corext.fix.CleanUpConstantsOptions; + +import org.eclipse.jdt.ui.text.IJavaColorConstants; + import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.JavaUIPreferenceInitializer; import org.eclipse.jdt.internal.ui.PreferenceConstantsCore; @@ -44,18 +65,6 @@ import org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerRegistry; import org.eclipse.jdt.internal.ui.text.java.ProposalSorterRegistry; import org.eclipse.jdt.internal.ui.text.spelling.SpellCheckEngine; -import org.eclipse.jdt.ui.text.IJavaColorConstants; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.JFacePreferences; -import org.eclipse.jface.preference.PreferenceConverter; -import org.eclipse.jface.resource.JFaceResources; -import org.eclipse.jface.text.contentassist.ContentAssistant; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; -import org.eclipse.ui.texteditor.AbstractTextEditor; /** @@ -2980,7 +2989,7 @@ private PreferenceConstants() { * A named preference that controls whether completion processors should be called from the non-UI thread, * when they declare ability to work from non-UI Thread. *

    Completion processors can declare whether they - * require UI Thread or not in their extension description, see {@link org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor#requiresUIThread()}.

    + * require UI Thread or not in their extension description, see {@link org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerRegistry#computingCompletionRequiresUIThread()}.

    *

    Value is of type Boolean

    * * @since 3.21 From 93c2d6b1d1c6dafe1c0b389598c65c8b26edba71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Thu, 9 Nov 2023 16:46:26 +0100 Subject: [PATCH 21/43] Disable some problem marker `The expression of type _ is boxed into _` - not a problem `Empty block should be documented` - not a problem `The allocated object is never used` - normal for SWT `The switch statement should have a default case` `_ is a raw type. References to generic type _ should be parameterized` - new code is reviewed anyway and nobody takes time to refactor the old raw types Also includes some minor warning fixes --- .../.settings/org.eclipse.jdt.core.prefs | 16 ++++- .../eclipse/jdt/astview/views/ASTView.java | 1 + .../eclipse/jdt/astview/views/Binding.java | 1 + .../jdt/astview/views/BindingProperty.java | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 15 ++++- .../refactoring/binary/StubCreator.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 16 ++++- .../jdt/jeview/views/JEViewLabelProvider.java | 1 + .../jdt/jeview/views/JavaElementView.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 18 +++++- .../.settings/org.eclipse.jdt.core.prefs | 16 ++++- .../.settings/org.eclipse.jdt.core.prefs | 20 +++++- .../junit4/runner/JUnit4TestLoader.java | 2 + .../.settings/org.eclipse.jdt.core.prefs | 20 +++++- .../.settings/org.eclipse.jdt.core.prefs | 23 +++++-- .../.settings/org.eclipse.jdt.core.prefs | 34 ++++++++++- .../.settings/org.eclipse.jdt.core.prefs | 61 ++++++++++++++++++- .../java/junit/runner/BaseTestRunner.java | 2 - .../.settings/org.eclipse.jdt.core.prefs | 20 +++++- .../MoveRenameResourceChangeTests.java | 3 - .../.settings/org.eclipse.jdt.core.prefs | 22 +++++-- .../.settings/org.eclipse.jdt.core.prefs | 5 +- .../junit/launcher/JUnitLaunchShortcut.java | 53 ++++++++++------ .../.settings/org.eclipse.jdt.core.prefs | 22 +++++-- .../JavaImplementationCodeMining.java | 1 - .../codemining/JavaReferenceCodeMining.java | 1 - .../formatter/FormatterModifyDialog.java | 49 ++++++++------- .../wizards/buildpaths/BuildPathsBlock.java | 2 +- 28 files changed, 341 insertions(+), 87 deletions(-) diff --git a/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs index 57390f27448..a2f173f6f0e 100644 --- a/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.astview/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,6 +38,8 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=info @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java index 1de4ae987c3..c6d059c1bd8 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java @@ -485,6 +485,7 @@ private boolean isInSwitchExpression(YieldStatement node) { private IDialogSettings fDialogSettings; + @SuppressWarnings("incomplete-switch") public ASTView() { fSuperListener= null; fDialogSettings= ASTViewPlugin.getDefault().getDialogSettings(); diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java index 56077aa6cd2..2c842eb0c50 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/Binding.java @@ -341,6 +341,7 @@ private int getTypeKind(ITypeBinding typeBinding) { return REF_TYPE; } + @SuppressWarnings("incomplete-switch") @Override public String getLabel() { StringBuffer buf= new StringBuffer(fLabel); diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java index b6b28d1fa4c..5c35c7c895a 100644 --- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java +++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/BindingProperty.java @@ -36,7 +36,7 @@ public BindingProperty(Binding parent, String name, Object value, boolean isRele fName= name + ": " + Binding.getEscapedStringLiteral((String) value); //$NON-NLS-1$ } } else if (value instanceof Character) { - fName= name + ": " + Binding.getEscapedCharLiteral(((Character) value)); //$NON-NLS-1$ + fName= name + ": " + Binding.getEscapedCharLiteral(((Character) value).charValue()); //$NON-NLS-1$ } else { fName= name + ": " + String.valueOf(value); //$NON-NLS-1$ } diff --git a/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs index 284f9764517..1dc0f04d37a 100644 --- a/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.core.manipulation/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -37,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -68,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=info +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error @@ -111,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/binary/StubCreator.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/binary/StubCreator.java index efa56f4c15b..c14efe99bfe 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/binary/StubCreator.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/binary/StubCreator.java @@ -237,7 +237,6 @@ protected void appendMembers(final IType type, final IProgressMonitor monitor) t } } - @SuppressWarnings("boxing") protected void appendMethodBody(final IMethod method) throws JavaModelException { if (method.isConstructor()) { final IType declaringType= method.getDeclaringType(); diff --git a/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs index 57390f27448..c0107ba6d92 100644 --- a/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.jeview/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEViewLabelProvider.java b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEViewLabelProvider.java index 7cec0b00fbc..5256ba2a5af 100644 --- a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEViewLabelProvider.java +++ b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JEViewLabelProvider.java @@ -48,6 +48,7 @@ public String getText(Object element) { return super.getText(element); } + @SuppressWarnings("incomplete-switch") @Override public Image getImage(Object element) { if (element instanceof JavaElement) { diff --git a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JavaElementView.java b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JavaElementView.java index 1ff01b8f5a3..4a7fa8857fc 100644 --- a/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JavaElementView.java +++ b/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JavaElementView.java @@ -261,7 +261,6 @@ public JavaElementView() { public void createPartControl(Composite parent) { fViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); fDrillDownAdapter = new DrillDownAdapter(fViewer) { - @SuppressWarnings("synthetic-access") @Override protected void updateNavigationButtons() { super.updateNavigationButtons(); diff --git a/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs index 6592e1dbbb9..c53fda38f10 100644 --- a/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs index 7d1a755a4ee..253cc89b111 100644 --- a/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,6 +38,8 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=info @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs index f2082f1cde6..1dc0f04d37a 100644 --- a/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -65,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=info +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled diff --git a/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java b/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java index 75208d6e785..8d894dc275c 100644 --- a/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java +++ b/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java @@ -112,7 +112,9 @@ private boolean isJUnit3SetUpTest(Class clazz, String testName) { if (setup.getReturnType() == Test.class && Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers)) return true; } catch (SecurityException e1) { + // ignore } catch (NoSuchMethodException e) { + // ignore } return false; } diff --git a/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs index e213f9e828f..29c1ed20507 100644 --- a/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.text.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled @@ -125,7 +139,7 @@ org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=info +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=warning org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled diff --git a/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs index 3e5400a4056..8ab36672770 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -17,8 +18,11 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 @@ -29,6 +33,8 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=info @@ -59,7 +65,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=info +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error @@ -79,16 +85,18 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning @@ -99,21 +107,28 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning diff --git a/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs index 350cf24f7a6..3ead76fccdb 100644 --- a/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -14,6 +15,15 @@ org.eclipse.jdt.core.codeComplete.localPrefixes= org.eclipse.jdt.core.codeComplete.localSuffixes= org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=fg org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve @@ -23,6 +33,8 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=info @@ -34,6 +46,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod= org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=warning @@ -41,6 +54,7 @@ org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning @@ -64,14 +78,21 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=dis org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -84,20 +105,30 @@ org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning @@ -107,6 +138,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference= org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=11 diff --git a/org.eclipse.jdt.ui.junit.sampleproject/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.junit.sampleproject/.settings/org.eclipse.jdt.core.prefs index f7e4229fa48..463a7e7d80b 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.junit.sampleproject/.settings/org.eclipse.jdt.core.prefs @@ -1,47 +1,104 @@ -#Tue Jun 21 10:28:00 CEST 2005 eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning diff --git a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/runner/BaseTestRunner.java b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/runner/BaseTestRunner.java index 3a02c0505c9..787c521f017 100644 --- a/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/runner/BaseTestRunner.java +++ b/org.eclipse.jdt.ui.junit.sampleproject/src/main/java/junit/runner/BaseTestRunner.java @@ -90,7 +90,6 @@ public synchronized void addFailure(final Test test, final AssertionFailedError * Returns the Test corresponding to the given suite. This is a template method, * subclasses override runFailed(), clearStatus(). */ - @SuppressWarnings({ "rawtypes", "unchecked" }) public Test getTest(String suiteClassName) { if (suiteClassName.length() <= 0) { clearStatus(); @@ -202,7 +201,6 @@ public static String truncate(String s) { /** * Returns the loaded Class for a suite name. */ - @SuppressWarnings("rawtypes") protected Class loadSuiteClass(String suiteClassName) throws ClassNotFoundException { return getLoader().load(suiteClassName); } diff --git a/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs index e213f9e828f..29c1ed20507 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled @@ -125,7 +139,7 @@ org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=info +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=warning org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveRenameResourceChangeTests.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveRenameResourceChangeTests.java index 1acd91d528b..14d7ce82f3d 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveRenameResourceChangeTests.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveRenameResourceChangeTests.java @@ -81,7 +81,6 @@ public void testFile1() throws Exception{ assertFalse("after: old should not exist", folder.getFile(oldName).exists()); } - @SuppressWarnings("null") @Test public void testFile2() throws Exception{ IFolder folder= (IFolder)getPackageP().getCorrespondingResource(); @@ -107,7 +106,6 @@ public void testFile2() throws Exception{ assertFalse("after undo: old should not exist", folder.getFile(newName).exists()); } - @SuppressWarnings("null") @Test public void testFile3() throws Exception{ IFolder folder= (IFolder)getPackageP().getCorrespondingResource(); @@ -204,7 +202,6 @@ public void testFolder2() throws Exception{ assertFalse("after undo: old should not exist", folder.getFolder(newName).exists()); } - @SuppressWarnings("null") @Test public void testFolder3() throws Exception{ IFolder folder= (IFolder)getPackageP().getCorrespondingResource(); diff --git a/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs index e213f9e828f..77731477139 100644 --- a/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -65,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=info +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled @@ -125,7 +139,7 @@ org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=info +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=warning org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled diff --git a/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs index 0d07f6034c0..c1deec45cc5 100644 --- a/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.unittest.junit/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -41,7 +42,7 @@ org.eclipse.jdt.core.compiler.problem.APILeak=warning org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -121,7 +122,7 @@ org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled diff --git a/org.eclipse.jdt.ui.unittest.junit/src/org/eclipse/jdt/ui/unittest/junit/launcher/JUnitLaunchShortcut.java b/org.eclipse.jdt.ui.unittest.junit/src/org/eclipse/jdt/ui/unittest/junit/launcher/JUnitLaunchShortcut.java index 1cb66474214..6ebb8e76b8d 100644 --- a/org.eclipse.jdt.ui.unittest.junit/src/org/eclipse/jdt/ui/unittest/junit/launcher/JUnitLaunchShortcut.java +++ b/org.eclipse.jdt.ui.unittest.junit/src/org/eclipse/jdt/ui/unittest/junit/launcher/JUnitLaunchShortcut.java @@ -24,18 +24,44 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.eclipse.core.resources.IResource; +import org.eclipse.unittest.ui.ConfigureViewerSupport; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; + +import org.eclipse.core.resources.IResource; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.window.Window; + +import org.eclipse.jface.text.ITextSelection; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.ElementListSelectionDialog; +import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; + import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; + import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugModelPresentation; import org.eclipse.debug.ui.ILaunchShortcut2; + import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; @@ -48,36 +74,23 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeRoot; import org.eclipse.jdt.core.JavaModelException; + import org.eclipse.jdt.internal.junit.launcher.AssertionVMArg; import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants; import org.eclipse.jdt.internal.junit.launcher.JUnitMigrationDelegate; import org.eclipse.jdt.internal.junit.util.ExceptionHandler; import org.eclipse.jdt.internal.junit.util.JUnitStubUtility; import org.eclipse.jdt.internal.junit.util.TestSearchEngine; -import org.eclipse.jdt.internal.ui.actions.SelectionConverter; + import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; + import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaElementLabels; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.PreferenceConstants; import org.eclipse.jdt.ui.unittest.junit.JUnitTestPlugin; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.ElementListSelectionDialog; -import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; -import org.eclipse.unittest.ui.ConfigureViewerSupport; + +import org.eclipse.jdt.internal.ui.actions.SelectionConverter; /** * The launch shortcut to launch JUnit tests. @@ -151,6 +164,7 @@ public void launch(ISelection selection, String mode) { } } + @SuppressWarnings("incomplete-switch") private void launch(Object[] elements, String mode) { try { IJavaElement elementToLaunch = null; @@ -618,6 +632,7 @@ public ILaunchConfiguration[] getLaunchConfigurations(final IEditorPart editor) return null; } + @SuppressWarnings("incomplete-switch") private ILaunchConfiguration[] findExistingLaunchConfigurations(Object candidate) { if (!(candidate instanceof IJavaElement) && candidate instanceof IAdaptable) { candidate = ((IAdaptable) candidate).getAdapter(IJavaElement.class); diff --git a/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs index f2082f1cde6..559c4532a4f 100644 --- a/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,5 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort @@ -21,8 +22,11 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -34,9 +38,11 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=info +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=error org.eclipse.jdt.core.compiler.problem.deprecation=warning @@ -65,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=info +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error @@ -85,12 +91,14 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error org.eclipse.jdt.core.compiler.problem.potentialNullReference=info org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=info @@ -106,17 +114,23 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=info +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled @@ -125,7 +139,7 @@ org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=info +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=warning org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaImplementationCodeMining.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaImplementationCodeMining.java index e9e06cca545..c2a8cb46772 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaImplementationCodeMining.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaImplementationCodeMining.java @@ -72,7 +72,6 @@ public JavaImplementationCodeMining(IJavaElement element, JavaEditor editor, IDo this.showImplementationsAtLeastOne= showImplementationsAtLeastOne; } - @SuppressWarnings("boxing") @Override protected CompletableFuture doResolve(ITextViewer viewer, IProgressMonitor monitor) { return CompletableFuture.runAsync(() -> { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaReferenceCodeMining.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaReferenceCodeMining.java index 5f19fbcc29f..ff8df389054 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaReferenceCodeMining.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/codemining/JavaReferenceCodeMining.java @@ -77,7 +77,6 @@ public JavaReferenceCodeMining(IJavaElement element, JavaEditor editor, IDocumen this.showReferencesAtLeastOne= showReferencesAtLeastOne; } - @SuppressWarnings("boxing") @Override protected CompletableFuture doResolve(ITextViewer viewer, IProgressMonitor monitor) { return CompletableFuture.runAsync(() -> { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java index 2933aadc403..3070d6bf119 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java @@ -22,26 +22,6 @@ import java.util.function.Function; import java.util.function.Predicate; -import org.eclipse.core.runtime.Assert; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.formatter.CodeFormatter; -import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; -import org.eclipse.jdt.internal.corext.util.Messages; -import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; -import org.eclipse.jdt.internal.ui.JavaPlugin; -import org.eclipse.jdt.internal.ui.JavaPluginImages; -import org.eclipse.jdt.internal.ui.preferences.FilteredPreferenceTree; -import org.eclipse.jdt.internal.ui.preferences.FilteredPreferenceTree.PreferenceTreeNode; -import org.eclipse.jdt.internal.ui.preferences.PreferenceHighlight; -import org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.ProfilePreferenceTree.SectionBuilder; -import org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.ProfilePreferenceTree.SimpleTreeBuilder; -import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile; -import org.eclipse.jdt.internal.ui.util.SWTUtil; -import org.eclipse.jdt.internal.ui.util.StringMatcher; -import org.eclipse.jdt.ui.JavaUI; -import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.FocusAdapter; @@ -66,6 +46,32 @@ import org.eclipse.swt.widgets.ToolBar; import org.eclipse.swt.widgets.ToolItem; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import org.eclipse.jface.resource.ImageDescriptor; + +import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.formatter.CodeFormatter; +import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; + +import org.eclipse.jdt.internal.corext.util.Messages; + +import org.eclipse.jdt.ui.JavaUI; + +import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; +import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.internal.ui.JavaPluginImages; +import org.eclipse.jdt.internal.ui.preferences.FilteredPreferenceTree; +import org.eclipse.jdt.internal.ui.preferences.FilteredPreferenceTree.PreferenceTreeNode; +import org.eclipse.jdt.internal.ui.preferences.PreferenceHighlight; +import org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.ProfilePreferenceTree.SectionBuilder; +import org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialog.ProfilePreferenceTree.SimpleTreeBuilder; +import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile; +import org.eclipse.jdt.internal.ui.util.SWTUtil; +import org.eclipse.jdt.internal.ui.util.StringMatcher; + public class FormatterModifyDialog extends ModifyDialog { @@ -73,7 +79,6 @@ private static class LineWrapPreference extends Preference { private static final String DATA_IMAGE_DISABLED= "image_disabled"; //$NON-NLS-1$ - @SuppressWarnings("boxing") private static final Object[][] WRAP_STYLE= { { FormatterMessages.FormatterModifyDialog_lineWrap_val_do_not_split, JavaPluginImages.DESC_ELCL_WRAP_NOT, JavaPluginImages.DESC_DLCL_WRAP_NOT, DefaultCodeFormatterConstants.WRAP_NO_SPLIT }, { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_when_necessary, JavaPluginImages.DESC_ELCL_WRAP_NECESSARY, JavaPluginImages.DESC_DLCL_WRAP_NECESSARY, DefaultCodeFormatterConstants.WRAP_COMPACT }, @@ -83,7 +88,6 @@ private static class LineWrapPreference extends Preference { { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_always_except_first_only_if_necessary, JavaPluginImages.DESC_ELCL_WRAP_ALL_NOT_FIRST, JavaPluginImages.DESC_DLCL_WRAP_ALL_NOT_FIRST, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE }, }; - @SuppressWarnings("boxing") private static final Object[][] INDENT_STYLE= { { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_default, JavaPluginImages.DESC_ELCL_INDENT_DEFAULT, JavaPluginImages.DESC_DLCL_INDENT_DEFAULT, DefaultCodeFormatterConstants.INDENT_DEFAULT }, { FormatterMessages.FormatterModifyDialog_lineWrap_val_indentation_by_one, JavaPluginImages.DESC_ELCL_INDENT_ONE, JavaPluginImages.DESC_DLCL_INDENT_ONE, DefaultCodeFormatterConstants.INDENT_BY_ONE }, @@ -96,7 +100,6 @@ private static class LineWrapPreference extends Preference { private static final List WRAP_BEFORE_PREF_VALUES= Arrays.asList(DefaultCodeFormatterConstants.TRUE, DefaultCodeFormatterConstants.FALSE); - @SuppressWarnings("boxing") private static final Object[][] WRAP_BEFORE_AFTER= { { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_before_operators, JavaPluginImages.DESC_ELCL_WRAP_BEFORE, JavaPluginImages.DESC_DLCL_WRAP_BEFORE, VALUE_WRAP_BEFORE }, { FormatterMessages.FormatterModifyDialog_lineWrap_val_wrap_after_operators, JavaPluginImages.DESC_ELCL_WRAP_AFTER, JavaPluginImages.DESC_DLCL_WRAP_AFTER, VALUE_WRAP_AFTER }, diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java index ccaecea3bcd..7c218eba6a9 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java @@ -708,7 +708,7 @@ public static void createProject(IProject project, URI locationURI, IProgressMon } public static void addJavaNature(IProject project, IProgressMonitor monitor) throws CoreException { - JavaProjectUtilities.addJavaNature(project, monitor);; + JavaProjectUtilities.addJavaNature(project, monitor); } public void configureJavaProject(IProgressMonitor monitor) throws CoreException, OperationCanceledException { From 8a8eef9445583ef125e60ce900c6d1fdaf910515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 21 Nov 2023 12:02:12 +0100 Subject: [PATCH 22/43] preferences.ComplianceConfigurationBlock: add null check - fixes #929 was NPE see https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/929 --- .../internal/ui/preferences/ComplianceConfigurationBlock.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java index c657e958c28..789e321e599 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java @@ -863,6 +863,9 @@ private void validateComplianceStatus() { } private String addsExportToSystemModule() { + if (fProject == null) { + return null; + } try { for (IClasspathEntry cpe : JavaCore.create(fProject).getRawClasspath()) { if (cpe.getEntryKind() == IClasspathEntry.CPE_CONTAINER && LibrariesWorkbookPage.isJREContainer(cpe.getPath())) { From 66a27ce114da51498dfe46e20179992578d2d567 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Thu, 30 Nov 2023 23:02:57 +0100 Subject: [PATCH 23/43] Re-normalize line-endings in git of all files to Linux style ("\n") Some files were checked-in into git having windows style line endings (\r\n). This is in general not wanted because it can cause modified files without any difference in git-staging on Windows if auto-crlf is enabled. To re-normalize line endings of all files use the following command (including dot): git add --renormalize . --- org.eclipse.jdt.bcoview/.options | 2 +- .../forceQualifierUpdate.txt | 4 +- .../jdt/bcoview/asm/DecompiledClass.java | 760 ++-- .../jdt/bcoview/asm/DecompiledMethod.java | 1050 ++--- .../eclipse/jdt/bcoview/ui/EclipseUtils.java | 234 +- .../ui/actions/CompareBytecodeAction.java | 68 +- .../bcoview/views/BytecodeOutlineView.java | 3620 ++++++++--------- .../forceQualifierUpdate.txt | 4 +- .../forceQualifierUpdate.txt | 26 +- .../forceQualifierUpdate.txt | 18 +- .../forceQualifierUpdate.txt | 16 +- .../moveInnerRecord/out/p1/Bar.java | 10 +- .../forceQualifierUpdate.txt | 12 +- 13 files changed, 2912 insertions(+), 2912 deletions(-) diff --git a/org.eclipse.jdt.bcoview/.options b/org.eclipse.jdt.bcoview/.options index d1eac5316b7..cf66a3fe327 100644 --- a/org.eclipse.jdt.bcoview/.options +++ b/org.eclipse.jdt.bcoview/.options @@ -1 +1 @@ -org.eclipse.jdt.bcoview/debug=false +org.eclipse.jdt.bcoview/debug=false diff --git a/org.eclipse.jdt.bcoview/forceQualifierUpdate.txt b/org.eclipse.jdt.bcoview/forceQualifierUpdate.txt index 7fe8d44e2fd..d26e0baf588 100644 --- a/org.eclipse.jdt.bcoview/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.bcoview/forceQualifierUpdate.txt @@ -1,3 +1,3 @@ -# To force a version qualifier update, add the bug here -Bug 527899 [9] Implement JEP 280: Indify String Concatenation +# To force a version qualifier update, add the bug here +Bug 527899 [9] Implement JEP 280: Indify String Concatenation Bug 527899 [9] Implement JEP 280: Indify String Concatenation \ No newline at end of file diff --git a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledClass.java b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledClass.java index 6d96542c636..a5e07bf1e9e 100644 --- a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledClass.java +++ b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledClass.java @@ -1,380 +1,380 @@ -/******************************************************************************* - * Copyright (c) 2023 Eric Bruneton and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Eric Bruneton - initial API and implementation - * Andrey Loskutov - initial API and implementation - *******************************************************************************/ -package org.eclipse.jdt.bcoview.asm; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.tree.ClassNode; - -import org.eclipse.jdt.bcoview.ui.JdtUtils; - -import org.eclipse.jface.text.ITextSelection; - -import org.eclipse.jdt.core.IClassFile; -import org.eclipse.jdt.core.IJavaElement; - -public class DecompiledClass { - - /** key is DecompiledMethod, value is IJavaElement (Member) */ - private final Map methodToJavaElt; - - private final List text; - - private String value; - - private final ClassNode classNode; - - private int classSize; - - private final DecompiledClassInfo classInfo; - - public DecompiledClass(final List text, DecompiledClassInfo classInfo, ClassNode classNode) { - this.text = text; - this.classInfo = classInfo; - this.classNode = classNode; - methodToJavaElt = new HashMap<>(); - } - - /** - * @return true if the class is either abstract or interface - */ - public boolean isAbstractOrInterface() { - int accessFlags = classInfo.accessFlags; - return (accessFlags & Opcodes.ACC_ABSTRACT) != 0 || (accessFlags & Opcodes.ACC_INTERFACE) != 0; - } - - public boolean isDefaultMethodPossible() { - return classInfo.major >= 8; - } - - public String getText() { - if (value == null) { - StringBuffer buf = new StringBuffer(); - for (Object o : text) { - if (o instanceof DecompiledMethod) { - buf.append(((DecompiledMethod) o).getText()); - } else { - buf.append(o); - } - } - value = buf.toString(); - } - return value; - } - - public String[][] getTextTable() { - List lines = new ArrayList<>(); - for (int i = 0; i < text.size(); ++i) { - Object o = text.get(i); - if (o instanceof DecompiledMethod) { - String[][] mlines = ((DecompiledMethod) o).getTextTable(); - for (String[] mline : mlines) { - lines.add(mline); - } - } else { - lines.add(new String[] { "", "", "", o.toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - } - } - return lines.toArray(new String[lines.size()][]); - } - - public int getBytecodeOffset(final int decompiledLine) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - Integer offset = m.getBytecodeOffset(decompiledLine - currentDecompiledLine); - if (offset != null) { - return offset.intValue(); - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return -1; - } - - public int getBytecodeInsn(final int decompiledLine) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - Integer opcode = m.getBytecodeInsn(decompiledLine - currentDecompiledLine); - if (opcode != null) { - return opcode.intValue(); - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return -1; - } - - public int getSourceLine(final int decompiledLine) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - int l = m.getSourceLine(decompiledLine - currentDecompiledLine); - if (l != -1) { - return l; - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return -1; - } - - public DecompiledMethod getMethod(final int decompiledLine) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - int l = m.getSourceLine(decompiledLine - currentDecompiledLine); - if (l != -1) { - return m; - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return null; - } - - public IJavaElement getJavaElement(int decompiledLine, IClassFile clazz) { - DecompiledMethod method = getMethod(decompiledLine); - if (method != null) { - IJavaElement javaElement = methodToJavaElt.get(method); - if (javaElement == null) { - javaElement = JdtUtils.getMethod(clazz, method.getSignature()); - if (javaElement != null) { - methodToJavaElt.put(method, javaElement); - } else { - javaElement = clazz; - } - } - return javaElement; - } - return clazz; - } - - public int getDecompiledLine(String methSignature) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - if (methSignature.equals(m.getSignature())) { - return currentDecompiledLine; - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return 0; - } - - public String[][][] getFrameTablesForInsn(final int insn, boolean useQualifiedNames) { - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - String[][][] frame = m.getFrameTablesForInsn(insn, useQualifiedNames); - if (frame != null) { - return frame; - } - } - } - return null; - } - - public String[][][] getFrameTables(final int decompiledLine, boolean useQualifiedNames) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - String[][][] frame = m.getFrameTables(decompiledLine - currentDecompiledLine, useQualifiedNames); - if (frame != null) { - return frame; - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return null; - } - - public int getDecompiledLine(final int sourceLine) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - int l = m.getDecompiledLine(sourceLine); - if (l != -1) { - return l + currentDecompiledLine; - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return -1; - } - - /** - * Converts method relative decompiled line to class absolute decompiled position - * - * @param m1 method for which we need absolute line position - * @param decompiledLine decompiled line, relative to given method (non global coord) - * @return class absolute decompiled line - */ - public int getDecompiledLine(final DecompiledMethod m1, final int decompiledLine) { - int currentDecompiledLine = 0; - for (Object o : text) { - if (o instanceof DecompiledMethod) { - if (o == m1) { - return currentDecompiledLine + decompiledLine; - } - DecompiledMethod m = (DecompiledMethod) o; - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return -1; - } - - public List getErrorLines() { - List errors = new ArrayList<>(); - int currentDecompiledLine = 0; - for (int i = 0; i < text.size(); ++i) { - Object o = text.get(i); - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - int l = m.getErrorLine(); - if (l != -1) { - errors.add(Integer.valueOf(l + currentDecompiledLine)); - } - currentDecompiledLine += m.getLineCount(); - } else { - currentDecompiledLine++; - } - } - return errors; - } - - public DecompiledMethod getBestDecompiledMatch(int sourceLine) { - DecompiledMethod bestM = null; - - for (Object o : text) { - if (o instanceof DecompiledMethod) { - DecompiledMethod m = (DecompiledMethod) o; - int line = m.getBestDecompiledLine(sourceLine); - if (line > 0) { - // doesn't work if it is a or which spawns over - // multiple locations in code - if (m.isInit()) { - if (bestM != null) { - int d1 = sourceLine - bestM.getFirstSourceLine(); - int d2 = sourceLine - m.getFirstSourceLine(); - if (d2 < d1) { - bestM = m; - } - } else { - bestM = m; - } - } else { - return m; - } - } else { - // check for init blocks which composed from different code lines - if (bestM != null && bestM.isInit()) { - if (bestM.getFirstSourceLine() < m.getFirstSourceLine() - && bestM.getLastSourceLine() > m.getLastSourceLine()) { - bestM = null; - } - } - } - } - } - return bestM; - } - - public LineRange getDecompiledRange(ITextSelection sourceRange) { - int startLine = sourceRange.getStartLine() + 1; - int endLine = sourceRange.getEndLine() + 1; - int startDecompiledLine = getDecompiledLine(startLine); - DecompiledMethod m1 = null; - DecompiledMethod m2 = null; - if (startDecompiledLine < 0) { - m1 = getBestDecompiledMatch(startLine); - m2 = getBestDecompiledMatch(endLine); - if (m1 != null && m1.equals(m2)) { - int methodStartLine = getDecompiledLine(m1.getSignature()); - startDecompiledLine = m1.getBestDecompiledLine(startLine); - if (startDecompiledLine >= 0) { - startDecompiledLine = methodStartLine + startDecompiledLine; - } else { - startDecompiledLine = methodStartLine + m1.getLineCount(); - } - } - } - int endDecompiledLine = getDecompiledLine(endLine); - if (endDecompiledLine < 0) { - if (m2 == null) { - m2 = getBestDecompiledMatch(endLine); - } - if (m2 != null && m2.equals(m1)) { - int methodStartLine = getDecompiledLine(m2.getSignature()); - endDecompiledLine = m2.getBestDecompiledLine(endLine); - if (endDecompiledLine >= 0) { - endDecompiledLine = methodStartLine + endDecompiledLine; - } else { - endDecompiledLine = methodStartLine + m2.getLineCount(); - } - // TODO dirty workaround - if (endDecompiledLine < startDecompiledLine) { - endDecompiledLine = startDecompiledLine + 1; - } - } - } - return new LineRange(startDecompiledLine, endDecompiledLine); - } - - public ClassNode getClassNode() { - return classNode; - } - - public void setClassSize(int classSize) { - this.classSize = classSize; - } - - public int getClassSize() { - return classSize; - } - - public String getJavaVersion() { - return classInfo.javaVersion.humanReadable(); - } -} +/******************************************************************************* + * Copyright (c) 2023 Eric Bruneton and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Eric Bruneton - initial API and implementation + * Andrey Loskutov - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.bcoview.asm; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.objectweb.asm.Opcodes; +import org.objectweb.asm.tree.ClassNode; + +import org.eclipse.jdt.bcoview.ui.JdtUtils; + +import org.eclipse.jface.text.ITextSelection; + +import org.eclipse.jdt.core.IClassFile; +import org.eclipse.jdt.core.IJavaElement; + +public class DecompiledClass { + + /** key is DecompiledMethod, value is IJavaElement (Member) */ + private final Map methodToJavaElt; + + private final List text; + + private String value; + + private final ClassNode classNode; + + private int classSize; + + private final DecompiledClassInfo classInfo; + + public DecompiledClass(final List text, DecompiledClassInfo classInfo, ClassNode classNode) { + this.text = text; + this.classInfo = classInfo; + this.classNode = classNode; + methodToJavaElt = new HashMap<>(); + } + + /** + * @return true if the class is either abstract or interface + */ + public boolean isAbstractOrInterface() { + int accessFlags = classInfo.accessFlags; + return (accessFlags & Opcodes.ACC_ABSTRACT) != 0 || (accessFlags & Opcodes.ACC_INTERFACE) != 0; + } + + public boolean isDefaultMethodPossible() { + return classInfo.major >= 8; + } + + public String getText() { + if (value == null) { + StringBuffer buf = new StringBuffer(); + for (Object o : text) { + if (o instanceof DecompiledMethod) { + buf.append(((DecompiledMethod) o).getText()); + } else { + buf.append(o); + } + } + value = buf.toString(); + } + return value; + } + + public String[][] getTextTable() { + List lines = new ArrayList<>(); + for (int i = 0; i < text.size(); ++i) { + Object o = text.get(i); + if (o instanceof DecompiledMethod) { + String[][] mlines = ((DecompiledMethod) o).getTextTable(); + for (String[] mline : mlines) { + lines.add(mline); + } + } else { + lines.add(new String[] { "", "", "", o.toString(), "" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + } + } + return lines.toArray(new String[lines.size()][]); + } + + public int getBytecodeOffset(final int decompiledLine) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + Integer offset = m.getBytecodeOffset(decompiledLine - currentDecompiledLine); + if (offset != null) { + return offset.intValue(); + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return -1; + } + + public int getBytecodeInsn(final int decompiledLine) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + Integer opcode = m.getBytecodeInsn(decompiledLine - currentDecompiledLine); + if (opcode != null) { + return opcode.intValue(); + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return -1; + } + + public int getSourceLine(final int decompiledLine) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + int l = m.getSourceLine(decompiledLine - currentDecompiledLine); + if (l != -1) { + return l; + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return -1; + } + + public DecompiledMethod getMethod(final int decompiledLine) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + int l = m.getSourceLine(decompiledLine - currentDecompiledLine); + if (l != -1) { + return m; + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return null; + } + + public IJavaElement getJavaElement(int decompiledLine, IClassFile clazz) { + DecompiledMethod method = getMethod(decompiledLine); + if (method != null) { + IJavaElement javaElement = methodToJavaElt.get(method); + if (javaElement == null) { + javaElement = JdtUtils.getMethod(clazz, method.getSignature()); + if (javaElement != null) { + methodToJavaElt.put(method, javaElement); + } else { + javaElement = clazz; + } + } + return javaElement; + } + return clazz; + } + + public int getDecompiledLine(String methSignature) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + if (methSignature.equals(m.getSignature())) { + return currentDecompiledLine; + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return 0; + } + + public String[][][] getFrameTablesForInsn(final int insn, boolean useQualifiedNames) { + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + String[][][] frame = m.getFrameTablesForInsn(insn, useQualifiedNames); + if (frame != null) { + return frame; + } + } + } + return null; + } + + public String[][][] getFrameTables(final int decompiledLine, boolean useQualifiedNames) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + String[][][] frame = m.getFrameTables(decompiledLine - currentDecompiledLine, useQualifiedNames); + if (frame != null) { + return frame; + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return null; + } + + public int getDecompiledLine(final int sourceLine) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + int l = m.getDecompiledLine(sourceLine); + if (l != -1) { + return l + currentDecompiledLine; + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return -1; + } + + /** + * Converts method relative decompiled line to class absolute decompiled position + * + * @param m1 method for which we need absolute line position + * @param decompiledLine decompiled line, relative to given method (non global coord) + * @return class absolute decompiled line + */ + public int getDecompiledLine(final DecompiledMethod m1, final int decompiledLine) { + int currentDecompiledLine = 0; + for (Object o : text) { + if (o instanceof DecompiledMethod) { + if (o == m1) { + return currentDecompiledLine + decompiledLine; + } + DecompiledMethod m = (DecompiledMethod) o; + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return -1; + } + + public List getErrorLines() { + List errors = new ArrayList<>(); + int currentDecompiledLine = 0; + for (int i = 0; i < text.size(); ++i) { + Object o = text.get(i); + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + int l = m.getErrorLine(); + if (l != -1) { + errors.add(Integer.valueOf(l + currentDecompiledLine)); + } + currentDecompiledLine += m.getLineCount(); + } else { + currentDecompiledLine++; + } + } + return errors; + } + + public DecompiledMethod getBestDecompiledMatch(int sourceLine) { + DecompiledMethod bestM = null; + + for (Object o : text) { + if (o instanceof DecompiledMethod) { + DecompiledMethod m = (DecompiledMethod) o; + int line = m.getBestDecompiledLine(sourceLine); + if (line > 0) { + // doesn't work if it is a or which spawns over + // multiple locations in code + if (m.isInit()) { + if (bestM != null) { + int d1 = sourceLine - bestM.getFirstSourceLine(); + int d2 = sourceLine - m.getFirstSourceLine(); + if (d2 < d1) { + bestM = m; + } + } else { + bestM = m; + } + } else { + return m; + } + } else { + // check for init blocks which composed from different code lines + if (bestM != null && bestM.isInit()) { + if (bestM.getFirstSourceLine() < m.getFirstSourceLine() + && bestM.getLastSourceLine() > m.getLastSourceLine()) { + bestM = null; + } + } + } + } + } + return bestM; + } + + public LineRange getDecompiledRange(ITextSelection sourceRange) { + int startLine = sourceRange.getStartLine() + 1; + int endLine = sourceRange.getEndLine() + 1; + int startDecompiledLine = getDecompiledLine(startLine); + DecompiledMethod m1 = null; + DecompiledMethod m2 = null; + if (startDecompiledLine < 0) { + m1 = getBestDecompiledMatch(startLine); + m2 = getBestDecompiledMatch(endLine); + if (m1 != null && m1.equals(m2)) { + int methodStartLine = getDecompiledLine(m1.getSignature()); + startDecompiledLine = m1.getBestDecompiledLine(startLine); + if (startDecompiledLine >= 0) { + startDecompiledLine = methodStartLine + startDecompiledLine; + } else { + startDecompiledLine = methodStartLine + m1.getLineCount(); + } + } + } + int endDecompiledLine = getDecompiledLine(endLine); + if (endDecompiledLine < 0) { + if (m2 == null) { + m2 = getBestDecompiledMatch(endLine); + } + if (m2 != null && m2.equals(m1)) { + int methodStartLine = getDecompiledLine(m2.getSignature()); + endDecompiledLine = m2.getBestDecompiledLine(endLine); + if (endDecompiledLine >= 0) { + endDecompiledLine = methodStartLine + endDecompiledLine; + } else { + endDecompiledLine = methodStartLine + m2.getLineCount(); + } + // TODO dirty workaround + if (endDecompiledLine < startDecompiledLine) { + endDecompiledLine = startDecompiledLine + 1; + } + } + } + return new LineRange(startDecompiledLine, endDecompiledLine); + } + + public ClassNode getClassNode() { + return classNode; + } + + public void setClassSize(int classSize) { + this.classSize = classSize; + } + + public int getClassSize() { + return classSize; + } + + public String getJavaVersion() { + return classInfo.javaVersion.humanReadable(); + } +} diff --git a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledMethod.java b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledMethod.java index 2b1ca360eea..c0c75629b3a 100644 --- a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledMethod.java +++ b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/asm/DecompiledMethod.java @@ -1,525 +1,525 @@ -/******************************************************************************* - * Copyright (c) 2023 Eric Bruneton and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Eric Bruneton - initial API and implementation - * Andrey Loskutov - initial API and implementation - *******************************************************************************/ -package org.eclipse.jdt.bcoview.asm; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.objectweb.asm.Label; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.Type; -import org.objectweb.asm.tree.LocalVariableNode; -import org.objectweb.asm.tree.MethodNode; -import org.objectweb.asm.tree.analysis.Analyzer; -import org.objectweb.asm.tree.analysis.AnalyzerException; -import org.objectweb.asm.tree.analysis.BasicValue; -import org.objectweb.asm.tree.analysis.BasicVerifier; -import org.objectweb.asm.tree.analysis.Frame; -import org.objectweb.asm.tree.analysis.Interpreter; -import org.objectweb.asm.tree.analysis.SimpleVerifier; -import org.objectweb.asm.tree.analysis.Value; - -import org.eclipse.jdt.bcoview.BytecodeOutlinePlugin; -import org.eclipse.jdt.bcoview.preferences.BCOConstants; - -import org.eclipse.core.runtime.IStatus; - -public class DecompiledMethod { - - private final List text; - - private final List localVariables; - - /** - * decompiled line -> source line - */ - private final Map sourceLines; - - /** - * source line -> decompiled line - */ - private final Map decompiledLines; - - /** - * decompiled line -> insn - */ - private final Map insns; - - /** - * decompiled line -> opcode - */ - private final Map opcodes; - - /** - * insn -> decompile line - */ - private final Map insnLines; - - private int lineCount; - - /** - * first source line, if any - */ - private int firstSourceLine; - - /** - * last source line, if any - */ - private int lastSourceLine; - - MethodNode meth; - - private Frame[] frames; - - private String error; - - private int errorInsn; - - private final String owner; - - - private final Map lineNumbers; - - private final DecompilerOptions options; - - private final int access; - - - public DecompiledMethod(String owner, Map lineNumbers, MethodNode meth, DecompilerOptions options, int access) { - this.meth = meth; - this.owner = owner; - this.lineNumbers = lineNumbers; - this.options = options; - this.access = access; - this.text = new ArrayList<>(); - this.localVariables = meth.localVariables; - this.sourceLines = new HashMap<>(); - this.decompiledLines = new HashMap<>(); - this.insns = new HashMap<>(); - this.opcodes = new HashMap<>(); - this.insnLines = new HashMap<>(); - } - - void setText(List inputText) { - formatText(inputText, new HashMap<>(), new StringBuffer(), this.text); - computeMaps(lineNumbers); - - if (options.modes.get(BCOConstants.F_SHOW_ANALYZER) && (access & Opcodes.ACC_ABSTRACT) == 0) { - analyzeMethod(); - } - } - - void addLineNumber(Label start, Integer integer) { - lineNumbers.put(start, integer); - } - - public boolean isInit() { - return ("".equals(meth.name) && "()V".equals(meth.desc)) //$NON-NLS-1$ //$NON-NLS-2$ - || "".equals(meth.name); //$NON-NLS-1$ - } - - public String getSignature() { - return meth.name + meth.desc; - } - - public boolean containsSource(int sourceLine) { - return sourceLine >= getFirstSourceLine() && sourceLine <= getLastSourceLine(); - } - - /** - * @param sourceLine line in sources - * @return nearest match above given source line or the given line for perfect match or -1 for - * no match. The return value is method-relative, and need to be transformed to class - * absolute - */ - public int getBestDecompiledLine(final int sourceLine) { - if (!containsSource(sourceLine)) { - return -1; - } - Set set = decompiledLines.keySet(); - if (set.size() == 0) { - return -1; - } - int bestMatch = -1; - for (Integer integer : set) { - int line = integer.intValue(); - int delta = sourceLine - line; - if (delta < 0) { - continue; - } else if (delta == 0) { - return line; - } - if (bestMatch < 0 || delta < sourceLine - bestMatch) { - bestMatch = line; - } - } - if (bestMatch < 0) { - return -1; - } - return decompiledLines.get(Integer.valueOf(bestMatch)).intValue(); - } - - private void analyzeMethod() { - Interpreter interpreter; - try { - Type type = Type.getType(owner); - interpreter = new SimpleVerifier(DecompilerOptions.LATEST_ASM_VERSION, type, null, null, false) { - // - }; - } catch (Exception e) { - interpreter = new BasicVerifier(); - } - - Analyzer a = new Analyzer<>(interpreter); - try { - a.analyze(owner, meth); - } catch (AnalyzerException e) { - error = e.getMessage(); - if (error.startsWith("Error at instruction ")) { //$NON-NLS-1$ - error = error.substring("Error at instruction ".length()); //$NON-NLS-1$ - errorInsn = Integer.parseInt(error.substring(0, error.indexOf(':'))); - error = error.substring(error.indexOf(':') + 2); - } else { - BytecodeOutlinePlugin.log(e, IStatus.ERROR); - error = null; - } - } - frames = a.getFrames(); - } - - private void formatText(List input, Map locals, StringBuffer line, List result) { - for (int i = 0; i < input.size(); ++i) { - Object o = input.get(i); - if (o instanceof List) { - formatText((List) o, locals, line, result); - } else if (o instanceof Index) { - result.add(o); - updateLocals((Index) o, locals); - } else if (o instanceof Integer) { - String localVariableName = locals.get(o); - if (localVariableName == null) { - Index index = getNextIndex(input, i); - if (index != null) { - updateLocals(index, locals); - localVariableName = locals.get(o); - } - } - if (localVariableName != null) { - line.append(": ").append(localVariableName); //$NON-NLS-1$ - } - } else { - String s = o.toString(); - int p; - do { - p = s.indexOf('\n'); - if (p == -1) { - line.append(s); - } else { - result.add(line.toString() + s.substring(0, p + 1)); - s = s.substring(p + 1); - line.setLength(0); - } - } while (p != -1); - } - } - } - - private static Index getNextIndex(List input, int startOffset) { - for (int i = startOffset + 1; i < input.size(); i++) { - Object object = input.get(i); - if (object instanceof Index) { - return (Index) object; - } - } - return null; - } - - private void updateLocals(Index index, Map locals) { - for (LocalVariableNode lvNode : localVariables) { - if (lvNode.start == index.labelNode) { - locals.put(Integer.valueOf(lvNode.index), lvNode.name); - } else if (lvNode.end == index.labelNode) { - locals.remove(Integer.valueOf(lvNode.index)); - } - } - } - - private void computeMaps(Map lineNumbers1) { - int currentDecompiledLine = 0; - int firstLine = -1; - int lastLine = -1; - for (Object o : text) { - int currentOpcode = -1; - int currentInsn1 = -1; - int currentSourceLine = -1; - if (o instanceof Index) { - Index index = (Index) o; - Integer sourceLine = null; - if (index.labelNode != null) { - sourceLine = lineNumbers1.get(index.labelNode.getLabel()); - } - if (sourceLine != null) { - currentSourceLine = sourceLine.intValue(); - if (firstLine == -1 || currentSourceLine < firstLine) { - firstLine = currentSourceLine; - } - if (lastLine == -1 || currentSourceLine > lastLine) { - lastLine = currentSourceLine; - } - } - currentInsn1 = index.insn; - currentOpcode = index.opcode; - } else { - ++currentDecompiledLine; - } - Integer cdl = Integer.valueOf(currentDecompiledLine); - Integer ci = Integer.valueOf(currentInsn1); - Integer co = Integer.valueOf(currentOpcode); - if (currentSourceLine >= 0) { - Integer csl = Integer.valueOf(currentSourceLine); - sourceLines.put(cdl, csl); - if (decompiledLines.get(csl) == null) { - decompiledLines.put(csl, cdl); - } - } - insns.put(cdl, ci); - opcodes.put(cdl, co); - if (insnLines.get(ci) == null) { - insnLines.put(ci, cdl); - } - } - lineCount = currentDecompiledLine; - firstSourceLine = firstLine; - lastSourceLine = lastLine; - } - - public String getText() { - StringBuffer buf = new StringBuffer(); - for (Object o : text) { - if (!(o instanceof Index)) { - buf.append((String) o); - } - } - return buf.toString(); - } - - public String[][] getTextTable() { - Frame frame = null; - String error1 = ""; //$NON-NLS-1$ - List lines = new ArrayList<>(); - String offsStr = null; - for (int i = 0; i < text.size(); ++i) { - Object o = text.get(i); - if (o instanceof Index) { - Index index = (Index) o; - int insn = index.insn; - - offsStr = "" + insn; //$NON-NLS-1$ - if (frames != null && insn < frames.length) { - frame = frames[insn]; - if (this.error != null && insn == this.errorInsn) { - error1 = this.error; - } - } - } else { - if (offsStr == null) { - offsStr = ""; //$NON-NLS-1$ - } - String locals = " "; //$NON-NLS-1$ - String stack = " "; //$NON-NLS-1$ - if (frame != null) { - StringBuffer buf = new StringBuffer(); - appendFrame(buf, frame); - int p = buf.indexOf(" "); //$NON-NLS-1$ - locals = buf.substring(0, p); - if ("".equals(locals)) { //$NON-NLS-1$ - locals = " "; //$NON-NLS-1$ - } - stack = buf.substring(p + 1); - if ("".equals(stack)) { //$NON-NLS-1$ - stack = " "; //$NON-NLS-1$ - } - } - - lines.add(new String[] { offsStr, locals, stack, o.toString(), error1 }); - frame = null; - error1 = ""; //$NON-NLS-1$ - offsStr = null; - } - } - return lines.toArray(new String[lines.size()][]); - } - - public int getLineCount() { - return lineCount; - } - - public int getErrorLine() { - if (error == null) { - return -1; - } - Integer i = insnLines.get(Integer.valueOf(errorInsn)); - return i == null ? -1 : i.intValue(); - } - - private static void appendFrame(StringBuffer buf, Frame f) { - try { - for (int i = 0; i < f.getLocals(); ++i) { - appendValue(buf, f.getLocal(i)); - } - buf.append(' '); - for (int i = 0; i < f.getStackSize(); ++i) { - appendValue(buf, f.getStack(i)); - } - } catch (IndexOutOfBoundsException e) { - BytecodeOutlinePlugin.log(e, IStatus.ERROR); - } - } - - private static void appendValue(StringBuffer buf, Value v) { - if (((BasicValue) v).isReference()) { - buf.append("R"); //$NON-NLS-1$ - } else { - buf.append(v.toString()); - } - } - - public int getFirstSourceLine() { - return firstSourceLine; - } - - public int getLastSourceLine() { - return lastSourceLine; - } - - public int getSourceLine(int decompiledLine) { - Integer i = sourceLines.get(Integer.valueOf(decompiledLine)); - return i == null ? -1 : i.intValue(); - } - - public Integer getBytecodeOffset(int decompiledLine) { - return insns.get(Integer.valueOf(decompiledLine)); - } - - public Integer getBytecodeInsn(int decompiledLine) { - return opcodes.get(Integer.valueOf(decompiledLine)); - } - - public String[][][] getFrameTables(int decompiledLine, boolean useQualifiedNames) { - Integer insn = getBytecodeOffset(decompiledLine); - if (insn == null) { - return null; - } - return getFrameTablesForInsn(insn.intValue(), useQualifiedNames); - } - - public String[][][] getFrameTablesForInsn(int insn, boolean useQualifiedNames) { - if (error != null && insn == errorInsn) { - return null; - } - if (frames != null && insn >= 0 && insn < frames.length) { - Frame f = frames[insn]; - if (f == null) { - return null; - } - - try { - ArrayList locals = new ArrayList<>(); - for (int i = 0; i < f.getLocals(); ++i) { - String varName = ""; //$NON-NLS-1$ - for (LocalVariableNode lvnode : localVariables) { - int n = lvnode.index; - if (n == i) { - varName = lvnode.name; - // TODO take into account variable scope! - break; - } - } - - locals.add(new String[] { - "" + i, //$NON-NLS-1$ - getTypeName(useQualifiedNames, f.getLocal(i).toString()), - varName }); - } - - ArrayList stack = new ArrayList<>(); - for (int i = 0; i < f.getStackSize(); ++i) { - stack.add(new String[] { - "" + i, //$NON-NLS-1$ - getTypeName(useQualifiedNames, f.getStack(i).toString()) }); - } - return new String[][][] { - locals.toArray(new String[3][]), - stack.toArray(new String[2][]) }; - } catch (IndexOutOfBoundsException e) { - BytecodeOutlinePlugin.log(e, IStatus.ERROR); - } - } - return null; - } - - private static String getTypeName(boolean useQualifiedNames, String s) { - if (!useQualifiedNames) { - // get leading array symbols - String arraySymbols = ""; //$NON-NLS-1$ - while (s.startsWith("[")) { //$NON-NLS-1$ - arraySymbols += "["; //$NON-NLS-1$ - s = s.substring(1); - } - - int idx = s.lastIndexOf('/'); - if (idx > 0) { - // from "Ljava/lang/Object;" to "Object" - return arraySymbols + s.substring(idx + 1, s.length() - 1); - } - // this is the case on LVT view - ignore it - if ("." == s) { //$NON-NLS-1$ - return arraySymbols + s; - } - // XXX Unresolved type - if ("R" == s) { //$NON-NLS-1$ - return arraySymbols + s; - } - // resolve primitive types - return arraySymbols + CommentedClassVisitor.getSimpleName(Type.getType(s)); - } - return "Lnull;".equals(s) ? "null" : s; //$NON-NLS-1$ //$NON-NLS-2$ - } - - public int getDecompiledLine(int sourceLine) { - Integer i = decompiledLines.get(Integer.valueOf(sourceLine)); - return i == null ? -1 : i.intValue(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof DecompiledMethod)) { - return false; - } - DecompiledMethod another = (DecompiledMethod) o; - return getSignature().equals(another.getSignature()) && (owner != null ? owner.equals(another.owner) : true); - } - - @Override - public int hashCode() { - return getSignature().hashCode() + (owner != null ? owner.hashCode() : 0); - } -} +/******************************************************************************* + * Copyright (c) 2023 Eric Bruneton and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Eric Bruneton - initial API and implementation + * Andrey Loskutov - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.bcoview.asm; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.objectweb.asm.Label; +import org.objectweb.asm.Opcodes; +import org.objectweb.asm.Type; +import org.objectweb.asm.tree.LocalVariableNode; +import org.objectweb.asm.tree.MethodNode; +import org.objectweb.asm.tree.analysis.Analyzer; +import org.objectweb.asm.tree.analysis.AnalyzerException; +import org.objectweb.asm.tree.analysis.BasicValue; +import org.objectweb.asm.tree.analysis.BasicVerifier; +import org.objectweb.asm.tree.analysis.Frame; +import org.objectweb.asm.tree.analysis.Interpreter; +import org.objectweb.asm.tree.analysis.SimpleVerifier; +import org.objectweb.asm.tree.analysis.Value; + +import org.eclipse.jdt.bcoview.BytecodeOutlinePlugin; +import org.eclipse.jdt.bcoview.preferences.BCOConstants; + +import org.eclipse.core.runtime.IStatus; + +public class DecompiledMethod { + + private final List text; + + private final List localVariables; + + /** + * decompiled line -> source line + */ + private final Map sourceLines; + + /** + * source line -> decompiled line + */ + private final Map decompiledLines; + + /** + * decompiled line -> insn + */ + private final Map insns; + + /** + * decompiled line -> opcode + */ + private final Map opcodes; + + /** + * insn -> decompile line + */ + private final Map insnLines; + + private int lineCount; + + /** + * first source line, if any + */ + private int firstSourceLine; + + /** + * last source line, if any + */ + private int lastSourceLine; + + MethodNode meth; + + private Frame[] frames; + + private String error; + + private int errorInsn; + + private final String owner; + + + private final Map lineNumbers; + + private final DecompilerOptions options; + + private final int access; + + + public DecompiledMethod(String owner, Map lineNumbers, MethodNode meth, DecompilerOptions options, int access) { + this.meth = meth; + this.owner = owner; + this.lineNumbers = lineNumbers; + this.options = options; + this.access = access; + this.text = new ArrayList<>(); + this.localVariables = meth.localVariables; + this.sourceLines = new HashMap<>(); + this.decompiledLines = new HashMap<>(); + this.insns = new HashMap<>(); + this.opcodes = new HashMap<>(); + this.insnLines = new HashMap<>(); + } + + void setText(List inputText) { + formatText(inputText, new HashMap<>(), new StringBuffer(), this.text); + computeMaps(lineNumbers); + + if (options.modes.get(BCOConstants.F_SHOW_ANALYZER) && (access & Opcodes.ACC_ABSTRACT) == 0) { + analyzeMethod(); + } + } + + void addLineNumber(Label start, Integer integer) { + lineNumbers.put(start, integer); + } + + public boolean isInit() { + return ("".equals(meth.name) && "()V".equals(meth.desc)) //$NON-NLS-1$ //$NON-NLS-2$ + || "".equals(meth.name); //$NON-NLS-1$ + } + + public String getSignature() { + return meth.name + meth.desc; + } + + public boolean containsSource(int sourceLine) { + return sourceLine >= getFirstSourceLine() && sourceLine <= getLastSourceLine(); + } + + /** + * @param sourceLine line in sources + * @return nearest match above given source line or the given line for perfect match or -1 for + * no match. The return value is method-relative, and need to be transformed to class + * absolute + */ + public int getBestDecompiledLine(final int sourceLine) { + if (!containsSource(sourceLine)) { + return -1; + } + Set set = decompiledLines.keySet(); + if (set.size() == 0) { + return -1; + } + int bestMatch = -1; + for (Integer integer : set) { + int line = integer.intValue(); + int delta = sourceLine - line; + if (delta < 0) { + continue; + } else if (delta == 0) { + return line; + } + if (bestMatch < 0 || delta < sourceLine - bestMatch) { + bestMatch = line; + } + } + if (bestMatch < 0) { + return -1; + } + return decompiledLines.get(Integer.valueOf(bestMatch)).intValue(); + } + + private void analyzeMethod() { + Interpreter interpreter; + try { + Type type = Type.getType(owner); + interpreter = new SimpleVerifier(DecompilerOptions.LATEST_ASM_VERSION, type, null, null, false) { + // + }; + } catch (Exception e) { + interpreter = new BasicVerifier(); + } + + Analyzer a = new Analyzer<>(interpreter); + try { + a.analyze(owner, meth); + } catch (AnalyzerException e) { + error = e.getMessage(); + if (error.startsWith("Error at instruction ")) { //$NON-NLS-1$ + error = error.substring("Error at instruction ".length()); //$NON-NLS-1$ + errorInsn = Integer.parseInt(error.substring(0, error.indexOf(':'))); + error = error.substring(error.indexOf(':') + 2); + } else { + BytecodeOutlinePlugin.log(e, IStatus.ERROR); + error = null; + } + } + frames = a.getFrames(); + } + + private void formatText(List input, Map locals, StringBuffer line, List result) { + for (int i = 0; i < input.size(); ++i) { + Object o = input.get(i); + if (o instanceof List) { + formatText((List) o, locals, line, result); + } else if (o instanceof Index) { + result.add(o); + updateLocals((Index) o, locals); + } else if (o instanceof Integer) { + String localVariableName = locals.get(o); + if (localVariableName == null) { + Index index = getNextIndex(input, i); + if (index != null) { + updateLocals(index, locals); + localVariableName = locals.get(o); + } + } + if (localVariableName != null) { + line.append(": ").append(localVariableName); //$NON-NLS-1$ + } + } else { + String s = o.toString(); + int p; + do { + p = s.indexOf('\n'); + if (p == -1) { + line.append(s); + } else { + result.add(line.toString() + s.substring(0, p + 1)); + s = s.substring(p + 1); + line.setLength(0); + } + } while (p != -1); + } + } + } + + private static Index getNextIndex(List input, int startOffset) { + for (int i = startOffset + 1; i < input.size(); i++) { + Object object = input.get(i); + if (object instanceof Index) { + return (Index) object; + } + } + return null; + } + + private void updateLocals(Index index, Map locals) { + for (LocalVariableNode lvNode : localVariables) { + if (lvNode.start == index.labelNode) { + locals.put(Integer.valueOf(lvNode.index), lvNode.name); + } else if (lvNode.end == index.labelNode) { + locals.remove(Integer.valueOf(lvNode.index)); + } + } + } + + private void computeMaps(Map lineNumbers1) { + int currentDecompiledLine = 0; + int firstLine = -1; + int lastLine = -1; + for (Object o : text) { + int currentOpcode = -1; + int currentInsn1 = -1; + int currentSourceLine = -1; + if (o instanceof Index) { + Index index = (Index) o; + Integer sourceLine = null; + if (index.labelNode != null) { + sourceLine = lineNumbers1.get(index.labelNode.getLabel()); + } + if (sourceLine != null) { + currentSourceLine = sourceLine.intValue(); + if (firstLine == -1 || currentSourceLine < firstLine) { + firstLine = currentSourceLine; + } + if (lastLine == -1 || currentSourceLine > lastLine) { + lastLine = currentSourceLine; + } + } + currentInsn1 = index.insn; + currentOpcode = index.opcode; + } else { + ++currentDecompiledLine; + } + Integer cdl = Integer.valueOf(currentDecompiledLine); + Integer ci = Integer.valueOf(currentInsn1); + Integer co = Integer.valueOf(currentOpcode); + if (currentSourceLine >= 0) { + Integer csl = Integer.valueOf(currentSourceLine); + sourceLines.put(cdl, csl); + if (decompiledLines.get(csl) == null) { + decompiledLines.put(csl, cdl); + } + } + insns.put(cdl, ci); + opcodes.put(cdl, co); + if (insnLines.get(ci) == null) { + insnLines.put(ci, cdl); + } + } + lineCount = currentDecompiledLine; + firstSourceLine = firstLine; + lastSourceLine = lastLine; + } + + public String getText() { + StringBuffer buf = new StringBuffer(); + for (Object o : text) { + if (!(o instanceof Index)) { + buf.append((String) o); + } + } + return buf.toString(); + } + + public String[][] getTextTable() { + Frame frame = null; + String error1 = ""; //$NON-NLS-1$ + List lines = new ArrayList<>(); + String offsStr = null; + for (int i = 0; i < text.size(); ++i) { + Object o = text.get(i); + if (o instanceof Index) { + Index index = (Index) o; + int insn = index.insn; + + offsStr = "" + insn; //$NON-NLS-1$ + if (frames != null && insn < frames.length) { + frame = frames[insn]; + if (this.error != null && insn == this.errorInsn) { + error1 = this.error; + } + } + } else { + if (offsStr == null) { + offsStr = ""; //$NON-NLS-1$ + } + String locals = " "; //$NON-NLS-1$ + String stack = " "; //$NON-NLS-1$ + if (frame != null) { + StringBuffer buf = new StringBuffer(); + appendFrame(buf, frame); + int p = buf.indexOf(" "); //$NON-NLS-1$ + locals = buf.substring(0, p); + if ("".equals(locals)) { //$NON-NLS-1$ + locals = " "; //$NON-NLS-1$ + } + stack = buf.substring(p + 1); + if ("".equals(stack)) { //$NON-NLS-1$ + stack = " "; //$NON-NLS-1$ + } + } + + lines.add(new String[] { offsStr, locals, stack, o.toString(), error1 }); + frame = null; + error1 = ""; //$NON-NLS-1$ + offsStr = null; + } + } + return lines.toArray(new String[lines.size()][]); + } + + public int getLineCount() { + return lineCount; + } + + public int getErrorLine() { + if (error == null) { + return -1; + } + Integer i = insnLines.get(Integer.valueOf(errorInsn)); + return i == null ? -1 : i.intValue(); + } + + private static void appendFrame(StringBuffer buf, Frame f) { + try { + for (int i = 0; i < f.getLocals(); ++i) { + appendValue(buf, f.getLocal(i)); + } + buf.append(' '); + for (int i = 0; i < f.getStackSize(); ++i) { + appendValue(buf, f.getStack(i)); + } + } catch (IndexOutOfBoundsException e) { + BytecodeOutlinePlugin.log(e, IStatus.ERROR); + } + } + + private static void appendValue(StringBuffer buf, Value v) { + if (((BasicValue) v).isReference()) { + buf.append("R"); //$NON-NLS-1$ + } else { + buf.append(v.toString()); + } + } + + public int getFirstSourceLine() { + return firstSourceLine; + } + + public int getLastSourceLine() { + return lastSourceLine; + } + + public int getSourceLine(int decompiledLine) { + Integer i = sourceLines.get(Integer.valueOf(decompiledLine)); + return i == null ? -1 : i.intValue(); + } + + public Integer getBytecodeOffset(int decompiledLine) { + return insns.get(Integer.valueOf(decompiledLine)); + } + + public Integer getBytecodeInsn(int decompiledLine) { + return opcodes.get(Integer.valueOf(decompiledLine)); + } + + public String[][][] getFrameTables(int decompiledLine, boolean useQualifiedNames) { + Integer insn = getBytecodeOffset(decompiledLine); + if (insn == null) { + return null; + } + return getFrameTablesForInsn(insn.intValue(), useQualifiedNames); + } + + public String[][][] getFrameTablesForInsn(int insn, boolean useQualifiedNames) { + if (error != null && insn == errorInsn) { + return null; + } + if (frames != null && insn >= 0 && insn < frames.length) { + Frame f = frames[insn]; + if (f == null) { + return null; + } + + try { + ArrayList locals = new ArrayList<>(); + for (int i = 0; i < f.getLocals(); ++i) { + String varName = ""; //$NON-NLS-1$ + for (LocalVariableNode lvnode : localVariables) { + int n = lvnode.index; + if (n == i) { + varName = lvnode.name; + // TODO take into account variable scope! + break; + } + } + + locals.add(new String[] { + "" + i, //$NON-NLS-1$ + getTypeName(useQualifiedNames, f.getLocal(i).toString()), + varName }); + } + + ArrayList stack = new ArrayList<>(); + for (int i = 0; i < f.getStackSize(); ++i) { + stack.add(new String[] { + "" + i, //$NON-NLS-1$ + getTypeName(useQualifiedNames, f.getStack(i).toString()) }); + } + return new String[][][] { + locals.toArray(new String[3][]), + stack.toArray(new String[2][]) }; + } catch (IndexOutOfBoundsException e) { + BytecodeOutlinePlugin.log(e, IStatus.ERROR); + } + } + return null; + } + + private static String getTypeName(boolean useQualifiedNames, String s) { + if (!useQualifiedNames) { + // get leading array symbols + String arraySymbols = ""; //$NON-NLS-1$ + while (s.startsWith("[")) { //$NON-NLS-1$ + arraySymbols += "["; //$NON-NLS-1$ + s = s.substring(1); + } + + int idx = s.lastIndexOf('/'); + if (idx > 0) { + // from "Ljava/lang/Object;" to "Object" + return arraySymbols + s.substring(idx + 1, s.length() - 1); + } + // this is the case on LVT view - ignore it + if ("." == s) { //$NON-NLS-1$ + return arraySymbols + s; + } + // XXX Unresolved type + if ("R" == s) { //$NON-NLS-1$ + return arraySymbols + s; + } + // resolve primitive types + return arraySymbols + CommentedClassVisitor.getSimpleName(Type.getType(s)); + } + return "Lnull;".equals(s) ? "null" : s; //$NON-NLS-1$ //$NON-NLS-2$ + } + + public int getDecompiledLine(int sourceLine) { + Integer i = decompiledLines.get(Integer.valueOf(sourceLine)); + return i == null ? -1 : i.intValue(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DecompiledMethod)) { + return false; + } + DecompiledMethod another = (DecompiledMethod) o; + return getSignature().equals(another.getSignature()) && (owner != null ? owner.equals(another.owner) : true); + } + + @Override + public int hashCode() { + return getSignature().hashCode() + (owner != null ? owner.hashCode() : 0); + } +} diff --git a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/EclipseUtils.java b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/EclipseUtils.java index 846a7521f16..3c653730a4e 100644 --- a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/EclipseUtils.java +++ b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/EclipseUtils.java @@ -1,117 +1,117 @@ -/******************************************************************************* - * Copyright (c) 2023 Andrey Loskutov and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Andrey Loskutov - initial API and implementation - *******************************************************************************/ -package org.eclipse.jdt.bcoview.ui; - -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionProvider; - -import org.eclipse.jface.text.ITextSelection; - -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; - -import org.eclipse.ui.texteditor.ITextEditor; - -import org.eclipse.jdt.core.IJavaElement; - -import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; - -@SuppressWarnings("restriction") -public class EclipseUtils { - - /** - * don't call me ;) - */ - private EclipseUtils() { - super(); - } - - /** - * @return current active editor in workbench - */ - public static IEditorPart getActiveEditor() { - IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - if (window != null) { - IWorkbenchPage page = window.getActivePage(); - if (page != null) { - return page.getActiveEditor(); - } - } - return null; - } - - public static IJavaElement getJavaInput(IEditorPart part) { - IJavaElement input = part.getAdapter(IJavaElement.class); - if (input != null) { - return input; - } - IEditorInput editorInput = part.getEditorInput(); - if (editorInput != null) { - input = editorInput.getAdapter(IJavaElement.class); - } - if (input != null) { - return input; - } - input = EditorUtility.getEditorInputJavaElement(part, false); - return input; - } - - public static void selectInEditor(ITextEditor editor, int offset, int length) { - IEditorPart active = getActiveEditor(); - if (active != editor) { - editor.getSite().getPage().activate(editor); - } - editor.selectAndReveal(offset, length); - } - - /** - * @param selectionProvider non null - * @return TextSelection or null, if provider does not provide TextSelection's - */ - public static ITextSelection getSelection(ISelectionProvider selectionProvider) { - ISelection selection = selectionProvider.getSelection(); - if (selection instanceof ITextSelection) { - return (ITextSelection) selection; - } - return null; - } - - /** - * @param resource can be null - * @return full package name in default java notation (with dots) or empty string - */ - public static String getJavaPackageName(IJavaElement resource) { - String name; - if (resource == null) { - return ""; //$NON-NLS-1$ - } - name = resource.getElementName(); - if (name == null) { - return ""; //$NON-NLS-1$ - } - int type = resource.getElementType(); - if (type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT) { - return name; - } - IJavaElement ancestor = resource.getAncestor(IJavaElement.PACKAGE_FRAGMENT); - if (ancestor != null) { - return ancestor.getElementName(); - } - return ""; //$NON-NLS-1$ - } - -} +/******************************************************************************* + * Copyright (c) 2023 Andrey Loskutov and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Andrey Loskutov - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.bcoview.ui; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionProvider; + +import org.eclipse.jface.text.ITextSelection; + +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import org.eclipse.ui.texteditor.ITextEditor; + +import org.eclipse.jdt.core.IJavaElement; + +import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; + +@SuppressWarnings("restriction") +public class EclipseUtils { + + /** + * don't call me ;) + */ + private EclipseUtils() { + super(); + } + + /** + * @return current active editor in workbench + */ + public static IEditorPart getActiveEditor() { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window != null) { + IWorkbenchPage page = window.getActivePage(); + if (page != null) { + return page.getActiveEditor(); + } + } + return null; + } + + public static IJavaElement getJavaInput(IEditorPart part) { + IJavaElement input = part.getAdapter(IJavaElement.class); + if (input != null) { + return input; + } + IEditorInput editorInput = part.getEditorInput(); + if (editorInput != null) { + input = editorInput.getAdapter(IJavaElement.class); + } + if (input != null) { + return input; + } + input = EditorUtility.getEditorInputJavaElement(part, false); + return input; + } + + public static void selectInEditor(ITextEditor editor, int offset, int length) { + IEditorPart active = getActiveEditor(); + if (active != editor) { + editor.getSite().getPage().activate(editor); + } + editor.selectAndReveal(offset, length); + } + + /** + * @param selectionProvider non null + * @return TextSelection or null, if provider does not provide TextSelection's + */ + public static ITextSelection getSelection(ISelectionProvider selectionProvider) { + ISelection selection = selectionProvider.getSelection(); + if (selection instanceof ITextSelection) { + return (ITextSelection) selection; + } + return null; + } + + /** + * @param resource can be null + * @return full package name in default java notation (with dots) or empty string + */ + public static String getJavaPackageName(IJavaElement resource) { + String name; + if (resource == null) { + return ""; //$NON-NLS-1$ + } + name = resource.getElementName(); + if (name == null) { + return ""; //$NON-NLS-1$ + } + int type = resource.getElementType(); + if (type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT) { + return name; + } + IJavaElement ancestor = resource.getAncestor(IJavaElement.PACKAGE_FRAGMENT); + if (ancestor != null) { + return ancestor.getElementName(); + } + return ""; //$NON-NLS-1$ + } + +} diff --git a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/actions/CompareBytecodeAction.java b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/actions/CompareBytecodeAction.java index 06487d119c5..946d2b93c06 100644 --- a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/actions/CompareBytecodeAction.java +++ b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/ui/actions/CompareBytecodeAction.java @@ -1,34 +1,34 @@ -/******************************************************************************* - * Copyright (c) 2023 Andrey Loskutov and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Andrey Loskutov - initial API and implementation - *******************************************************************************/ -package org.eclipse.jdt.bcoview.ui.actions; - -import org.eclipse.jdt.bcoview.BytecodeOutlinePlugin; - -import org.eclipse.jface.action.IAction; - -import org.eclipse.jdt.core.IJavaElement; - -public class CompareBytecodeAction extends BytecodeAction { - - @Override - public void run(IAction action) { - IJavaElement[] resources = getSelectedResources(); - try { - exec(resources[0], resources[1]); - } catch (Exception e) { - BytecodeOutlinePlugin.error("Failed to run Compare: " + e.getMessage(), e); //$NON-NLS-1$ - } - } - -} +/******************************************************************************* + * Copyright (c) 2023 Andrey Loskutov and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Andrey Loskutov - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.bcoview.ui.actions; + +import org.eclipse.jdt.bcoview.BytecodeOutlinePlugin; + +import org.eclipse.jface.action.IAction; + +import org.eclipse.jdt.core.IJavaElement; + +public class CompareBytecodeAction extends BytecodeAction { + + @Override + public void run(IAction action) { + IJavaElement[] resources = getSelectedResources(); + try { + exec(resources[0], resources[1]); + } catch (Exception e) { + BytecodeOutlinePlugin.error("Failed to run Compare: " + e.getMessage(), e); //$NON-NLS-1$ + } + } + +} diff --git a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/views/BytecodeOutlineView.java b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/views/BytecodeOutlineView.java index 8875dd1110a..834b5a992fe 100644 --- a/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/views/BytecodeOutlineView.java +++ b/org.eclipse.jdt.bcoview/src/org/eclipse/jdt/bcoview/views/BytecodeOutlineView.java @@ -1,1810 +1,1810 @@ -/******************************************************************************* - * Copyright (c) 2023 Andrey Loskutov and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Andrey Loskutov - initial API and implementation - *******************************************************************************/ -package org.eclipse.jdt.bcoview.views; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.BitSet; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.ResourceBundle; -import java.util.Set; - -import org.objectweb.asm.tree.ClassNode; -import org.objectweb.asm.util.Printer; - -import org.eclipse.jdt.bcoview.BytecodeOutlinePlugin; -import org.eclipse.jdt.bcoview.asm.DecompiledClass; -import org.eclipse.jdt.bcoview.asm.DecompiledMethod; -import org.eclipse.jdt.bcoview.asm.DecompilerHelper; -import org.eclipse.jdt.bcoview.asm.DecompilerOptions; -import org.eclipse.jdt.bcoview.asm.LineRange; -import org.eclipse.jdt.bcoview.internal.Messages; -import org.eclipse.jdt.bcoview.preferences.BCOConstants; -import org.eclipse.jdt.bcoview.ui.EclipseUtils; -import org.eclipse.jdt.bcoview.ui.JdtUtils; -import org.eclipse.jdt.bcoview.ui.actions.DefaultToggleAction; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.custom.StackLayout; -import org.eclipse.swt.custom.StyledText; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.events.KeyEvent; -import org.eclipse.swt.events.KeyListener; -import org.eclipse.swt.events.MouseAdapter; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.Table; -import org.eclipse.swt.widgets.TableColumn; -import org.eclipse.swt.widgets.TableItem; -import org.eclipse.swt.widgets.Widget; - -import org.eclipse.core.runtime.IStatus; - -import org.eclipse.core.filebuffers.FileBuffers; - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.action.StatusLineManager; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.TableViewer; - -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.Document; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.IFindReplaceTarget; -import org.eclipse.jface.text.IRegion; -import org.eclipse.jface.text.ITextHover; -import org.eclipse.jface.text.ITextListener; -import org.eclipse.jface.text.ITextOperationTarget; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.text.ITextViewer; -import org.eclipse.jface.text.TextViewer; -import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; -import org.eclipse.jface.text.quickassist.IQuickAssistAssistant; -import org.eclipse.jface.text.source.ISourceViewer; - -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorReference; -import org.eclipse.ui.ISelectionService; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.IViewSite; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchCommandConstants; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.console.actions.TextViewerAction; -import org.eclipse.ui.part.ViewPart; -import org.eclipse.ui.plugin.AbstractUIPlugin; - -import org.eclipse.ui.texteditor.FindReplaceAction; -import org.eclipse.ui.texteditor.ITextEditor; -import org.eclipse.ui.texteditor.IUpdate; - -import org.eclipse.jdt.core.IJavaElement; -import org.eclipse.jdt.core.IType; -import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.core.search.IJavaSearchScope; -import org.eclipse.jdt.core.search.SearchEngine; - -import org.eclipse.jdt.ui.actions.OpenAction; -import org.eclipse.jdt.ui.actions.SelectionDispatchAction; -import org.eclipse.jdt.ui.text.IColorManager; -import org.eclipse.jdt.ui.text.IJavaPartitions; -import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; -import org.eclipse.jdt.ui.text.JavaTextTools; - -import org.eclipse.jdt.internal.ui.JavaPlugin; -import org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlink; -import org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector; -import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer; -import org.eclipse.jdt.internal.ui.text.JavaWordFinder; -import org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput; -import org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover; - -/** - * This view shows decompiled java bytecode - */ -@SuppressWarnings("restriction") -public class BytecodeOutlineView extends ViewPart implements IBytecodePart { - - // orientations - static final int VIEW_ORIENTATION_VERTICAL = 0; - - static final int VIEW_ORIENTATION_HORIZONTAL = 1; - - static final int VIEW_ORIENTATION_AUTOMATIC = 2; - - /** - * The current orientation; either VIEW_ORIENTATION_HORIZONTAL - * VIEW_ORIENTATION_VERTICAL, or VIEW_ORIENTATION_AUTOMATIC. - */ - int orientation = VIEW_ORIENTATION_AUTOMATIC; - - /** - * The current orientation; either VIEW_ORIENTATION_HORIZONTAL - * VIEW_ORIENTATION_VERTICAL. - */ - private int currentOrientation; - - protected ToggleOrientationAction[] toggleOrientationActions; - - protected BitSet modes; - - protected boolean inputChanged; - - protected boolean bufferIsDirty; - - private boolean isEnabled; - - private boolean isActive; - - private boolean isVisible; - - protected Composite stackComposite; - - protected StyledText textControl; - - protected JavaSourceViewer textViewer; - - protected SashForm verifyControl; - - protected SashForm stackAndLvt; - - protected Table tableControl; - - protected TableViewer tableControlViewer; - - protected Table stackTable; - - protected Table lvtTable; - - protected ITextEditor javaEditor; - - private IJavaElement javaInput; - - protected IJavaElement lastChildElement; - - protected ITextSelection currentSelection; - - protected EditorListener editorListener; - - protected Action selectionChangedAction; - - protected Action refreshVarsAndStackAction; - - protected DefaultToggleAction linkWithEditorAction; - - protected DefaultToggleAction showSelectedOnlyAction; - - protected DefaultToggleAction setRawModeAction; - - protected DefaultToggleAction toggleASMifierModeAction; - - protected DefaultToggleAction hideLineInfoAction; - - protected DefaultToggleAction hideLocalsAction; - - protected DefaultToggleAction hideStackMapAction; - - protected DefaultToggleAction showHexValuesAction; - - protected DefaultToggleAction expandStackMapAction; - - protected DefaultToggleAction toggleVerifierAction; - - protected StatusLineManager statusLineManager; - - protected BCOViewSelectionProvider viewSelectionProvider; - - protected Color errorColor; - - private DecompiledClass lastDecompiledResult; - - protected Map globalActions; - - protected List selectionActions; - - private MenuManager contextMenuManager; - - /** global class info, without current selection status */ - protected String currentStatusMessage; - - protected boolean hasAnalyzerError; - - /* - * I don't know how to update the state of toolbar and menu managers because it seems - * that if we toggle the action state internally (not by user click) then either the - * managers or contribution items or whatever holds the old state of checked action. - * This flag is a workaround and allows us restore the state after internal toggling. - */ - private boolean restoreVerify; - - // updates the find replace action if the document length is > 0 - private ITextListener textListener; - - // see org.eclipse.ui.console.TextConsolePage for the reason to do this ;) - private ISelectionChangedListener textSelectionListener; - - private Control statusControl; - - protected void setJavaInput(IJavaElement javaInput) { - this.javaInput = javaInput; - inputChanged = true; - } - - public BytecodeOutlineView() { - super(); - modes = new BitSet(); - globalActions = new HashMap<>(); - selectionActions = new ArrayList<>(); - } - - /** - * Is this view state changes depending on editor changes? - * - * @return true if linked with editor - */ - protected boolean isLinkedWithEditor() { - return modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR); - } - - /** - * Are actions on toolbar active? - * - * @return Returns the isEnabled. - */ - private boolean isEnabled() { - return isEnabled; - } - - private void setEnabled(boolean on) { - this.isEnabled = on; - if (tableControl != null && !tableControl.isDisposed()) { - tableControl.setEnabled(on); - } - if (stackTable != null && !stackTable.isDisposed()) { - stackTable.setEnabled(on); - } - if (lvtTable != null && !lvtTable.isDisposed()) { - lvtTable.setEnabled(on); - } - showSelectedOnlyAction.setEnabled(on); - // linkWithEditorAction.setEnabled(on); - selectionChangedAction.setEnabled(on); - toggleVerifierAction.setEnabled(on); - hideLocalsAction.setEnabled(on); - hideLineInfoAction.setEnabled(on); - hideStackMapAction.setEnabled(on); - showHexValuesAction.setEnabled(on); - toggleASMifierModeAction.setEnabled(on); - expandStackMapAction.setEnabled(on); - setRawModeAction.setEnabled(on && !toggleASMifierModeAction.isChecked()); - boolean showAnalyzer = on && toggleVerifierAction.isChecked(); - for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { - toggleOrientationAction.setEnabled(showAnalyzer); - } - } - - /** - * Is this view monitoring workspace changes? - * - * @return Returns the isActive. - */ - private boolean isActive() { - return isActive; - } - - private void setBufferIsDirty(boolean bufferIsDirty) { - this.bufferIsDirty = bufferIsDirty; - } - - private void setInput(ITextEditor editor) { - javaEditor = null; - setJavaInput(null); - lastDecompiledResult = null; - if (editor != null) { - IJavaElement javaElem = EclipseUtils.getJavaInput(editor); - if (javaElem == null) { - return; - } - setJavaInput(javaElem); - javaEditor = editor; - - checkVerifyMode(); - - updateSelection(EclipseUtils.getSelection(javaEditor.getSelectionProvider())); - setBufferIsDirty(editor.isDirty()); - } - } - - private void checkVerifyMode() { - if (toggleVerifierAction == null) { - return; - } - boolean aoi = JdtUtils.isAbstractOrInterface(javaInput); - - if (!toggleVerifierAction.isChecked()) { - // deactivate verify button, but only if *not* in verify mode - toggleVerifierAction.setEnabled(!aoi); - restoreVerify = false; - } else { - if (aoi) { - // swith verify mode off, because it is not applicable to selected element - inputChanged = true; - toggleVerifyMode(getViewSite().getActionBars().getMenuManager(), false); - // remember last state, to match the state of the toolbars and menus - restoreVerify = true; - } else { - if (restoreVerify) { - inputChanged = true; - toggleVerifierAction.setEnabled(true); - toggleVerifyMode(getViewSite().getActionBars().getMenuManager(), true); - } - restoreVerify = false; - } - } - } - - private boolean updateSelection(ITextSelection sel) { - if (sel != null - && (sel.equals(currentSelection) || (currentSelection != null - && sel.getStartLine() == currentSelection.getStartLine() && sel - .getEndLine() == currentSelection.getEndLine()))) { - - /* - * getStartLine/getEndLine is probably not sensitive enough - but in case of - * java classes/methods which fits in one selection but not in the other, then - * I think we can ignore them here - this is not the 99% of use cases. - */ - return false; - } - - currentSelection = sel; - return true; - } - - @Override - public void init(IViewSite site) { - super.setSite(site); - if (editorListener == null) { - editorListener = new EditorListener(this); - getSite().getWorkbenchWindow().getPartService().addPartListener(editorListener); - } - } - - @Override - public void createPartControl(Composite parent) { - errorColor = parent.getDisplay().getSystemColor(SWT.COLOR_RED); - parent.addControlListener(new ControlListener() { - - @Override - public void controlMoved(ControlEvent e) { - // - } - - @Override - public void controlResized(ControlEvent e) { - computeOrientation(); - } - }); - - GridLayout parentLayout = new GridLayout(); - parentLayout.numColumns = 1; - parentLayout.marginBottom = -5; - parentLayout.marginTop = -5; - parentLayout.marginLeft = -5; - parentLayout.marginRight = -5; - - parent.setLayout(parentLayout); - - stackComposite = new Composite(parent, SWT.NONE); - stackComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); - stackComposite.setLayout(new StackLayout()); - - statusLineManager = new StatusLineManager(); - statusControl = statusLineManager.createControl(parent, SWT.NONE); - statusControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - IEditorPart activeEditor = EclipseUtils.getActiveEditor(); - if (activeEditor instanceof ITextEditor) { - setInput((ITextEditor) activeEditor); - } - createTextControl(); - createTextContextMenu(); - createVerifyControl(); - initModes(); - - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - ((StackLayout) stackComposite.getLayout()).topControl = verifyControl; - } else { - ((StackLayout) stackComposite.getLayout()).topControl = textControl; - } - - createSelectionProvider(); - createToolbarActions(); - setEnabled(false); - } - - private void initModes() { - IPreferenceStore store = BytecodeOutlinePlugin.getDefault().getPreferenceStore(); - modes.set(BCOConstants.F_LINK_VIEW_TO_EDITOR, store.getBoolean(BCOConstants.LINK_VIEW_TO_EDITOR)); - modes.set(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, store.getBoolean(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT)); - modes.set(BCOConstants.F_SHOW_RAW_BYTECODE, store.getBoolean(BCOConstants.SHOW_RAW_BYTECODE)); - modes.set(BCOConstants.F_SHOW_LINE_INFO, store.getBoolean(BCOConstants.SHOW_LINE_INFO)); - modes.set(BCOConstants.F_SHOW_VARIABLES, store.getBoolean(BCOConstants.SHOW_VARIABLES)); - modes.set(BCOConstants.F_SHOW_STACKMAP, store.getBoolean(BCOConstants.SHOW_STACKMAP)); - modes.set(BCOConstants.F_EXPAND_STACKMAP, store.getBoolean(BCOConstants.EXPAND_STACKMAP)); - modes.set(BCOConstants.F_SHOW_ASMIFIER_CODE, store.getBoolean(BCOConstants.SHOW_ASMIFIER_CODE)); - modes.set(BCOConstants.F_SHOW_ANALYZER, store.getBoolean(BCOConstants.SHOW_ANALYZER)); - modes.set(BCOConstants.F_SHOW_HEX_VALUES, store.getBoolean(BCOConstants.SHOW_HEX_VALUES)); - } - - private void createToolbarActions() { - createTextActions(); - - final IActionBars bars = getViewSite().getActionBars(); - final IToolBarManager tmanager = bars.getToolBarManager(); - final IMenuManager mmanager = bars.getMenuManager(); - - selectionChangedAction = new Action() { - @Override - public void run() { - Point selection = textControl.getSelection(); - setSelectionInJavaEditor(selection); - } - }; - - refreshVarsAndStackAction = new Action() { - @Override - public void run() { - int selectionIndex = tableControl.getSelectionIndex(); - TableItem[] items = tableControl.getSelection(); - if (items == null || items.length < 1) { - return; - } - String line = items[0].getText(0); - if (line == null || "".equals(line)) { //$NON-NLS-1$ - return; - } - Integer valueOf = Integer.valueOf(line); - if (valueOf != null) { - updateVerifierControl4insn(valueOf.intValue()); - tableControl.setSelection(selectionIndex); - } - } - }; - - linkWithEditorAction = new DefaultToggleAction(BCOConstants.LINK_VIEW_TO_EDITOR) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_LINK_VIEW_TO_EDITOR, newState); - if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - showSelectedOnlyAction.setEnabled(true); - toggleVerifierAction.setEnabled(true); - hideLineInfoAction.setEnabled(true); - hideLocalsAction.setEnabled(true); - toggleASMifierModeAction.setEnabled(true); - if (!toggleASMifierModeAction.isChecked()) { - setRawModeAction.setEnabled(true); - } - activateView(); - checkOpenEditors(true); - inputChanged = true; - refreshView(); - } - } - }; - - showSelectedOnlyAction = new DefaultToggleAction(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, newState); - inputChanged = true; - refreshView(); - } - }; - - setRawModeAction = new DefaultToggleAction(BCOConstants.SHOW_RAW_BYTECODE) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_RAW_BYTECODE, newState); - inputChanged = true; - refreshView(); - } - }; - - hideLineInfoAction = new DefaultToggleAction(BCOConstants.SHOW_LINE_INFO) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_LINE_INFO, newState); - inputChanged = true; - refreshView(); - } - }; - - hideLocalsAction = new DefaultToggleAction(BCOConstants.SHOW_VARIABLES) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_VARIABLES, newState); - inputChanged = true; - refreshView(); - } - }; - - hideStackMapAction = new DefaultToggleAction(BCOConstants.SHOW_STACKMAP) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_STACKMAP, newState); - inputChanged = true; - refreshView(); - } - }; - - expandStackMapAction = new DefaultToggleAction(BCOConstants.EXPAND_STACKMAP) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_EXPAND_STACKMAP, newState); - inputChanged = true; - refreshView(); - } - }; - - showHexValuesAction = new DefaultToggleAction(BCOConstants.SHOW_HEX_VALUES) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_HEX_VALUES, newState); - inputChanged = true; - refreshView(); - } - }; - - toggleASMifierModeAction = new DefaultToggleAction(BCOConstants.SHOW_ASMIFIER_CODE) { - @Override - public void run(boolean newState) { - setMode(BCOConstants.F_SHOW_ASMIFIER_CODE, newState); - if (newState) { - setMode(BCOConstants.F_SHOW_RAW_BYTECODE, true); - setRawModeAction.setEnabled(false); - } else { - setRawModeAction.setEnabled(true); - } - inputChanged = true; - refreshView(); - } - }; - - toggleVerifierAction = new DefaultToggleAction(BCOConstants.SHOW_ANALYZER) { - @Override - public void run(boolean newState) { - toggleVerifyMode(mmanager, newState); - inputChanged = true; - refreshView(); - } - }; - - mmanager.add(linkWithEditorAction); - mmanager.add(showSelectedOnlyAction); - mmanager.add(setRawModeAction); - mmanager.add(hideLineInfoAction); - mmanager.add(hideLocalsAction); - mmanager.add(showHexValuesAction); - mmanager.add(hideStackMapAction); - mmanager.add(expandStackMapAction); - mmanager.add(toggleASMifierModeAction); - mmanager.add(toggleVerifierAction); - - mmanager.add(new Separator()); - - toggleOrientationActions = new ToggleOrientationAction[] { - new ToggleOrientationAction(VIEW_ORIENTATION_VERTICAL), - new ToggleOrientationAction(VIEW_ORIENTATION_HORIZONTAL), - new ToggleOrientationAction(VIEW_ORIENTATION_AUTOMATIC) }; - for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { - mmanager.add(toggleOrientationAction); - } - - tmanager.add(linkWithEditorAction); - tmanager.add(showSelectedOnlyAction); - tmanager.add(setRawModeAction); - // tmanager.add(hideLineInfoAction); - // tmanager.add(hideLocalsAction); - tmanager.add(toggleASMifierModeAction); - tmanager.add(toggleVerifierAction); - } - - @SuppressWarnings("unused") - private void createVerifyControl() { - verifyControl = new SashForm(stackComposite, SWT.VERTICAL); - tableControl = new Table(verifyControl, SWT.SINGLE | SWT.FULL_SELECTION); - tableControlViewer = new TableViewer(tableControl); - - TableColumn tc = new TableColumn(tableControl, SWT.LEFT); - tc.setText("#"); //$NON-NLS-1$ - tc.setToolTipText("ASM instruction offset"); //$NON-NLS-1$ - - tc = new TableColumn(tableControl, SWT.LEFT); - tc.setText(Messages.BytecodeOutlineView_lvt_header); - tc.setToolTipText("Local variables"); //$NON-NLS-1$ - - tc = new TableColumn(tableControl, SWT.LEFT); - tc.setText(Messages.BytecodeOutlineView_stack_header); - tc.setToolTipText("Stack content *before* current instruction is executed"); //$NON-NLS-1$ - new TableColumn(tableControl, SWT.LEFT); - new TableColumn(tableControl, SWT.LEFT); - tableControl.setLinesVisible(false); - tableControl.setHeaderVisible(true); - - stackAndLvt = new SashForm(verifyControl, SWT.HORIZONTAL); - - lvtTable = new Table(stackAndLvt, SWT.SINGLE | SWT.FULL_SELECTION); - lvtTable.setLinesVisible(false); - lvtTable.setHeaderVisible(true); - - new TableColumn(lvtTable, SWT.LEFT).setText("#"); //$NON-NLS-1$ - new TableColumn(lvtTable, SWT.LEFT).setText("Var Type"); //$NON-NLS-1$ - new TableColumn(lvtTable, SWT.LEFT).setText("Name"); //$NON-NLS-1$ - - stackTable = new Table(stackAndLvt, SWT.SINGLE | SWT.FULL_SELECTION); - stackTable.setLinesVisible(false); - stackTable.setHeaderVisible(true); - new TableColumn(stackTable, SWT.LEFT).setText("#"); //$NON-NLS-1$ - new TableColumn(stackTable, SWT.LEFT).setText("Stack Type"); //$NON-NLS-1$ - - stackAndLvt.setWeights(50, 50); - verifyControl.setWeights(75, 25); - - tableControl.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - selectionChangedAction.run(); - } - refreshVarsAndStackAction.run(); - } - }); - - } - - private void createSelectionProvider() { - viewSelectionProvider = new BCOViewSelectionProvider(); - viewSelectionProvider.registerSelectionProvider(textViewer); - viewSelectionProvider.registerSelectionProvider(tableControlViewer); - - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - viewSelectionProvider.setCurrentSelectionProvider(tableControlViewer); - } else { - viewSelectionProvider.setCurrentSelectionProvider(textViewer); - } - getSite().setSelectionProvider(viewSelectionProvider); - } - - /** - * create/register context menu on text control - */ - private void createTextContextMenu() { - String id = "org.eclipse.jdt.bcoview.views.BytecodeOutlineView#ContextMenu"; //$NON-NLS-1$ - contextMenuManager = new MenuManager("#ContextMenu", id); //$NON-NLS-1$ - contextMenuManager.setRemoveAllWhenShown(true); - contextMenuManager.addMenuListener(this::contextMenuAboutToShow); - Menu menu = contextMenuManager.createContextMenu(textControl); - textControl.setMenu(menu); - - getSite().registerContextMenu(id, contextMenuManager, textViewer); - } - - private void createTextControl() { - IPreferenceStore store = JavaPlugin.getDefault().getCombinedPreferenceStore(); - final JavaSourceViewer viewer = new JavaSourceViewer(stackComposite, null, null, true, SWT.V_SCROLL | SWT.H_SCROLL, store); - - IColorManager colorManager = JavaPlugin.getDefault().getJavaTextTools().getColorManager(); - JavaSourceViewerConfiguration configuration = new JavaConfiguration(colorManager, store, null, IJavaPartitions.JAVA_PARTITIONING); - viewer.configure(configuration); - viewer.setEditable(false); - textViewer = viewer; - - textControl = textViewer.getTextWidget(); - IDocument document = new Document(""); //$NON-NLS-1$ - textViewer.setDocument(document); - - textSelectionListener = event -> { - for (String selectionAction : selectionActions) { - updateAction(selectionAction); - } - }; - - textListener = event -> { - IUpdate findReplace = (IUpdate) globalActions.get(ActionFactory.FIND.getId()); - if (findReplace != null) { - findReplace.update(); - } - }; - - textViewer.getSelectionProvider().addSelectionChangedListener(textSelectionListener); - textViewer.addTextListener(textListener); - - textControl.addMouseListener(new MouseAdapter() { - @Override - public void mouseDown(MouseEvent e) { - if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - selectionChangedAction.run(); - } - } - - @Override - public void mouseUp(MouseEvent e) { - if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - selectionChangedAction.run(); - } - } - }); - - textControl.addKeyListener(new KeyListener() { - @Override - public void keyPressed(KeyEvent e) { - // ignored - } - - @Override - public void keyReleased(KeyEvent e) { - if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - selectionChangedAction.run(); - } - } - }); - } - - @Override - public void dispose() { - deActivateView(); - if (editorListener != null) { - IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow(); - workbenchWindow.getPartService().removePartListener(editorListener); - workbenchWindow.getSelectionService().removePostSelectionListener(editorListener); - FileBuffers.getTextFileBufferManager().removeFileBufferListener(editorListener); - editorListener.dispose(); - editorListener = null; - } - - if (contextMenuManager != null) { - contextMenuManager.dispose(); - } - - selectionActions.clear(); - globalActions.clear(); - - textViewer.getSelectionProvider().removeSelectionChangedListener(textSelectionListener); - textViewer.removeTextListener(textListener); - textViewer = null; - viewSelectionProvider = null; - - if (textControl != null) { - textControl.dispose(); - textControl = null; - } - if (verifyControl != null) { - verifyControl.dispose(); - verifyControl = null; - tableControl = null; - stackTable = null; - lvtTable = null; - tableControlViewer = null; - } - currentSelection = null; - javaEditor = null; - setJavaInput(null); - lastChildElement = null; - lastDecompiledResult = null; - - linkWithEditorAction.dispose(); - showSelectedOnlyAction.dispose(); - setRawModeAction.dispose(); - toggleASMifierModeAction.dispose(); - hideLineInfoAction.dispose(); - hideLocalsAction.dispose(); - hideStackMapAction.dispose(); - showHexValuesAction.dispose(); - expandStackMapAction.dispose(); - toggleVerifierAction.dispose(); - - linkWithEditorAction = null; - selectionChangedAction = null; - refreshVarsAndStackAction = null; - showSelectedOnlyAction = null; - setRawModeAction = null; - toggleASMifierModeAction = null; - hideLineInfoAction = null; - hideLocalsAction = null; - hideStackMapAction = null; - showHexValuesAction = null; - expandStackMapAction = null; - toggleVerifierAction = null; - super.dispose(); - } - - protected void contextMenuAboutToShow(IMenuManager menuManager) { - IDocument doc = textViewer.getDocument(); - if (doc == null) { - return; - } - - menuManager.add(globalActions.get(ActionFactory.COPY.getId())); - menuManager.add(globalActions.get(ActionFactory.SELECT_ALL.getId())); - - menuManager.add(new Separator("FIND")); //$NON-NLS-1$ - menuManager.add(globalActions.get(ActionFactory.FIND.getId())); - - menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); - } - - @Override - public void setFocus() { - if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) { - if (textViewer != null) { - textViewer.getTextWidget().setFocus(); - } - } else { - if (tableControl != null) { - tableControl.setFocus(); - } - } - } - - protected void handleBufferIsDirty(boolean isDirty) { - if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR) || !isActive()) { - return; - } - if (isDirty) { - setBufferIsDirty(isDirty); - } else { - if (!bufferIsDirty) { - // second time calling with same argument - - // cause new bytecode should be written now - inputChanged = true; - refreshView(); - } else { - // first time - set the flag only - cause - // bytecode is not yet written - setBufferIsDirty(false); - } - } - } - - protected void handlePartHidden(IWorkbenchPart part) { - if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - return; - } - if (this == part) { - isVisible = false; - deActivateView(); - } else if (isActive() && (part instanceof IEditorPart)) { - // check if at least one editor is open - checkOpenEditors(false); - } - } - - protected void handlePartVisible(IWorkbenchPart part) { - if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { - if (this == part) { - isVisible = true; - } - return; - } - if (this == part) { - if (isVisible) { - return; - } - isVisible = true; - // check if java editor is already open - IEditorPart activeEditor = EclipseUtils.getActiveEditor(); - if (!(activeEditor instanceof ITextEditor)) { - // start monitoring again, even if current editor is not - // supported - but we at front now - activateView(); - return; - } - part = activeEditor; - // continue with setting input - } - if (isVisible && part instanceof ITextEditor) { - if (isActive() && part == javaEditor) { - return; - } - activateView(); - setEnabled(true); - setInput((ITextEditor) part); - refreshView(); - } else if (part instanceof IEditorPart) { - if (isActive()) { - deActivateView(); - } - } - } - - protected void handleSelectionChanged(IWorkbenchPart part, ISelection selection) { - if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR) || !isActive() || !isVisible || !(part instanceof IEditorPart)) { - return; - } - if (!(part instanceof ITextEditor)) { - deActivateView(); - return; - } - if (!isEnabled()) { - setEnabled(true); - } - if (part != javaEditor) { - setInput((ITextEditor) part); - } else { - if (!updateSelection((ITextSelection) selection)) { - return; - } - } - refreshView(); - } - - /** - * Does nothing if view is already active - */ - private void activateView() { - if (isActive()) { - return; - } - isActive = true; - getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(editorListener); - FileBuffers.getTextFileBufferManager().addFileBufferListener(editorListener); - } - - /** - * Does nothing if view is already deactivated - */ - private void deActivateView() { - if (!isActive()) { - return; - } - setEnabled(false); - if (editorListener != null) { - ISelectionService service = getSite().getWorkbenchWindow().getSelectionService(); - if (service != null) { - service.removePostSelectionListener(editorListener); - } - FileBuffers.getTextFileBufferManager().removeFileBufferListener(editorListener); - - } - if (textViewer != null && textViewer.getTextWidget() != null && !textViewer.getTextWidget().isDisposed()) { - IDocument document = new Document(""); //$NON-NLS-1$ - textViewer.setDocument(document); - } - if (tableControl != null && !tableControl.isDisposed()) { - setVerifyTableItems(null); - } - if (stackTable != null && !stackTable.isDisposed()) { - stackTable.removeAll(); - } - if (lvtTable != null && !lvtTable.isDisposed()) { - lvtTable.removeAll(); - } - if (statusControl != null && !statusControl.isDisposed()) { - updateStatus(null, -1, -1); - } - currentSelection = null; - lastDecompiledResult = null; - javaEditor = null; - setJavaInput(null); - lastChildElement = null; - setBufferIsDirty(false); - isActive = false; - } - - protected void refreshView() { - if (!isActive()) { - return; - } - - IJavaElement childEl = getCurrentJavaElement(); - if (childEl == null && javaInput == null) { - setInput(javaEditor); - childEl = javaInput; - } - - // after getCurrentJavaElement() call it is possible that java type is disappear - // because corresponding type is not more exist in model - if (javaInput == null) { - deActivateView(); - return; - } - - boolean clearOutput = false; - - if (inputChanged || isSelectedElementChanged(childEl)) { - DecompiledClass result = decompileBytecode(childEl); - if (result == null) { - clearOutput = true; - } else { - boolean hasMethods = !result.isAbstractOrInterface() || result.isDefaultMethodPossible(); - if (modes.get(BCOConstants.F_SHOW_ANALYZER) && hasMethods) { - refreshVerifyView(result); - } else { - toggleVerifierAction.setEnabled(hasMethods); - refreshTextView(result); - } - } - lastDecompiledResult = result; - } else if (childEl == null && modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT)) { - clearOutput = true; - } - - lastChildElement = childEl; - if (clearOutput) { - if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) { - IDocument document = new Document(""); //$NON-NLS-1$ - textViewer.setDocument(document); - } else { - setVerifyTableItems(null); - } - } - setSelectionInBytecodeView(); - inputChanged = false; - } - - private void refreshTextView(DecompiledClass result) { - IDocument document = new Document(result.getText()); - JavaTextTools tools = JavaPlugin.getDefault().getJavaTextTools(); - tools.setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING); - textViewer.setDocument(document); - // we are in verify mode but we can't show content because - // current element is abstract, so we clean table content - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - setVerifyTableItems(null); - } - hasAnalyzerError = false; - } - - private void refreshVerifyView(DecompiledClass result) { - setVerifyTableItems(result.getTextTable()); - List errors = result.getErrorLines(); - if (errors.size() > 0) { - // TODO this only changes color of status line - - // but it is possible also to provide useful info here... - hasAnalyzerError = true; - // currentErrorMessage = ... - } - for (Integer error : errors) { - int l = error.intValue(); - tableControl.getItem(l).setForeground(errorColor); - } - toggleVerifierAction.setEnabled(true); - } - - private void updateStatus(DecompiledClass result, int bytecodeOffsetStart, int bytecodeOffsetEnd) { - // clear error messages, if any - statusLineManager.setErrorMessage(null); - if (result != null) { - currentStatusMessage = "Java:" //$NON-NLS-1$ - + result.getJavaVersion() + " | class size:" //$NON-NLS-1$ - + result.getClassSize(); - ClassNode classNode = result.getClassNode(); - if (classNode != null && classNode.name != null) { - setContentDescription(classNode.name); - } - } else { - currentStatusMessage = ""; //$NON-NLS-1$ - setContentDescription(""); //$NON-NLS-1$ - } - String selectionInfo = ""; //$NON-NLS-1$ - if (bytecodeOffsetStart >= 0) { - selectionInfo = " | offset:" + bytecodeOffsetStart; //$NON-NLS-1$ - if (bytecodeOffsetEnd >= 0) { - selectionInfo += "-" + bytecodeOffsetEnd; //$NON-NLS-1$ - } - } - if (hasAnalyzerError) { - statusLineManager.setErrorMessage(currentStatusMessage + selectionInfo); - } else { - statusLineManager.setMessage(currentStatusMessage + selectionInfo); - } - - } - - @Override - public int getBytecodeInstructionAtLine(int line) { - if (lastDecompiledResult != null) { - return lastDecompiledResult.getBytecodeInsn(line); - } - return -1; - } - - /** - * @return IJavaElement which fits in the current selection in java editor - */ - private IJavaElement getCurrentJavaElement() { - IJavaElement childEl = null; - try { - childEl = JdtUtils.getElementAtOffset(javaInput, currentSelection); - if (childEl != null) { - switch (childEl.getElementType()) { - case IJavaElement.METHOD: - case IJavaElement.FIELD: - case IJavaElement.INITIALIZER: - case IJavaElement.TYPE: - break; - case IJavaElement.LOCAL_VARIABLE: - childEl = childEl.getAncestor(IJavaElement.METHOD); - break; - default: - childEl = null; - break; - } - } - } catch (JavaModelException e) { - // the exception is mostly occured if java structure was - // changed and current element is not more exist in model - // e.g. on rename/delete/move operation. - // so it is not an error for user, but info for us - BytecodeOutlinePlugin.log(e, IStatus.INFO); - setJavaInput(null); - lastChildElement = null; - } - return childEl; - } - - private void setSelectionInBytecodeView() { - if (lastDecompiledResult == null) { - return; - } - - if (currentSelection.getStartLine() != currentSelection.getEndLine()) { - setMultiLineSelectionInBytecodeView(currentSelection); - return; - } - - int sourceLine = currentSelection.getStartLine() + 1; - int decompiledLine = lastDecompiledResult.getDecompiledLine(sourceLine); - - if (decompiledLine < 0 - && !modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT) - && lastChildElement != null) { - /* - * May be this is the selection in outline view, if complete class is shown. - * Because there are no bytecode instructions/offset for method name, we need - * to find and select first method line. See cr 306011 - */ - DecompiledMethod match = lastDecompiledResult.getBestDecompiledMatch(sourceLine); - if (match != null) { - // this is relative to method start - decompiledLine = match.getBestDecompiledLine(sourceLine); - if (decompiledLine > 0) { - // convert to class file relative - decompiledLine = lastDecompiledResult.getDecompiledLine(match, decompiledLine); - } - } - if (decompiledLine < 0) { - String methodName = JdtUtils.getMethodSignature(lastChildElement); - if (methodName != null) { - decompiledLine = lastDecompiledResult.getDecompiledLine(methodName) - 1; - } - } - } - - if (decompiledLine > 0) { - try { - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - updateVerifierControl4line(decompiledLine); - tableControl.setSelection(decompiledLine); - } else { - int lineCount = textControl.getLineCount(); - if (decompiledLine < lineCount) { - int offsetAtLine = textControl.getOffsetAtLine(decompiledLine); - int offsetEnd = textControl.getText().indexOf('\n', offsetAtLine); - textControl.setSelection(offsetAtLine, offsetEnd); - } - } - } catch (IllegalArgumentException e) { - BytecodeOutlinePlugin.error(null, e); - } - } else if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - lvtTable.removeAll(); - stackTable.removeAll(); - } - int bytecodeOffset = lastDecompiledResult.getBytecodeOffset(decompiledLine); - updateStatus(lastDecompiledResult, bytecodeOffset, -1); - } - - private void setMultiLineSelectionInBytecodeView(ITextSelection multiLineSelection) { - LineRange range = lastDecompiledResult.getDecompiledRange(multiLineSelection); - int firstDecompiledLine = range.startLine; - if (firstDecompiledLine > 0) { - try { - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - updateVerifierControl4line(firstDecompiledLine); - tableControl.setSelection(firstDecompiledLine); - } else { - int lineCount = textControl.getLineCount(); - if (firstDecompiledLine < lineCount) { - int offsetAtLine = textControl.getOffsetAtLine(firstDecompiledLine); - int offsetEnd; - String text = textControl.getText(); - if (range.endLine > 0 && range.endLine < lineCount) { - offsetEnd = textControl.getOffsetAtLine(range.endLine); - offsetEnd = text.indexOf("LINENUMBER", text.indexOf('\n', offsetEnd)); //$NON-NLS-1$ - if (offsetEnd < 0) { - offsetEnd = text.indexOf('\n', offsetEnd); - } - } else { - offsetEnd = text.indexOf('\n', offsetAtLine); - } - textControl.setSelection(offsetAtLine, offsetEnd); - } - } - } catch (IllegalArgumentException e) { - BytecodeOutlinePlugin.error(null, e); - } - } else if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - lvtTable.removeAll(); - stackTable.removeAll(); - } - int bytecodeOffsetStart = lastDecompiledResult.getBytecodeOffset(firstDecompiledLine); - int bytecodeOffsetEnd = lastDecompiledResult.getBytecodeOffset(range.endLine); - updateStatus(lastDecompiledResult, bytecodeOffsetStart, bytecodeOffsetEnd); - } - - protected void updateVerifierControl4line(int decompiledLine) { - String[][][] frame = lastDecompiledResult.getFrameTables(decompiledLine, !modes.get(BCOConstants.F_SHOW_RAW_BYTECODE)); - updateVerifierControl(frame); - } - - protected void updateVerifierControl4insn(int insn) { - String[][][] frame = lastDecompiledResult.getFrameTablesForInsn(insn, !modes.get(BCOConstants.F_SHOW_RAW_BYTECODE)); - updateVerifierControl(frame); - } - - private void updateVerifierControl(String[][][] frame) { - lvtTable.removeAll(); - stackTable.removeAll(); - if (frame == null) { - return; - } - for (int i = 0; i < frame[0].length; ++i) { - if (frame[0][i] != null) { - new TableItem(lvtTable, SWT.NONE).setText(frame[0][i]); - } - } - for (int i = 0; i < frame[1].length; ++i) { - if (frame[1][i] != null) { - new TableItem(stackTable, SWT.NONE).setText(frame[1][i]); - } - } - - lvtTable.getColumn(0).pack(); - lvtTable.getColumn(1).pack(); - lvtTable.getColumn(2).pack(); - stackTable.getColumn(0).pack(); - stackTable.getColumn(1).pack(); - } - - protected void setSelectionInJavaEditor(Point selection) { - if (javaEditor != null && javaEditor.getEditorInput() == null) { - // editor was closed - we should clean the reference - javaEditor = null; - setJavaInput(null); - } - if (javaEditor == null || lastDecompiledResult == null) { - deActivateView(); - return; - } - - int startDecLine; - int endDecLine = -1; - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - startDecLine = tableControl.getSelectionIndex(); - endDecLine = startDecLine; - } else { - startDecLine = textControl.getLineAtOffset(selection.x); - endDecLine = textControl.getLineAtOffset(selection.y); - } - int startSourceLine = lastDecompiledResult.getSourceLine(startDecLine); - int endSourceLine = -1; - if (endDecLine > 0) { - endSourceLine = lastDecompiledResult.getSourceLine(endDecLine); - } - - if (endSourceLine < startSourceLine) { - int tmp = startSourceLine; - startSourceLine = endSourceLine; - endSourceLine = tmp; - } - - try { - if (startSourceLine > 0) { - IDocument document = javaEditor.getDocumentProvider().getDocument(javaEditor.getEditorInput()); - try { - IRegion lineInfo = document.getLineInformation(startSourceLine - 1); - - int startOffset = lineInfo.getOffset(); - int length = lineInfo.getLength(); - if (endSourceLine > 0) { - IRegion region = document.getLineInformation(endSourceLine - 1); - length = region.getLength() + (region.getOffset() - startOffset); - } - EclipseUtils.selectInEditor(javaEditor, startOffset, length); - } catch (BadLocationException e) { - // do nothing. This could happens e.g. if editor does not contain - // full source code etc, so that line info is not exist in editor - } - } - } catch (Exception e) { - BytecodeOutlinePlugin.log(e, IStatus.ERROR); - } - - int bytecodeOffset = lastDecompiledResult.getBytecodeOffset(startDecLine); - updateStatus(lastDecompiledResult, bytecodeOffset, -1); - } - - /** - * check if at least one java editor is open - if not, deactivate me - * - * @param checkNewSelection check selection in active editor - */ - protected void checkOpenEditors(boolean checkNewSelection) { - IEditorReference[] editorReferences = getSite().getPage().getEditorReferences(); - if (editorReferences == null || editorReferences.length == 0) { - deActivateView(); - } else if (checkNewSelection) { - IEditorPart activeEditor = EclipseUtils.getActiveEditor(); - if (activeEditor instanceof ITextEditor) { - ITextSelection selection = EclipseUtils.getSelection(((ITextEditor) activeEditor).getSelectionProvider()); - handleSelectionChanged(activeEditor, selection); - } else { - deActivateView(); - } - } - } - - /** - * @param childEl can be null - * @return true if java element selection was changed (means, that previous selection do not - * match to the given element) - */ - private boolean isSelectedElementChanged(IJavaElement childEl) { - - if (lastChildElement == null && childEl == null) { - // no selected child before - and no new selection now => no changes - return false; - } - - if (modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT)) { - if (lastChildElement == null || !lastChildElement.equals(childEl)) { - return true; - } - } - - /* - * the check if we changed from inner class to outer class or vice versa - */ - if (lastChildElement != null && childEl != null) { - IType newEnclosingType = JdtUtils.getEnclosingType(childEl); - IType oldEnclosingType = JdtUtils.getEnclosingType(lastChildElement); - return newEnclosingType == null || !newEnclosingType.equals(oldEnclosingType); - } - return false; - } - - /** - * @param childEl can be null - * @return return null if type is not known or bytecode is not written or cannot be found - */ - private DecompiledClass decompileBytecode(IJavaElement childEl) { - // check here for inner classes too - IJavaElement type = JdtUtils.getEnclosingType(childEl); - if (type == null) { - type = javaInput; - } - if (type == null) { - return null; - } - byte[] bytes = JdtUtils.readClassBytes(type); - if (bytes == null) { - return null; - } - DecompiledClass decompiledClass = null; - int available = bytes.length; - try { - String fieldName = null; - String methodName = null; - /* - * find out, which name we should use for selected element - */ - if (modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT) && childEl != null) { - if (childEl.getElementType() == IJavaElement.FIELD) { - fieldName = childEl.getElementName(); - } else { - methodName = JdtUtils.getMethodSignature(childEl); - } - } - decompiledClass = DecompilerHelper.getDecompiledClass(bytes, new DecompilerOptions(fieldName, methodName, modes)); - } catch (Exception e) { - try { - // check if compilation unit is ok - then this is the user problem - if (type.isStructureKnown()) { - BytecodeOutlinePlugin.error("Cannot decompile: " + type, e); //$NON-NLS-1$ - } else { - BytecodeOutlinePlugin.log(e, IStatus.ERROR); - } - } catch (JavaModelException e1) { - // this is compilation problem - don't show the message - BytecodeOutlinePlugin.log(e1, IStatus.WARNING); - } - } catch (UnsupportedClassVersionError e) { - BytecodeOutlinePlugin.error("Cannot decompile: " + type //$NON-NLS-1$ - + ". Error was caused by attempt to " //$NON-NLS-1$ - + "load a class compiled with the Java version which is not " //$NON-NLS-1$ - + "supported by the current JVM. ", e); //$NON-NLS-1$ - } - // remember class file size to show it later in UI - if (decompiledClass != null) { - decompiledClass.setClassSize(available); - } - return decompiledClass; - } - - private void setVerifyTableItems(String[][] items) { - tableControl.removeAll(); - if (items != null) { - for (int i = 0; i < items.length; ++i) { - TableItem item = new TableItem(tableControl, SWT.NONE); - for (int j = 0; j < items[i].length; ++j) { - String s = items[i][j]; - if (s.endsWith("\n")) { //$NON-NLS-1$ - s = s.substring(0, s.length() - 1); - // this is the "cookie" for the bytecode reference, which could be - // mapped later to the sourcecode line on selection event in the - // table - item.setData(Integer.valueOf(i)); - } - item.setText(j, s); - } - } - tableControl.getColumn(0).pack(); - tableControl.getColumn(1).pack(); - tableControl.getColumn(2).pack(); - tableControl.getColumn(3).pack(); - tableControl.getColumn(4).pack(); - } - } - - @Override - public T getAdapter(Class adapter) { - if (IFindReplaceTarget.class.equals(adapter)) { - return adapter.cast(textViewer.getFindReplaceTarget()); - } - if (Widget.class.equals(adapter)) { - return adapter.cast(textViewer.getTextWidget()); - } - if (TextViewer.class.equals(adapter)) { - return adapter.cast(textViewer); - } - return super.getAdapter(adapter); - } - - /** - * Configures an action for key bindings. - * - * @param actionBars action bars for this page - * @param actionID action definition id - * @param action associated action - */ - protected void setGlobalAction(IActionBars actionBars, String actionID, IAction action) { - globalActions.put(actionID, action); - actionBars.setGlobalActionHandler(actionID, action); - } - - /** - * Updates the global action with the given id - * - * @param actionId action definition id - */ - protected void updateAction(String actionId) { - IAction action = globalActions.get(actionId); - if (action instanceof IUpdate) { - ((IUpdate) action).update(); - } - } - - protected void createTextActions() { - IActionBars actionBars = getViewSite().getActionBars(); - TextViewerAction action = new TextViewerAction(textViewer, ITextOperationTarget.SELECT_ALL); - - action.configureAction( - Messages.BytecodeOutlineView_select_all_label, - Messages.BytecodeOutlineView_select_all_tooltip, - Messages.BytecodeOutlineView_select_all_description); - setGlobalAction(actionBars, ActionFactory.SELECT_ALL.getId(), action); - - action = new TextViewerAction(textViewer, ITextOperationTarget.COPY); - action.configureAction( - Messages.BytecodeOutlineView_copy_label, - Messages.BytecodeOutlineView_copy_tooltip, - Messages.BytecodeOutlineView_copy_description); - action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); - action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY); - setGlobalAction(actionBars, ActionFactory.COPY.getId(), action); - - ResourceBundle bundle = Messages.getResourceBundle(); - setGlobalAction(actionBars, ActionFactory.FIND.getId(), new FindReplaceAction(bundle, "BytecodeOutlineView_find_replace_", this)); //$NON-NLS-1$ - - selectionActions.add(ActionFactory.COPY.getId()); - selectionActions.add(ActionFactory.FIND.getId()); - - actionBars.updateActionBars(); - } - - private void setOrientation(int orientation) { - if (verifyControl == null || verifyControl.isDisposed()) { - return; - } - - boolean horizontal = orientation == VIEW_ORIENTATION_HORIZONTAL; - verifyControl.setOrientation(horizontal ? SWT.HORIZONTAL : SWT.VERTICAL); - - for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { - toggleOrientationAction.setChecked(orientation == toggleOrientationAction.getOrientation()); - } - - currentOrientation = orientation; - stackComposite.getParent().layout(); - } - - protected void computeOrientation() { - if (orientation != VIEW_ORIENTATION_AUTOMATIC) { - currentOrientation = orientation; - setOrientation(currentOrientation); - } else { - Point size = stackComposite.getParent().getSize(); - if (size.x != 0 && size.y != 0) { - setOrientation(size.x > size.y ? VIEW_ORIENTATION_HORIZONTAL : VIEW_ORIENTATION_VERTICAL); - } - } - } - - /** - * Set the bit with given index to given value and remembers it in the preferences - * - * @param bitIndex one of BCOConstants.F_* constants - * @param value flag - */ - protected void setMode(int bitIndex, boolean value) { - modes.set(bitIndex, value); - } - - protected void toggleVerifyMode(final IMenuManager mmanager, boolean showAnalyzer) { - setMode(BCOConstants.F_SHOW_ANALYZER, showAnalyzer); - if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { - ((StackLayout) stackComposite.getLayout()).topControl = verifyControl; - viewSelectionProvider.setCurrentSelectionProvider(tableControlViewer); - } else { - ((StackLayout) stackComposite.getLayout()).topControl = textControl; - viewSelectionProvider.setCurrentSelectionProvider(textViewer); - } - stackComposite.layout(); - - for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { - toggleOrientationAction.setEnabled(showAnalyzer); - } - mmanager.markDirty(); - mmanager.update(); - } - - - private class ToggleOrientationAction extends Action { - - private final int actionOrientation; - - public ToggleOrientationAction(int orientation) { - super("", AS_RADIO_BUTTON); //$NON-NLS-1$ - - String symbolicName = BytecodeOutlinePlugin.getDefault().getBundle().getSymbolicName(); - if (orientation == VIEW_ORIENTATION_HORIZONTAL) { - setText(Messages.BytecodeOutlineView_toggle_horizontal_label); - setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(symbolicName, "icons/th_horizontal.gif")); //$NON-NLS-1$ - } else if (orientation == VIEW_ORIENTATION_VERTICAL) { - setText(Messages.BytecodeOutlineView_toggle_vertical_label); - setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(symbolicName, "icons/th_vertical.gif")); //$NON-NLS-1$ - } else if (orientation == VIEW_ORIENTATION_AUTOMATIC) { - setText(Messages.BytecodeOutlineView_toggle_automatic_label); - setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(symbolicName, "icons/th_automatic.gif")); //$NON-NLS-1$ - } - actionOrientation = orientation; - } - - public int getOrientation() { - return actionOrientation; - } - - @Override - public void run() { - if (isChecked()) { - orientation = actionOrientation; - computeOrientation(); - } - } - } - - protected IJavaElement[] guessTypesFromSelectionInView(IRegion wordRegion) throws JavaModelException { - if (wordRegion == null || wordRegion.getLength() == 0 || javaInput == null) { - return null; - } - String typeName; - try { - typeName = textViewer.getDocument().get(wordRegion.getOffset(), wordRegion.getLength()); - } catch (BadLocationException e) { - return null; - } - if (typeName.isEmpty()) { - return null; - } - if (typeName.contains("$")) { //$NON-NLS-1$ - typeName = typeName.substring(typeName.lastIndexOf('$') + 1); - } - IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaInput.getJavaProject() }); - return JdtUtils.getTypeForName(typeName, scope, null); - } - - private class JavaElementHyperlinkDetectorInView extends JavaElementHyperlinkDetector { - - @Override - public IHyperlink[] detectHyperlinks(ITextViewer textViewer1, IRegion region, boolean canShowMultipleHyperlinks) { - if (region == null || javaInput == null) { - return null; - } - - IAction openAction = new OpenAction(getSite()); - int offset = region.getOffset(); - - IDocument document = textViewer1.getDocument(); - IRegion wordRegion = JavaWordFinder.findWord(document, offset); - List links = new ArrayList<>(); - IJavaElement[] elements; - try { - elements = guessTypesFromSelectionInView(wordRegion); - } catch (JavaModelException e) { - return null; - } - // TODO check for inner class files possibly referenced in current line. - // If found, add new hyperlink to jump to this inner class, see - // https://forge.ow2.org/tracker/index.php?func=detail&aid=316206&group_id=23&atid=350023 - if (elements == null) { - return null; - } - elements = JdtUtils.selectOpenableElements(elements); - if (elements.length == 0) { - return null; - } - for (IJavaElement element : elements) { - if (element == null) { - continue; - } - addHyperlinks2(links, wordRegion, (SelectionDispatchAction) openAction, element, elements.length > 1); - } - if (links.size() == 0) { - return null; - } - return links.toArray(new IHyperlink[links.size()]); - } - - /** - * This method is added for compatibility with Eclipse 3.6 and 3.7 only! - *

    - * Creates and adds Java element hyperlinks. - * - * @param hyperlinksCollector the list to which hyperlinks should be added - * @param wordRegion the region of the link - * @param openAction the action to use to open the Java elements - * @param element the Java element to open - * @param qualify true if the hyperlink text should show a qualified name for - * element - */ - protected void addHyperlinks2(List hyperlinksCollector, IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify) { - hyperlinksCollector.add(new JavaElementHyperlink(wordRegion, openAction, element, qualify)); - } - - } - - private final class JavaConfiguration extends JavaSourceViewerConfiguration { - - private JavaConfiguration(IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor, String partitioning) { - super(colorManager, preferenceStore, editor, partitioning); - } - - @Override - public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) { - // does not work, as they work on *text editor*, not on the *view*... - // HyperlinkDetectorRegistry registry = EditorsUI.getHyperlinkDetectorRegistry(); - // IHyperlinkDetector[] detectors = registry.createHyperlinkDetectors("org.eclipse.jdt.ui.javaCode", dummyEditorForHyperlinks); - JavaElementHyperlinkDetectorInView det = new JavaElementHyperlinkDetectorInView(); - return new IHyperlinkDetector[] { det }; - } - - @Override - public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) { - return new JavadocHoverExtension(); - } - - @Override - public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) { - return null; - } - } - - private final class JavadocHoverExtension extends JavadocHover { - - private final Set OPCODES = new HashSet<>(Arrays.asList(Printer.OPCODES)); - - - @Override - protected IJavaElement[] getJavaElementsAt(ITextViewer textViewer1, IRegion hoverRegion) { - try { - return guessTypesFromSelectionInView(hoverRegion); - } catch (JavaModelException e) { - return null; - } - } - - @Override - public Object getHoverInfo2(ITextViewer viewer, IRegion region) { - String typeName; - IDocument document = viewer.getDocument(); - try { - typeName = document.get(region.getOffset(), region.getLength()); - } catch (BadLocationException e) { - return null; - } - - if (!OPCODES.contains(typeName)) { - return super.getHoverInfo2(viewer, region); - } - int line; - try { - line = document.getLineOfOffset(region.getOffset()); - } catch (BadLocationException e) { - return null; - } - StringBuilder sb = HelpUtils.getOpcodeHelpFor(getBytecodeInstructionAtLine(line)); - if (sb.length() > 0) { - return new JavadocBrowserInformationControlInput(null, null, sb.toString(), 0); - } - return null; - } - } - -} +/******************************************************************************* + * Copyright (c) 2023 Andrey Loskutov and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Andrey Loskutov - initial API and implementation + *******************************************************************************/ +package org.eclipse.jdt.bcoview.views; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.ResourceBundle; +import java.util.Set; + +import org.objectweb.asm.tree.ClassNode; +import org.objectweb.asm.util.Printer; + +import org.eclipse.jdt.bcoview.BytecodeOutlinePlugin; +import org.eclipse.jdt.bcoview.asm.DecompiledClass; +import org.eclipse.jdt.bcoview.asm.DecompiledMethod; +import org.eclipse.jdt.bcoview.asm.DecompilerHelper; +import org.eclipse.jdt.bcoview.asm.DecompilerOptions; +import org.eclipse.jdt.bcoview.asm.LineRange; +import org.eclipse.jdt.bcoview.internal.Messages; +import org.eclipse.jdt.bcoview.preferences.BCOConstants; +import org.eclipse.jdt.bcoview.ui.EclipseUtils; +import org.eclipse.jdt.bcoview.ui.JdtUtils; +import org.eclipse.jdt.bcoview.ui.actions.DefaultToggleAction; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.custom.StackLayout; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.events.ControlListener; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.TableItem; +import org.eclipse.swt.widgets.Widget; + +import org.eclipse.core.runtime.IStatus; + +import org.eclipse.core.filebuffers.FileBuffers; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.StatusLineManager; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.TableViewer; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.Document; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IFindReplaceTarget; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextHover; +import org.eclipse.jface.text.ITextListener; +import org.eclipse.jface.text.ITextOperationTarget; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.jface.text.hyperlink.IHyperlink; +import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; +import org.eclipse.jface.text.quickassist.IQuickAssistAssistant; +import org.eclipse.jface.text.source.ISourceViewer; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorReference; +import org.eclipse.ui.ISelectionService; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.IViewSite; +import org.eclipse.ui.IWorkbenchActionConstants; +import org.eclipse.ui.IWorkbenchCommandConstants; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.ActionFactory; +import org.eclipse.ui.console.actions.TextViewerAction; +import org.eclipse.ui.part.ViewPart; +import org.eclipse.ui.plugin.AbstractUIPlugin; + +import org.eclipse.ui.texteditor.FindReplaceAction; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.texteditor.IUpdate; + +import org.eclipse.jdt.core.IJavaElement; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.search.IJavaSearchScope; +import org.eclipse.jdt.core.search.SearchEngine; + +import org.eclipse.jdt.ui.actions.OpenAction; +import org.eclipse.jdt.ui.actions.SelectionDispatchAction; +import org.eclipse.jdt.ui.text.IColorManager; +import org.eclipse.jdt.ui.text.IJavaPartitions; +import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration; +import org.eclipse.jdt.ui.text.JavaTextTools; + +import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlink; +import org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector; +import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer; +import org.eclipse.jdt.internal.ui.text.JavaWordFinder; +import org.eclipse.jdt.internal.ui.text.java.hover.JavadocBrowserInformationControlInput; +import org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover; + +/** + * This view shows decompiled java bytecode + */ +@SuppressWarnings("restriction") +public class BytecodeOutlineView extends ViewPart implements IBytecodePart { + + // orientations + static final int VIEW_ORIENTATION_VERTICAL = 0; + + static final int VIEW_ORIENTATION_HORIZONTAL = 1; + + static final int VIEW_ORIENTATION_AUTOMATIC = 2; + + /** + * The current orientation; either VIEW_ORIENTATION_HORIZONTAL + * VIEW_ORIENTATION_VERTICAL, or VIEW_ORIENTATION_AUTOMATIC. + */ + int orientation = VIEW_ORIENTATION_AUTOMATIC; + + /** + * The current orientation; either VIEW_ORIENTATION_HORIZONTAL + * VIEW_ORIENTATION_VERTICAL. + */ + private int currentOrientation; + + protected ToggleOrientationAction[] toggleOrientationActions; + + protected BitSet modes; + + protected boolean inputChanged; + + protected boolean bufferIsDirty; + + private boolean isEnabled; + + private boolean isActive; + + private boolean isVisible; + + protected Composite stackComposite; + + protected StyledText textControl; + + protected JavaSourceViewer textViewer; + + protected SashForm verifyControl; + + protected SashForm stackAndLvt; + + protected Table tableControl; + + protected TableViewer tableControlViewer; + + protected Table stackTable; + + protected Table lvtTable; + + protected ITextEditor javaEditor; + + private IJavaElement javaInput; + + protected IJavaElement lastChildElement; + + protected ITextSelection currentSelection; + + protected EditorListener editorListener; + + protected Action selectionChangedAction; + + protected Action refreshVarsAndStackAction; + + protected DefaultToggleAction linkWithEditorAction; + + protected DefaultToggleAction showSelectedOnlyAction; + + protected DefaultToggleAction setRawModeAction; + + protected DefaultToggleAction toggleASMifierModeAction; + + protected DefaultToggleAction hideLineInfoAction; + + protected DefaultToggleAction hideLocalsAction; + + protected DefaultToggleAction hideStackMapAction; + + protected DefaultToggleAction showHexValuesAction; + + protected DefaultToggleAction expandStackMapAction; + + protected DefaultToggleAction toggleVerifierAction; + + protected StatusLineManager statusLineManager; + + protected BCOViewSelectionProvider viewSelectionProvider; + + protected Color errorColor; + + private DecompiledClass lastDecompiledResult; + + protected Map globalActions; + + protected List selectionActions; + + private MenuManager contextMenuManager; + + /** global class info, without current selection status */ + protected String currentStatusMessage; + + protected boolean hasAnalyzerError; + + /* + * I don't know how to update the state of toolbar and menu managers because it seems + * that if we toggle the action state internally (not by user click) then either the + * managers or contribution items or whatever holds the old state of checked action. + * This flag is a workaround and allows us restore the state after internal toggling. + */ + private boolean restoreVerify; + + // updates the find replace action if the document length is > 0 + private ITextListener textListener; + + // see org.eclipse.ui.console.TextConsolePage for the reason to do this ;) + private ISelectionChangedListener textSelectionListener; + + private Control statusControl; + + protected void setJavaInput(IJavaElement javaInput) { + this.javaInput = javaInput; + inputChanged = true; + } + + public BytecodeOutlineView() { + super(); + modes = new BitSet(); + globalActions = new HashMap<>(); + selectionActions = new ArrayList<>(); + } + + /** + * Is this view state changes depending on editor changes? + * + * @return true if linked with editor + */ + protected boolean isLinkedWithEditor() { + return modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR); + } + + /** + * Are actions on toolbar active? + * + * @return Returns the isEnabled. + */ + private boolean isEnabled() { + return isEnabled; + } + + private void setEnabled(boolean on) { + this.isEnabled = on; + if (tableControl != null && !tableControl.isDisposed()) { + tableControl.setEnabled(on); + } + if (stackTable != null && !stackTable.isDisposed()) { + stackTable.setEnabled(on); + } + if (lvtTable != null && !lvtTable.isDisposed()) { + lvtTable.setEnabled(on); + } + showSelectedOnlyAction.setEnabled(on); + // linkWithEditorAction.setEnabled(on); + selectionChangedAction.setEnabled(on); + toggleVerifierAction.setEnabled(on); + hideLocalsAction.setEnabled(on); + hideLineInfoAction.setEnabled(on); + hideStackMapAction.setEnabled(on); + showHexValuesAction.setEnabled(on); + toggleASMifierModeAction.setEnabled(on); + expandStackMapAction.setEnabled(on); + setRawModeAction.setEnabled(on && !toggleASMifierModeAction.isChecked()); + boolean showAnalyzer = on && toggleVerifierAction.isChecked(); + for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { + toggleOrientationAction.setEnabled(showAnalyzer); + } + } + + /** + * Is this view monitoring workspace changes? + * + * @return Returns the isActive. + */ + private boolean isActive() { + return isActive; + } + + private void setBufferIsDirty(boolean bufferIsDirty) { + this.bufferIsDirty = bufferIsDirty; + } + + private void setInput(ITextEditor editor) { + javaEditor = null; + setJavaInput(null); + lastDecompiledResult = null; + if (editor != null) { + IJavaElement javaElem = EclipseUtils.getJavaInput(editor); + if (javaElem == null) { + return; + } + setJavaInput(javaElem); + javaEditor = editor; + + checkVerifyMode(); + + updateSelection(EclipseUtils.getSelection(javaEditor.getSelectionProvider())); + setBufferIsDirty(editor.isDirty()); + } + } + + private void checkVerifyMode() { + if (toggleVerifierAction == null) { + return; + } + boolean aoi = JdtUtils.isAbstractOrInterface(javaInput); + + if (!toggleVerifierAction.isChecked()) { + // deactivate verify button, but only if *not* in verify mode + toggleVerifierAction.setEnabled(!aoi); + restoreVerify = false; + } else { + if (aoi) { + // swith verify mode off, because it is not applicable to selected element + inputChanged = true; + toggleVerifyMode(getViewSite().getActionBars().getMenuManager(), false); + // remember last state, to match the state of the toolbars and menus + restoreVerify = true; + } else { + if (restoreVerify) { + inputChanged = true; + toggleVerifierAction.setEnabled(true); + toggleVerifyMode(getViewSite().getActionBars().getMenuManager(), true); + } + restoreVerify = false; + } + } + } + + private boolean updateSelection(ITextSelection sel) { + if (sel != null + && (sel.equals(currentSelection) || (currentSelection != null + && sel.getStartLine() == currentSelection.getStartLine() && sel + .getEndLine() == currentSelection.getEndLine()))) { + + /* + * getStartLine/getEndLine is probably not sensitive enough - but in case of + * java classes/methods which fits in one selection but not in the other, then + * I think we can ignore them here - this is not the 99% of use cases. + */ + return false; + } + + currentSelection = sel; + return true; + } + + @Override + public void init(IViewSite site) { + super.setSite(site); + if (editorListener == null) { + editorListener = new EditorListener(this); + getSite().getWorkbenchWindow().getPartService().addPartListener(editorListener); + } + } + + @Override + public void createPartControl(Composite parent) { + errorColor = parent.getDisplay().getSystemColor(SWT.COLOR_RED); + parent.addControlListener(new ControlListener() { + + @Override + public void controlMoved(ControlEvent e) { + // + } + + @Override + public void controlResized(ControlEvent e) { + computeOrientation(); + } + }); + + GridLayout parentLayout = new GridLayout(); + parentLayout.numColumns = 1; + parentLayout.marginBottom = -5; + parentLayout.marginTop = -5; + parentLayout.marginLeft = -5; + parentLayout.marginRight = -5; + + parent.setLayout(parentLayout); + + stackComposite = new Composite(parent, SWT.NONE); + stackComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + stackComposite.setLayout(new StackLayout()); + + statusLineManager = new StatusLineManager(); + statusControl = statusLineManager.createControl(parent, SWT.NONE); + statusControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + IEditorPart activeEditor = EclipseUtils.getActiveEditor(); + if (activeEditor instanceof ITextEditor) { + setInput((ITextEditor) activeEditor); + } + createTextControl(); + createTextContextMenu(); + createVerifyControl(); + initModes(); + + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + ((StackLayout) stackComposite.getLayout()).topControl = verifyControl; + } else { + ((StackLayout) stackComposite.getLayout()).topControl = textControl; + } + + createSelectionProvider(); + createToolbarActions(); + setEnabled(false); + } + + private void initModes() { + IPreferenceStore store = BytecodeOutlinePlugin.getDefault().getPreferenceStore(); + modes.set(BCOConstants.F_LINK_VIEW_TO_EDITOR, store.getBoolean(BCOConstants.LINK_VIEW_TO_EDITOR)); + modes.set(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, store.getBoolean(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT)); + modes.set(BCOConstants.F_SHOW_RAW_BYTECODE, store.getBoolean(BCOConstants.SHOW_RAW_BYTECODE)); + modes.set(BCOConstants.F_SHOW_LINE_INFO, store.getBoolean(BCOConstants.SHOW_LINE_INFO)); + modes.set(BCOConstants.F_SHOW_VARIABLES, store.getBoolean(BCOConstants.SHOW_VARIABLES)); + modes.set(BCOConstants.F_SHOW_STACKMAP, store.getBoolean(BCOConstants.SHOW_STACKMAP)); + modes.set(BCOConstants.F_EXPAND_STACKMAP, store.getBoolean(BCOConstants.EXPAND_STACKMAP)); + modes.set(BCOConstants.F_SHOW_ASMIFIER_CODE, store.getBoolean(BCOConstants.SHOW_ASMIFIER_CODE)); + modes.set(BCOConstants.F_SHOW_ANALYZER, store.getBoolean(BCOConstants.SHOW_ANALYZER)); + modes.set(BCOConstants.F_SHOW_HEX_VALUES, store.getBoolean(BCOConstants.SHOW_HEX_VALUES)); + } + + private void createToolbarActions() { + createTextActions(); + + final IActionBars bars = getViewSite().getActionBars(); + final IToolBarManager tmanager = bars.getToolBarManager(); + final IMenuManager mmanager = bars.getMenuManager(); + + selectionChangedAction = new Action() { + @Override + public void run() { + Point selection = textControl.getSelection(); + setSelectionInJavaEditor(selection); + } + }; + + refreshVarsAndStackAction = new Action() { + @Override + public void run() { + int selectionIndex = tableControl.getSelectionIndex(); + TableItem[] items = tableControl.getSelection(); + if (items == null || items.length < 1) { + return; + } + String line = items[0].getText(0); + if (line == null || "".equals(line)) { //$NON-NLS-1$ + return; + } + Integer valueOf = Integer.valueOf(line); + if (valueOf != null) { + updateVerifierControl4insn(valueOf.intValue()); + tableControl.setSelection(selectionIndex); + } + } + }; + + linkWithEditorAction = new DefaultToggleAction(BCOConstants.LINK_VIEW_TO_EDITOR) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_LINK_VIEW_TO_EDITOR, newState); + if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + showSelectedOnlyAction.setEnabled(true); + toggleVerifierAction.setEnabled(true); + hideLineInfoAction.setEnabled(true); + hideLocalsAction.setEnabled(true); + toggleASMifierModeAction.setEnabled(true); + if (!toggleASMifierModeAction.isChecked()) { + setRawModeAction.setEnabled(true); + } + activateView(); + checkOpenEditors(true); + inputChanged = true; + refreshView(); + } + } + }; + + showSelectedOnlyAction = new DefaultToggleAction(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, newState); + inputChanged = true; + refreshView(); + } + }; + + setRawModeAction = new DefaultToggleAction(BCOConstants.SHOW_RAW_BYTECODE) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_RAW_BYTECODE, newState); + inputChanged = true; + refreshView(); + } + }; + + hideLineInfoAction = new DefaultToggleAction(BCOConstants.SHOW_LINE_INFO) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_LINE_INFO, newState); + inputChanged = true; + refreshView(); + } + }; + + hideLocalsAction = new DefaultToggleAction(BCOConstants.SHOW_VARIABLES) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_VARIABLES, newState); + inputChanged = true; + refreshView(); + } + }; + + hideStackMapAction = new DefaultToggleAction(BCOConstants.SHOW_STACKMAP) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_STACKMAP, newState); + inputChanged = true; + refreshView(); + } + }; + + expandStackMapAction = new DefaultToggleAction(BCOConstants.EXPAND_STACKMAP) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_EXPAND_STACKMAP, newState); + inputChanged = true; + refreshView(); + } + }; + + showHexValuesAction = new DefaultToggleAction(BCOConstants.SHOW_HEX_VALUES) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_HEX_VALUES, newState); + inputChanged = true; + refreshView(); + } + }; + + toggleASMifierModeAction = new DefaultToggleAction(BCOConstants.SHOW_ASMIFIER_CODE) { + @Override + public void run(boolean newState) { + setMode(BCOConstants.F_SHOW_ASMIFIER_CODE, newState); + if (newState) { + setMode(BCOConstants.F_SHOW_RAW_BYTECODE, true); + setRawModeAction.setEnabled(false); + } else { + setRawModeAction.setEnabled(true); + } + inputChanged = true; + refreshView(); + } + }; + + toggleVerifierAction = new DefaultToggleAction(BCOConstants.SHOW_ANALYZER) { + @Override + public void run(boolean newState) { + toggleVerifyMode(mmanager, newState); + inputChanged = true; + refreshView(); + } + }; + + mmanager.add(linkWithEditorAction); + mmanager.add(showSelectedOnlyAction); + mmanager.add(setRawModeAction); + mmanager.add(hideLineInfoAction); + mmanager.add(hideLocalsAction); + mmanager.add(showHexValuesAction); + mmanager.add(hideStackMapAction); + mmanager.add(expandStackMapAction); + mmanager.add(toggleASMifierModeAction); + mmanager.add(toggleVerifierAction); + + mmanager.add(new Separator()); + + toggleOrientationActions = new ToggleOrientationAction[] { + new ToggleOrientationAction(VIEW_ORIENTATION_VERTICAL), + new ToggleOrientationAction(VIEW_ORIENTATION_HORIZONTAL), + new ToggleOrientationAction(VIEW_ORIENTATION_AUTOMATIC) }; + for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { + mmanager.add(toggleOrientationAction); + } + + tmanager.add(linkWithEditorAction); + tmanager.add(showSelectedOnlyAction); + tmanager.add(setRawModeAction); + // tmanager.add(hideLineInfoAction); + // tmanager.add(hideLocalsAction); + tmanager.add(toggleASMifierModeAction); + tmanager.add(toggleVerifierAction); + } + + @SuppressWarnings("unused") + private void createVerifyControl() { + verifyControl = new SashForm(stackComposite, SWT.VERTICAL); + tableControl = new Table(verifyControl, SWT.SINGLE | SWT.FULL_SELECTION); + tableControlViewer = new TableViewer(tableControl); + + TableColumn tc = new TableColumn(tableControl, SWT.LEFT); + tc.setText("#"); //$NON-NLS-1$ + tc.setToolTipText("ASM instruction offset"); //$NON-NLS-1$ + + tc = new TableColumn(tableControl, SWT.LEFT); + tc.setText(Messages.BytecodeOutlineView_lvt_header); + tc.setToolTipText("Local variables"); //$NON-NLS-1$ + + tc = new TableColumn(tableControl, SWT.LEFT); + tc.setText(Messages.BytecodeOutlineView_stack_header); + tc.setToolTipText("Stack content *before* current instruction is executed"); //$NON-NLS-1$ + new TableColumn(tableControl, SWT.LEFT); + new TableColumn(tableControl, SWT.LEFT); + tableControl.setLinesVisible(false); + tableControl.setHeaderVisible(true); + + stackAndLvt = new SashForm(verifyControl, SWT.HORIZONTAL); + + lvtTable = new Table(stackAndLvt, SWT.SINGLE | SWT.FULL_SELECTION); + lvtTable.setLinesVisible(false); + lvtTable.setHeaderVisible(true); + + new TableColumn(lvtTable, SWT.LEFT).setText("#"); //$NON-NLS-1$ + new TableColumn(lvtTable, SWT.LEFT).setText("Var Type"); //$NON-NLS-1$ + new TableColumn(lvtTable, SWT.LEFT).setText("Name"); //$NON-NLS-1$ + + stackTable = new Table(stackAndLvt, SWT.SINGLE | SWT.FULL_SELECTION); + stackTable.setLinesVisible(false); + stackTable.setHeaderVisible(true); + new TableColumn(stackTable, SWT.LEFT).setText("#"); //$NON-NLS-1$ + new TableColumn(stackTable, SWT.LEFT).setText("Stack Type"); //$NON-NLS-1$ + + stackAndLvt.setWeights(50, 50); + verifyControl.setWeights(75, 25); + + tableControl.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + selectionChangedAction.run(); + } + refreshVarsAndStackAction.run(); + } + }); + + } + + private void createSelectionProvider() { + viewSelectionProvider = new BCOViewSelectionProvider(); + viewSelectionProvider.registerSelectionProvider(textViewer); + viewSelectionProvider.registerSelectionProvider(tableControlViewer); + + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + viewSelectionProvider.setCurrentSelectionProvider(tableControlViewer); + } else { + viewSelectionProvider.setCurrentSelectionProvider(textViewer); + } + getSite().setSelectionProvider(viewSelectionProvider); + } + + /** + * create/register context menu on text control + */ + private void createTextContextMenu() { + String id = "org.eclipse.jdt.bcoview.views.BytecodeOutlineView#ContextMenu"; //$NON-NLS-1$ + contextMenuManager = new MenuManager("#ContextMenu", id); //$NON-NLS-1$ + contextMenuManager.setRemoveAllWhenShown(true); + contextMenuManager.addMenuListener(this::contextMenuAboutToShow); + Menu menu = contextMenuManager.createContextMenu(textControl); + textControl.setMenu(menu); + + getSite().registerContextMenu(id, contextMenuManager, textViewer); + } + + private void createTextControl() { + IPreferenceStore store = JavaPlugin.getDefault().getCombinedPreferenceStore(); + final JavaSourceViewer viewer = new JavaSourceViewer(stackComposite, null, null, true, SWT.V_SCROLL | SWT.H_SCROLL, store); + + IColorManager colorManager = JavaPlugin.getDefault().getJavaTextTools().getColorManager(); + JavaSourceViewerConfiguration configuration = new JavaConfiguration(colorManager, store, null, IJavaPartitions.JAVA_PARTITIONING); + viewer.configure(configuration); + viewer.setEditable(false); + textViewer = viewer; + + textControl = textViewer.getTextWidget(); + IDocument document = new Document(""); //$NON-NLS-1$ + textViewer.setDocument(document); + + textSelectionListener = event -> { + for (String selectionAction : selectionActions) { + updateAction(selectionAction); + } + }; + + textListener = event -> { + IUpdate findReplace = (IUpdate) globalActions.get(ActionFactory.FIND.getId()); + if (findReplace != null) { + findReplace.update(); + } + }; + + textViewer.getSelectionProvider().addSelectionChangedListener(textSelectionListener); + textViewer.addTextListener(textListener); + + textControl.addMouseListener(new MouseAdapter() { + @Override + public void mouseDown(MouseEvent e) { + if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + selectionChangedAction.run(); + } + } + + @Override + public void mouseUp(MouseEvent e) { + if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + selectionChangedAction.run(); + } + } + }); + + textControl.addKeyListener(new KeyListener() { + @Override + public void keyPressed(KeyEvent e) { + // ignored + } + + @Override + public void keyReleased(KeyEvent e) { + if (modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + selectionChangedAction.run(); + } + } + }); + } + + @Override + public void dispose() { + deActivateView(); + if (editorListener != null) { + IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow(); + workbenchWindow.getPartService().removePartListener(editorListener); + workbenchWindow.getSelectionService().removePostSelectionListener(editorListener); + FileBuffers.getTextFileBufferManager().removeFileBufferListener(editorListener); + editorListener.dispose(); + editorListener = null; + } + + if (contextMenuManager != null) { + contextMenuManager.dispose(); + } + + selectionActions.clear(); + globalActions.clear(); + + textViewer.getSelectionProvider().removeSelectionChangedListener(textSelectionListener); + textViewer.removeTextListener(textListener); + textViewer = null; + viewSelectionProvider = null; + + if (textControl != null) { + textControl.dispose(); + textControl = null; + } + if (verifyControl != null) { + verifyControl.dispose(); + verifyControl = null; + tableControl = null; + stackTable = null; + lvtTable = null; + tableControlViewer = null; + } + currentSelection = null; + javaEditor = null; + setJavaInput(null); + lastChildElement = null; + lastDecompiledResult = null; + + linkWithEditorAction.dispose(); + showSelectedOnlyAction.dispose(); + setRawModeAction.dispose(); + toggleASMifierModeAction.dispose(); + hideLineInfoAction.dispose(); + hideLocalsAction.dispose(); + hideStackMapAction.dispose(); + showHexValuesAction.dispose(); + expandStackMapAction.dispose(); + toggleVerifierAction.dispose(); + + linkWithEditorAction = null; + selectionChangedAction = null; + refreshVarsAndStackAction = null; + showSelectedOnlyAction = null; + setRawModeAction = null; + toggleASMifierModeAction = null; + hideLineInfoAction = null; + hideLocalsAction = null; + hideStackMapAction = null; + showHexValuesAction = null; + expandStackMapAction = null; + toggleVerifierAction = null; + super.dispose(); + } + + protected void contextMenuAboutToShow(IMenuManager menuManager) { + IDocument doc = textViewer.getDocument(); + if (doc == null) { + return; + } + + menuManager.add(globalActions.get(ActionFactory.COPY.getId())); + menuManager.add(globalActions.get(ActionFactory.SELECT_ALL.getId())); + + menuManager.add(new Separator("FIND")); //$NON-NLS-1$ + menuManager.add(globalActions.get(ActionFactory.FIND.getId())); + + menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); + } + + @Override + public void setFocus() { + if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) { + if (textViewer != null) { + textViewer.getTextWidget().setFocus(); + } + } else { + if (tableControl != null) { + tableControl.setFocus(); + } + } + } + + protected void handleBufferIsDirty(boolean isDirty) { + if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR) || !isActive()) { + return; + } + if (isDirty) { + setBufferIsDirty(isDirty); + } else { + if (!bufferIsDirty) { + // second time calling with same argument - + // cause new bytecode should be written now + inputChanged = true; + refreshView(); + } else { + // first time - set the flag only - cause + // bytecode is not yet written + setBufferIsDirty(false); + } + } + } + + protected void handlePartHidden(IWorkbenchPart part) { + if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + return; + } + if (this == part) { + isVisible = false; + deActivateView(); + } else if (isActive() && (part instanceof IEditorPart)) { + // check if at least one editor is open + checkOpenEditors(false); + } + } + + protected void handlePartVisible(IWorkbenchPart part) { + if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR)) { + if (this == part) { + isVisible = true; + } + return; + } + if (this == part) { + if (isVisible) { + return; + } + isVisible = true; + // check if java editor is already open + IEditorPart activeEditor = EclipseUtils.getActiveEditor(); + if (!(activeEditor instanceof ITextEditor)) { + // start monitoring again, even if current editor is not + // supported - but we at front now + activateView(); + return; + } + part = activeEditor; + // continue with setting input + } + if (isVisible && part instanceof ITextEditor) { + if (isActive() && part == javaEditor) { + return; + } + activateView(); + setEnabled(true); + setInput((ITextEditor) part); + refreshView(); + } else if (part instanceof IEditorPart) { + if (isActive()) { + deActivateView(); + } + } + } + + protected void handleSelectionChanged(IWorkbenchPart part, ISelection selection) { + if (!modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR) || !isActive() || !isVisible || !(part instanceof IEditorPart)) { + return; + } + if (!(part instanceof ITextEditor)) { + deActivateView(); + return; + } + if (!isEnabled()) { + setEnabled(true); + } + if (part != javaEditor) { + setInput((ITextEditor) part); + } else { + if (!updateSelection((ITextSelection) selection)) { + return; + } + } + refreshView(); + } + + /** + * Does nothing if view is already active + */ + private void activateView() { + if (isActive()) { + return; + } + isActive = true; + getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(editorListener); + FileBuffers.getTextFileBufferManager().addFileBufferListener(editorListener); + } + + /** + * Does nothing if view is already deactivated + */ + private void deActivateView() { + if (!isActive()) { + return; + } + setEnabled(false); + if (editorListener != null) { + ISelectionService service = getSite().getWorkbenchWindow().getSelectionService(); + if (service != null) { + service.removePostSelectionListener(editorListener); + } + FileBuffers.getTextFileBufferManager().removeFileBufferListener(editorListener); + + } + if (textViewer != null && textViewer.getTextWidget() != null && !textViewer.getTextWidget().isDisposed()) { + IDocument document = new Document(""); //$NON-NLS-1$ + textViewer.setDocument(document); + } + if (tableControl != null && !tableControl.isDisposed()) { + setVerifyTableItems(null); + } + if (stackTable != null && !stackTable.isDisposed()) { + stackTable.removeAll(); + } + if (lvtTable != null && !lvtTable.isDisposed()) { + lvtTable.removeAll(); + } + if (statusControl != null && !statusControl.isDisposed()) { + updateStatus(null, -1, -1); + } + currentSelection = null; + lastDecompiledResult = null; + javaEditor = null; + setJavaInput(null); + lastChildElement = null; + setBufferIsDirty(false); + isActive = false; + } + + protected void refreshView() { + if (!isActive()) { + return; + } + + IJavaElement childEl = getCurrentJavaElement(); + if (childEl == null && javaInput == null) { + setInput(javaEditor); + childEl = javaInput; + } + + // after getCurrentJavaElement() call it is possible that java type is disappear + // because corresponding type is not more exist in model + if (javaInput == null) { + deActivateView(); + return; + } + + boolean clearOutput = false; + + if (inputChanged || isSelectedElementChanged(childEl)) { + DecompiledClass result = decompileBytecode(childEl); + if (result == null) { + clearOutput = true; + } else { + boolean hasMethods = !result.isAbstractOrInterface() || result.isDefaultMethodPossible(); + if (modes.get(BCOConstants.F_SHOW_ANALYZER) && hasMethods) { + refreshVerifyView(result); + } else { + toggleVerifierAction.setEnabled(hasMethods); + refreshTextView(result); + } + } + lastDecompiledResult = result; + } else if (childEl == null && modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT)) { + clearOutput = true; + } + + lastChildElement = childEl; + if (clearOutput) { + if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) { + IDocument document = new Document(""); //$NON-NLS-1$ + textViewer.setDocument(document); + } else { + setVerifyTableItems(null); + } + } + setSelectionInBytecodeView(); + inputChanged = false; + } + + private void refreshTextView(DecompiledClass result) { + IDocument document = new Document(result.getText()); + JavaTextTools tools = JavaPlugin.getDefault().getJavaTextTools(); + tools.setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING); + textViewer.setDocument(document); + // we are in verify mode but we can't show content because + // current element is abstract, so we clean table content + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + setVerifyTableItems(null); + } + hasAnalyzerError = false; + } + + private void refreshVerifyView(DecompiledClass result) { + setVerifyTableItems(result.getTextTable()); + List errors = result.getErrorLines(); + if (errors.size() > 0) { + // TODO this only changes color of status line - + // but it is possible also to provide useful info here... + hasAnalyzerError = true; + // currentErrorMessage = ... + } + for (Integer error : errors) { + int l = error.intValue(); + tableControl.getItem(l).setForeground(errorColor); + } + toggleVerifierAction.setEnabled(true); + } + + private void updateStatus(DecompiledClass result, int bytecodeOffsetStart, int bytecodeOffsetEnd) { + // clear error messages, if any + statusLineManager.setErrorMessage(null); + if (result != null) { + currentStatusMessage = "Java:" //$NON-NLS-1$ + + result.getJavaVersion() + " | class size:" //$NON-NLS-1$ + + result.getClassSize(); + ClassNode classNode = result.getClassNode(); + if (classNode != null && classNode.name != null) { + setContentDescription(classNode.name); + } + } else { + currentStatusMessage = ""; //$NON-NLS-1$ + setContentDescription(""); //$NON-NLS-1$ + } + String selectionInfo = ""; //$NON-NLS-1$ + if (bytecodeOffsetStart >= 0) { + selectionInfo = " | offset:" + bytecodeOffsetStart; //$NON-NLS-1$ + if (bytecodeOffsetEnd >= 0) { + selectionInfo += "-" + bytecodeOffsetEnd; //$NON-NLS-1$ + } + } + if (hasAnalyzerError) { + statusLineManager.setErrorMessage(currentStatusMessage + selectionInfo); + } else { + statusLineManager.setMessage(currentStatusMessage + selectionInfo); + } + + } + + @Override + public int getBytecodeInstructionAtLine(int line) { + if (lastDecompiledResult != null) { + return lastDecompiledResult.getBytecodeInsn(line); + } + return -1; + } + + /** + * @return IJavaElement which fits in the current selection in java editor + */ + private IJavaElement getCurrentJavaElement() { + IJavaElement childEl = null; + try { + childEl = JdtUtils.getElementAtOffset(javaInput, currentSelection); + if (childEl != null) { + switch (childEl.getElementType()) { + case IJavaElement.METHOD: + case IJavaElement.FIELD: + case IJavaElement.INITIALIZER: + case IJavaElement.TYPE: + break; + case IJavaElement.LOCAL_VARIABLE: + childEl = childEl.getAncestor(IJavaElement.METHOD); + break; + default: + childEl = null; + break; + } + } + } catch (JavaModelException e) { + // the exception is mostly occured if java structure was + // changed and current element is not more exist in model + // e.g. on rename/delete/move operation. + // so it is not an error for user, but info for us + BytecodeOutlinePlugin.log(e, IStatus.INFO); + setJavaInput(null); + lastChildElement = null; + } + return childEl; + } + + private void setSelectionInBytecodeView() { + if (lastDecompiledResult == null) { + return; + } + + if (currentSelection.getStartLine() != currentSelection.getEndLine()) { + setMultiLineSelectionInBytecodeView(currentSelection); + return; + } + + int sourceLine = currentSelection.getStartLine() + 1; + int decompiledLine = lastDecompiledResult.getDecompiledLine(sourceLine); + + if (decompiledLine < 0 + && !modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT) + && lastChildElement != null) { + /* + * May be this is the selection in outline view, if complete class is shown. + * Because there are no bytecode instructions/offset for method name, we need + * to find and select first method line. See cr 306011 + */ + DecompiledMethod match = lastDecompiledResult.getBestDecompiledMatch(sourceLine); + if (match != null) { + // this is relative to method start + decompiledLine = match.getBestDecompiledLine(sourceLine); + if (decompiledLine > 0) { + // convert to class file relative + decompiledLine = lastDecompiledResult.getDecompiledLine(match, decompiledLine); + } + } + if (decompiledLine < 0) { + String methodName = JdtUtils.getMethodSignature(lastChildElement); + if (methodName != null) { + decompiledLine = lastDecompiledResult.getDecompiledLine(methodName) - 1; + } + } + } + + if (decompiledLine > 0) { + try { + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + updateVerifierControl4line(decompiledLine); + tableControl.setSelection(decompiledLine); + } else { + int lineCount = textControl.getLineCount(); + if (decompiledLine < lineCount) { + int offsetAtLine = textControl.getOffsetAtLine(decompiledLine); + int offsetEnd = textControl.getText().indexOf('\n', offsetAtLine); + textControl.setSelection(offsetAtLine, offsetEnd); + } + } + } catch (IllegalArgumentException e) { + BytecodeOutlinePlugin.error(null, e); + } + } else if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + lvtTable.removeAll(); + stackTable.removeAll(); + } + int bytecodeOffset = lastDecompiledResult.getBytecodeOffset(decompiledLine); + updateStatus(lastDecompiledResult, bytecodeOffset, -1); + } + + private void setMultiLineSelectionInBytecodeView(ITextSelection multiLineSelection) { + LineRange range = lastDecompiledResult.getDecompiledRange(multiLineSelection); + int firstDecompiledLine = range.startLine; + if (firstDecompiledLine > 0) { + try { + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + updateVerifierControl4line(firstDecompiledLine); + tableControl.setSelection(firstDecompiledLine); + } else { + int lineCount = textControl.getLineCount(); + if (firstDecompiledLine < lineCount) { + int offsetAtLine = textControl.getOffsetAtLine(firstDecompiledLine); + int offsetEnd; + String text = textControl.getText(); + if (range.endLine > 0 && range.endLine < lineCount) { + offsetEnd = textControl.getOffsetAtLine(range.endLine); + offsetEnd = text.indexOf("LINENUMBER", text.indexOf('\n', offsetEnd)); //$NON-NLS-1$ + if (offsetEnd < 0) { + offsetEnd = text.indexOf('\n', offsetEnd); + } + } else { + offsetEnd = text.indexOf('\n', offsetAtLine); + } + textControl.setSelection(offsetAtLine, offsetEnd); + } + } + } catch (IllegalArgumentException e) { + BytecodeOutlinePlugin.error(null, e); + } + } else if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + lvtTable.removeAll(); + stackTable.removeAll(); + } + int bytecodeOffsetStart = lastDecompiledResult.getBytecodeOffset(firstDecompiledLine); + int bytecodeOffsetEnd = lastDecompiledResult.getBytecodeOffset(range.endLine); + updateStatus(lastDecompiledResult, bytecodeOffsetStart, bytecodeOffsetEnd); + } + + protected void updateVerifierControl4line(int decompiledLine) { + String[][][] frame = lastDecompiledResult.getFrameTables(decompiledLine, !modes.get(BCOConstants.F_SHOW_RAW_BYTECODE)); + updateVerifierControl(frame); + } + + protected void updateVerifierControl4insn(int insn) { + String[][][] frame = lastDecompiledResult.getFrameTablesForInsn(insn, !modes.get(BCOConstants.F_SHOW_RAW_BYTECODE)); + updateVerifierControl(frame); + } + + private void updateVerifierControl(String[][][] frame) { + lvtTable.removeAll(); + stackTable.removeAll(); + if (frame == null) { + return; + } + for (int i = 0; i < frame[0].length; ++i) { + if (frame[0][i] != null) { + new TableItem(lvtTable, SWT.NONE).setText(frame[0][i]); + } + } + for (int i = 0; i < frame[1].length; ++i) { + if (frame[1][i] != null) { + new TableItem(stackTable, SWT.NONE).setText(frame[1][i]); + } + } + + lvtTable.getColumn(0).pack(); + lvtTable.getColumn(1).pack(); + lvtTable.getColumn(2).pack(); + stackTable.getColumn(0).pack(); + stackTable.getColumn(1).pack(); + } + + protected void setSelectionInJavaEditor(Point selection) { + if (javaEditor != null && javaEditor.getEditorInput() == null) { + // editor was closed - we should clean the reference + javaEditor = null; + setJavaInput(null); + } + if (javaEditor == null || lastDecompiledResult == null) { + deActivateView(); + return; + } + + int startDecLine; + int endDecLine = -1; + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + startDecLine = tableControl.getSelectionIndex(); + endDecLine = startDecLine; + } else { + startDecLine = textControl.getLineAtOffset(selection.x); + endDecLine = textControl.getLineAtOffset(selection.y); + } + int startSourceLine = lastDecompiledResult.getSourceLine(startDecLine); + int endSourceLine = -1; + if (endDecLine > 0) { + endSourceLine = lastDecompiledResult.getSourceLine(endDecLine); + } + + if (endSourceLine < startSourceLine) { + int tmp = startSourceLine; + startSourceLine = endSourceLine; + endSourceLine = tmp; + } + + try { + if (startSourceLine > 0) { + IDocument document = javaEditor.getDocumentProvider().getDocument(javaEditor.getEditorInput()); + try { + IRegion lineInfo = document.getLineInformation(startSourceLine - 1); + + int startOffset = lineInfo.getOffset(); + int length = lineInfo.getLength(); + if (endSourceLine > 0) { + IRegion region = document.getLineInformation(endSourceLine - 1); + length = region.getLength() + (region.getOffset() - startOffset); + } + EclipseUtils.selectInEditor(javaEditor, startOffset, length); + } catch (BadLocationException e) { + // do nothing. This could happens e.g. if editor does not contain + // full source code etc, so that line info is not exist in editor + } + } + } catch (Exception e) { + BytecodeOutlinePlugin.log(e, IStatus.ERROR); + } + + int bytecodeOffset = lastDecompiledResult.getBytecodeOffset(startDecLine); + updateStatus(lastDecompiledResult, bytecodeOffset, -1); + } + + /** + * check if at least one java editor is open - if not, deactivate me + * + * @param checkNewSelection check selection in active editor + */ + protected void checkOpenEditors(boolean checkNewSelection) { + IEditorReference[] editorReferences = getSite().getPage().getEditorReferences(); + if (editorReferences == null || editorReferences.length == 0) { + deActivateView(); + } else if (checkNewSelection) { + IEditorPart activeEditor = EclipseUtils.getActiveEditor(); + if (activeEditor instanceof ITextEditor) { + ITextSelection selection = EclipseUtils.getSelection(((ITextEditor) activeEditor).getSelectionProvider()); + handleSelectionChanged(activeEditor, selection); + } else { + deActivateView(); + } + } + } + + /** + * @param childEl can be null + * @return true if java element selection was changed (means, that previous selection do not + * match to the given element) + */ + private boolean isSelectedElementChanged(IJavaElement childEl) { + + if (lastChildElement == null && childEl == null) { + // no selected child before - and no new selection now => no changes + return false; + } + + if (modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT)) { + if (lastChildElement == null || !lastChildElement.equals(childEl)) { + return true; + } + } + + /* + * the check if we changed from inner class to outer class or vice versa + */ + if (lastChildElement != null && childEl != null) { + IType newEnclosingType = JdtUtils.getEnclosingType(childEl); + IType oldEnclosingType = JdtUtils.getEnclosingType(lastChildElement); + return newEnclosingType == null || !newEnclosingType.equals(oldEnclosingType); + } + return false; + } + + /** + * @param childEl can be null + * @return return null if type is not known or bytecode is not written or cannot be found + */ + private DecompiledClass decompileBytecode(IJavaElement childEl) { + // check here for inner classes too + IJavaElement type = JdtUtils.getEnclosingType(childEl); + if (type == null) { + type = javaInput; + } + if (type == null) { + return null; + } + byte[] bytes = JdtUtils.readClassBytes(type); + if (bytes == null) { + return null; + } + DecompiledClass decompiledClass = null; + int available = bytes.length; + try { + String fieldName = null; + String methodName = null; + /* + * find out, which name we should use for selected element + */ + if (modes.get(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT) && childEl != null) { + if (childEl.getElementType() == IJavaElement.FIELD) { + fieldName = childEl.getElementName(); + } else { + methodName = JdtUtils.getMethodSignature(childEl); + } + } + decompiledClass = DecompilerHelper.getDecompiledClass(bytes, new DecompilerOptions(fieldName, methodName, modes)); + } catch (Exception e) { + try { + // check if compilation unit is ok - then this is the user problem + if (type.isStructureKnown()) { + BytecodeOutlinePlugin.error("Cannot decompile: " + type, e); //$NON-NLS-1$ + } else { + BytecodeOutlinePlugin.log(e, IStatus.ERROR); + } + } catch (JavaModelException e1) { + // this is compilation problem - don't show the message + BytecodeOutlinePlugin.log(e1, IStatus.WARNING); + } + } catch (UnsupportedClassVersionError e) { + BytecodeOutlinePlugin.error("Cannot decompile: " + type //$NON-NLS-1$ + + ". Error was caused by attempt to " //$NON-NLS-1$ + + "load a class compiled with the Java version which is not " //$NON-NLS-1$ + + "supported by the current JVM. ", e); //$NON-NLS-1$ + } + // remember class file size to show it later in UI + if (decompiledClass != null) { + decompiledClass.setClassSize(available); + } + return decompiledClass; + } + + private void setVerifyTableItems(String[][] items) { + tableControl.removeAll(); + if (items != null) { + for (int i = 0; i < items.length; ++i) { + TableItem item = new TableItem(tableControl, SWT.NONE); + for (int j = 0; j < items[i].length; ++j) { + String s = items[i][j]; + if (s.endsWith("\n")) { //$NON-NLS-1$ + s = s.substring(0, s.length() - 1); + // this is the "cookie" for the bytecode reference, which could be + // mapped later to the sourcecode line on selection event in the + // table + item.setData(Integer.valueOf(i)); + } + item.setText(j, s); + } + } + tableControl.getColumn(0).pack(); + tableControl.getColumn(1).pack(); + tableControl.getColumn(2).pack(); + tableControl.getColumn(3).pack(); + tableControl.getColumn(4).pack(); + } + } + + @Override + public T getAdapter(Class adapter) { + if (IFindReplaceTarget.class.equals(adapter)) { + return adapter.cast(textViewer.getFindReplaceTarget()); + } + if (Widget.class.equals(adapter)) { + return adapter.cast(textViewer.getTextWidget()); + } + if (TextViewer.class.equals(adapter)) { + return adapter.cast(textViewer); + } + return super.getAdapter(adapter); + } + + /** + * Configures an action for key bindings. + * + * @param actionBars action bars for this page + * @param actionID action definition id + * @param action associated action + */ + protected void setGlobalAction(IActionBars actionBars, String actionID, IAction action) { + globalActions.put(actionID, action); + actionBars.setGlobalActionHandler(actionID, action); + } + + /** + * Updates the global action with the given id + * + * @param actionId action definition id + */ + protected void updateAction(String actionId) { + IAction action = globalActions.get(actionId); + if (action instanceof IUpdate) { + ((IUpdate) action).update(); + } + } + + protected void createTextActions() { + IActionBars actionBars = getViewSite().getActionBars(); + TextViewerAction action = new TextViewerAction(textViewer, ITextOperationTarget.SELECT_ALL); + + action.configureAction( + Messages.BytecodeOutlineView_select_all_label, + Messages.BytecodeOutlineView_select_all_tooltip, + Messages.BytecodeOutlineView_select_all_description); + setGlobalAction(actionBars, ActionFactory.SELECT_ALL.getId(), action); + + action = new TextViewerAction(textViewer, ITextOperationTarget.COPY); + action.configureAction( + Messages.BytecodeOutlineView_copy_label, + Messages.BytecodeOutlineView_copy_tooltip, + Messages.BytecodeOutlineView_copy_description); + action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); + action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY); + setGlobalAction(actionBars, ActionFactory.COPY.getId(), action); + + ResourceBundle bundle = Messages.getResourceBundle(); + setGlobalAction(actionBars, ActionFactory.FIND.getId(), new FindReplaceAction(bundle, "BytecodeOutlineView_find_replace_", this)); //$NON-NLS-1$ + + selectionActions.add(ActionFactory.COPY.getId()); + selectionActions.add(ActionFactory.FIND.getId()); + + actionBars.updateActionBars(); + } + + private void setOrientation(int orientation) { + if (verifyControl == null || verifyControl.isDisposed()) { + return; + } + + boolean horizontal = orientation == VIEW_ORIENTATION_HORIZONTAL; + verifyControl.setOrientation(horizontal ? SWT.HORIZONTAL : SWT.VERTICAL); + + for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { + toggleOrientationAction.setChecked(orientation == toggleOrientationAction.getOrientation()); + } + + currentOrientation = orientation; + stackComposite.getParent().layout(); + } + + protected void computeOrientation() { + if (orientation != VIEW_ORIENTATION_AUTOMATIC) { + currentOrientation = orientation; + setOrientation(currentOrientation); + } else { + Point size = stackComposite.getParent().getSize(); + if (size.x != 0 && size.y != 0) { + setOrientation(size.x > size.y ? VIEW_ORIENTATION_HORIZONTAL : VIEW_ORIENTATION_VERTICAL); + } + } + } + + /** + * Set the bit with given index to given value and remembers it in the preferences + * + * @param bitIndex one of BCOConstants.F_* constants + * @param value flag + */ + protected void setMode(int bitIndex, boolean value) { + modes.set(bitIndex, value); + } + + protected void toggleVerifyMode(final IMenuManager mmanager, boolean showAnalyzer) { + setMode(BCOConstants.F_SHOW_ANALYZER, showAnalyzer); + if (modes.get(BCOConstants.F_SHOW_ANALYZER)) { + ((StackLayout) stackComposite.getLayout()).topControl = verifyControl; + viewSelectionProvider.setCurrentSelectionProvider(tableControlViewer); + } else { + ((StackLayout) stackComposite.getLayout()).topControl = textControl; + viewSelectionProvider.setCurrentSelectionProvider(textViewer); + } + stackComposite.layout(); + + for (ToggleOrientationAction toggleOrientationAction : toggleOrientationActions) { + toggleOrientationAction.setEnabled(showAnalyzer); + } + mmanager.markDirty(); + mmanager.update(); + } + + + private class ToggleOrientationAction extends Action { + + private final int actionOrientation; + + public ToggleOrientationAction(int orientation) { + super("", AS_RADIO_BUTTON); //$NON-NLS-1$ + + String symbolicName = BytecodeOutlinePlugin.getDefault().getBundle().getSymbolicName(); + if (orientation == VIEW_ORIENTATION_HORIZONTAL) { + setText(Messages.BytecodeOutlineView_toggle_horizontal_label); + setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(symbolicName, "icons/th_horizontal.gif")); //$NON-NLS-1$ + } else if (orientation == VIEW_ORIENTATION_VERTICAL) { + setText(Messages.BytecodeOutlineView_toggle_vertical_label); + setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(symbolicName, "icons/th_vertical.gif")); //$NON-NLS-1$ + } else if (orientation == VIEW_ORIENTATION_AUTOMATIC) { + setText(Messages.BytecodeOutlineView_toggle_automatic_label); + setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(symbolicName, "icons/th_automatic.gif")); //$NON-NLS-1$ + } + actionOrientation = orientation; + } + + public int getOrientation() { + return actionOrientation; + } + + @Override + public void run() { + if (isChecked()) { + orientation = actionOrientation; + computeOrientation(); + } + } + } + + protected IJavaElement[] guessTypesFromSelectionInView(IRegion wordRegion) throws JavaModelException { + if (wordRegion == null || wordRegion.getLength() == 0 || javaInput == null) { + return null; + } + String typeName; + try { + typeName = textViewer.getDocument().get(wordRegion.getOffset(), wordRegion.getLength()); + } catch (BadLocationException e) { + return null; + } + if (typeName.isEmpty()) { + return null; + } + if (typeName.contains("$")) { //$NON-NLS-1$ + typeName = typeName.substring(typeName.lastIndexOf('$') + 1); + } + IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaInput.getJavaProject() }); + return JdtUtils.getTypeForName(typeName, scope, null); + } + + private class JavaElementHyperlinkDetectorInView extends JavaElementHyperlinkDetector { + + @Override + public IHyperlink[] detectHyperlinks(ITextViewer textViewer1, IRegion region, boolean canShowMultipleHyperlinks) { + if (region == null || javaInput == null) { + return null; + } + + IAction openAction = new OpenAction(getSite()); + int offset = region.getOffset(); + + IDocument document = textViewer1.getDocument(); + IRegion wordRegion = JavaWordFinder.findWord(document, offset); + List links = new ArrayList<>(); + IJavaElement[] elements; + try { + elements = guessTypesFromSelectionInView(wordRegion); + } catch (JavaModelException e) { + return null; + } + // TODO check for inner class files possibly referenced in current line. + // If found, add new hyperlink to jump to this inner class, see + // https://forge.ow2.org/tracker/index.php?func=detail&aid=316206&group_id=23&atid=350023 + if (elements == null) { + return null; + } + elements = JdtUtils.selectOpenableElements(elements); + if (elements.length == 0) { + return null; + } + for (IJavaElement element : elements) { + if (element == null) { + continue; + } + addHyperlinks2(links, wordRegion, (SelectionDispatchAction) openAction, element, elements.length > 1); + } + if (links.size() == 0) { + return null; + } + return links.toArray(new IHyperlink[links.size()]); + } + + /** + * This method is added for compatibility with Eclipse 3.6 and 3.7 only! + *

    + * Creates and adds Java element hyperlinks. + * + * @param hyperlinksCollector the list to which hyperlinks should be added + * @param wordRegion the region of the link + * @param openAction the action to use to open the Java elements + * @param element the Java element to open + * @param qualify true if the hyperlink text should show a qualified name for + * element + */ + protected void addHyperlinks2(List hyperlinksCollector, IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify) { + hyperlinksCollector.add(new JavaElementHyperlink(wordRegion, openAction, element, qualify)); + } + + } + + private final class JavaConfiguration extends JavaSourceViewerConfiguration { + + private JavaConfiguration(IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor, String partitioning) { + super(colorManager, preferenceStore, editor, partitioning); + } + + @Override + public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) { + // does not work, as they work on *text editor*, not on the *view*... + // HyperlinkDetectorRegistry registry = EditorsUI.getHyperlinkDetectorRegistry(); + // IHyperlinkDetector[] detectors = registry.createHyperlinkDetectors("org.eclipse.jdt.ui.javaCode", dummyEditorForHyperlinks); + JavaElementHyperlinkDetectorInView det = new JavaElementHyperlinkDetectorInView(); + return new IHyperlinkDetector[] { det }; + } + + @Override + public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) { + return new JavadocHoverExtension(); + } + + @Override + public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) { + return null; + } + } + + private final class JavadocHoverExtension extends JavadocHover { + + private final Set OPCODES = new HashSet<>(Arrays.asList(Printer.OPCODES)); + + + @Override + protected IJavaElement[] getJavaElementsAt(ITextViewer textViewer1, IRegion hoverRegion) { + try { + return guessTypesFromSelectionInView(hoverRegion); + } catch (JavaModelException e) { + return null; + } + } + + @Override + public Object getHoverInfo2(ITextViewer viewer, IRegion region) { + String typeName; + IDocument document = viewer.getDocument(); + try { + typeName = document.get(region.getOffset(), region.getLength()); + } catch (BadLocationException e) { + return null; + } + + if (!OPCODES.contains(typeName)) { + return super.getHoverInfo2(viewer, region); + } + int line; + try { + line = document.getLineOfOffset(region.getOffset()); + } catch (BadLocationException e) { + return null; + } + StringBuilder sb = HelpUtils.getOpcodeHelpFor(getBytecodeInstructionAtLine(line)); + if (sb.length() > 0) { + return new JavadocBrowserInformationControlInput(null, null, sb.toString(), 0); + } + return null; + } + } + +} diff --git a/org.eclipse.jdt.jeview/forceQualifierUpdate.txt b/org.eclipse.jdt.jeview/forceQualifierUpdate.txt index 7fe8d44e2fd..d26e0baf588 100644 --- a/org.eclipse.jdt.jeview/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.jeview/forceQualifierUpdate.txt @@ -1,3 +1,3 @@ -# To force a version qualifier update, add the bug here -Bug 527899 [9] Implement JEP 280: Indify String Concatenation +# To force a version qualifier update, add the bug here +Bug 527899 [9] Implement JEP 280: Indify String Concatenation Bug 527899 [9] Implement JEP 280: Indify String Concatenation \ No newline at end of file diff --git a/org.eclipse.jdt.junit/forceQualifierUpdate.txt b/org.eclipse.jdt.junit/forceQualifierUpdate.txt index a395608bad8..bc668bce864 100644 --- a/org.eclipse.jdt.junit/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.junit/forceQualifierUpdate.txt @@ -1,14 +1,14 @@ -# To force a version qualifier update, add the bug here -Bug 549784: Comparator errors in Y20190801-0900 -Bug 545576: [12] Push Java 12 work to master -Bug 509973 - Comparator errors in I20170105-0320 -Bug 539509 - Comparator errors in jdt.ui bundles in I20180926-0830 -Adopt change of IASTSharedValues.SHARED_AST_LEVEL to 10 -Comparator errors in jdt.ui bundles in Y20200127-1055 -Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 -Bug 566471 - I20200828-0150 - Comparator Errors Found -Comparator errors in jdt.ui bundles in I20210317-0330 -Bug 574522 - 4.21 I-Build: I20210628-1800 - Comparator Errors Found -https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/pull/439 - Update ICU4J to version 71.1 -Bug 527899 [9] Implement JEP 280: Indify String Concatenation +# To force a version qualifier update, add the bug here +Bug 549784: Comparator errors in Y20190801-0900 +Bug 545576: [12] Push Java 12 work to master +Bug 509973 - Comparator errors in I20170105-0320 +Bug 539509 - Comparator errors in jdt.ui bundles in I20180926-0830 +Adopt change of IASTSharedValues.SHARED_AST_LEVEL to 10 +Comparator errors in jdt.ui bundles in Y20200127-1055 +Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 +Bug 566471 - I20200828-0150 - Comparator Errors Found +Comparator errors in jdt.ui bundles in I20210317-0330 +Bug 574522 - 4.21 I-Build: I20210628-1800 - Comparator Errors Found +https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/pull/439 - Update ICU4J to version 71.1 +Bug 527899 [9] Implement JEP 280: Indify String Concatenation Bug 527899 [9] Implement JEP 280: Indify String Concatenation \ No newline at end of file diff --git a/org.eclipse.jdt.text.tests/forceQualifierUpdate.txt b/org.eclipse.jdt.text.tests/forceQualifierUpdate.txt index 6ef359c0176..3138a715261 100644 --- a/org.eclipse.jdt.text.tests/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.text.tests/forceQualifierUpdate.txt @@ -1,10 +1,10 @@ -# To force a version qualifier update, add the bug here -Bug 549784: Comparator errors in Y20190801-0900 -Bug 545576: [12] Push Java 12 work to master -BETA_JAVA9 merge into R4_7_maintenance -Adopt change of IASTSharedValues.SHARED_AST_LEVEL to 10 -Bug 539509 - Comparator errors in jdt.ui bundles in I20180926-0830 -Comparator errors in jdt.ui bundles in Y20200127-1055 -Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 -Comparator errors in jdt.ui bundles in I20210317-0330 +# To force a version qualifier update, add the bug here +Bug 549784: Comparator errors in Y20190801-0900 +Bug 545576: [12] Push Java 12 work to master +BETA_JAVA9 merge into R4_7_maintenance +Adopt change of IASTSharedValues.SHARED_AST_LEVEL to 10 +Bug 539509 - Comparator errors in jdt.ui bundles in I20180926-0830 +Comparator errors in jdt.ui bundles in Y20200127-1055 +Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 +Comparator errors in jdt.ui bundles in I20210317-0330 Bug 527899 [9] Implement JEP 280: Indify String Concatenation \ No newline at end of file diff --git a/org.eclipse.jdt.ui.tests.refactoring/forceQualifierUpdate.txt b/org.eclipse.jdt.ui.tests.refactoring/forceQualifierUpdate.txt index a25ea4ef087..f676ce9ceaa 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.ui.tests.refactoring/forceQualifierUpdate.txt @@ -1,9 +1,9 @@ -# To force a version qualifier update, add the bug here -Bug 545576: [12] Push Java 12 work to master -Bug 530709 - Comparator errors in jdt debug and jdt ui in I20180204-2000 -Bug 539509 - Comparator errors in jdt.ui bundles in I20180926-0830 -Adopt change of IASTSharedValues.SHARED_AST_LEVEL to 10 -Comparator errors in jdt.ui bundles in Y20200127-1055 -Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 -Bug 566471 - I20200828-0150 - Comparator Errors Found +# To force a version qualifier update, add the bug here +Bug 545576: [12] Push Java 12 work to master +Bug 530709 - Comparator errors in jdt debug and jdt ui in I20180204-2000 +Bug 539509 - Comparator errors in jdt.ui bundles in I20180926-0830 +Adopt change of IASTSharedValues.SHARED_AST_LEVEL to 10 +Comparator errors in jdt.ui bundles in Y20200127-1055 +Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 +Bug 566471 - I20200828-0150 - Comparator Errors Found Bug 527899 [9] Implement JEP 280: Indify String Concatenation \ No newline at end of file diff --git a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToNew14/moveInnerRecord/out/p1/Bar.java b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToNew14/moveInnerRecord/out/p1/Bar.java index c3829f68dcf..46fbbc004d8 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToNew14/moveInnerRecord/out/p1/Bar.java +++ b/org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToNew14/moveInnerRecord/out/p1/Bar.java @@ -1,6 +1,6 @@ -/** - * - */ -package p1; - +/** + * + */ +package p1; + public record Bar(int i) {} \ No newline at end of file diff --git a/org.eclipse.jdt.ui.tests/forceQualifierUpdate.txt b/org.eclipse.jdt.ui.tests/forceQualifierUpdate.txt index 35b0d07f127..089e4123a79 100644 --- a/org.eclipse.jdt.ui.tests/forceQualifierUpdate.txt +++ b/org.eclipse.jdt.ui.tests/forceQualifierUpdate.txt @@ -1,7 +1,7 @@ -# To force a version qualifier update, add the bug here -Bug 545576: [12] Push Java 12 work to master -Bug 509973 - Comparator errors in I20170105-0320 -Bug 534597 - Unanticipated comparator errors in I20180511-2000 -Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 -Bug 567746: Comparator errors in I20201009-0430 +# To force a version qualifier update, add the bug here +Bug 545576: [12] Push Java 12 work to master +Bug 509973 - Comparator errors in I20170105-0320 +Bug 534597 - Unanticipated comparator errors in I20180511-2000 +Bug 564399 - [Comparator] Comparator Errors in Y-build Y20200617-2350 +Bug 567746: Comparator errors in I20201009-0430 Bug 527899 [9] Implement JEP 280: Indify String Concatenation \ No newline at end of file From 4b92b5752577e070650c0d15d096ddd8c55c82b5 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Thu, 30 Nov 2023 17:24:59 +0100 Subject: [PATCH 24/43] Adding pomless build to JDT UI This enables pomless builds for JDT UI and removes the simple pom files. Future commits can reduce the usage of pom files further. For #948 --- .gitignore | 4 ++++ .mvn/extensions.xml | 8 ++++++++ org.eclipse.jdt.astview.feature/pom.xml | 23 ----------------------- org.eclipse.jdt.astview/pom.xml | 23 ----------------------- org.eclipse.jdt.bcoview.feature/pom.xml | 23 ----------------------- org.eclipse.jdt.core.manipulation/pom.xml | 23 ----------------------- org.eclipse.jdt.jeview.feature/pom.xml | 23 ----------------------- org.eclipse.jdt.jeview/pom.xml | 23 ----------------------- org.eclipse.jdt.junit.core/pom.xml | 23 ----------------------- org.eclipse.jdt.junit/pom.xml | 23 ----------------------- 10 files changed, 12 insertions(+), 184 deletions(-) create mode 100644 .mvn/extensions.xml delete mode 100644 org.eclipse.jdt.astview.feature/pom.xml delete mode 100644 org.eclipse.jdt.astview/pom.xml delete mode 100644 org.eclipse.jdt.bcoview.feature/pom.xml delete mode 100644 org.eclipse.jdt.core.manipulation/pom.xml delete mode 100644 org.eclipse.jdt.jeview.feature/pom.xml delete mode 100644 org.eclipse.jdt.jeview/pom.xml delete mode 100644 org.eclipse.jdt.junit.core/pom.xml delete mode 100644 org.eclipse.jdt.junit/pom.xml diff --git a/.gitignore b/.gitignore index e97799f4c2a..89f1685d714 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,7 @@ Snap.* org.eclipse.jdt.ui.examples.projects/archive/junit/org.eclipse.jdt.ui.junit.sampleproject-*.jar org.eclipse.jdt.ui.examples.projects/jdtexamples.jar +# pomless +.polyglot.* + + diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 00000000000..d5465e18875 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,8 @@ + + + + org.eclipse.tycho + tycho-build + 4.0.4 + + diff --git a/org.eclipse.jdt.astview.feature/pom.xml b/org.eclipse.jdt.astview.feature/pom.xml deleted file mode 100644 index 6583a77985e..00000000000 --- a/org.eclipse.jdt.astview.feature/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt.feature - org.eclipse.jdt.astview.feature - 1.2.200-SNAPSHOT - eclipse-feature - diff --git a/org.eclipse.jdt.astview/pom.xml b/org.eclipse.jdt.astview/pom.xml deleted file mode 100644 index dd945c2f875..00000000000 --- a/org.eclipse.jdt.astview/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt - org.eclipse.jdt.astview - 1.6.100-SNAPSHOT - eclipse-plugin - diff --git a/org.eclipse.jdt.bcoview.feature/pom.xml b/org.eclipse.jdt.bcoview.feature/pom.xml deleted file mode 100644 index 28daa357014..00000000000 --- a/org.eclipse.jdt.bcoview.feature/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt.feature - org.eclipse.jdt.bcoview.feature - 1.2.300-SNAPSHOT - eclipse-feature - diff --git a/org.eclipse.jdt.core.manipulation/pom.xml b/org.eclipse.jdt.core.manipulation/pom.xml deleted file mode 100644 index fd6de9b548e..00000000000 --- a/org.eclipse.jdt.core.manipulation/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt - org.eclipse.jdt.core.manipulation - 1.21.0-SNAPSHOT - eclipse-plugin - diff --git a/org.eclipse.jdt.jeview.feature/pom.xml b/org.eclipse.jdt.jeview.feature/pom.xml deleted file mode 100644 index c39da57e7eb..00000000000 --- a/org.eclipse.jdt.jeview.feature/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt.feature - org.eclipse.jdt.jeview.feature - 1.1.300-SNAPSHOT - eclipse-feature - diff --git a/org.eclipse.jdt.jeview/pom.xml b/org.eclipse.jdt.jeview/pom.xml deleted file mode 100644 index 2c8abc52110..00000000000 --- a/org.eclipse.jdt.jeview/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt - org.eclipse.jdt.jeview - 1.5.200-SNAPSHOT - eclipse-plugin - diff --git a/org.eclipse.jdt.junit.core/pom.xml b/org.eclipse.jdt.junit.core/pom.xml deleted file mode 100644 index bf13288c785..00000000000 --- a/org.eclipse.jdt.junit.core/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt - org.eclipse.jdt.junit.core - 3.13.100-SNAPSHOT - eclipse-plugin - diff --git a/org.eclipse.jdt.junit/pom.xml b/org.eclipse.jdt.junit/pom.xml deleted file mode 100644 index f70dc766cc9..00000000000 --- a/org.eclipse.jdt.junit/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 4.0.0 - - eclipse.jdt.ui - eclipse.jdt.ui - 4.31.0-SNAPSHOT - - org.eclipse.jdt - org.eclipse.jdt.junit - 3.16.300-SNAPSHOT - eclipse-plugin - From 4e1aea285ffebe8e5d06cc7e2b31eab2d3d4a1e5 Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Fri, 1 Dec 2023 17:05:46 -0500 Subject: [PATCH 25/43] Small checks and behavior differences for refactorings and assists (#921) - Small checks and behavior differences for refactorings and assists for headless consumers (jdt.ls) Signed-off-by: Rob Stryker --- .../RefactoringCorrectionProposalCore.java | 14 ++++- .../code/IntroduceParameterRefactoring.java | 2 +- .../rename/RenameTypeProcessor.java | 51 ++++++++++++------- .../rename/RenameVirtualMethodProcessor.java | 9 +++- .../SurroundWithTryCatchAnalyzer.java | 8 ++- .../SurroundWithTryCatchRefactoring.java | 10 +++- 6 files changed, 69 insertions(+), 25 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java b/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java index bb467350772..788282edc02 100644 --- a/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java +++ b/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java @@ -22,6 +22,8 @@ import org.eclipse.text.edits.InsertEdit; +import org.eclipse.ltk.core.refactoring.Change; +import org.eclipse.ltk.core.refactoring.CompositeChange; import org.eclipse.ltk.core.refactoring.Refactoring; import org.eclipse.ltk.core.refactoring.RefactoringStatus; import org.eclipse.ltk.core.refactoring.TextChange; @@ -62,7 +64,17 @@ public TextChange createTextChange() throws CoreException { dummyChange.setEdit(new InsertEdit(0, "")); //$NON-NLS-1$ return dummyChange; } - return (TextChange) fRefactoring.createChange(new NullProgressMonitor()); + Change o = fRefactoring.createChange(new NullProgressMonitor());; + if(o instanceof TextChange) + return (TextChange) o; + if( o instanceof CompositeChange) { + CompositeChange cc = (CompositeChange)o; + Change[] children = cc.getChildren(); + if( children != null && children.length == 1 && children[0] instanceof TextChange) { + return ((TextChange)children[0]); + } + } + return null; } /* diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java index 1da237877e1..afa6fa6f261 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java @@ -570,7 +570,7 @@ private IntroduceParameterDescriptor getRefactoringDescriptor() { ChangeMethodSignatureDescriptor extended= (ChangeMethodSignatureDescriptor) fChangeSignatureProcessor.createDescriptor(); RefactoringContribution contribution= RefactoringCore.getRefactoringContribution(IJavaRefactorings.CHANGE_METHOD_SIGNATURE); - Map argumentsMap= contribution.retrieveArgumentMap(extended); + Map argumentsMap= contribution == null ? Collections.emptyMap() : contribution.retrieveArgumentMap(extended); final Map arguments= new HashMap<>(); arguments.put(ATTRIBUTE_ARGUMENT, fParameter.getNewName()); diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java index 08370d04aeb..3c915cec96a 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java @@ -90,6 +90,7 @@ import org.eclipse.jdt.core.search.TypeReferenceMatch; import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore; +import org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin; import org.eclipse.jdt.internal.core.manipulation.util.BasicElementLabels; import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory; import org.eclipse.jdt.internal.corext.dom.IASTSharedValues; @@ -127,8 +128,6 @@ import org.eclipse.jdt.ui.refactoring.IRefactoringProcessorIdsCore; import org.eclipse.jdt.ui.refactoring.IRefactoringSaveModes; -import org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin; - public class RenameTypeProcessor extends JavaRenameProcessor implements ITextUpdating, IReferenceUpdating, IQualifiedNameUpdating, ISimilarDeclarationUpdating, IResourceMapper, IJavaElementMapper { private static final String ATTRIBUTE_QUALIFIED= "qualified"; //$NON-NLS-1$ @@ -1084,21 +1083,10 @@ public Change createChange(IProgressMonitor monitor) throws CoreException { ((TextFileChange) textChange).setSaveMode(TextFileChange.FORCE_SAVE); } } - result.addAll(fChangeManager.getAllChanges()); if (willRenameCU()) { - IResource resource= fType.getCompilationUnit().getResource(); - if (resource != null && resource.isLinked()) { - String ext= resource.getFileExtension(); - String renamedResourceName; - if (ext == null) - renamedResourceName= getNewElementName(); - else - renamedResourceName= getNewElementName() + '.' + ext; - result.add(new RenameResourceChange(fType.getCompilationUnit().getPath(), renamedResourceName)); - } else { - String renamedCUName= JavaModelUtil.getRenamedCUName(fType.getCompilationUnit(), getNewElementName()); - result.add(new RenameCompilationUnitChange(fType.getCompilationUnit(), renamedCUName)); - } + createChangeForRenamedCU(fType, fChangeManager, result); + } else { + result.addAll(fChangeManager.getAllChanges()); } monitor.worked(1); return result; @@ -1107,6 +1095,33 @@ public Change createChange(IProgressMonitor monitor) throws CoreException { } } + protected void createChangeForRenamedCU(IType type, TextChangeManager changeManager, DynamicValidationRefactoringChange result) throws CoreException { + IResource resource= type.getCompilationUnit().getResource(); + if (resource != null && resource.isLinked()) { + createChangeForRenamedCUNullOrLinkedResource(type, changeManager, resource, result);; + } else { + createChangeForRenamedCUStandardResource(type, changeManager, resource, result); + } + } + + protected void createChangeForRenamedCUStandardResource(IType type, TextChangeManager changeManager, IResource resource, DynamicValidationRefactoringChange result) throws CoreException { + result.addAll(changeManager.getAllChanges()); + + String renamedCUName = JavaModelUtil.getRenamedCUName(type.getCompilationUnit(), getNewElementName()); + result.add(new RenameCompilationUnitChange(type.getCompilationUnit(), renamedCUName)); + } + + protected void createChangeForRenamedCUNullOrLinkedResource(IType type, TextChangeManager changeManager, IResource resource, DynamicValidationRefactoringChange result) { + result.addAll(changeManager.getAllChanges()); + String ext= resource.getFileExtension(); + String renamedResourceName; + if (ext == null) + renamedResourceName= getNewElementName(); + else + renamedResourceName= getNewElementName() + '.' + ext; + result.add(new RenameResourceChange(type.getCompilationUnit().getPath(), renamedResourceName)); + } + @Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { @@ -1168,14 +1183,14 @@ private void createChanges(IProgressMonitor pm) throws CoreException { } } - private void addTypeDeclarationUpdate(TextChangeManager manager) throws CoreException { + protected void addTypeDeclarationUpdate(TextChangeManager manager) throws CoreException { String name= RefactoringCoreMessages.RenameTypeRefactoring_update; int typeNameLength= fType.getElementName().length(); ICompilationUnit cu= fType.getCompilationUnit(); TextChangeCompatibility.addTextEdit(manager.get(cu), name, new ReplaceEdit(fType.getNameRange().getOffset(), typeNameLength, getNewElementName())); } - private void addConstructorRenames(TextChangeManager manager) throws CoreException { + protected void addConstructorRenames(TextChangeManager manager) throws CoreException { ICompilationUnit cu= fType.getCompilationUnit(); int typeNameLength= fType.getElementName().length(); for (IMethod method : fType.getMethods()) { diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameVirtualMethodProcessor.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameVirtualMethodProcessor.java index 546e226fee5..f9a13ebb8cd 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameVirtualMethodProcessor.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameVirtualMethodProcessor.java @@ -128,8 +128,9 @@ public RefactoringStatus checkInitialConditions(IProgressMonitor monitor) throws IMethod topmost= getMethod(); if (MethodChecks.isVirtual(topmost)) topmost= MethodChecks.getTopmostMethod(getMethod(), hierarchy, monitor); - if (topmost != null) - initialize(topmost); + if (topmost != null) { + initializeWithTopMostImplementation(topmost); + } fActivationChecked= true; } } finally{ @@ -138,6 +139,10 @@ public RefactoringStatus checkInitialConditions(IProgressMonitor monitor) throws return result; } + protected void initializeWithTopMostImplementation(IMethod topmost) { + initialize(topmost); + } + @Override protected RefactoringStatus doCheckFinalConditions(IProgressMonitor pm, CheckConditionsContext checkContext) throws CoreException { try{ diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchAnalyzer.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchAnalyzer.java index 8688b9ca1b4..cc7449cad5c 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchAnalyzer.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchAnalyzer.java @@ -41,9 +41,15 @@ public class SurroundWithTryCatchAnalyzer extends SurroundWithAnalyzer { private ITypeBinding[] fExceptions; + private boolean excludeRethrown; public SurroundWithTryCatchAnalyzer(ICompilationUnit unit, Selection selection) throws CoreException { + this(unit, selection, false); + } + + public SurroundWithTryCatchAnalyzer(ICompilationUnit unit, Selection selection, boolean excludeRethrown) throws CoreException { super(unit, selection, true); + this.excludeRethrown = excludeRethrown; } public ITypeBinding[] getExceptions() { @@ -58,7 +64,7 @@ public void endVisit(CompilationUnit node) { super.endVisit(node); if (enclosingNode != null && !getStatus().hasFatalError()) { - fExceptions= ExceptionAnalyzer.perform(enclosingNode, getSelection(), false); + fExceptions= ExceptionAnalyzer.perform(enclosingNode, getSelection(), excludeRethrown); if (fExceptions == null || fExceptions.length == 0) { if (enclosingNode instanceof MethodReference) { invalidSelection(RefactoringCoreMessages.SurroundWithTryCatchAnalyzer_doesNotContain); diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java index e3cd9e9861a..421bc60188e 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java @@ -107,6 +107,7 @@ public class SurroundWithTryCatchRefactoring extends Refactoring { private Selection fSelection; private SurroundWithTryCatchAnalyzer fAnalyzer; private boolean fLeaveDirty; + private boolean fExcludeRethrown; private ICompilationUnit fCUnit; private CompilationUnit fRootNode; @@ -120,12 +121,18 @@ public class SurroundWithTryCatchRefactoring extends Refactoring { private final boolean fIsMultiCatch; private SurroundWithTryCatchRefactoring(ICompilationUnit cu, Selection selection, boolean isMultiCatch) { + this(cu, selection, isMultiCatch, false); + } + + private SurroundWithTryCatchRefactoring(ICompilationUnit cu, Selection selection, boolean isMultiCatch, boolean excludeRethrown) { fCUnit= cu; fSelection= selection; fIsMultiCatch= isMultiCatch; fLeaveDirty= false; + fExcludeRethrown= excludeRethrown; } + public static SurroundWithTryCatchRefactoring create(ICompilationUnit cu, int offset, int length) { return create(cu, offset, length, false); } @@ -161,7 +168,7 @@ public RefactoringStatus checkActivationBasics(CompilationUnit rootNode) throws RefactoringStatus result= new RefactoringStatus(); fRootNode= rootNode; - fAnalyzer= new SurroundWithTryCatchAnalyzer(fCUnit, fSelection); + fAnalyzer= new SurroundWithTryCatchAnalyzer(fCUnit, fSelection, fExcludeRethrown); fRootNode.accept(fAnalyzer); result.merge(fAnalyzer.getStatus()); ITypeBinding[] exceptions= fAnalyzer.getExceptions(); @@ -251,7 +258,6 @@ private void createTryCatchStatement(org.eclipse.jdt.core.IBuffer buffer, String TryStatement tryStatement= getAST().newTryStatement(); ITypeBinding[] exceptions= fAnalyzer.getExceptions(); ImportRewriteContext context= new ContextSensitiveImportRewriteContext(fAnalyzer.getEnclosingBodyDeclaration(), fImportRewrite); - if (!fIsMultiCatch) { for (int i= 0; i < exceptions.length; i++) { ITypeBinding exception= exceptions[i]; From cb94acb62464cf413d01378e870adbb39f0d9bf8 Mon Sep 17 00:00:00 2001 From: Simeon Andreev Date: Tue, 28 Nov 2023 14:53:04 +0100 Subject: [PATCH 26/43] Dont show children for JUnit 5 @TestTemplate tests that ran only once When running JUnit 5 @TestTemplate tests, extra test suites are shown in the JUnit view to represent the tests in the template. Those suites introduce unnecessary noise when the template contains only one test - e.g. when repeating tests that failed. This change adjusts TestSuiteElement.getChildren(), pruning each TestSuiteElement that has a single TestCaseElement child that is also a dynamic test. Fixes: #945 Signed-off-by: Simeon Andreev --- .../jdt/internal/junit/model/TestSuiteElement.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java b/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java index ec8e7907a57..ee0bb52255d 100644 --- a/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java +++ b/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java @@ -15,6 +15,7 @@ package org.eclipse.jdt.internal.junit.model; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.eclipse.jdt.junit.model.ITestElement; @@ -47,7 +48,8 @@ public String getSuiteTypeName() { @Override public ITestElement[] getChildren() { - return fChildren.toArray(new ITestElement[fChildren.size()]); + TestElement[] elements= fChildren.toArray(new TestElement[fChildren.size()]); // copy list to avoid concurrency problems + return Arrays.stream(elements).filter(e -> !isSingleDynamicTest(e)).toArray(ITestElement[]::new); } public void addChild(TestElement child) { @@ -154,4 +156,14 @@ public String toString() { return "TestSuite: " + getTestName() + " : " + super.toString() + " (" + fChildren.size() + ")"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } + private static boolean isSingleDynamicTest(TestElement element) { + if (element instanceof TestCaseElement) { + TestCaseElement testCase = (TestCaseElement) element; + TestSuiteElement suite = testCase.getParent(); + if (testCase.isDynamicTest() && suite.fChildren.size() == 1) { + return true; + } + } + return false; + } } From 2d271c98472ded82deb0bc31e3e20fff17b6f564 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Mon, 4 Dec 2023 12:12:43 +0100 Subject: [PATCH 27/43] Restoring the group-id from the old pom files Using https://github.com/eclipse-tycho/tycho/wiki/Tycho-Pomless#overwrite-group-and-artifact-ids we restore the group id to org.eclipse.jdt.feature for features and org.eclipse.jdt for plug-ins --- org.eclipse.jdt.astview.feature/build.properties | 1 + org.eclipse.jdt.astview/build.properties | 1 + org.eclipse.jdt.bcoview.feature/build.properties | 1 + org.eclipse.jdt.core.manipulation/build.properties | 1 + org.eclipse.jdt.jeview.feature/build.properties | 1 + org.eclipse.jdt.jeview/build.properties | 1 + org.eclipse.jdt.junit.core/build.properties | 1 + org.eclipse.jdt.junit/build.properties | 1 + 8 files changed, 8 insertions(+) diff --git a/org.eclipse.jdt.astview.feature/build.properties b/org.eclipse.jdt.astview.feature/build.properties index f84cda01ad2..3524a1fc7ea 100644 --- a/org.eclipse.jdt.astview.feature/build.properties +++ b/org.eclipse.jdt.astview.feature/build.properties @@ -16,3 +16,4 @@ bin.includes = feature.xml,\ src.includes = feature.xml,\ feature.properties jre.compilation.profile = J2SE-1.4 +pom.model.groupId = org.eclipse.jdt.feature diff --git a/org.eclipse.jdt.astview/build.properties b/org.eclipse.jdt.astview/build.properties index d961380b896..36eeaf017cf 100644 --- a/org.eclipse.jdt.astview/build.properties +++ b/org.eclipse.jdt.astview/build.properties @@ -22,3 +22,4 @@ source.. = src/ output.. = bin/ jre.compilation.profile = JavaSE-1.8 javacDefaultEncoding.. = UTF-8 +pom.model.groupId = org.eclipse.jdt diff --git a/org.eclipse.jdt.bcoview.feature/build.properties b/org.eclipse.jdt.bcoview.feature/build.properties index 48ebe340077..e35d0c7d46b 100644 --- a/org.eclipse.jdt.bcoview.feature/build.properties +++ b/org.eclipse.jdt.bcoview.feature/build.properties @@ -15,3 +15,4 @@ bin.includes = feature.xml,\ feature.properties src.includes = feature.xml,\ feature.properties +pom.model.groupId = org.eclipse.jdt.feature diff --git a/org.eclipse.jdt.core.manipulation/build.properties b/org.eclipse.jdt.core.manipulation/build.properties index 31967420c77..11a4f5c871f 100644 --- a/org.eclipse.jdt.core.manipulation/build.properties +++ b/org.eclipse.jdt.core.manipulation/build.properties @@ -25,3 +25,4 @@ source.. = common/,\ core extension/,\ proposals output.. = bin/ +pom.model.groupId = org.eclipse.jdt diff --git a/org.eclipse.jdt.jeview.feature/build.properties b/org.eclipse.jdt.jeview.feature/build.properties index d0f0fd9a5c3..570152d57f6 100644 --- a/org.eclipse.jdt.jeview.feature/build.properties +++ b/org.eclipse.jdt.jeview.feature/build.properties @@ -15,3 +15,4 @@ bin.includes = feature.xml,\ feature.properties src.includes = feature.xml,\ feature.properties +pom.model.groupId = org.eclipse.jdt.feature diff --git a/org.eclipse.jdt.jeview/build.properties b/org.eclipse.jdt.jeview/build.properties index 248ec5060d8..21cfb2a7e3c 100644 --- a/org.eclipse.jdt.jeview/build.properties +++ b/org.eclipse.jdt.jeview/build.properties @@ -21,3 +21,4 @@ bin.includes = plugin.xml,\ about.html src.includes = icons/ javacDefaultEncoding.. = UTF-8 +pom.model.groupId = org.eclipse.jdt diff --git a/org.eclipse.jdt.junit.core/build.properties b/org.eclipse.jdt.junit.core/build.properties index 0aa42e54103..f1cf3534e65 100644 --- a/org.eclipse.jdt.junit.core/build.properties +++ b/org.eclipse.jdt.junit.core/build.properties @@ -22,3 +22,4 @@ output.. = bin/ src.includes = about.html,\ schema/ +pom.model.groupId = org.eclipse.jdt diff --git a/org.eclipse.jdt.junit/build.properties b/org.eclipse.jdt.junit/build.properties index 1394a3309ce..493720b80b1 100644 --- a/org.eclipse.jdt.junit/build.properties +++ b/org.eclipse.jdt.junit/build.properties @@ -26,3 +26,4 @@ src.includes = about.html,\ schema/ javacWarnings..=-unavoidableGenericProblems +pom.model.groupId = org.eclipse.jdt From 23f5ad1aebb541613015ed5de04e049466c8936e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Mon, 4 Dec 2023 13:32:58 +0100 Subject: [PATCH 28/43] [test] RemoteTestRunner: use monotonic time https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1681 --- .../internal/junit/runner/RemoteTestRunner.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java index d6890c41f8c..e3187d4df80 100644 --- a/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java +++ b/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java @@ -496,11 +496,11 @@ protected Class[] loadClasses(String[] testClassNames) { } protected void notifyListenersOfTestEnd(TestExecution execution, - long testStartTime) { - if (execution == null || execution.shouldStop()) - notifyTestRunStopped(System.currentTimeMillis() - testStartTime); - else - notifyTestRunEnded(System.currentTimeMillis() - testStartTime); + long elapsedTime) { + if (execution == null || execution.shouldStop()) { + notifyTestRunStopped(elapsedTime); + } else + notifyTestRunEnded(elapsedTime); } /** @@ -525,9 +525,10 @@ public void runTests(String[] testClassNames, String testName, TestExecution exe sendTrees(suites); - long testStartTime= System.currentTimeMillis(); + long testStartTime= System.nanoTime(); execution.run(suites); - notifyListenersOfTestEnd(execution, testStartTime); + long elapsedTime= (System.nanoTime() - testStartTime) / 1_000_000L; + notifyListenersOfTestEnd(execution, elapsedTime); } private void sendTrees(ITestReference[] suites) { From c3451d7be64e923e461626d3e63b7d4e55b16dec Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Mon, 4 Dec 2023 18:09:26 +0100 Subject: [PATCH 29/43] Small cleanup of selection code in JUnit view The selection listener code assumes the good selection should always have exact one element and only from given type. Let make this code more verbose to reflect the original intent. See https://github.com/eclipse-platform/eclipse.platform.ui/issues/1360 --- .../src/org/eclipse/jdt/internal/junit/ui/TestViewer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestViewer.java b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestViewer.java index 5f9e8e7af1b..e88c52119f8 100644 --- a/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestViewer.java +++ b/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestViewer.java @@ -465,11 +465,11 @@ private OpenTestAction getOpenTestAction(TestSuiteElement testSuite) { private void handleSelected() { IStructuredSelection selection= (IStructuredSelection) fSelectionProvider.getSelection(); - TestElement testElement= null; - if (selection.size() == 1) { - testElement= (TestElement) selection.getFirstElement(); + if (selection.size() == 1 && selection.getFirstElement() instanceof TestElement testElement) { + fTestRunnerPart.handleTestSelected(testElement); + } else { + fTestRunnerPart.handleTestSelected(null); } - fTestRunnerPart.handleTestSelected(testElement); } public synchronized void setShowTime(boolean showTime) { From d0421bf6a90733dda4abae058478badaf851d804 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Mon, 4 Dec 2023 14:18:39 -0500 Subject: [PATCH 30/43] Fix incorrect return value in StaticImportFavoritesCompletionInvoker. - Helper method createNewCompilationUnit should always return an array. Signed-off-by: Roland Grunberg --- ...taticImportFavoritesCompletionInvoker.java | 5 +- .../ui/tests/core/ImportOrganizeTest16.java | 48 +++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java index d4a8a770b51..440ad2c398b 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/StaticImportFavoritesCompletionInvoker.java @@ -51,6 +51,9 @@ public void destroy () throws JavaModelException { } String[] res = createNewCompilationUnit(elementName); + if (res.length != 2) { + return new String[0]; + } String dummyCuContent = res[0]; int offset= Integer.parseInt(res[1]); fNewCU.getBuffer().setContents(dummyCuContent); @@ -85,7 +88,7 @@ private String[] createNewCompilationUnit (final String elementName) { String packName= fCu.getParent().getElementName(); IType type= fCu.findPrimaryType(); if (type == null) - return null; + return new String[0]; if (packName.length() > 0) { dummyCU.append("package ").append(packName).append(';'); //$NON-NLS-1$ diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest16.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest16.java index 2f14e35a608..0b25f04c079 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest16.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest16.java @@ -23,15 +23,21 @@ import org.eclipse.jdt.testplugin.JavaProjectHelper; import org.eclipse.jdt.testplugin.TestOptions; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; + +import org.eclipse.core.resources.ProjectScope; + import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; +import org.eclipse.jdt.core.manipulation.JavaManipulation; import org.eclipse.jdt.core.manipulation.OrganizeImportsOperation; import org.eclipse.jdt.core.manipulation.OrganizeImportsOperation.IChooseImportQuery; +import org.eclipse.jdt.ui.PreferenceConstants; import org.eclipse.jdt.ui.tests.core.rules.Java16ProjectTestSetup; public class ImportOrganizeTest16 extends ImportOrganizeTest { @@ -101,4 +107,46 @@ public void testNestedRecordIssue890() throws Exception { // https://github.com/ assertImports(cu, new String[] { }); } + + @Test + public void testOrganizeImportsModuleInfo() throws Exception { + IEclipsePreferences node= new ProjectScope(fJProject1.getProject()).getNode(JavaManipulation.getPreferenceNodeId()); + node.put(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS, "org.junit.Assert.*"); + IPackageFragmentRoot sourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src"); + + StringBuilder buf= new StringBuilder(); + buf.append("import foo.bar.MyDriverAction;\n"); + buf.append("import java.sql.DriverAction;\n"); + buf.append("import java.sql.SQLException;\n"); + buf.append("\n"); + buf.append("module mymodule.nine {\n"); + buf.append(" requires java.sql;\n"); + buf.append(" exports foo.bar;\n"); + buf.append(" provides DriverAction with MyDriverAction;\n"); + buf.append("}\n"); + + IPackageFragment pack1= sourceFolder.createPackageFragment("pack1", false, null); + ICompilationUnit cu= pack1.createCompilationUnit("module-info.java", buf.toString(), false, null); + + buf= new StringBuilder(); + buf.append("import foo.bar.MyDriverAction;\n"); + buf.append("\n"); + buf.append("import java.sql.DriverAction;\n"); + buf.append("\n"); + buf.append("module mymodule.nine {\n"); + buf.append(" requires java.sql;\n"); + buf.append(" exports foo.bar;\n"); + buf.append(" provides DriverAction with MyDriverAction;\n"); + buf.append("}\n"); + + String[] order= new String[0]; + IChooseImportQuery query= createQuery("E", new String[] {}, new int[] {}); + + OrganizeImportsOperation op= createOperation(cu, order, 99, false, true, true, query); + op.run(null); + assertImports(cu, new String[] { + "foo.bar.MyDriverAction", + "java.sql.DriverAction" + }); + } } From 62763949a8096424590f0c9c86834300bef90c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 5 Dec 2023 08:55:34 +0100 Subject: [PATCH 31/43] Remove unnecessary semicolon to reduce warnings --- .../correction/proposals/RefactoringCorrectionProposalCore.java | 2 +- .../internal/corext/refactoring/rename/RenameTypeProcessor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java b/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java index 788282edc02..4252a18f435 100644 --- a/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java +++ b/org.eclipse.jdt.core.manipulation/proposals/org/eclipse/jdt/internal/ui/text/correction/proposals/RefactoringCorrectionProposalCore.java @@ -64,7 +64,7 @@ public TextChange createTextChange() throws CoreException { dummyChange.setEdit(new InsertEdit(0, "")); //$NON-NLS-1$ return dummyChange; } - Change o = fRefactoring.createChange(new NullProgressMonitor());; + Change o = fRefactoring.createChange(new NullProgressMonitor()); if(o instanceof TextChange) return (TextChange) o; if( o instanceof CompositeChange) { diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java index 3c915cec96a..87af85ad42f 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java @@ -1098,7 +1098,7 @@ public Change createChange(IProgressMonitor monitor) throws CoreException { protected void createChangeForRenamedCU(IType type, TextChangeManager changeManager, DynamicValidationRefactoringChange result) throws CoreException { IResource resource= type.getCompilationUnit().getResource(); if (resource != null && resource.isLinked()) { - createChangeForRenamedCUNullOrLinkedResource(type, changeManager, resource, result);; + createChangeForRenamedCUNullOrLinkedResource(type, changeManager, resource, result); } else { createChangeForRenamedCUStandardResource(type, changeManager, resource, result); } From 3ecf44a98c1369612166c899fb09e023687979f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 5 Dec 2023 13:02:50 +0100 Subject: [PATCH 32/43] fix some 'Potential resource leak' warnings --- .../AbstractDocumentLineDifferTest.java | 20 ++++++------ .../AbstractDocumentPerformanceTest.java | 15 ++------- .../jdt/text/tests/performance/FileTool.java | 32 +------------------ .../LineTrackerPerformanceTest.java | 19 +++-------- .../tests/performance/ResourceTestHelper.java | 6 ++-- .../performance/ScrollVerticalRulerTest.java | 12 +++---- .../performance/TextStorePerformanceTest.java | 16 ++-------- .../refactoring/GenericRefactoringTest.java | 3 +- 8 files changed, 33 insertions(+), 90 deletions(-) diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentLineDifferTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentLineDifferTest.java index 58bd8fa0649..22abaee6b4c 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentLineDifferTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentLineDifferTest.java @@ -14,7 +14,8 @@ package org.eclipse.jdt.text.tests.performance; import java.io.IOException; -import java.io.InputStreamReader; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; @@ -73,14 +74,7 @@ public void setId(String id) { protected static final String SMALL_FAUST_MANY_CHANGES_SAME_SIZE; static { - String faust; - try { - faust= FileTool.read(new InputStreamReader(AbstractDocumentLineDifferTest.class.getResourceAsStream("faust1.txt"))).toString(); - } catch (IOException x) { - faust= ""; - x.printStackTrace(); - } - FAUST1= faust; + FAUST1= AbstractDocumentLineDifferTest.getFaust(); FAUST_FEW_CHANGES= FAUST1.replaceAll("MARGARETE", "GRETCHEN"); @@ -122,4 +116,12 @@ protected final void setUpDiffer(DocumentLineDiffer differ) { differ.setReferenceProvider(fReferenceProvider); } + static String getFaust() { + try (InputStream resourceAsStream= AbstractDocumentLineDifferTest.class.getResourceAsStream("faust1.txt")) { + return new String(resourceAsStream.readAllBytes(), StandardCharsets.UTF_8); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + } diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentPerformanceTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentPerformanceTest.java index 3fc47713234..48df2efac6e 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentPerformanceTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/AbstractDocumentPerformanceTest.java @@ -13,8 +13,6 @@ *******************************************************************************/ package org.eclipse.jdt.text.tests.performance; -import java.io.IOException; -import java.io.InputStreamReader; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -52,16 +50,9 @@ public Doc(ITextStore store, ILineTracker tracker) { static { - String faust; - try { - faust = FileTool.read(new InputStreamReader(AbstractDocumentPerformanceTest.class.getResourceAsStream("faust1.txt"))).toString(); - } catch (IOException x) { - faust = ""; - x.printStackTrace(); - } - FAUST1 = faust; - FAUST100 = faust.substring(0, 100).intern(); - FAUST500 = faust.substring(0, 500).intern(); + FAUST1 = AbstractDocumentLineDifferTest.getFaust(); + FAUST100 = FAUST1.substring(0, 100).intern(); + FAUST500 = FAUST1.substring(0, 500).intern(); // Set local fingerprints LOCAL_FINGERPRINTS.put("measureDeleteInsert", "Document: delete and insert"); diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/FileTool.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/FileTool.java index 746234da9b7..e34da42aaaa 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/FileTool.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/FileTool.java @@ -17,12 +17,10 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; -import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.io.Reader; import java.io.Writer; import java.net.URL; import java.util.Enumeration; @@ -152,37 +150,9 @@ public static File getFileInPlugin(Plugin plugin, IPath path) { } } - public static StringBuffer read(String fileName) throws IOException { - return read(new FileReader(fileName)); - } - - public static StringBuffer read(Reader reader) throws IOException { - StringBuffer s= new StringBuffer(); - try { - char[] buffer= new char[8196]; - int chars= reader.read(buffer); - while (chars != -1) { - s.append(buffer, 0, chars); - chars= reader.read(buffer); - } - } finally { - try { - reader.close(); - } catch (IOException e) { - } - } - return s; - } - public static void write(String fileName, StringBuffer content) throws IOException { - Writer writer= new FileWriter(fileName); - try { + try (Writer writer= new FileWriter(fileName)) { writer.write(content.toString()); - } finally { - try { - writer.close(); - } catch (IOException e) { - } } } } diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/LineTrackerPerformanceTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/LineTrackerPerformanceTest.java index a206ef65765..261b5232022 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/LineTrackerPerformanceTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/LineTrackerPerformanceTest.java @@ -13,20 +13,17 @@ *******************************************************************************/ package org.eclipse.jdt.text.tests.performance; -import java.io.IOException; -import java.io.InputStreamReader; import java.util.Arrays; import java.util.Random; -import junit.framework.Test; -import junit.framework.TestSuite; - import org.eclipse.test.performance.PerformanceMeter; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.DefaultLineTracker; import org.eclipse.jface.text.ILineTracker; +import junit.framework.Test; +import junit.framework.TestSuite; /** * @@ -38,15 +35,9 @@ public class LineTrackerPerformanceTest extends TextPerformanceTestCase { protected static final String FAUST500; static { - String faust; - try { - faust= FileTool.read(new InputStreamReader(AbstractDocumentLineDifferTest.class.getResourceAsStream("faust1.txt"))).toString(); - } catch (IOException x) { - faust= ""; - x.printStackTrace(); - } - FAUST1= faust; - FAUST500= faust.substring(0, 500); + FAUST1 = AbstractDocumentLineDifferTest.getFaust(); + + FAUST500= FAUST1.substring(0, 500); } diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ResourceTestHelper.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ResourceTestHelper.java index c8e74b55fba..3615fa1ae9c 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ResourceTestHelper.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ResourceTestHelper.java @@ -16,9 +16,9 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipException; @@ -132,7 +132,9 @@ public static IFile[] findFiles(String prefix, String suffix, int i, int n) { } public static StringBuffer read(String src) throws IOException, CoreException { - return FileTool.read(new InputStreamReader(getFile(src).getContents())); + try (InputStream contents= getFile(src).getContents()){ + return new StringBuffer(new String(contents.readAllBytes(), StandardCharsets.UTF_8)); + } } public static void write(String dest, final String content) throws CoreException { diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRulerTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRulerTest.java index 60340fa9ecb..77fce5a3fff 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRulerTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/ScrollVerticalRulerTest.java @@ -13,8 +13,8 @@ *******************************************************************************/ package org.eclipse.jdt.text.tests.performance; -import java.io.InputStream; -import java.io.InputStreamReader; +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; import java.util.Iterator; import org.eclipse.core.runtime.preferences.IEclipsePreferences; @@ -120,7 +120,7 @@ protected void tearDown() throws Exception { protected AbstractTextEditor openEditor(ScrollingMode mode) throws Exception { IFile file= ResourceTestHelper.getProject(PerformanceTestSetup.PROJECT).getFile("faust.txt"); if (!file.exists()) { - file.create(getFaustInputStream(), true, null); + file.create(new ByteArrayInputStream(AbstractDocumentLineDifferTest.getFaust().getBytes(StandardCharsets.UTF_8)), true, null); } AbstractTextEditor result= (AbstractTextEditor) EditorTestHelper.openInEditor(file, true); @@ -134,17 +134,13 @@ protected AbstractTextEditor openEditor(ScrollingMode mode) throws Exception { } private String getFaust(int numberOfLines) throws Exception { - String faust= FileTool.read(new InputStreamReader(getFaustInputStream())).toString(); + String faust= AbstractDocumentLineDifferTest.getFaust(); IDocument document= new Document(faust); int lineOffset= document.getLineOffset(numberOfLines); return document.get(0, lineOffset); } - private InputStream getFaustInputStream() { - return AbstractDocumentPerformanceTest.class.getResourceAsStream("faust1.txt"); - } - /* * @see org.eclipse.jdt.text.tests.performance.ScrollEditorTest#assertEditor(org.eclipse.ui.texteditor.AbstractTextEditor) */ diff --git a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TextStorePerformanceTest.java b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TextStorePerformanceTest.java index 53c2398f9b0..8fd197d9846 100644 --- a/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TextStorePerformanceTest.java +++ b/org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/TextStorePerformanceTest.java @@ -13,8 +13,6 @@ *******************************************************************************/ package org.eclipse.jdt.text.tests.performance; -import java.io.IOException; -import java.io.InputStreamReader; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -41,17 +39,9 @@ public abstract class TextStorePerformanceTest extends TextPerformanceTestCase2 protected static final Map LOCAL_FINGERPRINTS= new HashMap<>(); static { - String faust; - try { - faust = FileTool.read(new InputStreamReader(TextStorePerformanceTest.class.getResourceAsStream("faust1.txt"))).toString(); - } catch (IOException x) { - faust = ""; - x.printStackTrace(); - } - - FAUST1 = faust; - FAUST100 = faust.substring(0, 100).intern(); - FAUST500 = faust.substring(0, 500).intern(); + FAUST1 = AbstractDocumentLineDifferTest.getFaust(); + FAUST100 = FAUST1.substring(0, 100).intern(); + FAUST500 = FAUST1.substring(0, 500).intern(); } abstract protected ITextStore createTextStore(); diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/GenericRefactoringTest.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/GenericRefactoringTest.java index afde628fecd..e3fa992570f 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/GenericRefactoringTest.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/GenericRefactoringTest.java @@ -476,7 +476,8 @@ protected void printTestDisabledMessage(String explanation){ } //----------------------- - public static InputStream getStream(String content){ + /* return ByteArrayInputStream because that does not need to be closed */ + public static ByteArrayInputStream getStream(String content){ return new ByteArrayInputStream(content.getBytes(ENCODING)); } From b25fd15a91e1cf7a64868982eb333ba3fa6acc54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 5 Dec 2023 15:35:52 +0100 Subject: [PATCH 33/43] fix "The static method should be accessed directly" warnings via quickfix --- .../ui/tests/refactoring/ccp/CopyTest.java | 4 +-- .../ccp/CopyToClipboardActionTest.java | 18 +++++------ .../LocalCorrectionsSubProcessor.java | 4 +-- .../ui/text/correction/QuickFixProcessor.java | 2 +- .../UnresolvedElementsSubProcessor.java | 30 +++++++++---------- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyTest.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyTest.java index de8471197cb..314c4a2a70b 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyTest.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyTest.java @@ -71,7 +71,7 @@ import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaCopyProcessor; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgDestinationFactory; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory; -import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils; +import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtilsCore; import org.eclipse.jdt.internal.corext.util.JavaElementResourceMapping; import org.eclipse.jdt.ui.tests.refactoring.GenericRefactoringTest; @@ -2482,7 +2482,7 @@ public void testCopy_Package_to_JavaProject_That_Is_Root() throws Exception { IPackageFragment newPackage= null; for (IPackageFragmentRoot root : otherProject.getAllPackageFragmentRoots()) { - if (ReorgUtils.isSourceFolder(root)) { + if (ReorgUtilsCore.isSourceFolder(root)) { newPackage= root.getPackageFragment(getPackageP().getElementName()); assertTrue("new package does not exist after copying", newPackage.exists()); } diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyToClipboardActionTest.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyToClipboardActionTest.java index 0c86458844b..8ca40425ab9 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyToClipboardActionTest.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ccp/CopyToClipboardActionTest.java @@ -47,7 +47,7 @@ import org.eclipse.jdt.internal.core.manipulation.util.Strings; import org.eclipse.jdt.internal.corext.refactoring.TypedSource; import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaElementTransfer; -import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils; +import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtilsCore; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.tests.refactoring.GenericRefactoringTest; @@ -159,7 +159,7 @@ private void checkEnabled(Object[] elements) throws Exception { private void checkClipboard(Object[] elementsCopied) throws Exception { IResource[] resourcesCopied= getResources(elementsCopied); IJavaElement[] javaElementsCopied= getJavaElements(elementsCopied); - IType[] mainTypesCopied= ReorgUtils.getMainTypes(javaElementsCopied); + IType[] mainTypesCopied= ReorgUtilsCore.getMainTypes(javaElementsCopied); IResource[] resourcesExpected= computeResourcesExpectedInClipboard(resourcesCopied, mainTypesCopied, javaElementsCopied); IJavaElement[] javaElementsExpected= computeJavaElementsExpectedInClipboard(javaElementsCopied, mainTypesCopied); @@ -188,12 +188,12 @@ private void checkTypedSources(IJavaElement[] javaElementsCopied, TypedSource[] } private IResource[] computeResourcesExpectedInClipboard(IResource[] resourcesCopied, IType[] mainTypesCopied, IJavaElement[] javaElementsCopied) { - IResource[] cuResources= ReorgUtils.getResources(getCompilationUnits(javaElementsCopied)); - return ReorgUtils.union(cuResources, ReorgUtils.union(resourcesCopied, ReorgUtils.getResources(ReorgUtils.getCompilationUnits(mainTypesCopied)))); + IResource[] cuResources= ReorgUtilsCore.getResources(getCompilationUnits(javaElementsCopied)); + return ReorgUtilsCore.union(cuResources, ReorgUtilsCore.union(resourcesCopied, ReorgUtilsCore.getResources(ReorgUtilsCore.getCompilationUnits(mainTypesCopied)))); } private static IJavaElement[] computeJavaElementsExpectedInClipboard(IJavaElement[] javaElementsExpected, IType[] mainTypesCopied) { - return ReorgUtils.union(javaElementsExpected, ReorgUtils.getCompilationUnits(mainTypesCopied)); + return ReorgUtilsCore.union(javaElementsExpected, ReorgUtilsCore.getCompilationUnits(mainTypesCopied)); } private String getName(IResource resource){ @@ -243,7 +243,7 @@ private void checkNames(IResource[] resourcesCopied, IJavaElement[] javaElements assertTrue("name not in set:" + name, stringLines.contains(name)); } for (IJavaElement element : javaElementsCopied) { - if (! ReorgUtils.isInsideCompilationUnit(element)){ + if (! ReorgUtilsCore.isInsideCompilationUnit(element)){ String name= getName(element); assertTrue("name not in set:" + name, stringLines.contains(name)); } @@ -279,16 +279,16 @@ private static int countResources(IJavaElement[] javaElementsCopied) { } private static IJavaElement[] getCompilationUnits(IJavaElement[] javaElements) { - List cus= ReorgUtils.getElementsOfType(javaElements, IJavaElement.COMPILATION_UNIT); + List cus= ReorgUtilsCore.getElementsOfType(javaElements, IJavaElement.COMPILATION_UNIT); return cus.toArray(new ICompilationUnit[cus.size()]); } private static IResource[] getResources(Object[] elements) { - return ReorgUtils.getResources(Arrays.asList(elements)); + return ReorgUtilsCore.getResources(Arrays.asList(elements)); } private static IJavaElement[] getJavaElements(Object[] elements) { - return ReorgUtils.getJavaElements(Arrays.asList(elements)); + return ReorgUtilsCore.getJavaElements(Arrays.asList(elements)); } private IJavaElement[] getClipboardJavaElements() { diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java index 8bf354c8459..30c971b032d 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java @@ -2711,8 +2711,8 @@ public static void addServiceProviderConstructorProposals(IInvocationContext con JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE))); } else { // no-arg constructor does not exist, need to create it - String[] args= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving - .getMethodSignature(org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(targetBinding), new ITypeBinding[0], false) }; + String[] args= new String[] { ASTResolving + .getMethodSignature(ASTResolving.getTypeSignature(targetBinding), new ITypeBinding[0], false) }; String label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createconstructor_description, args); Image image= JavaElementImageProvider.getDecoratedImage(JavaPluginImages.DESC_MISC_PUBLIC, JavaElementImageDescriptor.CONSTRUCTOR, JavaElementImageProvider.SMALL_SIZE); proposals.add(new NewMethodCorrectionProposal(label, targetCU, targetRoot, new ArrayList<>(), targetBinding, IProposalRelevance.CREATE_CONSTRUCTOR, image)); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java index 7323ce2d1d2..df19e04ca7a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java @@ -342,7 +342,7 @@ public boolean hasCorrections(ICompilationUnit cu, int problemId) { case IProblem.IllegalFallthroughToPattern: return true; default: - return SuppressWarningsSubProcessor.hasSuppressWarningsProposal(cu.getJavaProject(), problemId) + return SuppressWarningsSubProcessorCore.hasSuppressWarningsProposal(cu.getJavaProject(), problemId) || ConfigureProblemSeveritySubProcessor.hasConfigureProblemSeverityProposal(problemId); } } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java index 85f1b6833f4..0affded2971 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java @@ -411,7 +411,7 @@ private static void addNewFieldForType(ICompilationUnit targetCU, ITypeBinding b String label; Image image; if (senderDeclBinding.isEnum() && !isWriteAccess) { - label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createenum_description, new Object[] { nameLabel, org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(senderDeclBinding) }); + label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createenum_description, new Object[] { nameLabel, ASTResolving.getTypeSignature(senderDeclBinding) }); image= JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC); proposals.add(new NewVariableCorrectionProposal(label, targetCU, NewVariableCorrectionProposalCore.ENUM_CONST, simpleName, senderDeclBinding, 10, image)); } else { @@ -420,7 +420,7 @@ private static void addNewFieldForType(ICompilationUnit targetCU, ITypeBinding b label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createfield_description, nameLabel); image= JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PRIVATE); } else { - label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createfield_other_description, new Object[] { nameLabel, org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(senderDeclBinding) } ); + label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createfield_other_description, new Object[] { nameLabel, ASTResolving.getTypeSignature(senderDeclBinding) } ); image= JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC); } int fieldRelevance= StubUtility.hasFieldName(targetCU.getJavaProject(), name) ? IProposalRelevance.CREATE_FIELD_PREFIX_OR_SUFFIX_MATCH : IProposalRelevance.CREATE_FIELD; @@ -432,7 +432,7 @@ private static void addNewFieldForType(ICompilationUnit targetCU, ITypeBinding b label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createconst_description, nameLabel); image= JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PRIVATE); } else { - label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createconst_other_description, new Object[] { nameLabel, org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(senderDeclBinding) } ); + label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createconst_other_description, new Object[] { nameLabel, ASTResolving.getTypeSignature(senderDeclBinding) } ); image= JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC); } int constRelevance= StubUtility.hasConstantName(targetCU.getJavaProject(), name) ? IProposalRelevance.CREATE_CONSTANT_PREFIX_OR_SUFFIX_MATCH : IProposalRelevance.CREATE_CONSTANT; @@ -545,7 +545,7 @@ private static void addSimilarVariableProposals(ICompilationUnit cu, Compilation if (NameMatcher.isSimilarName(curr.getName(), identifier)) { AST ast= astRoot.getAST(); ASTRewrite rewrite= ASTRewrite.create(ast); - String label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_changetomethod_description, org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(curr)); + String label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_changetomethod_description, ASTResolving.getMethodSignature(curr)); Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, IProposalRelevance.CHANGE_TO_METHOD, image); newProposals.add(proposal); @@ -1437,7 +1437,7 @@ private static void addNewMethodProposals(ICompilationUnit cu, CompilationUnit a Image image; ITypeBinding[] parameterTypes= getParameterTypes(arguments); if (parameterTypes != null) { - String sig= org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodName, parameterTypes, false); + String sig= ASTResolving.getMethodSignature(methodName, parameterTypes, false); boolean is18OrHigher= JavaModelUtil.is1d8OrHigher(targetCU.getJavaProject()); boolean isSenderTypeAbstractClass = (senderDeclBinding.getModifiers() & Modifier.ABSTRACT) > 0; boolean isSenderBindingInterface= senderDeclBinding.isInterface(); @@ -1470,7 +1470,7 @@ private static void addNewMethodProposals(ICompilationUnit cu, CompilationUnit a isSenderTypeAbstractClass = (senderDeclBinding.getModifiers() & Modifier.ABSTRACT) > 0; if (!senderDeclBinding.isAnonymous()) { if (is18OrHigher || !isSenderBindingInterface) { - String[] args= new String[] { sig, org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(senderDeclBinding) }; + String[] args= new String[] { sig, ASTResolving.getTypeSignature(senderDeclBinding) }; label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createmethod_other_description, args); labelAbstract= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createmethod_abstract_other_description, args); if (isSenderBindingInterface) { @@ -1631,7 +1631,7 @@ private static void doMoreParameters(IInvocationContext context, ASTNode invocat // add arguments { - String[] arg= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodBinding) }; + String[] arg= new String[] { ASTResolving.getMethodSignature(methodBinding) }; String label; if (diff == 1) { label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_addargument_description, arg); @@ -1660,7 +1660,7 @@ private static void doMoreParameters(IInvocationContext context, ASTNode invocat changeDesc[idx]= new RemoveDescription(); changedTypes[i]= declParameterTypes[idx]; } - String[] arg= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodDecl), getTypeNames(changedTypes) }; + String[] arg= new String[] { ASTResolving.getMethodSignature(methodDecl), getTypeNames(changedTypes) }; String label; if (methodDecl.isConstructor()) { if (diff == 1) { @@ -1688,7 +1688,7 @@ private static String getTypeNames(ITypeBinding[] types) { if (i > 0) { buf.append(", "); //$NON-NLS-1$ } - buf.append(org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(types[i])); + buf.append(ASTResolving.getTypeSignature(types[i])); } return BasicElementLabels.getJavaElementName(buf.toString()); } @@ -1735,7 +1735,7 @@ private static void doMoreArguments(IInvocationContext context, ASTNode invocati for (int i= diff - 1; i >= 0; i--) { rewrite.remove(arguments.get(indexSkipped[i]), null); } - String[] arg= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodRef) }; + String[] arg= new String[] { ASTResolving.getMethodSignature(methodRef) }; String label; if (diff == 1) { label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_removeargument_description, arg); @@ -1780,7 +1780,7 @@ private static void doMoreArguments(IInvocationContext context, ASTNode invocati changeDesc[idx]= new InsertDescription(newType, name); changeTypes[i]= newType; } - String[] arg= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodDecl), getTypeNames(changeTypes) }; + String[] arg= new String[] { ASTResolving.getMethodSignature(methodDecl), getTypeNames(changeTypes) }; String label; if (methodDecl.isConstructor()) { if (diff == 1) { @@ -1911,7 +1911,7 @@ private static void doEqualNumberOfParameters(IInvocationContext context, ASTNod ITypeBinding[] declParamTypes= methodDecl.getParameterTypes(); ITypeBinding[] swappedTypes= new ITypeBinding[] { declParamTypes[idx1], declParamTypes[idx2] }; - String[] args= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodDecl), getTypeNames(swappedTypes) }; + String[] args= new String[] { ASTResolving.getMethodSignature(methodDecl), getTypeNames(swappedTypes) }; String label; if (methodDecl.isConstructor()) { label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_swapparams_constr_description, args); @@ -1948,7 +1948,7 @@ private static void doEqualNumberOfParameters(IInvocationContext context, ASTNod return; } boolean isVarArgs= methodDecl.isVarargs() && newParamTypes.length > 0 && newParamTypes[newParamTypes.length - 1].isArray(); - String[] args= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodDecl), org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature(methodDecl.getName(), newParamTypes, isVarArgs) }; + String[] args= new String[] { ASTResolving.getMethodSignature(methodDecl), ASTResolving.getMethodSignature(methodDecl.getName(), newParamTypes, isVarArgs) }; String label; if (methodDecl.isConstructor()) { label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_changeparamsignature_constr_description, args); @@ -2036,7 +2036,7 @@ private static void addQualifierToOuterProposal(IInvocationContext context, Meth ASTRewrite rewrite= ASTRewrite.create(invocationNode.getAST()); - String label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_changetoouter_description, org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(currType)); + String label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_changetoouter_description, ASTResolving.getTypeSignature(currType)); Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, IProposalRelevance.QUALIFY_WITH_ENCLOSING_TYPE, image); @@ -2126,7 +2126,7 @@ public static void getConstructorProposals(IInvocationContext context, IProblemL ICompilationUnit targetCU= ASTResolving.findCompilationUnitForBinding(cu, astRoot, targetDecl); if (targetCU != null) { - String[] args= new String[] { org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature( org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature(targetDecl), getParameterTypes(arguments), false) }; + String[] args= new String[] { ASTResolving.getMethodSignature( ASTResolving.getTypeSignature(targetDecl), getParameterTypes(arguments), false) }; String label= Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_createconstructor_description, args); Image image= JavaElementImageProvider.getDecoratedImage(JavaPluginImages.DESC_MISC_PUBLIC, JavaElementImageDescriptor.CONSTRUCTOR, JavaElementImageProvider.SMALL_SIZE); proposals.add(new NewMethodCorrectionProposal(label, targetCU, selectedNode, arguments, targetDecl, IProposalRelevance.CREATE_CONSTRUCTOR, image)); From 46a58c702b6fada568180dac20925edc6b4f5a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 5 Dec 2023 15:59:23 +0100 Subject: [PATCH 34/43] fix "Redundant superinterface" warnings --- .../eclipse/jdt/internal/corext/fix/InlineMethodFixCore.java | 3 +-- .../org/eclipse/jdt/internal/corext/fix/StringFixCore.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/InlineMethodFixCore.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/InlineMethodFixCore.java index 6fe005f25c7..b1982f461b6 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/InlineMethodFixCore.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/InlineMethodFixCore.java @@ -55,7 +55,6 @@ import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.MethodInvocation; import org.eclipse.jdt.core.dom.SimpleName; -import org.eclipse.jdt.core.manipulation.ICleanUpFixCore; import org.eclipse.jdt.core.refactoring.CompilationUnitChange; import org.eclipse.jdt.internal.corext.dom.ASTNodes; @@ -67,7 +66,7 @@ import org.eclipse.jdt.internal.ui.text.correction.QuickAssistProcessorUtil; -public class InlineMethodFixCore implements IProposableFix, ICleanUpFixCore { +public class InlineMethodFixCore implements IProposableFix { private final String fName; private final ICompilationUnit fCompilationUnit; diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java index 3f3d294e731..c79c37a84f1 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringFixCore.java @@ -50,7 +50,7 @@ * Add missing $NON-NLS$ tag * Remove unnecessary $NON-NLS$ tag */ -public class StringFixCore implements IProposableFix, ICleanUpFixCore { +public class StringFixCore implements IProposableFix { private final TextEditGroup[] fEditGroups; private final String fName; From 4412697e60369324089c7ecd60efccaf2851de1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 5 Dec 2023 15:56:37 +0100 Subject: [PATCH 35/43] remove not analysed @SuppressWarnings("javadoc") get rid of "At least one of the problems in category 'javadoc' is not analysed due to a compiler option being ignored" warnings --- .../refactoring/rename/RefactoringAnalyzeUtil.java | 1 - .../corext/refactoring/rename/RenameAnalyzeUtil.java | 1 - .../ui/tests/refactoring/IntroduceFactoryTestsBase.java | 9 --------- .../ui/tests/callhierarchy/CallHierarchyTestHelper.java | 1 - .../jdt/ui/tests/core/HierarchicalASTVisitorTest.java | 1 - .../ui/org/eclipse/jdt/ui/tests/quickfix/JarUtil.java | 1 - 6 files changed, 14 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java index bb689029d61..b13e5119742 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java @@ -101,7 +101,6 @@ public static RecordDeclaration getRecordDeclaration(TextEdit edit, TextChange c /** * @noreference This method is not intended to be referenced by clients. */ - @SuppressWarnings("javadoc") public static MethodDeclaration getRecordDeclarationCompactConstructor(TextEdit edit, TextChange change, CompilationUnit cuNode){ RecordDeclaration recDecl = getRecordDeclaration(edit, change, cuNode); MethodDeclaration compConst= null; diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java index 9d7d25b425f..048f7f32a0e 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java @@ -404,7 +404,6 @@ public static RefactoringStatus analyzeLocalRenames(LocalAnalyzePackage[] analyz * * @noreference This method is not intended to be referenced by clients. */ - @SuppressWarnings("javadoc") public static RefactoringStatus analyzeCompactConstructorLocalRenames(LocalAnalyzePackage[] analyzePackages, TextChange cuChange, CompilationUnit oldCUNode, boolean recovery) throws CoreException { return analyzeLocalRenames(analyzePackages, cuChange, oldCUNode, true, recovery); } diff --git a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java index c1af7a99374..c15966550b4 100644 --- a/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java +++ b/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTestsBase.java @@ -101,7 +101,6 @@ private String getTestFileName(boolean positive, boolean input) { * Test files are assumed to be located in the resources directory. * @return the ICompilationUnit created from the specified test file */ - @SuppressWarnings("javadoc") private ICompilationUnit createCUForSimpleTest(IPackageFragment pack, boolean positive, boolean input) throws Exception @@ -141,7 +140,6 @@ private String getBugTestFileName(IJavaProject project, IPackageFragment pack, S * @param project can be null if only 1 project exists in the test workspace * @return the ICompilationUnit created from the specified test file */ - @SuppressWarnings("javadoc") private ICompilationUnit createCUForBugTestCase(IJavaProject project, IPackageFragment pack, String baseName, boolean input) throws Exception @@ -162,7 +160,6 @@ private ICompilationUnit createCUForBugTestCase(IJavaProject project, * markers is not present in the source string. * @return an ISourceRange representing the marked selection */ - @SuppressWarnings("javadoc") private ISourceRange findSelectionInSource(String source) throws Exception { int begin= source.indexOf(SELECTION_START_HERALD) + SELECTION_START_HERALD.length(); int end= source.indexOf(SELECTION_END_HERALD); @@ -234,7 +231,6 @@ private void doSingleUnitTestWithWarning(boolean protectConstructor, ICompilatio * Test files are assumed to be located in the resources directory. * @param protectConstructor true iff IntroduceFactoryRefactoring should make the constructor private */ - @SuppressWarnings("javadoc") void singleUnitHelper(boolean protectConstructor) throws Exception { @@ -252,7 +248,6 @@ void singleUnitHelper(boolean protectConstructor) * @param baseFileName the base file name * @param protectConstructor true iff IntroduceFactoryRefactoring should make the constructor private */ - @SuppressWarnings("javadoc") protected void singleUnitBugHelper(String baseFileName, boolean protectConstructor) throws Exception { @@ -275,7 +270,6 @@ protected void singleUnitBugHelperWithWarning(String baseFileName, boolean prote * @param factoryMethodName the name to use for the generated factory method * @param factoryClassName the name of the factory class */ - @SuppressWarnings("javadoc") void namesHelper(String factoryMethodName, String factoryClassName) throws Exception { @@ -312,7 +306,6 @@ void namesHelper(String factoryMethodName, String factoryClassName) * @param pack an IPackageFragment for the containing package * @return the ICompilationUnit for the newly-created unit */ - @SuppressWarnings("javadoc") private ICompilationUnit createCUFromFileName(String fileName, IPackageFragment pack) throws Exception { String fullName = TEST_PATH_PREFIX + getRefactoringPath() + "positive/" + fileName + "_in.java"; @@ -358,7 +351,6 @@ private void doMultiUnitTest(ICompilationUnit[] CUs, String testPath, String[] o * @param staticFactoryMethod true iff IntroduceFactoryRefactoring should make the factory method static * @param inputFileBaseNames an array of input source file base names */ - @SuppressWarnings("javadoc") void multiUnitHelper(boolean staticFactoryMethod, String[] inputFileBaseNames) throws Exception { @@ -384,7 +376,6 @@ void multiUnitHelper(boolean staticFactoryMethod, String[] inputFileBaseNames) * @param factoryClassName the fully-qualified name of the class to receive the factory method, or null * if the factory method is to be placed on the class defining the given constructor */ - @SuppressWarnings("javadoc") void multiUnitBugHelper(boolean staticFactoryMethod, String[] inputFileBaseNames, String factoryClassName) throws Exception { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java index 30d377c30e8..c94db49529b 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/callhierarchy/CallHierarchyTestHelper.java @@ -43,7 +43,6 @@ import org.eclipse.jdt.ui.tests.core.rules.Java17ProjectTestSetup; import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup; -@SuppressWarnings("javadoc") public class CallHierarchyTestHelper { private static final String[] EMPTY= new String[0]; diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java index ca3e4ffdff3..86b744d4b44 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java @@ -48,7 +48,6 @@ import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor; -@SuppressWarnings("javadoc") public class HierarchicalASTVisitorTest { private static class TestHierarchicalASTVisitor extends HierarchicalASTVisitor { diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/JarUtil.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/JarUtil.java index 5002b4de9f8..b573ce331c3 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/JarUtil.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/JarUtil.java @@ -45,7 +45,6 @@ /** * This is a reduced and marginally adjusted copy from org.eclipse.jdt.core.tests.util.Util */ -@SuppressWarnings("javadoc") public class JarUtil { // Trace for delete operation From c2467da65caa522e46675261f6cc118e2dc15276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 5 Dec 2023 15:50:52 +0100 Subject: [PATCH 36/43] [examples] fix JavaReconcileStep warnings --- .../examples/jspeditor/JavaReconcileStep.java | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JavaReconcileStep.java b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JavaReconcileStep.java index 3da46b03579..c0a581f33aa 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JavaReconcileStep.java +++ b/org.eclipse.jdt.ui.examples.javafamily/src/org/eclipse/jdt/internal/ui/examples/jspeditor/JavaReconcileStep.java @@ -48,9 +48,6 @@ import org.eclipse.jdt.core.WorkingCopyOwner; import org.eclipse.jdt.core.compiler.IProblem; -import org.eclipse.jdt.internal.core.BufferManager; - - /** * This reconcile step has a Java source document as * input model and maintains a Java working copy as its model. @@ -66,19 +63,6 @@ public class JavaReconcileStep extends AbstractReconcileStep { private final AnnotationTypeLookup fAnnotationTypeLookup= EditorsUI.getAnnotationTypeLookup(); - private static class TemporaryWorkingCopyOwner extends WorkingCopyOwner { - - - /* - * @see org.eclipse.jdt.core.WorkingCopyOwner#createBuffer(org.eclipse.jdt.core.ICompilationUnit) - */ - @Override - public IBuffer createBuffer(ICompilationUnit workingCopy) { - // FIXME: Don't know how to get a buffer without using internal API. - return BufferManager.createBuffer(workingCopy); - } - } - private class ProblemAdapter extends AnnotationAdapter { private final IProblem fProblem; @@ -241,7 +225,7 @@ private ICompilationUnit getCompilationUnit() { */ public JavaReconcileStep(IFile jspFile) { Assert.isNotNull(jspFile); - fTemporaryWorkingCopyOwner= new TemporaryWorkingCopyOwner(); + fTemporaryWorkingCopyOwner= new WorkingCopyOwner() {}; try { fWorkingCopy= new CompilationUnitAdapter(createTemporaryWorkingCopy(jspFile)); } catch (JavaModelException e) { @@ -256,7 +240,7 @@ public JavaReconcileStep(IFile jspFile) { public JavaReconcileStep(IReconcileStep step, IFile jspFile) { super(step); Assert.isNotNull(jspFile); - fTemporaryWorkingCopyOwner= new TemporaryWorkingCopyOwner(); + fTemporaryWorkingCopyOwner= new WorkingCopyOwner() {}; try { fWorkingCopy= new CompilationUnitAdapter(createTemporaryWorkingCopy(jspFile)); } catch (JavaModelException e) { @@ -292,7 +276,7 @@ protected IReconcileResult[] reconcileModel(DirtyRegion dirtyRegion, IRegion sub try { synchronized (cu) { fProblemRequestor.setIsActive(true); - cu.reconcile(true, getProgressMonitor()); + cu.reconcile(ICompilationUnit.NO_AST, true, null, getProgressMonitor()); } } catch (JavaModelException ex) { ex.printStackTrace(); From 4c7f466c2526ca18d64bca5d744d98c89efde705 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 5 Dec 2023 18:03:35 -0500 Subject: [PATCH 37/43] Fix string concat to text block when string is a parameter (#979) - fix StringConcatToTextBlockFixCore to not bail on a method parameter or assignment where a method is called and the result of the method is not String - add new test scenarios to CleanUpTest15 - fixes #935 --- .../fix/StringConcatToTextBlockFixCore.java | 38 ------------------- .../jdt/ui/tests/quickfix/CleanUpTest15.java | 32 ++++++++++++++++ 2 files changed, 32 insertions(+), 38 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java index 89a95f008dd..22437c9f133 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java @@ -87,44 +87,6 @@ public StringConcatFinder(List operations, bool fAllConcats= allConcats; } - private boolean isStringType(Type type) { - if (type instanceof ArrayType) { - return false; - } - ITypeBinding typeBinding= type.resolveBinding(); - if (typeBinding == null || !typeBinding.getQualifiedName().equals(JAVA_STRING)) { - return false; - } - return true; - } - - @Override - public boolean visit(final VariableDeclarationStatement visited) { - Type type= visited.getType(); - if (!isStringType(type)) { - return false; - } - return true; - } - - @Override - public boolean visit(final FieldDeclaration visited) { - Type type= visited.getType(); - if (!isStringType(type)) { - return false; - } - return true; - } - - @Override - public boolean visit(final Assignment visited) { - ITypeBinding typeBinding= visited.resolveTypeBinding(); - if (typeBinding == null || !typeBinding.getQualifiedName().equals(JAVA_STRING)) { - return false; - } - return true; - } - @Override public boolean visit(final InfixExpression visited) { if (visited.getOperator() != InfixExpression.Operator.PLUS diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java index c6c567d47dd..24f5a6007fa 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java @@ -90,6 +90,22 @@ public void testConcatToTextBlock() throws Exception { + " buf.append(\"123456\\n\");\n" // + " buf.append(\"ghijkl\\n\");\n" // + " String k = buf.toString();\n" // + + " }\n" // + + " public Integer foo(String x) {\n" // + + " return Integer.valueOf(x.length());\n" // + + " }\n" // + + " public void testParameter() {\n" // + + " Integer k = foo(\"\" + \n" // + + " \"abcdef\\n\" + \n" // + + " \"123456\\n\" + \n" // + + " \"klm\");\n" // + + " }\n" // + + " public void testAssignment() {\n" // + + " Integer k = null;\n" // + + " k = foo(\"\" + \n" // + + " \"abcdef\\n\" + \n" // + + " \"123456\\n\" + \n" // + + " \"klm\");\n" // + " }\n" // + "}\n"; @@ -140,6 +156,22 @@ public void testConcatToTextBlock() throws Exception { + " buf.append(\"123456\\n\");\n" // + " buf.append(\"ghijkl\\n\");\n" // + " String k = buf.toString();\n" // + + " }\n" // + + " public Integer foo(String x) {\n" // + + " return Integer.valueOf(x.length());\n" // + + " }\n" // + + " public void testParameter() {\n" // + + " Integer k = foo(\"\"\"\n" // + + " \tabcdef\n" // + + " \t123456\n" // + + " \tklm\"\"\");\n" // + + " }\n" // + + " public void testAssignment() {\n" // + + " Integer k = null;\n" // + + " k = foo(\"\"\"\n" // + + " \tabcdef\n" // + + " \t123456\n" // + + " \tklm\"\"\");\n" // + " }\n" // + "}\n"; From 16c8792ee6ddc259af82608c24437f6d7e89c2e6 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 5 Dec 2023 20:24:48 -0500 Subject: [PATCH 38/43] Fix NPE in string concat to text block fix (#980) * Prevent NPE in string concat to text block cleanup - add null check for originalVarName field in StringConcatToTextBlockFixCore.visit(ClassInstanceCreation) - fixes: #950 - add new test scenarios to CleanUpTest15 --- .../corext/fix/StringConcatToTextBlockFixCore.java | 4 ++-- .../jdt/ui/tests/quickfix/CleanUpTest15.java | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java index 22437c9f133..3feb20a778d 100644 --- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java +++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/fix/StringConcatToTextBlockFixCore.java @@ -510,8 +510,8 @@ public boolean visit(ClassInstanceCreation node) { } Statement endStatement= stmtList.get(i - 1); int lastStatementEnd= endStatement.getStartPosition() + endStatement.getLength(); - IBinding varBinding= originalVarName.resolveBinding(); - if (varBinding == null) { + IBinding varBinding= null; + if (originalVarName == null || (varBinding= originalVarName.resolveBinding()) == null) { return false; } CheckValidityVisitor checkValidityVisitor= new CheckValidityVisitor(lastStatementEnd, varBinding); diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java index 24f5a6007fa..4b999093a0b 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest15.java @@ -106,6 +106,9 @@ public void testConcatToTextBlock() throws Exception { + " \"abcdef\\n\" + \n" // + " \"123456\\n\" + \n" // + " \"klm\");\n" // + + " }\n" // + + " public void testConcatInConstructor() {\n" // + + " new StringBuffer(\"abc\\n\" + \"def\\n\" + \"ghi\");\n" // + " }\n" // + "}\n"; @@ -172,6 +175,12 @@ public void testConcatToTextBlock() throws Exception { + " \tabcdef\n" // + " \t123456\n" // + " \tklm\"\"\");\n" // + + " }\n" // + + " public void testConcatInConstructor() {\n" // + + " new StringBuffer(\"\"\"\n" // + + " \tabc\n" // + + " \tdef\n" // + + " \tghi\"\"\");\n" // + " }\n" // + "}\n"; @@ -220,6 +229,7 @@ public void testConcatToTextBlock2() throws Exception { + " String x = \"abc\\n\" +\n" + " \"def\\n\" +\n" // + " \"ghi\\n\";\n" // + + " new StringBuffer(\"abc\\n\" + \"def\\n\" + \"ghi\");\n" // + " }\n" // + "}"; @@ -274,6 +284,10 @@ public void testConcatToTextBlock2() throws Exception { + " \tdef\n" // + " \tghi\n" // + " \t\"\"\";\n" // + + " new StringBuffer(\"\"\"\n" // + + " \tabc\n" // + + " \tdef\n" // + + " \tghi\"\"\");\n" // + " }\n" // + "}"; From 798db97c036672f5a64b0528736655c8d926b983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Tue, 5 Dec 2023 13:54:19 +0200 Subject: [PATCH 39/43] Add smoke tests for all views defined in JavaUI --- .../jdt/ui/tests/views/SmokeViewsTest.java | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/views/SmokeViewsTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/views/SmokeViewsTest.java index d8e15dae602..dad6772e132 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/views/SmokeViewsTest.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/views/SmokeViewsTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 Andrey Loskutov (loskutov@gmx.de) and others. + * Copyright (c) 2023, 2024 Andrey Loskutov (loskutov@gmx.de) and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -48,6 +48,8 @@ import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.ui.JavaUI; + import org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput; public class SmokeViewsTest { @@ -102,6 +104,36 @@ public void testOpenBytecodeReferenceView() throws Exception { smokeTest("org.eclipse.jdt.bcoview.views.BytecodeReferenceView"); } + @Test + public void testOpenJavadocView() throws Exception { + smokeTest(JavaUI.ID_JAVADOC_VIEW); + } + + @Test + public void testOpenPackagesView() throws Exception { + smokeTest(JavaUI.ID_PACKAGES_VIEW); + } + + @Test + public void testOpenTypesView() throws Exception { + smokeTest(JavaUI.ID_TYPES_VIEW); + } + + @Test + public void testOpenMembersView() throws Exception { + smokeTest(JavaUI.ID_MEMBERS_VIEW); + } + + @Test + public void testOpenProjectsView() throws Exception { + smokeTest(JavaUI.ID_PROJECTS_VIEW); + } + + @Test + public void testOpenSourceView() throws Exception { + smokeTest(JavaUI.ID_SOURCE_VIEW); + } + private void smokeTest(String viewId) throws PartInitException { view = window.getActivePage().showView(viewId); assertNotNull("View " + viewId + " should be created", view); From 915420a99a63f9f148fbc018ec8febf4c72f0cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 6 Dec 2023 14:04:42 +0200 Subject: [PATCH 40/43] Modernize JavadocView code * Remove useless see tags * Use pattern matching --- .../internal/ui/infoviews/JavadocView.java | 174 +++++------------- 1 file changed, 48 insertions(+), 126 deletions(-) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java index 717fc028ab5..a6c6b970dc0 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -79,7 +79,6 @@ import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbenchCommandConstants; @@ -332,9 +331,6 @@ public void run(IStructuredSelection selection) { } - /* - * @see org.eclipse.jdt.ui.actions.OpenAttachedJavadocAction#canEnableFor(org.eclipse.jface.viewers.IStructuredSelection) - */ @Override protected boolean canEnableFor(IStructuredSelection selection) { if (selection.size() != 1) @@ -491,8 +487,8 @@ private static class SelectionProvider implements ISelectionProvider { public SelectionProvider(Control control) { Assert.isNotNull(control); fControl= control; - if (fControl instanceof StyledText) { - ((StyledText)fControl).addSelectionListener(new SelectionAdapter() { + if (fControl instanceof StyledText styledText) { + styledText.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { fireSelectionChanged(); @@ -519,21 +515,15 @@ public void fireSelectionChanged() { } } - /* - * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) - */ @Override public void addSelectionChangedListener(ISelectionChangedListener listener) { fListeners.add(listener); } - /* - * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection() - */ @Override public ISelection getSelection() { - if (fControl instanceof StyledText) { - IDocument document= new Document(((StyledText)fControl).getSelectionText()); + if (fControl instanceof StyledText styledText) { + IDocument document= new Document(styledText.getSelectionText()); return new TextSelection(document, 0, document.getLength()); } else { // FIXME: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63022 @@ -541,26 +531,17 @@ public ISelection getSelection() { } } - /* - * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) - */ @Override public void removeSelectionChangedListener(ISelectionChangedListener listener) { fListeners.remove(listener); } - /* - * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection) - */ @Override public void setSelection(ISelection selection) { // not supported } } - /* - * @see AbstractInfoView#internalCreatePartControl(Composite) - */ @Override protected void internalCreatePartControl(Composite parent) { try { @@ -602,9 +583,6 @@ protected void internalCreatePartControl(Composite parent) { fPresenter= new FallbackInformationPresenter(); fText.addControlListener(new ControlAdapter() { - /* - * @see org.eclipse.swt.events.ControlAdapter#controlResized(org.eclipse.swt.events.ControlEvent) - */ @Override public void controlResized(ControlEvent e) { doSetInput(fOriginalInput); @@ -649,10 +627,6 @@ private static void initStyleSheet() { fgStyleSheet= JavadocHover.loadStyleSheet("/JavadocViewStyleSheet.css"); //$NON-NLS-1$ } - - /* - * @see AbstractInfoView#createActions() - */ @Override protected void createActions() { super.createActions(); @@ -712,10 +686,6 @@ public void menuAboutToShow(IMenuManager menu) { menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenBrowserAction); } - /* - * @see org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView#getSelectAllAction() - * @since 3.0 - */ @Override protected IAction getSelectAllAction() { // FIXME: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63022 @@ -725,10 +695,6 @@ protected IAction getSelectAllAction() { return fSelectAllAction; } - /* - * @see org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView#getCopyToClipboardAction() - * @since 3.0 - */ @Override protected IAction getCopyToClipboardAction() { // FIXME: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63022 @@ -738,9 +704,6 @@ protected IAction getCopyToClipboardAction() { return super.getCopyToClipboardAction(); } - /* - * @see AbstractInfoView#setForeground(Color) - */ @Override protected void setForeground(Color color) { getControl().setForeground(color); @@ -748,9 +711,6 @@ protected void setForeground(Color color) { refresh(); } - /* - * @see AbstractInfoView#setBackground(Color) - */ @Override protected void setBackground(Color color) { getControl().setBackground(color); @@ -767,10 +727,6 @@ private void refresh() { doSetInput(computeInput(getOrignalInput())); } - /* - * @see org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView#getBackgroundColorKey() - * @since 3.2 - */ @Override protected String getBackgroundColorKey() { return "org.eclipse.jdt.ui.Javadoc.backgroundColor"; //$NON-NLS-1$ @@ -781,9 +737,6 @@ protected String getForegroundColorKey() { return "org.eclipse.jdt.ui.Javadoc.foregroundColor"; //$NON-NLS-1$ } - /* - * @see AbstractInfoView#internalDispose() - */ @Override protected void internalDispose() { fText= null; @@ -799,17 +752,11 @@ protected void internalDispose() { } } - /* - * @see org.eclipse.ui.part.WorkbenchPart#setFocus() - */ @Override public void setFocus() { getControl().setFocus(); } - /* - * @see AbstractInfoView#computeInput(Object) - */ @Override protected Object computeInput(Object input) { if (getControl() == null || ! (input instanceof IJavaElement)) @@ -861,9 +808,9 @@ protected Object computeInput(IWorkbenchPart part, ISelection selection, IJavaEl case IJavaElement.CLASS_FILE: if (JavaModelUtil.PACKAGE_INFO_CLASS.equals(input.getElementName())) { javadocHtml= getJavadocHtml(new IJavaElement[] { input.getParent() }, part, selection, monitor); - } else if (input instanceof IModularClassFile) { + } else if (input instanceof IModularClassFile modularClassFile) { try { - javadocHtml= getJavadocHtml(new IJavaElement[] { ((IModularClassFile) input).getModule() }, part, selection, monitor); + javadocHtml= getJavadocHtml(new IJavaElement[] { modularClassFile.getModule() }, part, selection, monitor); } catch (JavaModelException e) { return null; } @@ -878,10 +825,6 @@ protected Object computeInput(IWorkbenchPart part, ISelection selection, IJavaEl return javadocHtml; } - /* - * @see AbstractInfoView#computeDescription(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.jdt.core.IJavaElement, org.eclipse.core.runtime.IProgressMonitor) - * @since 3.4 - */ @Override protected String computeDescription(IWorkbenchPart part, ISelection selection, IJavaElement inputElement, IProgressMonitor monitor) { return ""; //$NON-NLS-1$ @@ -897,10 +840,10 @@ public void setInput(BrowserInput input) { fCurrent= input; Object inputElement= input.getInputElement(); - if (inputElement instanceof IJavaElement) { - setInput((IJavaElement) inputElement); - } else if (inputElement instanceof URL) { - fBrowser.setUrl(((URL) inputElement).toExternalForm()); + if (inputElement instanceof IJavaElement javaElement) { + setInput(javaElement); + } else if (inputElement instanceof URL url) { + fBrowser.setUrl(url.toExternalForm()); if (fInputSelectionProvider != null) fInputSelectionProvider.setSelection(new StructuredSelection(inputElement)); @@ -918,8 +861,8 @@ public void setInput(BrowserInput input) { @Override protected void doSetInput(Object input) { String javadocHtml; - if (input instanceof String) { - javadocHtml= (String) input; + if (input instanceof String s) { + javadocHtml= s; } else { StringBuilder buffer= new StringBuilder(); HTMLPrinter.insertPageProlog(buffer, 0, fForegroundColorRGB, fBackgroundColorRGB, fgStyleSheet); @@ -996,11 +939,11 @@ private String getJavadocHtml(IJavaElement[] result, IWorkbenchPart activePart, Reader reader= null; String content= null; try { - if (curr instanceof IPackageDeclaration) { + if (curr instanceof IPackageDeclaration packageDecl) { try { - ISourceRange nameRange= ((IPackageDeclaration) curr).getNameRange(); + ISourceRange nameRange= packageDecl.getNameRange(); if (SourceRange.isAvailable(nameRange)) { - ITypeRoot typeRoot= (ITypeRoot) ((IPackageDeclaration) curr).getParent(); + ITypeRoot typeRoot= (ITypeRoot) packageDecl.getParent(); Region hoverRegion= new Region(nameRange.getOffset(), nameRange.getLength()); JavadocHover.addAnnotations(buffer, typeRoot.getParent(), typeRoot, hoverRegion); } @@ -1009,9 +952,9 @@ private String getJavadocHtml(IJavaElement[] result, IWorkbenchPart activePart, } content= JavadocContentAccess2.getHTMLContent((IPackageDeclaration) curr); - } else if (curr instanceof IPackageFragment) { + } else if (curr instanceof IPackageFragment packageFragm) { JavadocHover.addAnnotations(buffer, curr, null, null); - content= JavadocContentAccess2.getHTMLContent((IPackageFragment) curr); + content= JavadocContentAccess2.getHTMLContent(packageFragm); } } catch (CoreException e) { reader= new StringReader(JavaDocLocations.handleFailedJavadocFetch(e)); @@ -1046,10 +989,10 @@ private String getJavadocHtml(IJavaElement[] result, IWorkbenchPart activePart, try { ISourceRange nameRange= ((ISourceReference) curr).getNameRange(); if (SourceRange.isAvailable(nameRange)) { - if (element instanceof ILocalVariable) { - typeRoot= ((ILocalVariable) curr).getTypeRoot(); - } else if (element instanceof ITypeParameter) { - typeRoot= ((ITypeParameter) curr).getTypeRoot(); + if (element instanceof ILocalVariable localVar) { + typeRoot= localVar.getTypeRoot(); + } else if (element instanceof ITypeParameter typeParam) { + typeRoot= typeParam.getTypeRoot(); } else { typeRoot= ((IMember) curr).getTypeRoot(); } @@ -1060,16 +1003,16 @@ private String getJavadocHtml(IJavaElement[] result, IWorkbenchPart activePart, } String constantValue= null; - if (element instanceof IField) { - constantValue= computeFieldConstant(activePart, selection, (IField) element, monitor); + if (element instanceof IField field) { + constantValue= computeFieldConstant(activePart, selection, field, monitor); if (constantValue != null) constantValue= HTMLPrinter.convertToHTMLContentWithWhitespace(constantValue); } String defaultValue= null; - if (element instanceof IMethod) { + if (element instanceof IMethod method) { try { - defaultValue= JavadocHover.getAnnotationMemberDefaultValue((IMethod) element, typeRoot, hoverRegion); + defaultValue= JavadocHover.getAnnotationMemberDefaultValue(method, typeRoot, hoverRegion); if (defaultValue != null) { defaultValue= HTMLPrinter.convertToHTMLContentWithWhitespace(defaultValue); } @@ -1091,10 +1034,10 @@ private String getJavadocHtml(IJavaElement[] result, IWorkbenchPart activePart, IPackageFragmentRoot root= (IPackageFragmentRoot) element.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); if (content != null) { IMember member; - if (element instanceof ILocalVariable) { - member= ((ILocalVariable) element).getDeclaringMember(); - } else if (element instanceof ITypeParameter) { - member= ((ITypeParameter) element).getDeclaringMember(); + if (element instanceof ILocalVariable localVar) { + member= localVar.getDeclaringMember(); + } else if (element instanceof ITypeParameter typeParam) { + member= typeParam.getDeclaringMember(); } else { member= (IMember) element; } @@ -1163,20 +1106,15 @@ private String getInfoText(IJavaElement member, String constantValue, String def return JavadocHover.getImageAndLabel(member, allowImage, label.toString()); } - /* - * @see org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView#isIgnoringNewInput(org.eclipse.jdt.core.IJavaElement, org.eclipse.jface.viewers.ISelection) - * @since 3.2 - */ @Override protected boolean isIgnoringNewInput(IJavaElement je, IWorkbenchPart part, ISelection selection) { if (fCurrent != null && fCurrent.getInputElement() instanceof URL) return false; if (super.isIgnoringNewInput(je, part, selection) - && part instanceof ITextEditor - && selection instanceof ITextSelection) { + && part instanceof ITextEditor editor + && selection instanceof ITextSelection textSel) { - ITextEditor editor= (ITextEditor)part; IDocumentProvider docProvider= editor.getDocumentProvider(); if (docProvider == null) return false; @@ -1186,7 +1124,7 @@ protected boolean isIgnoringNewInput(IJavaElement je, IWorkbenchPart part, ISele return false; try { - int offset= ((ITextSelection)selection).getOffset(); + int offset= textSel.getOffset(); String partition= ((IDocumentExtension3)document).getContentType(IJavaPartitions.JAVA_PARTITIONING, offset, false); return !IJavaPartitions.JAVA_DOC.equals(partition); } catch (BadPartitioningException | BadLocationException ex) { @@ -1197,37 +1135,30 @@ protected boolean isIgnoringNewInput(IJavaElement je, IWorkbenchPart part, ISele return false; } - /* - * @see AbstractInfoView#findSelectedJavaElement(IWorkbenchPart) - */ @Override protected IJavaElement findSelectedJavaElement(IWorkbenchPart part, ISelection selection) { IJavaElement element= super.findSelectedJavaElement(part, selection); try { //update the Javadoc view when package.html is selected in project explorer view - if (element == null && selection instanceof IStructuredSelection) { - Object selectedElement= ((IStructuredSelection) selection).getFirstElement(); - if (selectedElement instanceof IFile) { - IFile selectedFile= (IFile) selectedElement; + if (element == null && selection instanceof IStructuredSelection sSel) { + Object selectedElement= sSel.getFirstElement(); + if (selectedElement instanceof IFile selectedFile) { if (JavaModelUtil.PACKAGE_HTML.equals(selectedFile.getName())) { element= JavaCore.create(selectedFile.getParent()); } - } else if (selectedElement instanceof IJarEntryResource) { - IJarEntryResource jarEntryResource= (IJarEntryResource) selectedElement; + } else if (selectedElement instanceof IJarEntryResource jarEntryResource) { if (JavaModelUtil.PACKAGE_HTML.equals(jarEntryResource.getName())) { Object parent= jarEntryResource.getParent(); - if (parent instanceof IJavaElement) { - element= (IJavaElement) parent; + if (parent instanceof IJavaElement javaEl) { + element= javaEl; } } } } - if (element == null && selection instanceof ITextSelection) { - ITextSelection textSelection= (ITextSelection) selection; - if (part instanceof AbstractDecoratedTextEditor) { - AbstractDecoratedTextEditor editor= (AbstractDecoratedTextEditor) part; + if (element == null && selection instanceof ITextSelection textSelection) { + if (part instanceof AbstractDecoratedTextEditor editor) { IDocumentProvider documentProvider= editor.getDocumentProvider(); if (documentProvider != null) { IEditorInput editorInput= editor.getEditorInput(); @@ -1238,8 +1169,8 @@ protected IJavaElement findSelectedJavaElement(IWorkbenchPart part, ISelection s if (IJavaPartitions.JAVA_DOC.equals(typedRegion.getType())){ element= TextSelectionConverter.getElementAtOffset((JavaEditor) part, textSelection); } - else if (editorInput instanceof IFileEditorInput) { - IFile file= ((IFileEditorInput) editorInput).getFile(); + else if (editorInput instanceof IFileEditorInput fei) { + IFile file= fei.getFile(); //update the Javadoc view when the content of the package.html is modified in the editor if (JavaModelUtil.PACKAGE_HTML.equals(file.getName())) { element= JavaCore.create(file.getParent()); @@ -1256,9 +1187,6 @@ else if (editorInput instanceof IFileEditorInput) { return element; } - /* - * @see AbstractInfoView#getControl() - */ @Override protected Control getControl() { if (fIsUsingBrowserWidget) @@ -1267,10 +1195,6 @@ protected Control getControl() { return fText; } - /* - * @see org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView#getHelpContextId() - * @since 3.1 - */ @Override protected String getHelpContextId() { return IJavaHelpContextIds.JAVADOC_VIEW; @@ -1296,10 +1220,9 @@ private String computeFieldConstant(IWorkbenchPart activePart, ISelection select Object constantValue; - if (selection instanceof ITextSelection && activePart instanceof JavaEditor) { - IEditorPart editor= (IEditorPart) activePart; + if (selection instanceof ITextSelection textSel && activePart instanceof JavaEditor editor) { ITypeRoot activeType= JavaUI.getEditorInputTypeRoot(editor.getEditorInput()); - constantValue= getConstantValueFromActiveEditor(activeType, resolvedField, (ITextSelection) selection, monitor); + constantValue= getConstantValueFromActiveEditor(activeType, resolvedField, textSel, monitor); if (constantValue == null) // fall back - e.g. when selection is inside Javadoc of the element constantValue= computeFieldConstantFromTypeAST(resolvedField, monitor); } else { @@ -1355,8 +1278,8 @@ public static Object computeFieldConstantFromTypeAST(IField constantField, IProg return null; } - if (createBindings[0] instanceof IVariableBinding) - return ((IVariableBinding) createBindings[0]).getConstantValue(); + if (createBindings[0] instanceof IVariableBinding variableBinding) + return variableBinding.getConstantValue(); return null; } @@ -1391,10 +1314,9 @@ private static Object getConstantValueFromActiveEditor(ITypeRoot activeType, IFi * @since 3.4 */ private static String formatCompilerConstantValue(Object constantValue) { - if (constantValue instanceof String) { + if (constantValue instanceof String stringConstant) { StringBuilder result= new StringBuilder(); result.append('"'); - String stringConstant= (String)constantValue; if (stringConstant.length() > 80) { result.append(stringConstant.substring(0, 80)); result.append(JavaElementLabels.ELLIPSIS_STRING); From d2192098f414e5d1bcf1c7797e025f6ddc551e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 6 Dec 2023 16:29:51 +0200 Subject: [PATCH 41/43] Move examples to Java 17 Their deps already did that so it actually fixes couple of warnings in the workspace. --- .../.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 37 +++++++++++++---- .../META-INF/MANIFEST.MF | 4 +- .../.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 40 ++++++++++++++----- .../META-INF/MANIFEST.MF | 4 +- org.eclipse.jdt.ui.examples.projects/pom.xml | 2 +- 7 files changed, 68 insertions(+), 23 deletions(-) diff --git a/org.eclipse.jdt.ui.examples.javafamily/.classpath b/org.eclipse.jdt.ui.examples.javafamily/.classpath index 71eb16789f0..4199cd3a3ea 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/.classpath +++ b/org.eclipse.jdt.ui.examples.javafamily/.classpath @@ -2,7 +2,7 @@ - + diff --git a/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs index 8ab36672770..aff10c0e395 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.examples.javafamily/.settings/org.eclipse.jdt.core.prefs @@ -25,9 +25,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -45,6 +45,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning @@ -103,6 +104,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=info org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -141,8 +143,10 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -150,17 +154,20 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -246,11 +253,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -281,6 +289,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -305,13 +315,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -359,6 +373,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -395,9 +411,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -423,8 +442,12 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.incompatibleJDKLevel=ignore org.eclipse.jdt.core.incompleteClasspath=error diff --git a/org.eclipse.jdt.ui.examples.javafamily/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.examples.javafamily/META-INF/MANIFEST.MF index 02919910d64..89592281da1 100644 --- a/org.eclipse.jdt.ui.examples.javafamily/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui.examples.javafamily/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui.examples.javafamily Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.ui.examples.javafamily; singleton:=true -Bundle-Version: 3.3.0.qualifier +Bundle-Version: 3.4.0.qualifier Bundle-ClassPath: javafamily.jar Bundle-Activator: org.eclipse.jsp.JspUIPlugin Bundle-Vendor: %providerName @@ -28,7 +28,7 @@ Require-Bundle: org.eclipse.core.resources, org.eclipse.ltk.core.refactoring, org.eclipse.jdt.core.manipulation;bundle-version="1.8.0" Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 Export-Package: org.eclipse.core.indexsearch;x-internal:=true, org.eclipse.jdt.internal.ui.examples.jspeditor;x-internal:=true, org.eclipse.jface.text.source.translation;x-internal:=true, diff --git a/org.eclipse.jdt.ui.examples.projects/.classpath b/org.eclipse.jdt.ui.examples.projects/.classpath index 18a8636a691..63a6fc32cb6 100644 --- a/org.eclipse.jdt.ui.examples.projects/.classpath +++ b/org.eclipse.jdt.ui.examples.projects/.classpath @@ -1,7 +1,7 @@ - + diff --git a/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs index 3ead76fccdb..076a804ffdc 100644 --- a/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jdt.ui.examples.projects/.settings/org.eclipse.jdt.core.prefs @@ -25,9 +25,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -45,7 +45,8 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled org.eclipse.jdt.core.compiler.problem.discouragedReference=error org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled @@ -103,6 +104,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=info org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -141,8 +143,10 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -150,17 +154,20 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 @@ -226,7 +233,6 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true org.eclipse.jdt.core.formatter.indentation.size=4 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert @@ -247,11 +253,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert @@ -282,6 +289,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -306,13 +315,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -360,6 +373,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -396,9 +411,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -424,8 +442,12 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.incompatibleJDKLevel=ignore org.eclipse.jdt.core.incompleteClasspath=error diff --git a/org.eclipse.jdt.ui.examples.projects/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.examples.projects/META-INF/MANIFEST.MF index 248a24f6257..e8641022a86 100644 --- a/org.eclipse.jdt.ui.examples.projects/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.ui.examples.projects/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui.examples.projects Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.ui.examples.projects; singleton:=true -Bundle-Version: 3.2.0.qualifier +Bundle-Version: 3.3.0.qualifier Bundle-ClassPath: jdtexamples.jar Bundle-Activator: org.eclipse.jdt.internal.ui.exampleprojects.ExampleProjectsPlugin Bundle-ActivationPolicy: lazy @@ -15,4 +15,4 @@ Require-Bundle: org.eclipse.core.resources, org.eclipse.ui.workbench, org.eclipse.jface Export-Package: org.eclipse.jdt.internal.ui.exampleprojects;x-internal:=true -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/org.eclipse.jdt.ui.examples.projects/pom.xml b/org.eclipse.jdt.ui.examples.projects/pom.xml index bd07b6e36e9..ccd5602892b 100644 --- a/org.eclipse.jdt.ui.examples.projects/pom.xml +++ b/org.eclipse.jdt.ui.examples.projects/pom.xml @@ -15,7 +15,7 @@ org.eclipse.jdt org.eclipse.jdt.ui.examples.projects - 3.2.0-SNAPSHOT + 3.3.0-SNAPSHOT eclipse-plugin From 5e0e5d0889804cad6e1ac2684e84b61d532e73ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 6 Dec 2023 16:53:47 +0200 Subject: [PATCH 42/43] Make JavaUI view constants final It is a plain oversight as I can not imagine anyone wanting these to be overridden. Added api_filters to not cause extra warnings in the code. --- org.eclipse.jdt.ui/.settings/.api_filters | 32 +++++++++++++++++++ .../ui/org/eclipse/jdt/ui/JavaUI.java | 10 +++--- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jdt.ui/.settings/.api_filters b/org.eclipse.jdt.ui/.settings/.api_filters index 9d152f249d5..d248c773793 100644 --- a/org.eclipse.jdt.ui/.settings/.api_filters +++ b/org.eclipse.jdt.ui/.settings/.api_filters @@ -137,6 +137,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java index fc00098236f..df7bac2939a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java @@ -244,7 +244,7 @@ private JavaUI() { * * @since 2.0 */ - public static String ID_BROWSING_PERSPECTIVE= "org.eclipse.jdt.ui.JavaBrowsingPerspective"; //$NON-NLS-1$ + public static final String ID_BROWSING_PERSPECTIVE= "org.eclipse.jdt.ui.JavaBrowsingPerspective"; //$NON-NLS-1$ /** * The view part id of the Java Browsing Projects view @@ -252,7 +252,7 @@ private JavaUI() { * * @since 2.0 */ - public static String ID_PROJECTS_VIEW= "org.eclipse.jdt.ui.ProjectsView"; //$NON-NLS-1$ + public static final String ID_PROJECTS_VIEW= "org.eclipse.jdt.ui.ProjectsView"; //$NON-NLS-1$ /** * The view part id of the Java Browsing Packages view @@ -260,7 +260,7 @@ private JavaUI() { * * @since 2.0 */ - public static String ID_PACKAGES_VIEW= "org.eclipse.jdt.ui.PackagesView"; //$NON-NLS-1$ + public static final String ID_PACKAGES_VIEW= "org.eclipse.jdt.ui.PackagesView"; //$NON-NLS-1$ /** * The view part id of the Java Browsing Types view @@ -268,7 +268,7 @@ private JavaUI() { * * @since 2.0 */ - public static String ID_TYPES_VIEW= "org.eclipse.jdt.ui.TypesView"; //$NON-NLS-1$ + public static final String ID_TYPES_VIEW= "org.eclipse.jdt.ui.TypesView"; //$NON-NLS-1$ /** * The view part id of the Java Browsing Members view @@ -276,7 +276,7 @@ private JavaUI() { * * @since 2.0 */ - public static String ID_MEMBERS_VIEW= "org.eclipse.jdt.ui.MembersView"; //$NON-NLS-1$ + public static final String ID_MEMBERS_VIEW= "org.eclipse.jdt.ui.MembersView"; //$NON-NLS-1$ /** From a4c1b5bc5dbb294e8c23b93296effeb1d5c2cae0 Mon Sep 17 00:00:00 2001 From: Federico Jeanne <2205684+fedejeanne@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:31:47 +0100 Subject: [PATCH 43/43] Add API filters (#883) From JUnitRemoteTestRunnerClient to RemoteTestRunnerClient, both in the same plugin. --- .../.settings/.api_filters | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 org.eclipse.jdt.ui.unittest.junit/.settings/.api_filters diff --git a/org.eclipse.jdt.ui.unittest.junit/.settings/.api_filters b/org.eclipse.jdt.ui.unittest.junit/.settings/.api_filters new file mode 100644 index 00000000000..9161999700a --- /dev/null +++ b/org.eclipse.jdt.ui.unittest.junit/.settings/.api_filters @@ -0,0 +1,11 @@ + + + + + + + + + + +