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_FOLDERS_OPT, SHOW_FILES_OPT, SHOW_WFILES_OPT, USER_CONTEXT_MENU and USER_MENU_FIRST).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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADD_HIDDEN |
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 |
DIR_FILTER_KEY |
static java.lang.String |
DIR_GLOB |
static java.lang.String |
ERRORLIST_PLUGIN |
static java.lang.String |
EXCLUDE_DIRS_OPT |
static java.lang.String |
EXTENSIONS_PREFIX |
static java.lang.String |
FILE_FILTER_KEY |
static java.lang.String |
FILE_GLOB |
static java.lang.String |
FILE_NAME_KEY |
static java.lang.String |
FILTER_ID |
static java.lang.String |
FLATTEN |
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 |
KEEP_TREE |
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_ALLWFILES_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_WFILES_OPT |
static java.lang.String |
TRAVERSE_DIRS |
static java.lang.String |
USE_EXTERNAL_APPS_OPT |
static java.lang.String |
USE_SYSTEM_ICONS_OPT |
static java.lang.String |
USE_VARIABLE_PATHS_OPT |
static java.lang.String |
USER_CONTEXT_MENU |
static java.lang.String |
USER_MENU_FIRST |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a new property change listener to the list.
|
void |
clearLastNodes()
Clears last nodes list.
|
void |
disableExtension(java.lang.String type,
java.lang.String ext) |
void |
enableExtension(java.lang.String type,
java.lang.String ext) |
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.
|
boolean |
getRememberOpen() |
boolean |
getShowAllWorkingFiles() |
boolean |
getShowCompactTree() |
boolean |
getShowFilesTree() |
boolean |
getShowFilteredTree() |
boolean |
getShowFoldersTree() |
boolean |
getShowProjectInTitle() |
boolean |
getShowWorkingFilesTree() |
boolean |
getUseExternalApps() |
boolean |
getUseInfoViewer() |
java.lang.String |
getUserContextMenu() |
boolean |
getUserMenuFirst() |
boolean |
getUseSystemIcons() |
boolean |
getUseVariablePaths() |
void |
handlePluginUpdate(org.gjt.sp.jedit.msg.PluginUpdate pluginUpdate) |
boolean |
isEarlyStartupRequired()
Early startup is required if all of the following is fulfilled:
User specified "Remember open project files"
There was a project open last time
|
boolean |
isErrorListAvailable() |
boolean |
isExtensionEnabled(java.lang.String type,
java.lang.String ext) |
boolean |
isInfoViewerAvailable() |
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 |
setRememberOpen(boolean newRememberOpen) |
void |
setShowAllWorkingFiles(boolean newShowAllWorkingFiles) |
void |
setShowCompactTree(boolean newValue) |
void |
setShowFilesTree(boolean newShowFilesTree) |
void |
setShowFilteredTree(boolean newValue) |
void |
setShowFoldersTree(boolean newShowFoldersTree) |
void |
setShowProjectInTitle(boolean flag) |
void |
setShowWorkingFilesTree(boolean newShowWorkingFilesTree) |
void |
setUseExternalApps(boolean useExternalApps) |
void |
setUseInfoViewer(boolean useInfoViewer) |
void |
setUserContextMenu(java.lang.String userContextMenu) |
void |
setUserMenuFirst(boolean userMenuFirst) |
void |
setUseSystemIcons(boolean useSystemIcons) |
void |
setUseVariablePaths(boolean uvp) |
void |
update(java.util.Properties props)
Updates the properties in the properties object passed to
reflect the current state of the config.
|
public static final java.lang.String CONFIG_FILE
public static final java.lang.String ERRORLIST_PLUGIN
public static final java.lang.String INFOVIEWER_PLUGIN
public static final java.lang.String ASK_IMPORT_OPT
public static final java.lang.String BROWSER_PATH_OPT
public static final java.lang.String BROWSER_USE_INFOVIEWER
public static final java.lang.String CASE_INSENSITIVE_SORT_OPT
public static final java.lang.String CLOSE_FILES_OPT
public static final java.lang.String DELETE_NOT_FOUND_FILES_OPT
public static final java.lang.String EXCLUDE_DIRS_OPT
public static final java.lang.String FOLLOW_BUFFER_OPT
public static final java.lang.String IMPORT_EXTS_OPT
public static final java.lang.String IMPORT_GLOBS_OPT
public static final java.lang.String INCLUDE_FILES_OPT
public static final java.lang.String LAST_NODE_OPT
public static final java.lang.String LAST_PROJECT_OPT
public static final java.lang.String LAST_INIT_VERSION_OPT
public static final java.lang.String REMEBER_OPEN_FILES_OPT
public static final java.lang.String SHOW_PROJECT_TITLE_OPT
public static final java.lang.String USE_EXTERNAL_APPS_OPT
public static final java.lang.String USE_VARIABLE_PATHS_OPT
public static final java.lang.String USE_SYSTEM_ICONS_OPT
public static final java.lang.String SHOW_COMPACT_OPT
public static final java.lang.String SHOW_FILES_OPT
public static final java.lang.String SHOW_FILTERED_OPT
public static final java.lang.String SHOW_FOLDERS_OPT
public static final java.lang.String SHOW_WFILES_OPT
public static final java.lang.String SHOW_ALLWFILES_OPT
public static final java.lang.String USER_MENU_FIRST
public static final java.lang.String USER_CONTEXT_MENU
public static final java.lang.String EXTENSIONS_PREFIX
public static final java.lang.String FILE_FILTER_KEY
public static final java.lang.String DIR_FILTER_KEY
public static final java.lang.String FILE_NAME_KEY
public static final java.lang.String TRAVERSE_DIRS
public static final java.lang.String ADD_HIDDEN
public static final java.lang.String FLATTEN
public static final java.lang.String KEEP_TREE
public static final java.lang.String FILTER_ID
public static final java.lang.String FILE_GLOB
public static final java.lang.String DIR_GLOB
public static final int ASK_ALWAYS
public static final int ASK_ONCE
public static final int ASK_NEVER
public static final int AUTO_IMPORT
public static ProjectViewerConfig getInstance()
public void setCloseFiles(boolean closeFiles)
public void setDeleteNotFoundFiles(boolean deleteNotFoundFiles)
public void setRememberOpen(boolean newRememberOpen)
public void setAskImport(int newAskImport)
public void setExcludeDirs(java.lang.String newExcludeDirs)
public void setBrowserpath(java.lang.String newBrowserPath)
public void setShowFoldersTree(boolean newShowFoldersTree)
public void setShowFilesTree(boolean newShowFilesTree)
public void setShowWorkingFilesTree(boolean newShowWorkingFilesTree)
public void setShowAllWorkingFiles(boolean newShowAllWorkingFiles)
public void setShowCompactTree(boolean newValue)
public void setShowFilteredTree(boolean newValue)
public boolean getCloseFiles()
public boolean getDeleteNotFoundFiles()
public boolean getRememberOpen()
public int getAskImport()
public java.lang.String getExcludeDirs()
public java.lang.String getBrowserPath()
public boolean getShowFoldersTree()
public boolean getShowFilesTree()
public boolean getShowWorkingFilesTree()
public boolean getShowAllWorkingFiles()
public boolean getShowCompactTree()
public boolean getShowFilteredTree()
public void setUseVariablePaths(boolean uvp)
public boolean getUseVariablePaths()
public void setUseInfoViewer(boolean useInfoViewer)
public boolean getUseInfoViewer()
public void setUserMenuFirst(boolean userMenuFirst)
public boolean getUserMenuFirst()
public void setUserContextMenu(java.lang.String userContextMenu)
public java.lang.String getUserContextMenu()
public void setUseSystemIcons(boolean useSystemIcons)
public boolean getUseSystemIcons()
public void setLastNode(VPTNode node)
public VPTNode getLastNode()
Note: DON'T CALL THIS METHOD; it's for internal PV use ONLY, and having other callers might mess some things up.
public void clearLastNodes()
public void setUseExternalApps(boolean useExternalApps)
public boolean getUseExternalApps()
public void setImportGlobs(java.lang.String importGlobs)
public java.lang.String getImportGlobs()
public void setShowProjectInTitle(boolean flag)
public boolean getShowProjectInTitle()
public void setCaseInsensitiveSort(boolean flag)
public boolean getCaseInsensitiveSort()
public void setFollowCurrentBuffer(boolean flag)
public boolean getFollowCurrentBuffer()
public boolean isExtensionEnabled(java.lang.String type, java.lang.String ext)
public void enableExtension(java.lang.String type, java.lang.String ext)
public void disableExtension(java.lang.String type, java.lang.String ext)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void update(java.util.Properties props)
Updates the properties in the properties object passed to reflect the current state of the config.
public void save()
public boolean isInfoViewerAvailable()
public boolean isErrorListAvailable()
public boolean isEarlyStartupRequired()
public void handlePluginUpdate(org.gjt.sp.jedit.msg.PluginUpdate pluginUpdate)