VISTALL / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Auto highlighting of multiple words interferes with normal selection and stays selected too long #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. instantiated a new JEditorPane
DefaultSyntaxKit.initKit();
setContentType("text/java");

2. add the lines

import com.xyz.model.billing.ChargeModel;
charge : ChargeModel()

3. click into the word ChargeModel

4. Both words are highlighted in light brown

3. placed the cursor before the C. 
   held down shift
   moved cursor after the l

4.  The chargemodel is now selected such that I can copy but it still
displays the original highlighting - I cant tell I actually selected it

5.  I click away elsewhere in the editor

6.  The two ChargeModels are still highlighted with the light brown selection

What is the expected output? 

If a word is selected which appears else where the selection display should
not interfere with the standard editor highlighting functionality.

What version of the product are you using? On what operating system?

jsyntaxpane-0.9.3a.jar
Windows XP

Please provide any additional information below.

If I can disable this particular feature that would be great

Original issue reported on code.google.com by caulton...@gmail.com on 17 Nov 2008 at 5:48

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report.  By default, auto-word highlighting can be disabled by
changing the jsyntaxpane.config.properties file under META-INF\services.
The file contains the "plugins" to use for any particular editorKit:

JavaSyntaxKit.components = jsyntaxpane.components.PairsMarker, \
    jsyntaxpane.components.LineNumbersRuler, \
    jsyntaxpane.components.TokenMarker

You can remove the TokenMarker, and it will not show.

I will look later at how highlighting interferes with selection and fix it.  But
might take a while.

Original comment by ayman.al...@gmail.com on 18 Nov 2008 at 5:14

GoogleCodeExporter commented 9 years ago
You can also use the DefaultSyntaxKit.getConfig to get the configuration, then 
change
the above key/value before creating your EditorPane.  Convenience method to set 
a
property will be added to the class. 

Original comment by ayman.al...@gmail.com on 18 Nov 2008 at 5:26

GoogleCodeExporter commented 9 years ago
Fixed in r54

Original comment by ayman.al...@gmail.com on 18 Nov 2008 at 10:55