Skip to content

Clean Code for ui/org.eclipse.swt.tools.spies#1765

Merged
akurtakov merged 2 commits intomasterfrom
clean-code/ui/org.eclipse.swt.tools.spies
Jun 17, 2025
Merged

Clean Code for ui/org.eclipse.swt.tools.spies#1765
akurtakov merged 2 commits intomasterfrom
clean-code/ui/org.eclipse.swt.tools.spies

Conversation

@eclipse-pde-bot
Copy link
Contributor

@eclipse-pde-bot eclipse-pde-bot commented May 7, 2025

The following cleanups were applied:

  • Add final modifier to private fields
  • Add missing '@Deprecated' annotations
  • Add missing '@Override' annotations
  • Add missing '@Override' annotations to implementations of interface methods
  • Convert control statement bodies to block
  • Make inner classes static where possible
  • Remove trailing white spaces on all lines
  • Remove unnecessary array creation for varargs
  • Remove unnecessary suppress warning tokens
  • Remove unused imports
  • Replace deprecated calls with inlined content where possible
  • Use pattern matching for instanceof

@github-actions
Copy link

github-actions bot commented May 7, 2025

Test Results

   765 files  ±0     765 suites  ±0   53m 45s ⏱️ - 2m 5s
 3 611 tests ±0   3 535 ✅ ±0   76 💤 ±0  0 ❌ ±0 
10 833 runs  ±0  10 602 ✅ ±0  231 💤 ±0  0 ❌ ±0 

Results for commit 2cda573. ± Comparison against base commit 1363fd2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should wait until uneccesary suppress warning will be cleaned up.

@HannesWell
Copy link
Member

Should wait until uneccesary suppress warning will be cleaned up.

Looks like this doesn't require the removal of suppressed-warning annotations. Should we still await that?

@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch from bf5e9ae to 7c8f0d6 Compare May 8, 2025 03:26
@laeubi
Copy link
Contributor

laeubi commented May 8, 2025

Should wait until uneccesary suppress warning will be cleaned up.

Looks like this doesn't require the removal of suppressed-warning annotations. Should we still await that?

grafik

I mean this one.

@jjohnstn also here the cleanup seem to not work.

@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch from 7c8f0d6 to 46b6c4a Compare May 9, 2025 03:26
@jjohnstn
Copy link
Contributor

jjohnstn commented May 9, 2025

Should wait until uneccesary suppress warning will be cleaned up.

Looks like this doesn't require the removal of suppressed-warning annotations. Should we still await that?

grafik

I mean this one.

@jjohnstn also here the cleanup seem to not work.

I'll need a source file and the compiler options. It works for my simple test (just adding it extraneously to a class). Does the warning show up for you when you edit the file in Eclipse? The clean-up relies on the compiler issuing the warning but it uses a default set of compiler options plus:

		result.put(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS, JavaCore.ENABLED);
		result.put(JavaCore.COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS, JavaCore.ENABLED);
		result.put(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN, JavaCore.ERROR); // do not change to WARNING

If setting these options in your Eclipse gets you the warning/error and running the clean-up manually doesn't remove the annotation, then I'll have to investigate what is going on.

@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch 6 times, most recently from e6dd511 to e34ccf9 Compare May 17, 2025 03:19
@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch 2 times, most recently from b046fc2 to 7d55b5c Compare May 28, 2025 03:43
@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch from 7d55b5c to 55b5b3b Compare June 5, 2025 03:19
@eclipse-pde-bot
Copy link
Contributor Author

eclipse-pde-bot commented Jun 5, 2025

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

features/org.eclipse.pde.spies-feature/feature.xml
ui/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 4265e0044ff8e79a16a93761b0d80bb1af27559d Mon Sep 17 00:00:00 2001
From: Eclipse PDE Bot <pde-bot@eclipse.org>
Date: Tue, 17 Jun 2025 03:42:20 +0000
Subject: [PATCH] Version bump(s) for 4.37 stream


diff --git a/features/org.eclipse.pde.spies-feature/feature.xml b/features/org.eclipse.pde.spies-feature/feature.xml
index f76de7467c..1a482dead2 100644
--- a/features/org.eclipse.pde.spies-feature/feature.xml
+++ b/features/org.eclipse.pde.spies-feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.pde.spies"
       label="%featureName"
-      version="1.0.700.qualifier"
+      version="1.0.800.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/ui/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF b/ui/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF
index 876c6b8040..c3f23b7f3d 100644
--- a/ui/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.swt.tools.spies/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.tools.spies;singleton:=true
-Bundle-Version: 3.109.600.qualifier
+Bundle-Version: 3.109.700.qualifier
 Bundle-ManifestVersion: 2
 Export-Package: org.eclipse.swt.tools.internal,
  org.eclipse.swt.tools.views
-- 
2.49.0

Further information are available in Common Build Issues - Missing version increments.

@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch 5 times, most recently from 7c80834 to 42b9f25 Compare June 10, 2025 03:34
@akurtakov
Copy link
Member

@laeubi Your review blocks this one. Please review it again.

@laeubi
Copy link
Contributor

laeubi commented Jun 10, 2025

@akurtakov the Unnecessary Code warning is still not cleaned up...

@akurtakov
Copy link
Member

Why don't we see it in the build logs?

@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch 4 times, most recently from b0e05c3 to 6872e45 Compare June 14, 2025 03:28
@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch 2 times, most recently from bfa8eda to 3240af4 Compare June 16, 2025 03:38
Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

@eclipse-pde-bot eclipse-pde-bot force-pushed the clean-code/ui/org.eclipse.swt.tools.spies branch from b590f46 to 0f259f9 Compare June 17, 2025 03:36
@akurtakov akurtakov merged commit bc575a0 into master Jun 17, 2025
19 checks passed
@akurtakov akurtakov deleted the clean-code/ui/org.eclipse.swt.tools.spies branch June 17, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants