cleaning up the mess with the text highlighting, etc

This commit is contained in:
benfry
2004-01-08 08:07:12 +00:00
parent 7c927c0438
commit 47cb002c70
5 changed files with 15 additions and 6 deletions
+2 -1
View File
@@ -209,7 +209,8 @@ public class PdeEditor extends JFrame
header = new PdeEditorHeader(this);
rightPanel.add(header, BorderLayout.NORTH);
textarea = new JEditTextArea();
//textarea = new JEditTextArea();
textarea = new JEditTextArea(new PdeTextAreaDefaults());
textarea.setRightClickPopup(new TextAreaPopup());
textarea.setTokenMarker(new PdeKeywords());
+5 -3
View File
@@ -58,11 +58,11 @@ public class PdeKeywords extends CTokenMarker {
int tab = line.indexOf('\t');
if (tab == -1) continue;
String keyword = line.substring(0, tab);
String keyword = line.substring(0, tab).trim();
String second = line.substring(tab + 1);
tab = second.indexOf('\t');
String coloring = second.substring(0, tab);
String htmlFilename = second.substring(tab + 1);
String coloring = second.substring(0, tab).trim();
String htmlFilename = second.substring(tab + 1).trim();
if (coloring.length() > 0) {
// text will be KEYWORD or LITERAL
@@ -70,6 +70,8 @@ public class PdeKeywords extends CTokenMarker {
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc
int num = coloring.charAt(coloring.length() - 1) - '1';
byte id = (byte) ((isKey ? Token.KEYWORD1 : Token.LITERAL1) + num);
//System.out.println("got " + (isKey ? "keyword" : "literal") +
// (num+1) + " for " + keyword);
keywordColoring.add(keyword, id);
}
+1 -1
View File
@@ -625,7 +625,7 @@ public class PdePreferences extends JComponent {
s = st.nextToken();
boolean bold = (s.indexOf("bold") != -1);
boolean italic = (s.indexOf("italic") != -1);
//System.out.println(str + " " + bold + " " + italic);
//System.out.println(what + " = " + str + " " + bold + " " + italic);
return new SyntaxStyle(color, italic, bold);
}
+1 -1
View File
@@ -73,7 +73,7 @@ editor.linehighlight.color=#ddddbb
# bracket/brace highlighting
editor.brackethighlight=true
editor.brackethighligh.color=#ffcc00
editor.brackethighlight.color=#000000
# little pooties at the end of lines that show where they finish
editor.eolmarkers=false
+6
View File
@@ -28,6 +28,12 @@ X make a preference panel to set pde.properties stuff
X new html code for eolas patent case
X move html to external file in the lib folder
X re-enable line highlight
X fix background color
X get bracket highlighting to work
X why won't loop() go bold? -> java 1.4 problem on the mac
_ test what it does on the pc
goodbye macos9
X posted to message board about it going away
o leftover todos