com.aptana.ide.lexer
Class LexerPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by com.aptana.ide.lexer.LexerPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class LexerPlugin
extends org.eclipse.core.runtime.Plugin

The main plugin class to be used in the desktop.


Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
LexerPlugin()
          The constructor.
 
Method Summary
static LexerPlugin getDefault()
          Returns the shared instance.
static java.lang.String getLexerType()
          getLexerType
static java.lang.String getPluginVersion(org.eclipse.core.runtime.Plugin plugin)
          Retrieves the bundle version or a plugin based on its ID.
static void log(int statusNumber, java.lang.String message, java.lang.Throwable throwable)
          Logs an error
static void logError(java.lang.String message)
          Logs an error
static void logError(java.lang.String message, java.lang.Throwable th)
          Logs an error
static void logInfo(java.lang.String message)
          Logs an error
static void logInfo(java.lang.String message, java.lang.Throwable th)
          Logs an error
static void logWarning(java.lang.String message)
          logWarning
static void logWarning(java.lang.String message, java.lang.Throwable th)
          logWarning
 void start(org.osgi.framework.BundleContext context)
          This method is called upon plug-in activation
 void stop(org.osgi.framework.BundleContext context)
          This method is called when the plug-in is stopped
static boolean useAsciiLexer()
          useAsciiLexer
static boolean useCodeBasedLexer()
          useCodeBasedLexer
static boolean useMatcherLexer()
          useMatcherLexer
static boolean useUnicodeLexer()
          useUnicodeLexer
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LexerPlugin

public LexerPlugin()
The constructor.

Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
This method is called upon plug-in activation

Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.core.runtime.Plugin
Parameters:
context -
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
This method is called when the plug-in is stopped

Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.core.runtime.Plugin
Parameters:
context -
Throws:
java.lang.Exception

getDefault

public static LexerPlugin getDefault()
Returns the shared instance.

Returns:
Returns LexerPlugin

getLexerType

public static java.lang.String getLexerType()
getLexerType

Returns:
lexer type

logError

public static void logError(java.lang.String message)
Logs an error

Parameters:
message - The message to log

logError

public static void logError(java.lang.String message,
                            java.lang.Throwable th)
Logs an error

Parameters:
message -
th -

logInfo

public static void logInfo(java.lang.String message)
Logs an error

Parameters:
message -

logInfo

public static void logInfo(java.lang.String message,
                           java.lang.Throwable th)
Logs an error

Parameters:
message -
th -

logWarning

public static void logWarning(java.lang.String message)
logWarning

Parameters:
message -

logWarning

public static void logWarning(java.lang.String message,
                              java.lang.Throwable th)
logWarning

Parameters:
message -
th -

log

public static void log(int statusNumber,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Logs an error

Parameters:
statusNumber -
message -
throwable -

getPluginVersion

public static java.lang.String getPluginVersion(org.eclipse.core.runtime.Plugin plugin)
Retrieves the bundle version or a plugin based on its ID.

Parameters:
plugin - The plugin to retrieve from
Returns:
The version of the bundle, or null if not found.

useAsciiLexer

public static boolean useAsciiLexer()
useAsciiLexer

Returns:
boolean

useUnicodeLexer

public static boolean useUnicodeLexer()
useUnicodeLexer

Returns:
boolean

useCodeBasedLexer

public static boolean useCodeBasedLexer()
useCodeBasedLexer

Returns:
boolean

useMatcherLexer

public static boolean useMatcherLexer()
useMatcherLexer

Returns:
boolean