summaryrefslogtreecommitdiff
path: root/inc/geshi/java.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/geshi/java.php')
-rw-r--r--inc/geshi/java.php51
1 files changed, 30 insertions, 21 deletions
diff --git a/inc/geshi/java.php b/inc/geshi/java.php
index 4c5689df2..81cdd3dc8 100644
--- a/inc/geshi/java.php
+++ b/inc/geshi/java.php
@@ -4,13 +4,15 @@
* --------
* Author: Nigel McNie (nigel@geshi.org)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.7.21
+ * Release Version: 1.0.7.22
* Date Started: 2004/07/10
*
* Java language file for GeSHi.
*
* CHANGES
* -------
+ * 2008/05/25 (1.0.7.22)
+ * - Added highlighting of import and package directives as non-OOP
* 2005/12/28 (1.0.4)
* - Added instanceof keyword
* 2004/11/27 (1.0.3)
@@ -51,24 +53,27 @@
$language_data = array (
'LANG_NAME' => 'Java',
- 'COMMENT_SINGLE' => array(1 => '//', 2 => 'import'),
+ 'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('/*' => '*/'),
+ 'COMMENT_REGEXP' => array(
+ //Import and Package directives (Basic Support only)
+ 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'for', 'foreach', 'if', 'else', 'while', 'do',
- 'switch', 'case'
- ),
- 2 => array(
- 'null', 'return', 'false', 'final', 'true', 'public',
+ 'switch', 'case', 'return', 'public',
'private', 'protected', 'extends', 'break', 'class',
'new', 'try', 'catch', 'throws', 'finally', 'implements',
- 'interface', 'throw', 'native', 'synchronized', 'this',
+ 'interface', 'throw', 'final', 'native', 'synchronized', 'this',
'abstract', 'transient', 'instanceof', 'assert', 'continue',
'default', 'enum', 'package', 'static', 'strictfp', 'super',
- 'volatile', 'const', 'goto'
+ 'volatile', 'const', 'goto', 'import', 'package'
+ ),
+ 2 => array(
+ 'null', 'false', 'true'
),
3 => array(
'AbstractAction', 'AbstractBorder', 'AbstractButton', 'AbstractCellEditor',
@@ -1321,7 +1326,11 @@ $language_data = array (
)
),
'SYMBOLS' => array(
- '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?'
+ '(', ')', '[', ']', '{', '}',
+ '+', '-', '*', '/', '%',
+ '!', '&', '|', '^',
+ '<', '>', '=',
+ '?', ':', ';',
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
@@ -1332,34 +1341,34 @@ $language_data = array (
),
'STYLES' => array(
'KEYWORDS' => array(
- 1 => 'color: #b1b100;',
- 2 => 'color: #000000; font-weight: bold;',
- 3 => 'color: #aaaadd; font-weight: bold;',
- 4 => 'color: #993333;'
+ 1 => 'color: #000000; font-weight: bold;',
+ 2 => 'color: #000066; font-weight: bold;',
+ 3 => 'color: #003399;',
+ 4 => 'color: #000066; font-weight: bold;'
),
'COMMENTS' => array(
- 1=> 'color: #808080; font-style: italic;',
- 2=> 'color: #a1a100;',
- 'MULTI' => 'color: #808080; font-style: italic;'
+ 1=> 'color: #666666; font-style: italic;',
+ 2=> 'color: #006699;',
+ 'MULTI' => 'color: #666666; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
- 0 => 'color: #66cc66;'
+ 0 => 'color: #009900;'
),
'STRINGS' => array(
- 0 => 'color: #ff0000;'
+ 0 => 'color: #0000ff;'
),
'NUMBERS' => array(
0 => 'color: #cc66cc;'
),
'METHODS' => array(
- 1 => 'color: #006600;',
- 2 => 'color: #006600;'
+ 1 => 'color: #006633;',
+ 2 => 'color: #006633;'
),
'SYMBOLS' => array(
- 0 => 'color: #66cc66;'
+ 0 => 'color: #339933;'
),
'SCRIPT' => array(
),