Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
9.0
-
None
-
None
-
None
Description
There are various places in the netbeans code base, that make use of the HTMLEditorKit to visualize HTML content. In many cases the stylesheet backing the HTMLEditorKit is manipulated. This is the case at least in:
- autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/PanelBodyContainer.java
- autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/DetailsPanel.java
- code.analysis/src/org/netbeans/modules/analysis/ui/AnalysisResultTopComponent.java
- editor.completion/src/org/netbeans/modules/editor/completion/HTMLDocView.java
- java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/BrokenPlatformCustomizer.java
- java.navigation/src/org/netbeans/modules/java/navigation/HTMLDocView.java
- openide.dialogs/src/org/openide/WizardDescriptor.java
- openide.explorer/src/org/openide/explorer/propertysheet/DescriptionComponent.java
- openide.loaders/src/org/openide/loaders/TemplateWizard1.java
- projectui/src/org/netbeans/modules/project/ui/TemplatesPanelGUI.java
This is problematic (as also mentioned in several places in the files above), as the stylesheet is shared by all HTMLEditorKits (think of it as a client style sheet). As a reference this is the implemenation of HTMLEditorKits#setStylesheet:
public void setStyleSheet(StyleSheet s) { if (s == null) { AppContext.getAppContext().remove(DEFAULT_STYLES_KEY); } else { AppContext.getAppContext().put(DEFAULT_STYLES_KEY, s); } }
Other users manipulate the document stylesheet and not the global stylesheet:
- subversion/src/org/netbeans/modules/subversion/util/NotifyHtmlPanel.java
- subversion/src/org/netbeans/modules/subversion/options/SvnOptionsPanel.java
- subversion/src/org/netbeans/modules/subversion/client/MissingClientPanel.java
- openide.awt/src/org/openide/awt/SwingBrowserImpl.java
It should be checked if it would be feasible to centralize the modification of the global stylesheet for example in the org.netbeans.swing.plaf (Look & Feel Customization Library) module.
Attachments
Issue Links
- relates to
-
NETBEANS-404 Javadoc popup is poorly rendered
-
- Closed
-