Skip to content

Clean Code for team/bundles/org.eclipse.compare.win32#1928

Merged
akurtakov merged 2 commits into
masterfrom
clean-code/team/bundles/org.eclipse.compare.win32
Jun 25, 2025
Merged

Clean Code for team/bundles/org.eclipse.compare.win32#1928
akurtakov merged 2 commits into
masterfrom
clean-code/team/bundles/org.eclipse.compare.win32

Conversation

@eclipse-platform-bot

@eclipse-platform-bot eclipse-platform-bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

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

@eclipse-platform-bot

eclipse-platform-bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

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

team/bundles/org.eclipse.compare.win32/META-INF/MANIFEST.MF
team/bundles/org.eclipse.compare.win32/pom.xml

Warning

🚧 This PR cannot be modified by maintainers because edits are disabled or it is created from an organization repository. To obtain the required changes apply the git patch manually as an additional commit.

Git patch
From 37904787c16a84acecb16af768cd732c89289ad6 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Wed, 25 Jun 2025 03:37:12 +0000
Subject: [PATCH] Version bump(s) for 4.37 stream


diff --git a/team/bundles/org.eclipse.compare.win32/META-INF/MANIFEST.MF b/team/bundles/org.eclipse.compare.win32/META-INF/MANIFEST.MF
index f98167fde7..bfb974de7a 100644
--- a/team/bundles/org.eclipse.compare.win32/META-INF/MANIFEST.MF
+++ b/team/bundles/org.eclipse.compare.win32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.compare.win32;singleton:=true
-Bundle-Version: 1.3.500.qualifier
+Bundle-Version: 1.3.600.qualifier
 Bundle-Vendor: %providerName
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Eclipse-PlatformFilter: (osgi.os=win32)
diff --git a/team/bundles/org.eclipse.compare.win32/pom.xml b/team/bundles/org.eclipse.compare.win32/pom.xml
index 2601db1c09..81425c49b4 100644
--- a/team/bundles/org.eclipse.compare.win32/pom.xml
+++ b/team/bundles/org.eclipse.compare.win32/pom.xml
@@ -18,7 +18,7 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.compare.win32</artifactId>
-  <version>1.3.500-SNAPSHOT</version>
+  <version>1.3.600-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
-- 
2.49.0

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

@github-actions

github-actions Bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Test Results

 1 947 files  ±0   1 947 suites  ±0   1h 33m 53s ⏱️ - 3m 33s
 4 717 tests ±0   4 693 ✅ ±0   24 💤 ±0  0 ❌ ±0 
14 151 runs  ±0  13 984 ✅ ±0  167 💤 ±0  0 ❌ ±0 

Results for commit b489902. ± Comparison against base commit a5a46f8.

♻️ This comment has been updated with latest results.

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.compare.win32 branch 5 times, most recently from 8b54507 to bd441ba Compare June 15, 2025 03:38

@HeikoKlare HeikoKlare left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems like the Tycho cleanup mojo may not be applicable to bundles that do not fit to the current platform and that depend on some other code/bundle that does not fit to the current platform. In this case, a win32-specific bundle is cleaned up on Linux, which erroneously removes a bunch of imports, probably because it compiles against the Linux fragment of SWT which does obviously not contain win32-specific classes like Ole classes. So in my understanding, the issue is not related to a bundle just being platform-specific, but to a bundle being platform-specific and depending on some other platform-specific code/bundle.

When I execute the cleanup via Tycho for the org.eclipse.compare.win32 bundle on a Windows system, it produces a proper result.

@laeubi does the assessment make sense to you?
I am not sure what would be the right way do deal with it. Making the cleanup mojo only execute if the platform filter of a bundle fits to the current platform would be too restrictive (if always done in a non-configurable way), as a platform-specific bundle itself may not be problematic. But since the we can also properly compile this win32-specific bundle on Linux, it may be possible to also enhance the cleanup mojo to perform the cleanup against dependencies according to the bundle's platform filter?

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.compare.win32 branch from 0174ee6 to c7e9145 Compare June 16, 2025 03:33
@laeubi

laeubi commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

@laeubi does the assessment make sense to you?

This is absolutely possible!

But since the we can also properly compile this win32-specific bundle on Linux, it may be possible to also enhance the cleanup mojo to perform the cleanup against dependencies according to the bundle's platform filter?

I need to take a look, in general is should be possible to some extend as we basically setup a java project and then call the cleanup actions, even if the native stuff will never run, JDT should be happy by just see the java class itself...

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.compare.win32 branch 7 times, most recently from 9c6ff37 to 7beabba Compare June 23, 2025 03:37
@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.compare.win32 branch from ab60b5c to ea8727c Compare June 24, 2025 03:33
@laeubi

laeubi commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.compare.win32 branch from de4eca7 to 5460e52 Compare June 24, 2025 11:41
@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.compare.win32 branch from f964484 to b23b00f Compare June 25, 2025 03:32
@akurtakov

Copy link
Copy Markdown
Member

All is good now. Thanks for the enhancements to Tycho!

@akurtakov akurtakov merged commit 54f0633 into master Jun 25, 2025
18 checks passed
@akurtakov akurtakov deleted the clean-code/team/bundles/org.eclipse.compare.win32 branch June 25, 2025 05:24
@HeikoKlare

Copy link
Copy Markdown
Contributor

Thank you for the Tycho improvement that made this work properly, @laeubi!

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.

4 participants