Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370422 - When selecting a topic and choosing "Print selected topic and all subtopics", content that should be hidden with Eclipse Help System XML annotations appears in the print preview (Infocenter mode only)
Summary: When selecting a topic and choosing "Print selected topic and all subtopics",...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 06:10 EST by Eero Helenius CLA
Modified: 2019-09-17 00:25 EDT (History)
2 users (show)

See Also:


Attachments
An Eclipse Help System JAR plugin for testing dynamic content behavior. (3.53 KB, application/octet-stream)
2012-02-02 06:11 EST, Eero Helenius CLA
no flags Details
temporary bugfix (16.07 KB, application/octet-stream)
2012-02-09 03:25 EST, Lukasz H. CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eero Helenius CLA 2012-02-02 06:10:47 EST
Build Identifier: I20120125-1800

Let's say I have a <div> element that I only want to show to customers when a JAR plugin called "product.A.isInstalled.jar" is in PLUGINS_ROOT.

To achieve that, I can use dynamic content -- more specifically, XML annotations -- as described on this page:

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fua_dynamic.htm

So I add an element like this:

<div>
  <p>This text should be hidden.</p>
  <enablement>
    <test property="org.eclipse.core.runtime.isBundleInstalled" args="product.A.isInstalled"/>
  </enablement>
</div>

After that, the contents of the element don't show up in the content frame.

However, if I select the document in the TOC and select "Print selected topic and all subtopics", the <div> element appears in the print preview even though it shouldn't.

The interesting thing is that this only seems to happen when:

1. The Eclipse Help System is being run in the Infocenter mode:
    http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm

2. You use the "Print selected topic and all subtopics" feature. "Print topic" seems to work fine.

If you come up with a workaround to this bug, I'd really appreciate it if you'd let me know.

Reproducible: Always

Steps to Reproduce:
1. Add enablement.jar (see attachment) into PLUGINS_ROOT.
2. Start the Eclipse Help System in Information Center mode.
3. Select the "Enablement test" document in the TOC.
4. Check the content in the content frame.
5. Choose "Print selected topic and all subtopics".
6. Compare the content in the print preview to the content in the content frame in step 4.
Comment 1 Eero Helenius CLA 2012-02-02 06:11:40 EST
Created attachment 210437 [details]
An Eclipse Help System JAR plugin for testing dynamic content behavior.
Comment 2 Eero Helenius CLA 2012-02-02 06:57:12 EST
One thing I forgot to mention: the "filterInfocenter" property is set to "true".
Comment 3 Lukasz H. CLA 2012-02-09 03:25:07 EST
Created attachment 210775 [details]
temporary bugfix

We managed to recompile the code with temporary fix by adding default value for filter:

//boolean filter = BaseHelpSystem.getMode() != BaseHelpSystem.MODE_INFOCENTER;
boolean filter = true;

Anyway this needs further investigation by Eclipse team as DynamicXHTMLProcessor.process has this filter defined as an input attribute and because Infocenter supports now filtering, something has to be done with this.
Comment 4 Eclipse Genie CLA 2019-09-17 00:25:41 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.

--
The automated Eclipse Genie.