Implement attribute handling during context merging#2599
Conversation
Implement attribute handling during context merging and enable the related test Contributes to eclipse-platform#525
|
This pull request changes some projects for the first time in this development cycle. 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 patchFurther information are available in Common Build Issues - Missing version increments. |
There was a problem hiding this comment.
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) duringContext.mergeContext. - Re-enable
testCopyContextWithAttributeto validate attribute copying during context copying/merging. - Bump
org.eclipse.ua.testsbundle/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.
HeikoKlare
left a comment
There was a problem hiding this comment.
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?
fedejeanne
left a comment
There was a problem hiding this comment.
Just a nit-picky comment, I approve.
Thank you!
Implement attribute handling during context merging and enable the related test
Contributes to
#525