java5.php
来自「php 开发的内容管理系统」· PHP 代码 · 共 535 行 · 第 1/5 页
PHP
535 行
<?php
/*************************************************************************************
* java.php
* --------
* Author: Nigel McNie (oracle.shinoda@gmail.com)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
* Release Version: 1.0.7.14 * CVS Revision Version: $Revision: 1.8.2.3 $
* Date Started: 2004/07/10
* Last Modified: $Date: 2006/08/22 10:42:35 $
*
* Java language file for GeSHi.
*
* CHANGES
* -------
* 2005/12/28 (1.0.4)
* - Added instanceof keyword
* 2004/11/27 (1.0.3)
* - Added support for multiple object splitters
* 2004/08/05 (1.0.2)
* - Added URL support
* - Added keyword "this", as bugs in GeSHi class ironed out
* 2004/08/05 (1.0.1)
* - Added support for symbols
* - Added extra missed keywords
* 2004/07/14 (1.0.0)
* - First Release
*
* TODO
* -------------------------
* *
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GeSHi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Java(TM) 2 Platform Standard Edition 5.0',
'COMMENT_SINGLE' => array(1 => '//'), /* import statements are not comments! */
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
/* see the authoritative list of all 50 Java keywords at */
/* http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#229308 */
/* java keywords, part 1: control flow */
'case', 'default', 'do', 'else', 'for',
'goto', 'if', 'switch', 'while'
/* IMO 'break', 'continue', 'return' and 'throw' */
/* should also be added to this group, as they */
/* also manage the control flow, */
/* arguably 'try'/'catch'/'finally' as well */
),
2 => array(
/* java keywords, part 2 */
'break', 'continue', 'return', 'throw',
'try', 'catch', 'finally',
'abstract', 'assert', 'class', 'const', 'enum', 'extends',
'final', 'implements', 'import', 'instanceof', 'interface',
'native', 'new', 'package', 'private', 'protected',
'public', 'static', 'strictfp', 'super', 'synchronized',
'this', 'throws', 'transient', 'volatile'
),
3 => array(
/* Java keywords, part 3: primitive data types and 'void' */
'boolean', 'byte', 'char', 'double',
'float', 'int', 'long', 'short', 'void'
),
4 => array(
/* other reserved words in Java: literals */
/* should be styled to look similar to numbers and Strings */
'false', 'null', 'true'
),
5 => array (
'Applet', 'AppletContext', 'AppletStub', 'AudioClip'
),
6 => array (
'AWTError', 'AWTEvent', 'AWTEventMulticaster', 'AWTException', 'AWTKeyStroke', 'AWTPermission', 'ActiveEvent', 'Adjustable', 'AlphaComposite', 'BasicStroke', 'BorderLayout', 'BufferCapabilities', 'BufferCapabilities.FlipContents', 'Button', 'Canvas', 'CardLayout', 'Checkbox', 'CheckboxGroup', 'CheckboxMenuItem', 'Choice', 'Color', 'Component', 'ComponentOrientation', 'Composite', 'CompositeContext', 'Container', 'ContainerOrderFocusTraversalPolicy', 'Cursor', 'DefaultFocusTraversalPolicy', 'DefaultKeyboardFocusManager', 'Dialog', 'Dimension', 'DisplayMode', 'EventQueue', 'FileDialog', 'FlowLayout', 'FocusTraversalPolicy', 'Font', 'FontFormatException', 'FontMetrics', 'Frame', 'GradientPaint', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'HeadlessException', 'IllegalComponentStateException', 'Image', 'ImageCapabilities', 'Insets', 'ItemSelectable', 'JobAttributes',
'JobAttributes.DefaultSelectionType', 'JobAttributes.DestinationType', 'JobAttributes.DialogType', 'JobAttributes.MultipleDocumentHandlingType', 'JobAttributes.SidesType', 'KeyEventDispatcher', 'KeyEventPostProcessor', 'KeyboardFocusManager', 'Label', 'LayoutManager', 'LayoutManager2', 'MediaTracker', 'Menu', 'MenuBar', 'MenuComponent', 'MenuContainer', 'MenuItem', 'MenuShortcut', 'MouseInfo', 'PageAttributes', 'PageAttributes.ColorType', 'PageAttributes.MediaType', 'PageAttributes.OrientationRequestedType', 'PageAttributes.OriginType', 'PageAttributes.PrintQualityType', 'Paint', 'PaintContext', 'Panel', 'Point', 'PointerInfo', 'Polygon', 'PopupMenu', 'PrintGraphics', 'PrintJob', 'Rectangle', 'RenderingHints', 'RenderingHints.Key', 'Robot', 'ScrollPane', 'ScrollPaneAdjustable', 'Scrollbar', 'Shape', 'Stroke', 'SystemColor', 'TextArea', 'TextComponent', 'TextField', 'TexturePaint', 'Toolkit', 'Transparency', 'Window'
),
7 => array (
'CMMException', 'ColorSpace', 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', 'ICC_ProfileRGB', 'ProfileDataException'
),
8 => array (
'Clipboard', 'ClipboardOwner', 'DataFlavor', 'FlavorEvent', 'FlavorListener', 'FlavorMap', 'FlavorTable', 'MimeTypeParseException', 'StringSelection', 'SystemFlavorMap', 'Transferable', 'UnsupportedFlavorException'
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?