projectviewer.config
Class ProjectViewerConfig

java.lang.Object
  extended byprojectviewer.config.ProjectViewerConfig

public final class ProjectViewerConfig
extends java.lang.Object

Class to hold configuration information for the plugin.

Note about property changing events: currently, these events are only generated for the properties regarding the ProjectViewer GUI (that is, SHOW_TOOLBAR_OPT, SHOW_FOLDERS_OPT, SHOW_FILES_OPT and SHOW_WFILES_OPT). If the change of another property needs to be notified to someone, please include the call to the appropriate "firePropertyChanged" method is the setter methods of the property.

Also of note is that these events are for internal ProjectViewer use and are not meant to be used by other plugins interfacing with PV.

Author:
Marcelo Vanzin

Field Summary
static int ASK_ALWAYS
           
static java.lang.String ASK_IMPORT_OPT
           
static int ASK_NEVER
           
static int ASK_ONCE
           
static int AUTO_IMPORT
           
static java.lang.String BROWSER_PATH_OPT
           
static java.lang.String BROWSER_USE_INFOVIEWER
           
static java.lang.String CASE_INSENSITIVE_SORT_OPT
           
static java.lang.String CLOSE_FILES_OPT
           
static java.lang.String CONFIG_FILE
           
static java.lang.String DELETE_NOT_FOUND_FILES_OPT
           
static java.lang.String ERRORLIST_PLUGIN
           
static java.lang.String EXCLUDE_DIRS_OPT
           
static java.lang.String FOLLOW_BUFFER_OPT
           
static java.lang.String IMPORT_EXTS_OPT
           
static java.lang.String IMPORT_GLOBS_OPT
           
static java.lang.String INCLUDE_FILES_OPT
           
static java.lang.String INFOVIEWER_PLUGIN
           
static java.lang.String LAST_INIT_VERSION_OPT
           
static java.lang.String LAST_NODE_OPT
           
static java.lang.String LAST_PROJECT_OPT
           
static java.lang.String REMEBER_OPEN_FILES_OPT
           
static java.lang.String SHOW_COMPACT_OPT
           
static java.lang.String SHOW_FILES_OPT
           
static java.lang.String SHOW_FILTERED_OPT
           
static java.lang.String SHOW_FOLDERS_OPT
           
static java.lang.String SHOW_PROJECT_TITLE_OPT
           
static java.lang.String SHOW_TOOLBAR_OPT
           
static java.lang.String SHOW_WFILES_OPT
           
static java.lang.String USE_EXTERNAL_APPS_OPT
           
static java.lang.String USE_SYSTEM_ICONS_OPT
           
static java.lang.String USER_CONTEXT_MENU
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a new property change listener to the list.
 int getAskImport()
           
 java.lang.String getBrowserPath()
           
 boolean getCaseInsensitiveSort()
           
 boolean getCloseFiles()
           
 boolean getDeleteNotFoundFiles()
           
 java.lang.String getExcludeDirs()
           
 boolean getFollowCurrentBuffer()
           
 java.lang.String getImportGlobs()
           
