|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.rse.core.SystemResourceManager
Static methods that manage the workbench resource tree for the remote systems project. All code in the framework uses this to access the file system for save/restore purposes. By limiting all access to one place, we simply changes should we decide to change the underlying file system map.
Assumptions
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.rse.core.SystemResourceConstants |
|---|
RESOURCE_COMPILECOMMANDS_FOLDER_NAME, RESOURCE_CONNECTIONS_FOLDER_NAME, RESOURCE_FILTERS_FOLDER_NAME, RESOURCE_PROJECT_NAME, RESOURCE_TEAMPROFILE_NAME, RESOURCE_TEMPFILES_PROJECT_NAME, RESOURCE_TYPE_FILTERS_FOLDER_NAME, RESOURCE_USERACTIONS_FOLDER_NAME |
| Constructor Summary | |
|---|---|
SystemResourceManager()
|
|
| Method Summary | |
|---|---|
static String |
addPathTerminator(String path)
Ensure given path ends with path separator. |
static void |
addResourceChangeListener(IResourceChangeListener l)
Register a listener for resource change events on objects in our remote system project. |
protected static IProject |
createRemoteSystemsProjectInternal(IProject proj)
Create a remote systems project, plus the core subfolders required. |
static String[] |
deduceProfileNames()
Guess the profile names by itemizing all the root folders, and assuming any such folder that has a file in it named "profile.xmi" is indeed a profile whose name equals the folder name. |
static void |
deleteFile(IFolder folder,
String fileName)
Delete a file |
static void |
deleteFolder(IFolder folder)
Delete a folder |
static void |
endResourceEventListening()
End event listening. |
static void |
ensureOnResourceEventListening()
Ensure event listening is on. |
static IFolder |
getCompileCommandsFolder(ISystemProfile profile,
ISubSystemConfiguration ssFactory)
Get compile commands root folder given a system profile object and subsystem factory |
protected static IFolder |
getCompileCommandsFolder(String profileName)
Get compile commands root folder given a system profile name |
static IFolder |
getCompileCommandsFolder(String profileName,
ISubSystemConfiguration ssFactory)
Get compile commands root folder given a system profile name and subsystem factory |
static IFolder |
getCompileCommandsFolder(String profileName,
String factoryId)
Get compile commands root folder given a system profile name and subsystem factory Id. |
static String |
getFolderName(IHost conn)
Map a system connection object to a folder name |
static String |
getFolderName(ISubSystemConfiguration ssFactory)
Map a subsystem factory object to a folder name |
static String |
getFolderName(ISystemFilterPool pool)
Map a filter pool name to a folder name Current algorith is that pool name equals folder name, but we use this method to allow flexibility in the future. |
static String |
getFolderPath(IFolder folder)
Given any folder, return its path as a string. |
static String |
getFolderPathWithTerminator(IFolder folder)
Given any folder, return its path as a string, and an ending '\' |
static IFolder |
getProfileFolder(ISystemProfile profile)
Get profiles folder for a given profile |
static IFolder |
getProfileFolder(String profileName)
Get profiles folder for a given profile name |
static IFolder[] |
getProfileFolders()
Each root folder of the project is assumed to be a profile, if it has a file named profile.xmi |
static String |
getProfileName(ISystemFilterPoolManager mgr)
Map a filter pool manager name to a profile name Current algorith is that manager name equals profile name, but we use this method to allow flexibility in the future. |
static String |
getProfileName(ISystemHostPool pool)
Map a connection pool name to a profile name. |
static IProject |
getRemoteSystemsProject()
Get the default remote systems project. |
static IProject |
getRemoteSystemsTempFilesProject()
Get the default remote systems temp files project. |
protected static SystemResourceHelpers |
getResourceHelpers()
Return singleton of resource helpers object |
static IFolder |
getTypeFiltersFolder()
Get the typeFilters root folder |
static IFolder |
getTypeFiltersFolder(ISubSystemConfiguration ssFactory)
Get the typeFilters sub-folder per subsystem factory object |
static IFolder |
getTypeFiltersFolder(String ssFactoryId)
Get the typeFilters sub-folder per subsystem factory id |
static IFolder |
getUserActionsFolder(ISystemProfile profile,
ISubSystemConfiguration ssFactory)
Get user defined actions root folder given a system profile object and subsystem factory |
protected static IFolder |
getUserActionsFolder(String profileName)
Get user defined actions root folder given a system profile name |
static IFolder |
getUserActionsFolder(String profileName,
ISubSystemConfiguration ssFactory)
Get user defined actions root folder given a system profile name and subsystem factory |
static IFolder |
getUserActionsFolder(String profileName,
String factoryId)
Get user defined actions root folder given a system profile name and subsystem factory Id. |
static boolean |
isFirstTime()
Return true if we just created the remote systems project for the first time. |
static void |
removeResourceChangeListener(IResourceChangeListener l)
Remove a listener for resource change events on an object in our remote system project. |
static void |
renameFile(IFolder folder,
String oldName,
String newName)
Rename a file |
static void |
renameFolder(IFolder folder,
String newName)
Rename a folder |
static void |
startResourceEventListening()
Start event listening. |
static boolean |
testIfResourceInUse(IResource resource)
Test if a resource is in use, prior to attempting to rename or delete it. |
static boolean |
testUserActionsFolder(String profileName,
ISubSystemConfiguration ssFactory)
Test for existence of user defined actions root folder given a system profile name and subsystem factory |
static void |
turnOffResourceEventListening()
Turn off event listening. |
static void |
turnOnResourceEventListening()
Turn off event listening. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SystemResourceManager()
| Method Detail |
public static void turnOffResourceEventListening()
public static void turnOnResourceEventListening()
public static void ensureOnResourceEventListening()
public static void startResourceEventListening()
public static void endResourceEventListening()
public static void addResourceChangeListener(IResourceChangeListener l)
However, the event will only be fired if a change is made to that resource outside of the normal activities of the Remote Systems Framework, and only for resources within the Remote Systems Connection project.
public static void removeResourceChangeListener(IResourceChangeListener l)
public static IProject getRemoteSystemsProject()
public static IProject getRemoteSystemsTempFilesProject()
protected static IProject createRemoteSystemsProjectInternal(IProject proj)
public static boolean isFirstTime()
public static IFolder[] getProfileFolders()
public static String[] deduceProfileNames()
public static IFolder getProfileFolder(ISystemProfile profile)
public static IFolder getProfileFolder(String profileName)
protected static IFolder getUserActionsFolder(String profileName)
public static IFolder getUserActionsFolder(ISystemProfile profile,
ISubSystemConfiguration ssFactory)
public static IFolder getUserActionsFolder(String profileName,
ISubSystemConfiguration ssFactory)
public static boolean testUserActionsFolder(String profileName,
ISubSystemConfiguration ssFactory)
public static IFolder getUserActionsFolder(String profileName,
String factoryId)
protected static IFolder getCompileCommandsFolder(String profileName)
public static IFolder getCompileCommandsFolder(ISystemProfile profile,
ISubSystemConfiguration ssFactory)
public static IFolder getCompileCommandsFolder(String profileName,
ISubSystemConfiguration ssFactory)
public static IFolder getCompileCommandsFolder(String profileName,
String factoryId)
public static void renameFolder(IFolder folder,
String newName)
public static void deleteFolder(IFolder folder)
public static void renameFile(IFolder folder,
String oldName,
String newName)
public static void deleteFile(IFolder folder,
String fileName)
public static String getProfileName(ISystemHostPool pool)
public static String getProfileName(ISystemFilterPoolManager mgr)
public static String getFolderName(ISystemFilterPool pool)
public static String getFolderName(IHost conn)
public static String getFolderName(ISubSystemConfiguration ssFactory)
public static String getFolderPath(IFolder folder)
public static String getFolderPathWithTerminator(IFolder folder)
protected static SystemResourceHelpers getResourceHelpers()
public static String addPathTerminator(String path)
public static boolean testIfResourceInUse(IResource resource)
public static IFolder getTypeFiltersFolder()
public static IFolder getTypeFiltersFolder(ISubSystemConfiguration ssFactory)
public static IFolder getTypeFiltersFolder(String ssFactoryId)
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||