Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-10-14 23:10:16 +0000
committerChris Goldthorpe2011-10-14 23:12:29 +0000
commit5519734d70494c3f7c798fd2cd55d89feb0702c7 (patch)
treefbe17a7430d5bd77234dacf7d51f8bba3204e6bc
parent33b7a3aa349fe40d99263598f1d913f5daef429c (diff)
downloadeclipse.platform.ua-5519734d70494c3f7c798fd2cd55d89feb0702c7.tar.gz
eclipse.platform.ua-5519734d70494c3f7c798fd2cd55d89feb0702c7.tar.xz
eclipse.platform.ua-5519734d70494c3f7c798fd2cd55d89feb0702c7.zip
Bug 360983 - [Help] isEnabled is not called for children of ITocs whichv20111017
are created by a toc provider
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/UAElement.java5
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java7
2 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java b/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
index 0e69cd9da..672298d53 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -141,6 +141,9 @@ public class UAElement implements IUAElement {
}
public void appendChildren(IUAElement[] children) {
+ if (this.children == null && children.length > 0) {
+ this.children = new ArrayList(4);
+ }
for (int i=0;i<children.length;i++) {
appendChild(children[i] instanceof UAElement ? (UAElement)children[i] : UAElementFactory.newElement(children[i]));
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
index 171e6839f..feb4408c8 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -275,8 +275,7 @@ public class TopicTest extends TestCase {
assertFalse(t2.isEnabled(HelpEvaluationContext.getContext()));
}
- /*
- * Disabled, see Bug 210024 [Help] Topic element problems constructing from an ITopic
+
public void testUserTopicWithFilteredChildren() {
UserTopic u1 = new UserTopic(ECLIPSE, ECLIPSE_HREF, true);
UserTopic u2 = new UserTopic(BUGZILLA, BUGZILLA_HREF, false);
@@ -291,7 +290,7 @@ public class TopicTest extends TestCase {
assertEquals(BUGZILLA_HREF, t2.getHref());
assertFalse(t2.isEnabled(HelpEvaluationContext.getContext()));
}
- */
+
public void testCopyUserTopicWithChildren() {
UserTopic u1 = new UserTopic(ECLIPSE, ECLIPSE_HREF, true);

Back to the top