1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
sub JAVA_Base {
MoveFileStart;
InsertString "package /* package name */;";
2:LineNew;
InsertString "import java.util.*;"; LineNew;
InsertString "import javax.swing.*;"; 2:LineNew;
InsertString "public class ";
InsertString $FileBaseName;
LineNew;
InsertString "{"; LineIndent;
2:LineNew;
InsertString "public ";
InsertString $FileBaseName;
InsertString "()"; LineIndent; LineNew;
InsertString "{"; LineIndent; 2:LineNew;
InsertString "}"; LineIndent; 2:LineNew;
InsertString "}"; LineIndent; LineNew;
MoveFileStart; 8:MoveRight;
}
colorize JAVA {
SyntaxParser = 'C';
color {
{ 'Normal', 'Editor_Default' },
{ 'Number', 'Lang_DecimalNumber' },
{ 'HexNumber', 'Lang_HexNumber' },
{ 'Punctuation', 'Lang_Punctuation' },
{ 'String', 'Lang_String' },
{ 'Comment', 'Lang_Comment' },
{ 'CPreprocessor', 'Lang_Preprocessor' },
{ 'Function', 'Lang_Function' },
{ 'Label', 'Lang_Label' },
};
keyword 'Editor_Keywords' {
'abstract', 'default', 'goto', 'null', 'synchronized',
'boolean', 'do', 'if', 'package', 'this',
'break', 'double', 'implements', 'private', 'threadsafe',
'byte', 'else', 'import', 'protected', 'throw',
'byvalue', 'extends', 'instanceof', 'public', 'transient',
'case', 'false', 'int', 'return', 'true',
'catch', 'final', 'interface', 'short', 'try',
'char', 'finally', 'long', 'static', 'void',
'class', 'float', 'native', 'super', 'while',
'const', 'for', 'new', 'switch', 'continue',
'throws'
};
}
mode JAVA: SOURCE { # JAVA Mode
FileNameRx = /\.\c{JAVA}$/;
HilitOn = 1;
Colorizer = 'JAVA';
AutoIndent = 1;
IndentMode = 'C';
MatchCase = 1;
Trim = 1;
MultiLineHilit = 1;
AutoHilitParen = 1;
RoutineRegexp = /^\s*\w[\w._]+{\s+[\w._]+}+[\w_]+\s*\([^;]*$/;
SaveFolds = 2; # save fold info at end of line
CommentStart = ' /*';
CommentEnd = '*/';
}
oinclude 'mym_java.fte';
|