| author | blanchet | 
| Fri, 25 Jul 2014 11:26:17 +0200 | |
| changeset 57671 | dc5e1b1db9ba | 
| parent 53898 | e4825d4c6bd7 | 
| child 59571 | 1081f91c0662 | 
| permissions | -rw-r--r-- | 
| 53415 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 1 | diff -ru 5.1.0/jEdit/org/gjt/sp/jedit/gui/StyleEditor.java 5.1.0/jEdit-patched/org/gjt/sp/jedit/gui/StyleEditor.java | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 2 | --- 5.1.0/jEdit/org/gjt/sp/jedit/gui/StyleEditor.java 2013-07-28 19:03:38.000000000 +0200 | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 3 | +++ 5.1.0/jEdit-patched/org/gjt/sp/jedit/gui/StyleEditor.java 2013-09-05 10:51:29.192192327 +0200 | 
| 50306 | 4 | @@ -79,7 +79,7 @@ | 
| 48786 | 5 | start = next; | 
| 6 | token = token.next; | |
| 7 | } | |
| 8 | - if (token.id == Token.END || token.id == Token.NULL) | |
| 9 | + if (token.id == Token.END || (token.id % Token.ID_COUNT) == Token.NULL) | |
| 10 |  		{
 | |
| 11 | JOptionPane.showMessageDialog(textArea.getView(), | |
| 12 |  				jEdit.getProperty("syntax-style-no-token.message"),
 | |
| 53415 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 13 | diff -ru 5.1.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 5.1.0/jEdit-patched/org/gjt/sp/jedit/syntax/Chunk.java | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 14 | --- 5.1.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 2013-07-28 19:03:51.000000000 +0200 | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 15 | +++ 5.1.0/jEdit-patched/org/gjt/sp/jedit/syntax/Chunk.java 2013-09-05 10:51:29.192192327 +0200 | 
| 50306 | 16 | @@ -256,9 +256,9 @@ | 
| 17 |  	//{{{ Package private members
 | |
| 18 | ||
| 19 |  	//{{{ Instance variables
 | |
| 20 | - SyntaxStyle style; | |
| 21 | + public SyntaxStyle style; | |
| 22 | // set up after init() | |
| 23 | - float width; | |
| 24 | + public float width; | |
| 25 | //}}} | |
| 26 | ||
| 27 |  	//{{{ Chunk constructor
 | |
| 28 | @@ -506,7 +506,7 @@ | |
| 48786 | 29 | // this is either style.getBackgroundColor() or | 
| 30 | // styles[defaultID].getBackgroundColor() | |
| 31 | private Color background; | |
| 32 | - private String str; | |
| 33 | + public String str; | |
| 50306 | 34 | private GlyphVector[] glyphs; | 
| 35 | //}}} | |
| 36 | ||
| 53415 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 37 | diff -ru 5.1.0/jEdit/org/gjt/sp/jedit/syntax/Token.java 5.1.0/jEdit-patched/org/gjt/sp/jedit/syntax/Token.java | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 38 | --- 5.1.0/jEdit/org/gjt/sp/jedit/syntax/Token.java 2013-07-28 19:03:51.000000000 +0200 | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 39 | +++ 5.1.0/jEdit-patched/org/gjt/sp/jedit/syntax/Token.java 2013-09-05 10:51:29.192192327 +0200 | 
| 48786 | 40 | @@ -57,7 +57,7 @@ | 
| 41 | */ | |
| 42 | public static String tokenToString(byte token) | |
| 43 |  	{
 | |
| 44 | - return (token == Token.END) ? "END" : TOKEN_TYPES[token]; | |
| 45 | + return (token == Token.END) ? "END" : TOKEN_TYPES[token % ID_COUNT]; | |
| 46 | } //}}} | |
| 47 | ||
| 48 |  	//{{{ Token types
 | |
| 53415 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 49 | diff -ru 5.1.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java 5.1.0/jEdit-patched/org/gjt/sp/util/SyntaxUtilities.java | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 50 | --- 5.1.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java 2013-07-28 19:03:53.000000000 +0200 | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 51 | +++ 5.1.0/jEdit-patched/org/gjt/sp/util/SyntaxUtilities.java 2013-09-05 10:51:29.192192327 +0200 | 
| 48786 | 52 | @@ -194,7 +194,24 @@ | 
| 53 |  	{
 | |
| 54 | return loadStyles(family,size,true); | |
| 55 | } | |
| 56 | - | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * Extended styles derived from the user-specified style array. | |
| 60 | + */ | |
| 61 | + | |
| 62 | + public static class StyleExtender | |
| 63 | +	{
 | |
| 64 | + public SyntaxStyle[] extendStyles(SyntaxStyle[] styles) | |
| 65 | +		{
 | |
| 66 | + return styles; | |
| 67 | + } | |
| 68 | + } | |
| 69 | + volatile private static StyleExtender _styleExtender = new StyleExtender(); | |
| 70 | + public static void setStyleExtender(StyleExtender ext) | |
| 71 | +	{
 | |
| 72 | + _styleExtender = ext; | |
| 73 | + } | |
| 74 | + | |
| 75 | /** | |
| 76 | * Loads the syntax styles from the properties, giving them the specified | |
| 77 | * base font family and size. | |
| 78 | @@ -224,9 +241,9 @@ | |
| 79 | Log.log(Log.ERROR,StandardUtilities.class,e); | |
| 80 | } | |
| 81 | } | |
| 82 | - | |
| 83 | - return styles; | |
| 84 | + styles[0] = new SyntaxStyle(Color.black, null, new Font(family, 0, size)); | |
| 85 | + return _styleExtender.extendStyles(styles); | |
| 86 | } //}}} | |
| 87 | - | |
| 88 | + | |
| 89 |  	private SyntaxUtilities(){}
 | |
| 90 | } | |
| 53415 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 91 | diff -ru 5.1.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 5.1.0/jEdit-patched/org/gjt/sp/jedit/textarea/TextArea.java | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 92 | --- 5.1.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 2013-07-28 19:03:32.000000000 +0200 | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 93 | +++ 5.1.0/jEdit-patched/org/gjt/sp/jedit/textarea/TextArea.java 2013-09-05 10:51:29.196192309 +0200 | 
| 
9ebab8b7d73c
updated to jedit_build-20130905 which is based on jedit-5.1.0;
 wenzelm parents: 
50306diff
changeset | 94 | @@ -907,6 +907,11 @@ | 
| 50306 | 95 | return chunkCache.getLineInfo(screenLine).physicalLine; | 
| 96 | } //}}} | |
| 97 | ||
| 98 | + public Chunk getChunksOfScreenLine(int screenLine) | |
| 99 | +        {
 | |
| 100 | + return chunkCache.getLineInfo(screenLine).chunks; | |
| 101 | + } | |
| 102 | + | |
| 103 |  	//{{{ getScreenLineOfOffset() method
 | |
| 104 | /** | |
| 105 | * Returns the screen (wrapped) line containing the specified offset. |