Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 210024 - [Help] Topic element problems constructing from an ITopic
Summary: [Help] Topic element problems constructing from an ITopic
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-15 16:08 EST by Chris Goldthorpe CLA
Modified: 2022-01-20 12:20 EST (History)
0 users

See Also:


Attachments
JUnit tests (11.72 KB, text/plain)
2007-11-15 16:11 EST, Chris Goldthorpe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Goldthorpe CLA 2007-11-15 16:08:56 EST
Eclipse 3.3 does not always do the right thing when creating Topics from other Topics or ITopics. This bug describes three separate problems:

1. If a child is removed from a Topic after it has been used in the constructor for another Topic an exception is thrown:

org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.
	at org.apache.xerces.dom.ParentNode.internalRemoveChild(Unknown Source)

While the exception could easily be caught and ignored a better fix would be to keep the child nodes in synch with the parent nodes.

See JUnit test testCopyTopicWithChildRemoveChild() which I will attach.

2. If a Topic with a child is used in the constructor for another Topic both the old and new Topic will think they own the same child(). This means that calling getParent() for a child topic will not always return the original topic. I think that this is potentially dangerous.

See JUnit test testCopyTopicWithChildCheckParents()

3. If a Topic 't' is constructed from an ITopic and that ITopic has a child the child topic of 't' will always be enabled, regardless of the enablement status of he original child. I believe that this would mean that code which used the API to create a TOC would not have child topics filtered as expected.

See JUnit test testUserTopicWithFilteredChildren
Comment 1 Chris Goldthorpe CLA 2007-11-15 16:11:49 EST
Created attachment 82999 [details]
JUnit tests

This file contains the 3 JUnit tests mentioned and others. Until these are fixed I will leave these commented out in the HEAD version of the test.
Comment 2 Eclipse Webmaster CLA 2019-09-06 15:32:26 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 3 Eclipse Genie CLA 2022-01-20 12:20:12 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.