static ProjectViewerConfig getInstance()
          Returns the config.
 VPTNode getLastNode()
          Returns the path to the last active node as a list.
 java.lang.String getLastProject()
          Deprecated. Not used by PV anymore. Superseded by getLastNode().
 boolean getRememberOpen()
           
 boolean getShowCompactTree()
           
 boolean getShowFilesTree()
           
 boolean getShowFilteredTree()
           
 boolean getShowFoldersTree()
           
 boolean getShowProjectInTitle()
           
 boolean getShowToolBar()
           
 boolean getShowWorkingFilesTree()
           
 boolean getUseExternalApps()
           
 boolean getUseInfoViewer()
           
 java.lang.String getUserContextMenu()
           
 boolean getUseSystemIcons()
           
 boolean hasBinaryFileCheck()
          Checks whether jEdit has the methods to do binary file check, which was added in 4.3pre5.
 boolean isErrorListAvailable()
           
 boolean isInfoViewerAvailable()
           
 boolean isJEdit43()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a property change listener to the list.
 void save()
          Save the configuration to the plugin's config file on disk.
 void setAskImport(int newAskImport)
           
 void setBrowserpath(java.lang.String newBrowserPath)
           
 void setCaseInsensitiveSort(boolean flag)
           
 void setCloseFiles(boolean closeFiles)
           
 void setDeleteNotFoundFiles(boolean deleteNotFoundFiles)
           
 void setExcludeDirs(java.lang.String newExcludeDirs)
           
 void setFollowCurrentBuffer(boolean flag)
           
 void setImportGlobs(java.lang.String importGlobs)
           
 void setLastNode(VPTNode node)
          Sets the path to the given node as the "last active path" used by the user.
 void setLastProject(java.lang.String newLastProject)
          Deprecated. Not used by PV anymore. Superseded by setLastNode(VPTNode).
 void setRememberOpen(boolean newRememberOpen)
           
 void setShowCompactTree(boolean newValue)
           
 void setShowFilesTree(boolean newShowFilesTree)
           
 void setShowFilteredTree(boolean newValue)
           
 void setShowFoldersTree(boolean newShowFoldersTree)
           
 void setShowProjectInTitle(boolean flag)
           
 void setShowToolBar(boolean newShowToolBar)
           
 void setShowWorkingFilesTree(boolean newShowWorkingFilesTree)
           
 void setUseExternalApps(boolean useExternalApps)
           
 void setUseInfoViewer(boolean useInfoViewer)
           
 void setUserContextMenu(java.lang.String userContextMenu)
           
 void setUseSystemIcons(boolean useSystemIcons)
           
 void update(java.util.Properties props)
          Updates the properties in the properties object passed to reflect the current state of the config.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILE

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

ERRORLIST_PLUGIN

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

INFOVIEWER_PLUGIN

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

ASK_IMPORT_OPT

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

BROWSER_PATH_OPT

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

BROWSER_USE_INFOVIEWER

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

CASE_INSENSITIVE_SORT_OPT

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

CLOSE_FILES_OPT

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

DELETE_NOT_FOUND_FILES_OPT

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

EXCLUDE_DIRS_OPT

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

FOLLOW_BUFFER_OPT

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

IMPORT_EXTS_OPT

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

IMPORT_GLOBS_OPT

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

INCLUDE_FILES_OPT

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

LAST_NODE_OPT

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

LAST_PROJECT_OPT

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

LAST_INIT_VERSION_OPT

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

REMEBER_OPEN_FILES_OPT

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

SHOW_PROJECT_TITLE_OPT

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

USE_EXTERNAL_APPS_OPT

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

USE_SYSTEM_ICONS_OPT

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

SHOW_COMPACT_OPT

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

SHOW_FILES_OPT

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

SHOW_FILTERED_OPT

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

SHOW_FOLDERS_OPT

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

SHOW_TOOLBAR_OPT

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

SHOW_WFILES_OPT

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

USER_CONTEXT_MENU

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

ASK_ALWAYS

public static final int ASK_ALWAYS
See Also:
Constant Field Values

ASK_ONCE

public static final int ASK_ONCE
See Also:
Constant Field Values

ASK_NEVER

public static final int ASK_NEVER
See Also:
Constant Field Values

AUTO_IMPORT

public static final int AUTO_IMPORT
See Also:
Constant Field Values
Method Detail

getInstance

public static ProjectViewerConfig getInstance()
Returns the config.


setCloseFiles

public void setCloseFiles(boolean closeFiles)

setDeleteNotFoundFiles

public void setDeleteNotFoundFiles(boolean deleteNotFoundFiles)

setRememberOpen

public void setRememberOpen(boolean newRememberOpen)

setAskImport

public void setAskImport(int newAskImport)

setExcludeDirs

public void setExcludeDirs(java.lang.String newExcludeDirs)

setLastProject

