org.opensolaris.opengrok.search.scope
Class Config

java.lang.Object
  extended by org.opensolaris.opengrok.search.scope.Config

public class Config
extends java.lang.Object

The Config class is a Singleton class that provides a single storage towards all of the user configurable settings.


Method Summary
 java.util.List<Editor> getAvailableEditors()
          Get a list of the available editors to use to display files.
 Editor getEditor()
          Get the selected editor.
static Config getInstance()
          Get the one and only instance of the Config class
 java.lang.String getPath()
          Get the preferred subtree path.
 boolean getPathHold()
          Get the preferred subtree path button status
 java.util.List<java.io.File> getRecentConfigurations()
           
 void setCurrentConfiguration(java.io.File file)
           
 void setEditor(Editor editor)
          Set the editor to use
 void setPath(java.lang.String path)
          Set the preferred subtree path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Config getInstance()
Get the one and only instance of the Config class

Returns:
A Config object

getAvailableEditors

public java.util.List<Editor> getAvailableEditors()
Get a list of the available editors to use to display files. You may add your own editor by subclassing Editor, and add an entry in the preferences under editors. Create a new "subnode" for your editor, and add the following key's:
    name - this key contains the display-name of the editor
    command - this key contains the command to display in the command field
    class - this key contains the name of the class that implements the editor.
 

Returns:
The list of available editors

getEditor

public Editor getEditor()
Get the selected editor.

Returns:
The editor to use

setEditor

public void setEditor(Editor editor)
Set the editor to use

Parameters:
editor - The editor to use when new files shall be displayed

getRecentConfigurations

public java.util.List<java.io.File> getRecentConfigurations()

setCurrentConfiguration

public void setCurrentConfiguration(java.io.File file)

getPath

public java.lang.String getPath()
Get the preferred subtree path.

Returns:
preferred subtree path.

setPath

public void setPath(java.lang.String path)
Set the preferred subtree path.

Parameters:
path - preferred subtree path.

getPathHold

public boolean getPathHold()
Get the preferred subtree path button status

Returns:
preferred subtree path on?