Menu

Commit [r4222]  Maximize  Restore  History

Fixed a long-standing bug that involved DrJava highlights taking precedence over selected text highlighting. This was fixed by enforcing an ordering on the highlights by an insert-in-order operation when a highlight is added. The ordering is as follows (from most important to least):

DefaultUnderlineHighlightPainter (used for underlines as in find all)
DefaultFrameHighlightPainter (used to draw a box around the highlighted text)
DefaultHighlightPainter (now called only by Swing for a normal highlight)
DrJavaHighlightPainter (a normal highlight requested by DrJava)

The DrJavaHighlightPainter nested class was added in order to differentiate between highlights created by DrJava and those created by Swing (this helps us find the selected text highlight and raise its priority). The insert-in-order operation may cause a slight performance decrease, but is not intended as a long-term solution. Ideally, a better type of storage will be used to make inserting a quicker operation.

M src/edu/rice/cs/drjava/ui/DefinitionsPane.java
M src/edu/rice/cs/drjava/ui/ErrorPanel.java
M src/edu/rice/cs/drjava/ui/AbstractDJPane.java
M src/edu/rice/cs/drjava/ui/ReverseHighlighter.java
M src/edu/rice/cs/util/swing/HighlightManagerTest.java

sigma_lmtd 2007-04-02

changed /trunk/drjava/src/edu/rice/cs/drjava/ui/AbstractDJPane.java
changed /trunk/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.java
changed /trunk/drjava/src/edu/rice/cs/drjava/ui/ErrorPanel.java
changed /trunk/drjava/src/edu/rice/cs/drjava/ui/ReverseHighlighter.java
changed /trunk/drjava/src/edu/rice/cs/util/swing/HighlightManagerTest.java
/trunk/drjava/src/edu/rice/cs/drjava/ui/AbstractDJPane.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/ui/ErrorPanel.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/drjava/ui/ReverseHighlighter.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/util/swing/HighlightManagerTest.java Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB