Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mars.venus.editors.jeditsyntax
Class SyntaxUtilities

    java.lang.Object
      mars.venus.editors.jeditsyntax.SyntaxUtilities

    public class SyntaxUtilities

extends Object

Class with several utility functions used by jEdit's syntax colorizing subsystem.

Author:
  Slava Pestov

Field Summary
`static Popup` | `popup`
`static boolean` | `popupShowing` Paints the specified line onto the graphics context.

Method Summary
`static SyntaxStyle[]` | `getCurrentSyntaxStyles()` Returns the CURRENT style table.
`static SyntaxStyle[]` | `getDefaultSyntaxStyles()` Returns the default style table.
`static int` | `paintSyntaxLine(Segment line, Token tokens, SyntaxStyle[] styles, TabExpander expander, Graphics gfx, int x, int y)`
`static boolean` | `regionMatches(boolean ignoreCase, Segment text, int offset, char[] match)` Checks if a subregion of a `Segment` is equal to a character array.
`static boolean` | `regionMatches(boolean ignoreCase, Segment text, int offset, String match)` Checks if a subregion of a `Segment` is equal to a string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### popupShowing

    public static boolean popupShowing

  Paints the specified line onto the graphics context. Note that this method munges the offset and count values of the segment.

### popup

    public static Popup popup

Method Detail

### regionMatches

    public static boolean regionMatches(boolean ignoreCase,
                                        Segment text,
                                        int offset,
                                        String match)

  Checks if a subregion of a `Segment` is equal to a string.

  Parameters:
    `ignoreCase` - True if case should be ignored, false otherwise
    `text` - The segment
    `offset` - The offset into the segment
    `match` - The string to match

### regionMatches

    public static boolean regionMatches(boolean ignoreCase,
                                        Segment text,
                                        int offset,
                                        char[] match)

  Checks if a subregion of a `Segment` is equal to a character array.

  Parameters:
    `ignoreCase` - True if case should be ignored, false otherwise
    `text` - The segment
    `offset` - The offset into the segment
    `match` - The character array to match

### getDefaultSyntaxStyles

    public static SyntaxStyle[] getDefaultSyntaxStyles()

  Returns the default style table. This can be passed to the `setStyles()` method of `SyntaxDocument` to use the default syntax styles.

### getCurrentSyntaxStyles

    public static SyntaxStyle[] getCurrentSyntaxStyles()

  Returns the CURRENT style table. This can be passed to the `setStyles()` method of `SyntaxDocument` to 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)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD