Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-713

HighlightingManager does not track changes to HighlightsLayerExcludes correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 8.2, 9.0
    • 10.0
    • None

    Description

      The editor API defines the JEditorPane client properties HighlightsLayerExcludes and HighlightsLayerIncludes to allow clients to show/hide specific highlight layers on demand. The bug is that modifications to these properties are not reflected properly in the editor.

      The use case here is for a NetBeans Platform application that needs to modify the client properties depending on user action (e.g. keyboard focus state).

      The bug seems to be in o.n.modules.editor.lib2.highlighting.HighlightingManager.Highlighting. In the constructor, the paneFilter variable is initialized once from the HighlightsLayerExcludes/HighlightsLayerIncludes client properties, right above where the propertyChangeListener that is supposed to track changes to it is added. The PropertyChangeListener reacts to changes to the client properties by calling rebuildAllLayers(), which calls rebuildAllLayersImpl(), which always just uses the value of paneFilter set in the constructor.

      Originally reported as Bugzilla bug 248664. Adding this as a JIRA issue to associate with a pull request that I'm about to open.

      Attachments

        Issue Links

          Activity

            People

              emi Emilian Bold
              ebakke Eirik Bakke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m