Tags:
create new tag
, view all tags

Back to Plugin Home

Highlighters

Introduction

This feature allow highlight code of any language and etc. It fing and color the keywords or matched regular expressions.

Syntax of definition

To define you custom highlighter you must define in this topic follow entry:

%CODE:DEF{"java"}%

here put formatters to replace reserved words, strings, etc. See PhantomPluginFormatters topic.

%CODE:END%

Using

Imagine that we define highlighter "java", then we can use:

%CODE:JAVA%

/* Block comment */
import java.util.Date;

/**
 * Doc comment here for <code>SomeClass</code>
 * @version 1.0
 */
public class SomeClass { // some comment
  private String field = "Hello World";
  private double unusedField = 12345.67890;
  private UnknownType anotherString = "AnotherString";

  public SomeClass() {
    //TODO: something
    int localVar = "IntelliJ"; // Error, incompatible types
    System.out.println(anotherString + field + localVar);
    long time = Date.parse("1.2.3"); // Method is deprecated
  }
}
%CODE:END%


See also PhantomPluginFormatters

-- AlexeyEfimov - 17 Nov 2002

Topic revision: r4 - 2005-07-15 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.