Skip to content

Implement attribute handling during context merging#2599

Merged
fedejeanne merged 2 commits intoeclipse-platform:masterfrom
vlakn:context.merge.implement.attribute.handling
Apr 2, 2026
Merged

Implement attribute handling during context merging#2599
fedejeanne merged 2 commits intoeclipse-platform:masterfrom
vlakn:context.merge.implement.attribute.handling

Conversation

@vlakn
Copy link
Copy Markdown
Contributor

@vlakn vlakn commented Mar 31, 2026

Implement attribute handling during context merging and enable the related test

Contributes to
#525

vlakn and others added 2 commits March 31, 2026 16:30
Implement attribute handling during context merging and enable the
related test

Contributes to
eclipse-platform#525
@eclipse-platform-bot
Copy link
Copy Markdown
Contributor

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

ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF
ua/org.eclipse.ua.tests/pom.xml

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 e40fef5004e226791bee9e82a6a3f165a28a6869 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Tue, 31 Mar 2026 14:39:05 +0000
Subject: [PATCH] Version bump(s) for 4.40 stream


diff --git a/ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF b/ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF
index 3ac5e35883..6c843abd05 100644
--- a/ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF
+++ b/ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: User Assistance Test
 Bundle-SymbolicName: org.eclipse.ua.tests;singleton:=true
-Bundle-Version: 3.7.400.qualifier
+Bundle-Version: 3.7.500.qualifier
 Require-Bundle: org.eclipse.help.ui,
  org.eclipse.help.webapp,
  org.eclipse.test.performance,
diff --git a/ua/org.eclipse.ua.tests/pom.xml b/ua/org.eclipse.ua.tests/pom.xml
index b1a73bdb0c..a24d50eec3 100644
--- a/ua/org.eclipse.ua.tests/pom.xml
+++ b/ua/org.eclipse.ua.tests/pom.xml
@@ -19,7 +19,7 @@
   </parent>
   <groupId>org.eclipse.platform</groupId>
   <artifactId>org.eclipse.ua.tests</artifactId>
-  <version>3.7.400-SNAPSHOT</version>
+  <version>3.7.500-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 
   <properties>
-- 
2.53.0

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

@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   36m 31s ⏱️ -4s
 4 548 tests +1   4 525 ✅ +1   23 💤 ±0  0 ❌ ±0 
12 240 runs  +3  12 081 ✅ +3  159 💤 ±0  0 ❌ ±0 

Results for commit 0b3f071. ± Comparison against base commit e85fd97.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for copying XML/DOM attributes when Context instances are merged/copied, and re-enables the previously disabled regression test that validates attribute propagation. This aligns with the broader effort to reactivate disabled tests (Issue #525).

Changes:

  • Copy missing attributes from the source Context (when DOM-backed) during Context.mergeContext.
  • Re-enable testCopyContextWithAttribute to validate attribute copying during context copying/merging.
  • Bump org.eclipse.ua.tests bundle/pom version to reflect the test change.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ua/org.eclipse.ua.tests/pom.xml Increments test bundle Maven version.
ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF Increments OSGi bundle version for the test bundle.
ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java Re-enables and runs the attribute-copy regression test.
ua/org.eclipse.help/src/org/eclipse/help/internal/context/Context.java Implements attribute copying when merging contexts (DOM-backed sources).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

Thank you for reenabling the test and adding the required production code to make it work.

The implementation looks sound to me. I was wondering if uaelement.getElement() might be null so that an NPE could happen here, but I checked all callers of the Context constructors and it turns out that they all pass a non-null value.

@fedejeanne can you please also have a look?

Copy link
Copy Markdown
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

Just a nit-picky comment, I approve.

Thank you!

@fedejeanne fedejeanne merged commit 0db3a28 into eclipse-platform:master Apr 2, 2026
22 checks passed
@vlakn vlakn deleted the context.merge.implement.attribute.handling branch April 2, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants