author | wenzelm |
Mon, 10 May 2021 12:23:30 +0200 | |
changeset 73653 | d9823224fcfe |
parent 72247 | c06260b7152c |
permissions | -rw-r--r-- |
73653
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
1 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/syntax/Chunk.java |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
2 |
--- jedit5.6.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 2020-09-03 05:31:01.000000000 +0200 |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
3 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 2021-05-10 11:02:05.816257745 +0200 |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
4 |
@@ -332,9 +332,9 @@ |
50306 | 5 |
//{{{ Package private members |
6 |
||
7 |
//{{{ Instance variables |
|
8 |
- SyntaxStyle style; |
|
9 |
+ public SyntaxStyle style; |
|
10 |
// set up after init() |
|
11 |
- float width; |
|
12 |
+ public float width; |
|
13 |
//}}} |
|
14 |
||
15 |
//{{{ Chunk constructor |
|
72247 | 16 |
@@ -584,8 +584,8 @@ |
17 |
// this is either style.getBackgroundColor() or |
|
48786 | 18 |
// styles[defaultID].getBackgroundColor() |
19 |
private Color background; |
|
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
20 |
- private char[] chars; |
48786 | 21 |
- private String str; |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
22 |
+ public char[] chars; |
48786 | 23 |
+ public String str; |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
24 |
private GlyphData glyphData; |
50306 | 25 |
//}}} |
26 |
||
73653
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
27 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/textarea/TextArea.java |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
28 |
--- jedit5.6.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 2020-09-03 05:31:01.000000000 +0200 |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
29 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 2021-05-10 11:02:05.820257742 +0200 |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
30 |
@@ -914,6 +914,11 @@ |
61511 | 31 |
return chunkCache.getLineInfo(screenLine).physicalLine; |
32 |
} //}}} |
|
33 |
||
34 |
+ public Chunk getChunksOfScreenLine(int screenLine) |
|
35 |
+ { |
|
36 |
+ return chunkCache.getLineInfo(screenLine).chunks; |
|
37 |
+ } |
|
38 |
+ |
|
39 |
//{{{ getScreenLineOfOffset() method |
|
40 |
/** |
|
41 |
* Returns the screen (wrapped) line containing the specified offset. |
|
73653
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
42 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java jedit5.6.0-patched/jEdit/org/gjt/sp/util/SyntaxUtilities.java |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
43 |
--- jedit5.6.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java 2020-09-03 05:31:09.000000000 +0200 |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
44 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/util/SyntaxUtilities.java 2021-05-10 11:02:05.820257742 +0200 |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
45 |
@@ -344,8 +344,28 @@ |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
46 |
} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
47 |
} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
48 |
|
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
49 |
- return styles; |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
50 |
+ styles[0] = |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
51 |
+ new SyntaxStyle(org.gjt.sp.jedit.jEdit.getColorProperty("view.fgColor", Color.BLACK), |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
52 |
+ null, new Font(family, 0, size)); |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
53 |
+ return _styleExtender.extendStyles(styles); |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
54 |
} //}}} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
55 |
|
48786 | 56 |
+ /** |
57 |
+ * Extended styles derived from the user-specified style array. |
|
58 |
+ */ |
|
59 |
+ |
|
60 |
+ public static class StyleExtender |
|
61 |
+ { |
|
62 |
+ public SyntaxStyle[] extendStyles(SyntaxStyle[] styles) |
|
63 |
+ { |
|
64 |
+ return styles; |
|
65 |
+ } |
|
66 |
+ } |
|
67 |
+ volatile private static StyleExtender _styleExtender = new StyleExtender(); |
|
68 |
+ public static void setStyleExtender(StyleExtender ext) |
|
69 |
+ { |
|
70 |
+ _styleExtender = ext; |
|
71 |
+ } |
|
72 |
+ |
|
73 |
private SyntaxUtilities(){} |
|
74 |
} |