sidekick
Class SideKickPlugin

java.lang.Object
  extended by org.gjt.sp.jedit.EditPlugin
      extended by sidekick.SideKickPlugin

public class SideKickPlugin
extends org.gjt.sp.jedit.EditPlugin

SideKick plugin core class Manages a mapping of View to SideKick instances, creating/destroying SideKick objects whenever Views are created/destroyed.

Version:
$Id: SideKickPlugin.java 20353 2011-11-16 08:04:45Z kpouer $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gjt.sp.jedit.EditPlugin
org.gjt.sp.jedit.EditPlugin.Broken, org.gjt.sp.jedit.EditPlugin.Deferred
 
Field Summary
static java.lang.String DEFAULT
           
static java.lang.String NAME
          The name of the dockable
static java.lang.String NONE
           
static java.lang.String PARSE_COUNT
           
static java.lang.String PARSED_DATA_PROPERTY
           
static java.lang.String PARSER_MODE_PROPERTY
           
static java.lang.String PARSER_PROPERTY
           
 
Constructor Summary
SideKickPlugin()
           
 
Method Summary
static void cleanup(org.gjt.sp.jedit.View view)
           
static void execute(java.lang.Runnable runnable)
           
static void execute(org.gjt.sp.jedit.View view, javax.swing.SwingWorker<SideKickParsedData,java.lang.Object> worker)
           
static org.gjt.sp.jedit.EditPlugin getMarkerSetsPlugin()
           
static SideKickParser getParser(java.lang.String name)
           
static SideKickParser getParserForBuffer(org.gjt.sp.jedit.Buffer buffer)
           
static SideKickParser getParserForMode(org.gjt.sp.jedit.Mode m)
          Returns the parser for the given mode.
static SideKickParser getParserForView(org.gjt.sp.jedit.View view)
           
 void handleBufferUpdate(org.gjt.sp.jedit.msg.BufferUpdate bu)
           
 void handleEditPaneUpdate(org.gjt.sp.jedit.msg.EditPaneUpdate epu)
           
 void handlePluginUpdate(org.gjt.sp.jedit.msg.PluginUpdate msg)
           
 void handlePropertiesChanged(org.gjt.sp.jedit.msg.PropertiesChanged msg)
           
 void handleViewUpdate(org.gjt.sp.jedit.msg.ViewUpdate vu)
           
static boolean isParsingBuffer(org.gjt.sp.jedit.Buffer buffer)
           
static void parse(org.gjt.sp.jedit.View view, boolean showParsingMessage)
          Immediately begins parsing the current buffer in a background thread.
static void setParserForBuffer(org.gjt.sp.jedit.Buffer buffer, java.lang.String parserName)
           
 void start()
           
 void stop()
           
static void stop(org.gjt.sp.jedit.View view)
           
 
Methods inherited from class org.gjt.sp.jedit.EditPlugin
createBrowserMenuItems, createMenuItems, getClassName, getPluginHome, getPluginHome, getPluginHome, getPluginJAR, getResourceAsOutputStream, getResourceAsOutputStream, getResourceAsStream, getResourceAsStream, getResourcePath, getResourcePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name of the dockable

See Also:
Constant Field Values

PARSER_MODE_PROPERTY

public static final java.lang.String PARSER_MODE_PROPERTY
See Also:
Constant Field Values

PARSER_PROPERTY

public static final java.lang.String PARSER_PROPERTY
See Also:
Constant Field Values

PARSED_DATA_PROPERTY

public static final java.lang.String PARSED_DATA_PROPERTY
See Also:
Constant Field Values

PARSE_COUNT

public static final java.lang.String PARSE_COUNT
See Also:
Constant Field Values

NONE

public static final java.lang.String NONE
See Also:
Constant Field Values

DEFAULT

public static final java.lang.String DEFAULT
See Also:
Constant Field Values
Constructor Detail

SideKickPlugin

public SideKickPlugin()
Method Detail

start

public void start()
Overrides:
start in class org.gjt.sp.jedit.EditPlugin

stop

public void stop()
Overrides:
stop in class org.gjt.sp.jedit.EditPlugin

handleViewUpdate

public void handleViewUpdate(org.gjt.sp.jedit.msg.ViewUpdate vu)

handleEditPaneUpdate

public void handleEditPaneUpdate(org.gjt.sp.jedit.msg.EditPaneUpdate epu)

handleBufferUpdate

public void handleBufferUpdate(org.gjt.sp.jedit.msg.BufferUpdate bu)

handlePropertiesChanged

public void handlePropertiesChanged(org.gjt.sp.jedit.msg.PropertiesChanged msg)

handlePluginUpdate

public void handlePluginUpdate(org.gjt.sp.jedit.msg.PluginUpdate msg)

getMarkerSetsPlugin

public static org.gjt.sp.jedit.EditPlugin getMarkerSetsPlugin()

getParserForMode

public static SideKickParser getParserForMode(org.gjt.sp.jedit.Mode m)
Returns the parser for the given mode.

Parameters:
m - the mode (it must not be null)
Returns:
the parser associated to this mode (or null if there is no parser)

getParser

public static SideKickParser getParser(java.lang.String name)
Parameters:
name - - the name of the parser, as defined in services.xml

getParserForView

public static SideKickParser getParserForView(org.gjt.sp.jedit.View view)

setParserForBuffer

public static void setParserForBuffer(org.gjt.sp.jedit.Buffer buffer,
                                      java.lang.String parserName)
Parameters:
buffer -
parserName - the new parser we want to use
Since:
Sidekick 0.6

getParserForBuffer

public static SideKickParser getParserForBuffer(org.gjt.sp.jedit.Buffer buffer)

parse

public static void parse(org.gjt.sp.jedit.View view,
                         boolean showParsingMessage)
Immediately begins parsing the current buffer in a background thread.

Parameters:
view - The view
showParsingMessage - Clear the tree and show a status message there?

execute

public static void execute(java.lang.Runnable runnable)

execute

public static void execute(org.gjt.sp.jedit.View view,
                           javax.swing.SwingWorker<SideKickParsedData,java.lang.Object> worker)

cleanup

public static void cleanup(org.gjt.sp.jedit.View view)

isParsingBuffer

public static boolean isParsingBuffer(org.gjt.sp.jedit.Buffer buffer)

stop

public static void stop(org.gjt.sp.jedit.View view)