public void setLastProject(java.lang.String newLastProject)
Deprecated. Not used by PV anymore. Superseded by setLastNode(VPTNode).


setBrowserpath

public void setBrowserpath(java.lang.String newBrowserPath)

setShowToolBar

public void setShowToolBar(boolean newShowToolBar)

setShowFoldersTree

public void setShowFoldersTree(boolean newShowFoldersTree)

setShowFilesTree

public void setShowFilesTree(boolean newShowFilesTree)

setShowWorkingFilesTree

public void setShowWorkingFilesTree(boolean newShowWorkingFilesTree)

setShowCompactTree

public void setShowCompactTree(boolean newValue)

setShowFilteredTree

public void setShowFilteredTree(boolean newValue)

getCloseFiles

public boolean getCloseFiles()

getDeleteNotFoundFiles

public boolean getDeleteNotFoundFiles()

getRememberOpen

public boolean getRememberOpen()

getAskImport

public int getAskImport()

getExcludeDirs

public java.lang.String getExcludeDirs()

getLastProject

public java.lang.String getLastProject()
Deprecated. Not used by PV anymore. Superseded by getLastNode().


getBrowserPath

public java.lang.String getBrowserPath()

getShowToolBar

public boolean getShowToolBar()

getShowFoldersTree

public boolean getShowFoldersTree()

getShowFilesTree

public boolean getShowFilesTree()

getShowWorkingFilesTree

public boolean getShowWorkingFilesTree()

getShowCompactTree

public boolean getShowCompactTree()

getShowFilteredTree

public boolean getShowFilteredTree()

setUseInfoViewer

public void setUseInfoViewer(boolean useInfoViewer)

getUseInfoViewer

public boolean getUseInfoViewer()

setUserContextMenu

public void setUserContextMenu(java.lang.String userContextMenu)

getUserContextMenu

public java.lang.String getUserContextMenu()

setUseSystemIcons

public void setUseSystemIcons(boolean useSystemIcons)

getUseSystemIcons

public boolean getUseSystemIcons()

setLastNode

public void setLastNode(VPTNode node)
Sets the path to the given node as the "last active path" used by the user. This makes it possible to reload the exact node that was active before next time PV starts, be it a project or a group.

Since:
PV 2.1.0

getLastNode

public VPTNode getLastNode()
Returns the path to the last active node as a list. Each item is the name of a node in the path, starting with the first child of the root node at index 0. This method will never return null; at least the root of the tree will be returned.

Note: DON'T CALL THIS METHOD; it's for internal PV use ONLY, and having other callers might mess some things up.

Since:
PV 2.1.0

setUseExternalApps

public void setUseExternalApps(boolean useExternalApps)

getUseExternalApps

public boolean getUseExternalApps()

setImportGlobs

public void setImportGlobs(java.lang.String importGlobs)

getImportGlobs

public java.lang.String getImportGlobs()

setShowProjectInTitle

public void setShowProjectInTitle(boolean flag)

getShowProjectInTitle

public boolean getShowProjectInTitle()

setCaseInsensitiveSort

public void setCaseInsensitiveSort(boolean flag)

getCaseInsensitiveSort

public boolean getCaseInsensitiveSort()

setFollowCurrentBuffer

public void setFollowCurrentBuffer(boolean flag)

getFollowCurrentBuffer

public boolean getFollowCurrentBuffer()

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a new property change listener to the list.


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener to the list.


update

public void update(java.util.Properties props)

Updates the properties in the properties object passed to reflect the current state of the config.


save

public void save()
Save the configuration to the plugin's config file on disk.


isInfoViewerAvailable

public boolean isInfoViewerAvailable()

isErrorListAvailable

public boolean isErrorListAvailable()

isJEdit43

public boolean isJEdit43()

hasBinaryFileCheck

public boolean hasBinaryFileCheck()
Checks whether jEdit has the methods to do binary file check, which was added in 4.3pre5.

Since:
PV 2.3.1.6