Package mars.venus.editors.jeditsyntax
Class SyntaxUtilities
java.lang.Object
mars.venus.editors.jeditsyntax.SyntaxUtilities
Class with several utility functions used by jEdit's syntax colorizing
subsystem.
- Version:
- $Id: SyntaxUtilities.java,v 1.9 1999/12/13 03:40:30 sp Exp $
- Author:
- Slava Pestov
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SyntaxStyle[]Returns the CURRENT style table.static SyntaxStyle[]Returns the default style table.static intpaintSyntaxLine(Segment line, Token tokens, SyntaxStyle[] styles, TabExpander expander, Graphics gfx, int x, int y)Paints the specified line onto the graphics context.static booleanregionMatches(boolean ignoreCase, Segment text, int offset, char[] match)Checks if a subregion of aSegmentis equal to a character array.static booleanregionMatches(boolean ignoreCase, Segment text, int offset, String match)Checks if a subregion of aSegmentis equal to a string.
-
Field Details
-
popupShowing
public static boolean popupShowing -
popup
-
-
Method Details
-
regionMatches
Checks if a subregion of aSegmentis equal to a string.- Parameters:
ignoreCase- True if case should be ignored, false otherwisetext- The segmentoffset- The offset into the segmentmatch- The string to match
-
regionMatches
Checks if a subregion of aSegmentis equal to a character array.- Parameters:
ignoreCase- True if case should be ignored, false otherwisetext- The segmentoffset- The offset into the segmentmatch- The character array to match
-
getDefaultSyntaxStyles
Returns the default style table. This can be passed to thesetStyles()method ofSyntaxDocumentto use the default syntax styles. -
getCurrentSyntaxStyles
Returns the CURRENT style table. This can be passed to thesetStyles()method ofSyntaxDocumentto use the current syntax styles. If changes have been made via MARS Settings menu, the current settings will not be the same as the default settings. -
paintSyntaxLine
public static int paintSyntaxLine(Segment line, Token tokens, SyntaxStyle[] styles, TabExpander expander, Graphics gfx, int x, int y)Paints the specified line onto the graphics context. Note that this method manipulates the offset and count values of the segment.- Parameters:
line- The line segmenttokens- The token list for the linestyles- The syntax style listexpander- The tab expander used to determine tab stops. May be nullgfx- The graphics contextx- The x co-ordinatey- The y co-ordinate- Returns:
- The x co-ordinate, plus the width of the painted string
-