mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
[releng][cleanup] Fix @since tags according to API Tooling
This commit is contained in:
parent
5bdffc6d25
commit
b15c28c5fc
8 changed files with 735 additions and 576 deletions
|
@ -1,15 +1,15 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Xuan Chen (IBM) - [220999] [api] Need to change class SystemSelectRemoteFileAction to use SystemRemoteFileDialog
|
||||
|
@ -70,13 +70,13 @@ import org.eclipse.swt.widgets.Shell;
|
|||
* <li>{@link #getSelectedConnection()}
|
||||
* </ul>
|
||||
*/
|
||||
public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
||||
public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
||||
{
|
||||
private IRSESystemType[] systemTypes;
|
||||
private IHost systemConnection, outputConnection;
|
||||
private IHost rootFolderConnection;
|
||||
private IRemoteFile preSelection;
|
||||
private String rootFolderAbsPath;
|
||||
private String rootFolderAbsPath;
|
||||
private String message, treeTip, dlgTitle;
|
||||
private boolean showNewConnectionPrompt = true;
|
||||
private boolean showPropertySheet = false;
|
||||
|
@ -99,7 +99,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
this.allowFolderSelect = allowFolderSelection;
|
||||
this.previousInChain = previousInChain;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage
|
||||
* if it is not to be enabled. The message will be displayed on the message line.
|
||||
|
@ -108,15 +108,15 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
{
|
||||
//if (selectedConnection != sourceConnection) {} // someday, but can't happen today.
|
||||
SimpleSystemMessage msg = null;
|
||||
|
||||
|
||||
if (selectedObjects == null || selectedObjects.length == 0)
|
||||
{
|
||||
msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
IStatus.INFO,
|
||||
msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
IStatus.INFO,
|
||||
FileResources.MSG_MAKE_SELECTION);
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
if (allowFolderSelect == true)
|
||||
{
|
||||
if (previousInChain != null)
|
||||
|
@ -128,57 +128,57 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < selectedObjects.length; i++)
|
||||
|
||||
for (int i = 0; i < selectedObjects.length; i++)
|
||||
{
|
||||
if (selectedObjects[i] instanceof IRemoteFile)
|
||||
{
|
||||
IRemoteFile selectedFile = (IRemoteFile)selectedObjects[i];
|
||||
if (selectedFile != null && selectedFile.isDirectory()) {
|
||||
msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
IStatus.INFO,
|
||||
msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
IStatus.INFO,
|
||||
FileResources.MSG_SELECT_FOLDER_NOT_VALID);
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (previousInChain != null)
|
||||
{
|
||||
return previousInChain.isValid(selectedConnection, selectedObjects, remoteAdaptersForSelectedObjects);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* Constructor that uses default action label and tooltip
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
*/
|
||||
public SystemSelectRemoteFileAction(Shell shell)
|
||||
{
|
||||
this(shell, FileResources.ACTION_SELECT_FILE_LABEL, FileResources.ACTION_SELECT_FILE_TOOLTIP);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Constructor when you have your own action label and tooltip
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
* @param label string to display in menu or toolbar
|
||||
* @param tooltip string to display when user hovers mouse over action.
|
||||
*/
|
||||
public SystemSelectRemoteFileAction(Shell shell, String label, String tooltip)
|
||||
{
|
||||
super(label, tooltip, null, shell);
|
||||
super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
|
||||
}
|
||||
super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
|
||||
}
|
||||
|
||||
|
||||
// ------------------------
|
||||
// CONFIGURATION METHODS...
|
||||
// ------------------------
|
||||
// ------------------------
|
||||
/**
|
||||
* Set the system connection to restrict the user to seeing in the tree.
|
||||
*
|
||||
|
@ -201,8 +201,8 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
/**
|
||||
* Set the system types to restrict what connections the user sees,
|
||||
* and what types of connections they can create.
|
||||
*
|
||||
* @param systemTypes An array of system types, or
|
||||
*
|
||||
* @param systemTypes An array of system types, or
|
||||
* <code>null</code> to allow all registered valid system types.
|
||||
* A system type is valid if at least one subsystem configuration
|
||||
* is registered against it.
|
||||
|
@ -211,9 +211,9 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
{
|
||||
this.systemTypes = systemTypes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convenience method to restrict to a single system type.
|
||||
* Convenience method to restrict to a single system type.
|
||||
* Same as setSystemTypes(new IRSESystemType[] {systemType})
|
||||
*
|
||||
* @param systemType The name of the system type to restrict to, or
|
||||
|
@ -241,7 +241,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
* Set the root folder from which to start listing files.
|
||||
* This version identifies the folder via a connection object and absolute path.
|
||||
* There is another overload that identifies the folder via a single IRemoteFile object.
|
||||
*
|
||||
*
|
||||
* @param connection The connection to the remote system containing the root folder
|
||||
* @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
|
||||
*/
|
||||
|
@ -249,8 +249,8 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
{
|
||||
rootFolderConnection = connection;
|
||||
rootFolderAbsPath = folderAbsolutePath;
|
||||
|
||||
IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(rootFolderConnection);
|
||||
|
||||
IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(rootFolderConnection);
|
||||
if (ss != null)
|
||||
{
|
||||
try
|
||||
|
@ -272,7 +272,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
* Set the root folder from which to start listing files.
|
||||
* This version identifies the folder via an IRemoteFile object.
|
||||
* There is another overload that identifies the folder via a connection and folder path.
|
||||
*
|
||||
*
|
||||
* @param rootFolder The IRemoteFile object representing the remote folder to start the list from
|
||||
*/
|
||||
public void setRootFolder(IRemoteFile rootFolder)
|
||||
|
@ -282,7 +282,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
/**
|
||||
* Set a file or folder to preselect. This will:
|
||||
* <ul>
|
||||
* <li>Set the parent folder as the root folder
|
||||
* <li>Set the parent folder as the root folder
|
||||
* <li>Pre-expand the parent folder
|
||||
* <li>Pre-select the given file or folder after expansion
|
||||
* </ul>
|
||||
|
@ -313,7 +313,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
* selected object.
|
||||
* <p>
|
||||
* This overload shows a Details>>> button so the user can decide if they want to see the
|
||||
* property sheet.
|
||||
* property sheet.
|
||||
* <p>
|
||||
* @param show True if to show the property sheet within the dialog
|
||||
* @param initialState True if the property is to be initially displayed, false if it is not
|
||||
|
@ -338,7 +338,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
* Further, if you turn this on, it has the side effect of allowing the user
|
||||
* to select any remote object. The assumption being if you are prompting for
|
||||
* files, you also want to allow the user to select a folder, with the meaning
|
||||
* being that all files within the folder are implicitly selected.
|
||||
* being that all files within the folder are implicitly selected.
|
||||
*
|
||||
* @see #getSelectedObjects()
|
||||
*/
|
||||
|
@ -354,10 +354,10 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
{
|
||||
this.clientProvidedSelectionValidator = selectionValidator;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------
|
||||
// MRI METHODS. THESE ONLY NEED BE
|
||||
// MRI METHODS. THESE ONLY NEED BE
|
||||
// CALLED IF YOU WISH TO CHANGE THE DEFAULT MRI...
|
||||
// -----------------------------------------------
|
||||
/**
|
||||
|
@ -383,7 +383,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
}
|
||||
|
||||
|
||||
// -----------------
|
||||
// -----------------
|
||||
// OUTPUT METHODS...
|
||||
// -----------------
|
||||
|
||||
|
@ -408,14 +408,14 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
{
|
||||
Object o = getValue();
|
||||
if (o instanceof Object[]) {
|
||||
|
||||
|
||||
Object[] temp = (Object[])o;
|
||||
|
||||
|
||||
IRemoteFile[] files = new IRemoteFile[temp.length];
|
||||
|
||||
|
||||
// ensure all objects are IRemoteFiles
|
||||
for (int i = 0; i < temp.length; i++) {
|
||||
|
||||
|
||||
if (temp[i] instanceof IRemoteFile) {
|
||||
files[i] = (IRemoteFile)temp[i];
|
||||
}
|
||||
|
@ -424,17 +424,17 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
return new IRemoteFile[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return files;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all selected objects. This method will return an array of one
|
||||
* Return all selected objects. This method will return an array of one
|
||||
* unless you have called setMultipleSelectionMode(true)!
|
||||
* @see #setMultipleSelectionMode(boolean)
|
||||
*/
|
||||
*/
|
||||
public Object[] getSelectedObjects()
|
||||
{
|
||||
Object remoteObject = getValue();
|
||||
|
@ -450,21 +450,24 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
|
||||
/**
|
||||
* Return selected connection
|
||||
*/
|
||||
*/
|
||||
public IHost getSelectedConnection()
|
||||
{
|
||||
return outputConnection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setCustomViewerFilter(SystemActionViewerFilter filter)
|
||||
{
|
||||
customViewerFilter = filter;
|
||||
}
|
||||
|
||||
|
||||
// -------------------
|
||||
// INTERNAL METHODS...
|
||||
// -------------------
|
||||
|
||||
|
||||
/**
|
||||
* Called by eclipse when user selects this action
|
||||
*/
|
||||
|
@ -472,20 +475,20 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
{
|
||||
SystemRemoteFileDialog dlg = null;
|
||||
if (dlgTitle == null)
|
||||
dlg = new SystemRemoteFileDialog(shell);
|
||||
dlg = new SystemRemoteFileDialog(shell);
|
||||
else
|
||||
dlg = new SystemRemoteFileDialog(shell, dlgTitle);
|
||||
|
||||
|
||||
dlg = new SystemRemoteFileDialog(shell, dlgTitle);
|
||||
|
||||
|
||||
dlg.setMultipleSelectionMode(multipleSelectionMode);
|
||||
dlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
|
||||
|
||||
|
||||
if (systemConnection != null)
|
||||
{
|
||||
dlg.setDefaultSystemConnection(systemConnection, onlyConnection);
|
||||
}
|
||||
dlg.setCustomViewerFilter(customViewerFilter);
|
||||
|
||||
|
||||
if (message != null)
|
||||
dlg.setMessage(message);
|
||||
if (treeTip != null)
|
||||
|
@ -493,19 +496,19 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
/*
|
||||
if (systemConnection != null)
|
||||
{
|
||||
if (onlyConnection)
|
||||
if (onlyConnection)
|
||||
dlg.setSystemConnection(systemConnection);
|
||||
else
|
||||
dlg.setDefaultConnection(systemConnection);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
if (systemTypes != null)
|
||||
dlg.setSystemTypes(systemTypes);
|
||||
|
||||
|
||||
if (preSelection != null)
|
||||
dlg.setPreSelection(preSelection);
|
||||
|
||||
dlg.setPreSelection(preSelection);
|
||||
|
||||
if (showPropertySheet)
|
||||
if (showPropertySheetDetailsButton)
|
||||
dlg.setShowPropertySheet(true, showPropertySheetDetailsButtonInitialState);
|
||||
|
@ -519,19 +522,19 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
dlg.enableAddMode(addButtonCallback);
|
||||
*/
|
||||
IValidatorRemoteSelection selectionValidator = new RemoteFileSelectionValidator(allowFolderSelection, clientProvidedSelectionValidator);
|
||||
|
||||
|
||||
dlg.setSelectionValidator(selectionValidator);
|
||||
/*
|
||||
if (!allowFolderSelection) {
|
||||
dlg.setAllowFolderSelection(allowFolderSelection);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
// add viewer filters if any
|
||||
if (viewerFilters != null) {
|
||||
Iterator iter = viewerFilters.iterator();
|
||||
|
||||
|
||||
while (iter.hasNext()) {
|
||||
ViewerFilter filter = (ViewerFilter)(iter.next());
|
||||
dlg.addViewerFilter(filter);
|
||||
|
@ -540,7 +543,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
*/
|
||||
|
||||
return dlg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Required by parent. We return the selected object
|
||||
|
@ -555,12 +558,12 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
if (multipleSelectionMode)
|
||||
outputObject = ourDlg.getSelectedObjects();
|
||||
else
|
||||
outputObject = ourDlg.getSelectedObject();
|
||||
outputObject = ourDlg.getSelectedObject();
|
||||
outputConnection = ourDlg.getSelectedConnection();
|
||||
}
|
||||
return outputObject; // parent class calls setValue on what we return
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add viewer filter.
|
||||
* @param filter a viewer filter.
|
||||
|
@ -568,7 +571,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
public void addViewerFilter(ViewerFilter filter) {
|
||||
viewerFilters.add(filter);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets whether to allow folder selection. The default selection validator will use this to
|
||||
* determine whether the OK button will be enabled when a folder is selected. The default
|
||||
|
@ -578,5 +581,5 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
public void setAllowFolderSelection(boolean allow) {
|
||||
allowFolderSelection = allow;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Xuan Chen (IBM) - [220995] [api] Need to add setCustomViewFilter API to SystemSelectRemoteFileAction
|
||||
|
@ -78,30 +78,30 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
private boolean onlyConnection = false;
|
||||
private IValidatorRemoteSelection selectionValidator;
|
||||
private SystemActionViewerFilter customViewerFilter = null;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor that uses default action label and tooltip
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
*/
|
||||
public SystemSelectRemoteFolderAction(Shell shell)
|
||||
{
|
||||
this(shell, FileResources.ACTION_SELECT_DIRECTORY_LABEL, FileResources.ACTION_SELECT_DIRECTORY_TOOLTIP);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Constructor when you have your own action label and tooltip
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
*
|
||||
* @param shell The shell to hang the dialog off of
|
||||
* @param label string to display in menu or toolbar
|
||||
* @param tooltip string to display when user hovers mouse over action.
|
||||
*/
|
||||
public SystemSelectRemoteFolderAction(Shell shell, String label, String tooltip)
|
||||
{
|
||||
super(label, tooltip, null, shell);
|
||||
super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
|
||||
}
|
||||
super.setNeedsProgressMonitor(true); // the default is to include a monitor. Caller can override
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------
|
||||
// CONFIGURATION METHODS...
|
||||
// ------------------------
|
||||
|
@ -117,7 +117,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
{
|
||||
this.foldersOnly = flag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the message shown at the top of the form
|
||||
*/
|
||||
|
@ -132,7 +132,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
{
|
||||
this.treeTip = tip;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the system connection to restrict the user to seeing in the tree.
|
||||
*
|
||||
|
@ -152,10 +152,10 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
onlyConnection = false;
|
||||
}
|
||||
/**
|
||||
* Set the system types to restrict what connections the user sees, and what types of
|
||||
* Set the system types to restrict what connections the user sees, and what types of
|
||||
* connections they can create.
|
||||
* @param systemTypes An array of system type names
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.rse.core.IRSESystemType
|
||||
*/
|
||||
public void setSystemTypes(IRSESystemType[] systemTypes)
|
||||
|
@ -163,12 +163,12 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
this.systemTypes = systemTypes;
|
||||
}
|
||||
/**
|
||||
* Convenience method to restrict to a single system type.
|
||||
* Convenience method to restrict to a single system type.
|
||||
* Same as setSystemTypes(new String[] {systemType})
|
||||
*
|
||||
* @param systemType The name of the system type to restrict to,
|
||||
* or <code>null</code> to allow all valid system types.
|
||||
* A system type is valid if at least one subsystem
|
||||
* A system type is valid if at least one subsystem
|
||||
* configuration is registered against it.
|
||||
*/
|
||||
public void setSystemType(IRSESystemType systemType)
|
||||
|
@ -178,7 +178,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
else
|
||||
setSystemTypes(new IRSESystemType[] {systemType});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set to true if a "New Connection..." special connection is to be shown for creating new connections
|
||||
*/
|
||||
|
@ -186,7 +186,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
{
|
||||
this.showNewConnectionPrompt = show;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the root folder from which to start listing files.
|
||||
* This version identifies the folder via a connection object and absolute path.
|
||||
|
@ -197,18 +197,18 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
* <li>Preventing the user from selecting other connections
|
||||
* <li>Preventing the user from selecting other filter strings
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* @param connection The connection to the remote system containing the root folder
|
||||
* @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
|
||||
*/
|
||||
public void setRootFolder(IHost connection, String folderAbsolutePath)
|
||||
{
|
||||
rootFolderConnection = connection;
|
||||
rootFolderAbsPath = folderAbsolutePath;
|
||||
|
||||
IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(rootFolderConnection);
|
||||
|
||||
IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(rootFolderConnection);
|
||||
if (ss != null)
|
||||
{
|
||||
try
|
||||
|
@ -236,9 +236,9 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
* <li>Preventing the user from selecting other connections
|
||||
* <li>Preventing the user from selecting other filter strings
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* @param rootFolder The IRemoteFile object representing the remote folder to start the list from
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
|
||||
*/
|
||||
public void setRootFolder(IRemoteFile rootFolder)
|
||||
|
@ -248,7 +248,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
/**
|
||||
* Set a file or folder to preselect. This will:
|
||||
* <ul>
|
||||
* <li>Set the parent folder as the root folder
|
||||
* <li>Set the parent folder as the root folder
|
||||
* <li>Pre-expand the parent folder
|
||||
* <li>Pre-select the given file or folder after expansion
|
||||
* </ul>
|
||||
|
@ -279,7 +279,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
* selected object.
|
||||
* <p>
|
||||
* This overload shows a Details>>> button so the user can decide if they want to see the
|
||||
* property sheet.
|
||||
* property sheet.
|
||||
* <p>
|
||||
* @param show True if to show the property sheet within the dialog
|
||||
* @param initialState True if the property is to be initially displayed, false if it is not
|
||||
|
@ -307,7 +307,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
{
|
||||
this.multipleSelectionMode = multiple;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Specify a validator to use when the user selects a remote file or folder.
|
||||
* This allows you to decide if OK should be enabled or not for that remote file or folder.
|
||||
|
@ -317,7 +317,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
this.selectionValidator = selectionValidator;
|
||||
}
|
||||
|
||||
// -----------------
|
||||
// -----------------
|
||||
// OUTPUT METHODS...
|
||||
// -----------------
|
||||
|
||||
|
@ -343,14 +343,14 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
{
|
||||
Object o = getValue();
|
||||
if (o instanceof Object[]) {
|
||||
|
||||
|
||||
Object[] temp = (Object[])o;
|
||||
|
||||
|
||||
IRemoteFile[] files = new IRemoteFile[temp.length];
|
||||
|
||||
|
||||
// ensure all objects are IRemoteFiles
|
||||
for (int i = 0; i < temp.length; i++) {
|
||||
|
||||
|
||||
if (temp[i] instanceof IRemoteFile) {
|
||||
files[i] = (IRemoteFile)temp[i];
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
return new IRemoteFile[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return files;
|
||||
}
|
||||
if (o instanceof IRemoteFile[])
|
||||
|
@ -371,13 +371,13 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
}
|
||||
|
||||
/**
|
||||
* Return all selected objects. This method will return an array of one
|
||||
* Return all selected objects. This method will return an array of one
|
||||
* unless you have called setMultipleSelectionMode(true)!
|
||||
* <p>
|
||||
* It will always return null if the user cancelled the dialog.
|
||||
*
|
||||
*
|
||||
* @see #setMultipleSelectionMode(boolean)
|
||||
*/
|
||||
*/
|
||||
public Object[] getSelectedObjects()
|
||||
{
|
||||
Object remoteObject = getValue();
|
||||
|
@ -393,21 +393,24 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
|
||||
/**
|
||||
* Return selected connection
|
||||
*/
|
||||
*/
|
||||
public IHost getSelectedConnection()
|
||||
{
|
||||
return outputConnection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setCustomViewerFilter(SystemActionViewerFilter filter)
|
||||
{
|
||||
customViewerFilter = filter;
|
||||
}
|
||||
|
||||
|
||||
// -------------------
|
||||
// INTERNAL METHODS...
|
||||
// -------------------
|
||||
|
||||
|
||||
/**
|
||||
* Called by eclipse when user selects this action
|
||||
*/
|
||||
|
@ -442,7 +445,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
dlg.setDefaultSystemConnection(systemConnection, onlyConnection);
|
||||
}
|
||||
dlg.setCustomViewerFilter(customViewerFilter);
|
||||
|
||||
|
||||
/*
|
||||
SystemSelectRemoteFileOrFolderDialog dlg = null;
|
||||
if (dlgTitle == null)
|
||||
|
@ -450,26 +453,26 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
else
|
||||
dlg = new SystemSelectRemoteFileOrFolderDialog(shell, dlgTitle, false); // false => folder vs file mode
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
dlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
|
||||
dlg.setMultipleSelectionMode(multipleSelectionMode);
|
||||
|
||||
|
||||
/*
|
||||
dlg.setAllowForMultipleParents(allowForMultipleParents);
|
||||
if (restrictFolders)
|
||||
dlg.setRestrictFolders(true);
|
||||
|
||||
|
||||
|
||||
|
||||
if (systemConnection != null)
|
||||
{
|
||||
if (onlyConnection)
|
||||
if (onlyConnection)
|
||||
dlg.setSystemConnection(systemConnection);
|
||||
else
|
||||
dlg.setDefaultConnection(systemConnection);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
if (message != null)
|
||||
dlg.setMessage(message);
|
||||
if (treeTip != null)
|
||||
|
@ -479,22 +482,22 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
dlg.setSystemTypes(systemTypes);
|
||||
/*
|
||||
if (expandDepth != 0)
|
||||
dlg.setAutoExpandDepth(expandDepth);
|
||||
dlg.setAutoExpandDepth(expandDepth);
|
||||
*/
|
||||
if (preSelection != null)
|
||||
dlg.setPreSelection(preSelection);
|
||||
|
||||
dlg.setPreSelection(preSelection);
|
||||
|
||||
/*
|
||||
else if (rootFolderConnection != null)
|
||||
dlg.setRootFolder(rootFolderConnection, rootFolderAbsPath);
|
||||
*/
|
||||
|
||||
|
||||
if (showPropertySheet)
|
||||
if (showPropertySheetDetailsButton)
|
||||
dlg.setShowPropertySheet(true, showPropertySheetDetailsButtonInitialState);
|
||||
else
|
||||
dlg.setShowPropertySheet(true);
|
||||
|
||||
|
||||
/*
|
||||
if (addButtonCallback != null)
|
||||
if ((addLabel!=null) || (addToolTipText!=null))
|
||||
|
@ -506,7 +509,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
dlg.setSelectionValidator(selectionValidator);
|
||||
|
||||
return dlg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Required by parent. We return the selected object
|
||||
|
@ -521,7 +524,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
if (multipleSelectionMode)
|
||||
outputObject = ourDlg.getSelectedObjects();
|
||||
else
|
||||
outputObject = ourDlg.getSelectedObject();
|
||||
outputObject = ourDlg.getSelectedObject();
|
||||
outputConnection = ourDlg.getSelectedConnection();
|
||||
}
|
||||
return outputObject; // parent class calls setValue on what we return
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
* Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
|
||||
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
|
||||
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
|
||||
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
|
||||
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
|
||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
|
||||
* David McKnight (IBM) - [187130] New Folder/File, Move and Rename should be available for read-only folders
|
||||
|
@ -128,7 +128,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
private Exception e;
|
||||
private boolean completed = false;
|
||||
private boolean failed = false;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for InternalDownloadFileRunnable
|
||||
*/
|
||||
|
@ -138,7 +138,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
return completed;
|
||||
}
|
||||
|
||||
|
||||
public boolean didFail()
|
||||
{
|
||||
return failed;
|
||||
|
@ -191,7 +191,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IStatus run(IProgressMonitor monitor) {
|
||||
try
|
||||
{
|
||||
|
@ -212,20 +212,22 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
/**
|
||||
* Constructor for SystemEditableRemoteFile
|
||||
*
|
||||
* @since 3.0 changed String editorId into IEditorDescriptor
|
||||
*/
|
||||
public SystemEditableRemoteFile(IWorkbenchPage page, IRemoteFile remoteFile, IEditorDescriptor editorDescriptor)
|
||||
{
|
||||
super();
|
||||
this.page = page;
|
||||
this.remoteFile = remoteFile;
|
||||
this.remotePath = remoteFile.getAbsolutePath();
|
||||
this.remotePath = remoteFile.getAbsolutePath();
|
||||
this.subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||
SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
|
||||
|
||||
|
||||
// if remote edit project doesn't exist, create it
|
||||
if (!mgr.doesRemoteEditProjectExist())
|
||||
mgr.getRemoteEditProject();
|
||||
|
||||
|
||||
this.root = mgr.getRemoteEditProjectLocation().makeAbsolute().toOSString();
|
||||
this.localPath = getDownloadPath();
|
||||
this._editorDescriptor = editorDescriptor;
|
||||
|
@ -233,6 +235,8 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
/**
|
||||
* Constructor for SystemEditableRemoteFile
|
||||
*
|
||||
* @since 3.0 changed String editorId into IEditorDescriptor
|
||||
*/
|
||||
public SystemEditableRemoteFile(IRemoteFile remoteFile, IEditorDescriptor editorDescriptor)
|
||||
{
|
||||
|
@ -253,17 +257,17 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
// dkm - use registered
|
||||
String fileName = remoteFile.getName();
|
||||
|
||||
|
||||
IEditorRegistry registry = getEditorRegistry();
|
||||
|
||||
|
||||
IEditorDescriptor descriptor = registry.getDefaultEditor(fileName);
|
||||
if (descriptor == null)
|
||||
{
|
||||
descriptor = getDefaultTextEditor();
|
||||
descriptor = getDefaultTextEditor();
|
||||
}
|
||||
this._editorDescriptor = descriptor;
|
||||
}
|
||||
|
||||
|
||||
protected IEditorRegistry getEditorRegistry()
|
||||
{
|
||||
if (PlatformUI.isWorkbenchRunning())
|
||||
|
@ -272,34 +276,34 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
protected IEditorDescriptor getDefaultTextEditor()
|
||||
{
|
||||
IEditorRegistry registry = getEditorRegistry();
|
||||
return registry.findEditor("org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns an instance of this class given a local copy of a remote file.
|
||||
* @param file the local file to create it from.
|
||||
*/
|
||||
public static SystemEditableRemoteFile getInstance(IFile file) {
|
||||
|
||||
|
||||
// first determine associated remote file
|
||||
IPath path = file.getFullPath();
|
||||
int numSegments = path.segmentCount();
|
||||
|
||||
// first we need to find the right RemoteFileSubSystem for the remote file
|
||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||
|
||||
|
||||
ISubSystem fs = null;
|
||||
|
||||
// get the subsystem ID property from the temporary file
|
||||
String subsystemId = properties.getRemoteFileSubSystem();
|
||||
|
||||
// the subsystem ID may not exist if the temporary file existed before this feature
|
||||
// to handle migration of this smoothly, we can use another method to determine the subsystem
|
||||
// to handle migration of this smoothly, we can use another method to determine the subsystem
|
||||
if (subsystemId != null)
|
||||
{
|
||||
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
|
||||
|
@ -308,7 +312,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
if (fs != null)
|
||||
{
|
||||
// use the remote file path property of the temp file to determine the path of the remote file
|
||||
// use the remote file path property of the temp file to determine the path of the remote file
|
||||
// on the remote system
|
||||
String remotePath = properties.getRemoteFilePath();
|
||||
|
||||
|
@ -352,11 +356,11 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
remotePath = tempRemotePath.toString();
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
if (remotePath != null && fs instanceof IRemoteFileSubSystem) {
|
||||
IRemoteFile remoteFile = ((IRemoteFileSubSystem)fs).getRemoteFileObject(remotePath, new NullProgressMonitor());
|
||||
|
||||
|
||||
if (remoteFile != null) {
|
||||
return new SystemEditableRemoteFile(remoteFile);
|
||||
}
|
||||
|
@ -372,7 +376,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
SystemBasePlugin.logError("Error getting remote file object " + remotePath, e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -380,9 +384,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
* Set the remote file
|
||||
*/
|
||||
public void setRemoteFile(IRemoteFile remoteFile)
|
||||
{
|
||||
{
|
||||
this.remoteFile = remoteFile;
|
||||
this.remotePath = remoteFile.getAbsolutePath();
|
||||
this.remotePath = remoteFile.getAbsolutePath();
|
||||
this.subsystem = remoteFile.getParentRemoteFileSubSystem();
|
||||
this.localPath = getDownloadPath();
|
||||
this.localFile = null;
|
||||
|
@ -484,14 +488,14 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
if (shell != null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
InternalDownloadFileRunnable downloadFileRunnable = new InternalDownloadFileRunnable();
|
||||
//ProgressMonitorDialog pmd = new ProgressMonitorDialog(shell);
|
||||
IFile localFile = getLocalResource();
|
||||
SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
|
||||
listener.addIgnoreFile(localFile);
|
||||
|
||||
|
||||
//pmd.run(false, true, downloadFileRunnable);
|
||||
downloadFileRunnable.setRule(getRemoteFile());
|
||||
downloadFileRunnable.schedule();
|
||||
|
@ -507,7 +511,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
} catch(InterruptedException e) {
|
||||
/*stop waiting*/
|
||||
}
|
||||
|
||||
|
||||
listener.removeIgnoreFile(localFile);
|
||||
downloadFileRunnable.throwException();
|
||||
return !downloadFileRunnable.didFail();
|
||||
|
@ -517,7 +521,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
return download(new NullProgressMonitor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void setReadOnly(IFile file, boolean flag)
|
||||
{
|
||||
ResourceAttributes attrs = file.getResourceAttributes();
|
||||
|
@ -527,7 +531,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
file.setResourceAttributes(attrs);
|
||||
}
|
||||
catch (CoreException e)
|
||||
{
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -557,7 +561,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
// get stored modification stamp
|
||||
long storedModifiedStamp = properties.getRemoteFileTimeStamp();
|
||||
|
||||
|
||||
// get updated remoteFile so we get the current remote timestamp
|
||||
//remoteFile.markStale(true);
|
||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
|
||||
|
@ -608,7 +612,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
else
|
||||
{
|
||||
// we transferred a different way last time, so we need to transfer again
|
||||
// we transferred a different way last time, so we need to transfer again
|
||||
return doDownload(properties, monitor);
|
||||
}
|
||||
}
|
||||
|
@ -633,9 +637,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
if (!subsystem.isConnected())
|
||||
{
|
||||
// don't try to download file if not connected
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
subsystem.download(remoteFile, localPath, remoteFile.getEncoding(), monitor);
|
||||
|
@ -659,10 +663,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
properties.setDownloadFileTimeStamp(file.getLocalTimeStamp());
|
||||
properties.setDirty(false);
|
||||
properties.setUsedBinaryTransfer(remoteFile.isBinary());
|
||||
|
||||
|
||||
boolean readOnly = !remoteFile.canWrite();
|
||||
properties.setReadOnly(readOnly);
|
||||
|
||||
|
||||
// get the modified timestamp from the File, not the IFile
|
||||
// for some reason, the modified timestamp from the IFile does not always return
|
||||
// the right value. There is a Javadoc comment saying the value from IFile might be a
|
||||
|
@ -703,7 +707,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
listener.upload(fs, remoteFile, tempFile, properties, properties.getRemoteFileTimeStamp(), this, null);
|
||||
|
||||
listener.setEnabled(true);
|
||||
|
||||
|
||||
return !properties.getDirty();
|
||||
//return true;
|
||||
}
|
||||
|
@ -728,7 +732,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
// update timestamp
|
||||
IFile file = getLocalResource();
|
||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||
|
||||
|
||||
//DKM- saveAS fix
|
||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||
properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
|
||||
|
@ -758,7 +762,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
IPath path = getLocalPathObject();
|
||||
localFile = SystemBasePlugin.getWorkspaceRoot().getFileForLocation(path);
|
||||
}
|
||||
|
||||
|
||||
return localFile;
|
||||
}
|
||||
|
||||
|
@ -785,7 +789,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
for (int r = 0; r < resources.length && match == null; r++)
|
||||
{
|
||||
IResource resource = resources[r];
|
||||
|
||||
|
||||
if (resource instanceof IContainer)
|
||||
{
|
||||
String resName = resource.getName().toLowerCase();
|
||||
|
@ -926,7 +930,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
|
||||
if (!os.startsWith("win")) //$NON-NLS-1$
|
||||
absolutePath = absolutePath.replace('\\', '/');
|
||||
|
||||
|
||||
// DY: We should only be escaping the remote portion of the path
|
||||
IPath remote = new Path(absolutePath);
|
||||
absolutePath = SystemFileNameHelper.getEscapedPath(remote.toOSString());
|
||||
|
@ -942,7 +946,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
* Gets the path to use in the workspace for saving the local replica remote file. In most cases
|
||||
* this path will be the same thing as the remote path however, this mechanism exists so that 3rd parties
|
||||
* can customize where temp files are saved.
|
||||
*
|
||||
*
|
||||
* @param remotePath the absolute path to the resource on the host
|
||||
* @return the workspace mapping of the remote path
|
||||
*/
|
||||
|
@ -958,7 +962,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
public String getActualHostFor(String remotePath)
|
||||
{
|
||||
String hostname = subsystem.getHost().getHostName();
|
||||
if (subsystem != null
|
||||
if (subsystem != null
|
||||
//DKM && subsystem.getHost().getSystemType().isLocal()
|
||||
)
|
||||
{
|
||||
|
@ -969,9 +973,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
return result;
|
||||
}
|
||||
return hostname;
|
||||
return hostname;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the open IEditorPart for this remote object if there is one.
|
||||
|
@ -1026,7 +1030,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
// i.e. whether the argument to the getEditor() should be true
|
||||
part = activeReferences[k].getEditor(false);
|
||||
|
||||
//DKM***if (part instanceof SystemTextEditor)
|
||||
//DKM***if (part instanceof SystemTextEditor)
|
||||
if (part != null)
|
||||
{
|
||||
|
||||
|
@ -1101,10 +1105,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
*/
|
||||
public void open(Shell shell, boolean readOnly)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
|
||||
// first check if file is already open in an editor
|
||||
int result = checkOpenInEditor();
|
||||
|
@ -1113,19 +1117,19 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
||||
}
|
||||
|
||||
|
||||
if (!remoteFile.exists())
|
||||
{
|
||||
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
|
||||
IStatus.ERROR, msgTxt);
|
||||
|
||||
IStatus.ERROR, msgTxt);
|
||||
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
|
||||
dialog.open();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (result == NOT_OPEN)
|
||||
{
|
||||
if (readOnly)
|
||||
|
@ -1157,9 +1161,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
|
||||
String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ISystemFileConstants.MSG_DOWNLOAD_NO_WRITE,
|
||||
IStatus.WARNING, msgTxt, msgDetails);
|
||||
IStatus.WARNING, msgTxt, msgDetails);
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
|
||||
|
||||
boolean answer = dialog.openQuestion();
|
||||
|
@ -1184,9 +1188,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, remotePath, subsystem.getHost().getHostName());
|
||||
String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS, remotePath, subsystem.getHost().getHostName());
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ISystemFileConstants.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR,
|
||||
IStatus.WARNING, msgTxt, msgDetails);
|
||||
IStatus.WARNING, msgTxt, msgDetails);
|
||||
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
|
||||
|
||||
|
@ -1220,7 +1224,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Open in editor
|
||||
*/
|
||||
|
@ -1234,28 +1238,28 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
*/
|
||||
public void open(boolean readOnly, IProgressMonitor monitor)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// ensure the file is stale
|
||||
// ensure the file is stale
|
||||
remoteFile.markStale(true, false);
|
||||
{
|
||||
remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
|
||||
}
|
||||
|
||||
|
||||
if (!remoteFile.exists())
|
||||
{
|
||||
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
|
||||
IStatus.ERROR, msgTxt);
|
||||
|
||||
IStatus.ERROR, msgTxt);
|
||||
|
||||
DisplayMessageDialog dd = new DisplayMessageDialog(message);
|
||||
Display.getDefault().syncExec(dd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// assumption is that editor is not open
|
||||
|
||||
if (readOnly)
|
||||
|
@ -1284,10 +1288,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{ // this could be because file doesn't exist
|
||||
download(monitor);
|
||||
}
|
||||
|
||||
|
||||
String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
|
||||
String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ISystemFileConstants.MSG_DOWNLOAD_NO_WRITE,
|
||||
IStatus.WARNING, msgTxt, msgDetails);
|
||||
|
||||
|
@ -1329,23 +1333,23 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class DisplayMessageDialog implements Runnable
|
||||
{
|
||||
protected SystemMessage _msg;
|
||||
public DisplayMessageDialog(SystemMessage msg)
|
||||
{
|
||||
_msg = msg;
|
||||
_msg = msg;
|
||||
}
|
||||
|
||||
|
||||
public void run()
|
||||
{
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
|
||||
dialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class DisplayQuestionDialog implements Runnable
|
||||
{
|
||||
protected SystemMessage _msg;
|
||||
|
@ -1354,26 +1358,26 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
_msg = msg;
|
||||
}
|
||||
|
||||
|
||||
public boolean getResponse()
|
||||
{
|
||||
return _responce;
|
||||
}
|
||||
|
||||
|
||||
public void run()
|
||||
{
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
|
||||
try
|
||||
{
|
||||
_responce = dialog.openQuestion();
|
||||
_responce = dialog.openQuestion();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open in system editor
|
||||
*/
|
||||
|
@ -1384,7 +1388,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
if (remoteFile.getHost().getSystemType().isLocal())
|
||||
{
|
||||
// Open local files "in-place", i.e. don't copy them to the
|
||||
// Open local files "in-place", i.e. don't copy them to the
|
||||
// RemoteSystemsTempFiles project first
|
||||
if (remoteFile instanceof IVirtualRemoteFile)
|
||||
{
|
||||
|
@ -1394,7 +1398,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
Program.launch(remotePath);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1424,7 +1428,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open in in place editor
|
||||
*/
|
||||
|
@ -1441,7 +1445,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
// push changes back to the server.
|
||||
setReadOnly(file, true);
|
||||
openInPlaceEditor();
|
||||
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -1481,23 +1485,23 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
String subSystemId = registry.getAbsoluteNameForSubSystem(subsystem);
|
||||
properties.setRemoteFileSubSystem(subSystemId);
|
||||
properties.setRemoteFilePath(remoteFile.getAbsolutePath());
|
||||
|
||||
|
||||
properties.setRemoteFileMounted(_isRemoteFileMounted);
|
||||
if (_isRemoteFileMounted)
|
||||
{
|
||||
properties.setResolvedMountedRemoteFileHost(_actualRemoteHost);
|
||||
properties.setResolvedMountedRemoteFilePath(_actualRemotePath);
|
||||
}
|
||||
|
||||
|
||||
// if we have an xml file, find the local encoding of the file
|
||||
SystemEncodingUtil util = SystemEncodingUtil.getInstance();
|
||||
String encoding = remoteFile.getEncoding();
|
||||
properties.setEncoding(encoding);
|
||||
|
||||
|
||||
String tempPath = file.getLocation().toOSString();
|
||||
|
||||
|
||||
if (util.isXML(tempPath)) {
|
||||
|
||||
|
||||
try {
|
||||
encoding = util.getXMLFileEncoding(tempPath);
|
||||
}
|
||||
|
@ -1507,10 +1511,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (encoding != null)
|
||||
if (encoding != null)
|
||||
{
|
||||
if (remoteFile.isBinary()){
|
||||
if (!file.isSynchronized(IResource.DEPTH_ZERO))
|
||||
|
@ -1527,14 +1531,14 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
if (properties.getLocalEncoding() != null){
|
||||
String localEncoding = properties.getLocalEncoding();
|
||||
file.setCharset(localEncoding, null);
|
||||
}
|
||||
|
||||
// otherwise, the default charset is inherited so no need to set
|
||||
}
|
||||
|
||||
// otherwise, the default charset is inherited so no need to set
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1570,11 +1574,11 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
IWorkbenchPage activePage = this.page;
|
||||
IWorkbench wb = PlatformUI.getWorkbench();
|
||||
if (activePage == null)
|
||||
{
|
||||
{
|
||||
activePage = wb.getActiveWorkbenchWindow().getActivePage();
|
||||
}
|
||||
IFile file = getLocalResource();
|
||||
|
||||
|
||||
// get fresh remote file object
|
||||
remoteFile.markStale(true); // make sure we get the latest remote file (with proper permissions and all)
|
||||
if (!remoteFile.getParentRemoteFileSubSystem().isOffline()){
|
||||
|
@ -1598,33 +1602,33 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set editor as preferred editor for this file
|
||||
|
||||
|
||||
String editorId = null;
|
||||
if (_editorDescriptor != null)
|
||||
_editorDescriptor.getId();
|
||||
|
||||
|
||||
IDE.setDefaultEditor(file, editorId);
|
||||
|
||||
FileEditorInput finput = new FileEditorInput(file);
|
||||
|
||||
|
||||
// check for files already open
|
||||
|
||||
// DKM - when _editorId is not lpex, this causes problem
|
||||
// DY - changed editor from SystemTextEditor to IEditorPart
|
||||
//editor = (SystemTextEditor)activePage.openEditor(file, _editorId);
|
||||
if (_editorDescriptor != null && _editorDescriptor.isOpenExternal()){
|
||||
if (_editorDescriptor != null && _editorDescriptor.isOpenExternal()){
|
||||
editor = ((WorkbenchPage)activePage).openEditorFromDescriptor(new FileEditorInput(file), _editorDescriptor, true, null);
|
||||
}
|
||||
else {
|
||||
editor = activePage.openEditor(finput, _editorDescriptor.getId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||
properties.setRemoteFileObject(this);
|
||||
}
|
||||
|
@ -1636,24 +1640,24 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
IWorkbenchPage activePage = this.page;
|
||||
if (activePage == null)
|
||||
{
|
||||
{
|
||||
activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
|
||||
}
|
||||
IFile file = getLocalResource();
|
||||
|
||||
|
||||
// set editor as preferred editor for this file
|
||||
String editorId = null;
|
||||
if (_editorDescriptor != null)
|
||||
editorId = _editorDescriptor.getId();
|
||||
IDE.setDefaultEditor(file, editorId);
|
||||
|
||||
|
||||
FileEditorInput fileInput = new FileEditorInput(file);
|
||||
activePage.openEditor(fileInput, IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
|
||||
|
||||
|
||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||
properties.setRemoteFileObject(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open the in place editor
|
||||
*/
|
||||
|
@ -1661,7 +1665,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
IWorkbenchPage activePage = this.page;
|
||||
if (activePage == null)
|
||||
{
|
||||
{
|
||||
activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
|
||||
}
|
||||
IFile file = getLocalResource();
|
||||
|
@ -1681,7 +1685,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
IFile file = getLocalResource();
|
||||
setReadOnly(file, true);
|
||||
|
||||
|
||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||
properties.setReadOnly(true);
|
||||
}
|
||||
|
@ -1751,9 +1755,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
/*
|
||||
if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
|
||||
|
||||
|
||||
IResourceDelta delta = event.getDelta();
|
||||
|
||||
|
||||
try {
|
||||
delta.accept(this);
|
||||
}
|
||||
|
@ -1880,13 +1884,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
|
||||
String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
|
||||
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ICommonMessageIds.MSG_ERROR_UNEXPECTED,
|
||||
IStatus.ERROR, msgTxt);
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
|
||||
dialog.open();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
finally
|
||||
|
@ -1915,13 +1919,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
{
|
||||
SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
|
||||
String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
|
||||
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
|
||||
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ICommonMessageIds.MSG_ERROR_UNEXPECTED,
|
||||
IStatus.ERROR, msgTxt);
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
|
||||
dialog.open();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1954,7 +1958,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
return editor.isDirty();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getAbsolutePath() {
|
||||
return remotePath;
|
||||
|
@ -1963,7 +1967,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
public ISubSystem getSubSystem() {
|
||||
return subsystem;
|
||||
}
|
||||
|
||||
|
||||
public boolean exists()
|
||||
{
|
||||
return remoteFile.exists();
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Michael Scharf (Wind River) - Fix 163844: InvalidThreadAccess in checkForCollision
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
|
@ -124,7 +124,7 @@ import org.eclipse.ui.PlatformUI;
|
|||
|
||||
/**
|
||||
* Utility class for doing file transfers on universal systems.
|
||||
*
|
||||
*
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
*/
|
||||
|
@ -141,7 +141,7 @@ public class UniversalFileTransferUtility
|
|||
/**
|
||||
* Creates a new RenameStatus object. The created status has no
|
||||
* children.
|
||||
*
|
||||
*
|
||||
* @param severity the severity; one of <code>OK</code>,
|
||||
* <code>ERROR</code>, <code>INFO</code>,
|
||||
* <code>WARNING</code>, or <code>CANCEL</code>
|
||||
|
@ -220,7 +220,7 @@ public class UniversalFileTransferUtility
|
|||
|
||||
/**
|
||||
* replicates a remote file to the temp files project in the workspace
|
||||
*
|
||||
*
|
||||
* @param srcFileOrFolder the file to copy
|
||||
* @param monitor the progress monitor
|
||||
* @return the resulting local replica
|
||||
|
@ -268,7 +268,7 @@ public class UniversalFileTransferUtility
|
|||
setReadOnly(tempFile, srcFileOrFolder.canWrite());
|
||||
}
|
||||
|
||||
if (remoteEncoding != null)
|
||||
if (remoteEncoding != null)
|
||||
{
|
||||
if (srcFileOrFolder.isBinary())
|
||||
{
|
||||
|
@ -281,15 +281,15 @@ public class UniversalFileTransferUtility
|
|||
tempFile.setCharset(remoteEncoding, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// using text mode so the char set needs to be local
|
||||
SystemIFileProperties properties = new SystemIFileProperties(tempFile);
|
||||
if (properties.getLocalEncoding() != null){
|
||||
String localEncoding = properties.getLocalEncoding();
|
||||
tempFile.setCharset(localEncoding, null);
|
||||
}
|
||||
// otherwise, the default charset is inherited so no need to set
|
||||
}
|
||||
// otherwise, the default charset is inherited so no need to set
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ public class UniversalFileTransferUtility
|
|||
* This method downloads a set of remote resources to the workspace. It uses
|
||||
* the downloadMultiple() API of the remote file subsystem and service layers so
|
||||
* for some service implementations, this is a big optimization
|
||||
*
|
||||
*
|
||||
* @param remoteSet the set of resources to download
|
||||
* @param monitor the progress monitor
|
||||
* @return the set of temporary files created as a result of the download.
|
||||
|
@ -471,7 +471,7 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
IResource tempFolder = getTempFileFor(srcFileOrFolder);
|
||||
try
|
||||
{
|
||||
{
|
||||
//get contents of folder
|
||||
IRemoteFile[] children = srcFS.list(srcFileOrFolder,IFileService.FILE_TYPE_FILES_AND_FOLDERS,monitor);
|
||||
//check for empty folder and add to set
|
||||
|
@ -479,7 +479,7 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
emptyFolders.add(tempFolder);
|
||||
}
|
||||
//get all subfolders
|
||||
//get all subfolders
|
||||
children=srcFS.list(srcFileOrFolder, IFileService.FILE_TYPE_FOLDERS, monitor);
|
||||
if(!(children==null) && !(children.length==0))
|
||||
{
|
||||
|
@ -544,7 +544,7 @@ public class UniversalFileTransferUtility
|
|||
IStatus.ERROR, FileResources.FILEMSG_CREATE_FILE_FAILED, e);
|
||||
resultSet.setMessage(errorMessage);
|
||||
}
|
||||
|
||||
|
||||
// step 3: post download processing
|
||||
if (!resultSet.hasMessage())
|
||||
{
|
||||
|
@ -573,10 +573,10 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
setReadOnly(tempFile, srcFileOrFolder.canWrite());
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (remoteEncoding != null)
|
||||
if (remoteEncoding != null)
|
||||
{
|
||||
if (srcFileOrFolder.isBinary())
|
||||
{
|
||||
|
@ -589,23 +589,23 @@ public class UniversalFileTransferUtility
|
|||
tempFile.setCharset(remoteEncoding, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// using text mode so the char set needs to be local
|
||||
if (properties.getLocalEncoding() != null){
|
||||
String localEncoding = properties.getLocalEncoding();
|
||||
tempFile.setCharset(localEncoding, null);
|
||||
}
|
||||
// otherwise, the default charset is inherited so no need to set
|
||||
}
|
||||
// otherwise, the default charset is inherited so no need to set
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
SimpleSystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ICommonMessageIds.MSG_OPERATION_FAILED,
|
||||
SimpleSystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
|
||||
ICommonMessageIds.MSG_OPERATION_FAILED,
|
||||
IStatus.ERROR, "", e); //$NON-NLS-1$
|
||||
resultSet.setMessage(errorMessage);
|
||||
resultSet.setMessage(errorMessage);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ public class UniversalFileTransferUtility
|
|||
return resultSet;
|
||||
}
|
||||
|
||||
private static void createEmptyFolders(IProgressMonitor monitor, List emptyFolders) throws CoreException
|
||||
private static void createEmptyFolders(IProgressMonitor monitor, List emptyFolders) throws CoreException
|
||||
{
|
||||
IContainer empty;
|
||||
IFolder emptyFolder;
|
||||
|
@ -680,7 +680,7 @@ public class UniversalFileTransferUtility
|
|||
boolean ok = true;
|
||||
SystemWorkspaceResourceSet resultSet = new SystemWorkspaceResourceSet();
|
||||
IRemoteFileSubSystem srcFS = (IRemoteFileSubSystem)remoteSet.getSubSystem();
|
||||
|
||||
|
||||
if (!srcFS.isConnected())
|
||||
{
|
||||
return null;
|
||||
|
@ -690,7 +690,7 @@ public class UniversalFileTransferUtility
|
|||
|
||||
List set = remoteSet.getResourceSet();
|
||||
List emptyFolders = new ArrayList();
|
||||
|
||||
|
||||
for (int i = 0; i < set.size() && !resultSet.hasMessage(); i++)
|
||||
{
|
||||
if (monitor != null && monitor.isCanceled())
|
||||
|
@ -751,7 +751,7 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
emptyFolders.add(tempFolder);
|
||||
}
|
||||
|
||||
|
||||
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
|
||||
SystemWorkspaceResourceSet childResults = downloadResourcesToWorkspace(childSet, monitor);
|
||||
if (childResults.hasMessage())
|
||||
|
@ -781,7 +781,7 @@ public class UniversalFileTransferUtility
|
|||
IStatus.ERROR, FileResources.FILEMSG_CREATE_FILE_FAILED, e);
|
||||
resultSet.setMessage(errorMessage);
|
||||
}
|
||||
|
||||
|
||||
// refresh and set IFile properties
|
||||
for (int r = 0; r < resultSet.size(); r++)
|
||||
{
|
||||
|
@ -1132,7 +1132,7 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
return false;
|
||||
}
|
||||
else if (destinationFile != null && file.exists()) {
|
||||
else if (destinationFile != null && file.exists()) {
|
||||
destinationFile.setLastModified(file.lastModified());
|
||||
|
||||
if (destinationFile.length() != file.length()) {
|
||||
|
@ -1150,9 +1150,11 @@ public class UniversalFileTransferUtility
|
|||
|
||||
/**
|
||||
* Replicates a remote file or folder to the workspace
|
||||
*
|
||||
* @param srcFileOrFolder the object which is being copied
|
||||
* @param monitor a progress monitor
|
||||
* @return the temporary object that was created after the download
|
||||
* @since 3.0
|
||||
*/
|
||||
public static Object downloadResourceToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
|
||||
{
|
||||
|
@ -1836,12 +1838,12 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
|
||||
long timestamp = properties.getRemoteFileTimeStamp();
|
||||
|
||||
|
||||
// srcFileOrFolder may not be a file from the RemoteSystemTempFiles folder in which
|
||||
// case there will be no stored property for the remote timestamp.
|
||||
if (timestamp == 0)
|
||||
timestamp = srcFileOrFolder.getLocalTimeStamp();
|
||||
|
||||
timestamp = srcFileOrFolder.getLocalTimeStamp();
|
||||
|
||||
try {
|
||||
targetFS.setLastModified(copiedFile, timestamp, monitor);
|
||||
}
|
||||
|
@ -2346,7 +2348,7 @@ public class UniversalFileTransferUtility
|
|||
arc2.delete();
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
protected static String useLocalSeparator(String virtualPath)
|
||||
{
|
||||
|
@ -2726,6 +2728,10 @@ public class UniversalFileTransferUtility
|
|||
_targetFileOrFolder = targetFileOrFolder;
|
||||
cancelStatus = RENAME_DIALOG_NOT_CANCELLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.0
|
||||
*/
|
||||
public RenameRunnable(IRemoteFile targetFileOrFolder, List namesInUse)
|
||||
{
|
||||
_targetFileOrFolder = targetFileOrFolder;
|
||||
|
@ -2830,11 +2836,11 @@ public class UniversalFileTransferUtility
|
|||
|
||||
/**
|
||||
* replicates a remote file to the temp files project in the workspace
|
||||
*
|
||||
*
|
||||
* @param srcFileOrFolder the file to copy
|
||||
* @param monitor the progress monitor
|
||||
* @return the resulting local replica
|
||||
*
|
||||
*
|
||||
* @deprecated use downloadFileToWorkspace
|
||||
*/
|
||||
protected static IFile copyRemoteFileToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
|
||||
|
@ -2849,11 +2855,11 @@ public class UniversalFileTransferUtility
|
|||
* This method downloads a set of remote resources to the workspace. It uses
|
||||
* the downloadMultiple() API of the remote file subsystem and service layers so
|
||||
* for some service implementations, this is a big optimization
|
||||
*
|
||||
*
|
||||
* @param remoteSet the set of resources to download
|
||||
* @param monitor the progress monitor
|
||||
* @return the set of temp files created as a result of the download.
|
||||
*
|
||||
*
|
||||
* @deprecated use downloadResourcesToWorkspaceMultiple
|
||||
* @since 3.0
|
||||
*/
|
||||
|
@ -2868,7 +2874,7 @@ public class UniversalFileTransferUtility
|
|||
* @param remoteSet the objects which are being copied
|
||||
* @param monitor a progress monitor
|
||||
* @return the temporary objects that was created after the download
|
||||
*
|
||||
*
|
||||
* @deprecated use downloadResourcesToWorkspace
|
||||
*/
|
||||
public static SystemWorkspaceResourceSet copyRemoteResourcesToWorkspace(SystemRemoteResourceSet remoteSet, IProgressMonitor monitor)
|
||||
|
@ -2877,7 +2883,7 @@ public class UniversalFileTransferUtility
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @deprecated use downloadResourceToWorkspace
|
||||
*/
|
||||
public static Object copyRemoteResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
|
||||
|
@ -2889,7 +2895,7 @@ public class UniversalFileTransferUtility
|
|||
* @param srcFileOrFolder the file to copy.
|
||||
* @param monitor the progress monitor.
|
||||
* @return the resulting local replica.
|
||||
*
|
||||
*
|
||||
* @deprecated use downloadFileToWorkspace
|
||||
*/
|
||||
protected static IFile copyRemoteFileToWorkspace(File srcFileOrFolder, IProgressMonitor monitor)
|
||||
|
@ -2904,7 +2910,7 @@ public class UniversalFileTransferUtility
|
|||
* @param srcFileOrFolder the object which is being copied
|
||||
* @param monitor a progress monitor
|
||||
* @return the temporary object that was created after the download
|
||||
*
|
||||
*
|
||||
* @deprecated use downloadResourceToWorkspace
|
||||
*/
|
||||
public static Object copyRemoteResourceToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
|
||||
|
@ -2918,7 +2924,7 @@ public class UniversalFileTransferUtility
|
|||
* @param targetFolder the object to be copied to.
|
||||
* @param monitor the progress monitor
|
||||
* @return the resulting remote object
|
||||
*
|
||||
*
|
||||
* @deprecated use uploadResourceFromWorkspace
|
||||
*/
|
||||
public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor)
|
||||
|
@ -2934,7 +2940,7 @@ public class UniversalFileTransferUtility
|
|||
* @param monitor the progress monitor
|
||||
* @param checkForCollisions indicates whether to check for collisions or not
|
||||
* @return the resulting remote objects
|
||||
*
|
||||
*
|
||||
* @deprecated use uploadResourcesFromWorkspace
|
||||
*/
|
||||
public static SystemRemoteResourceSet copyWorkspaceResourcesToRemote(SystemWorkspaceResourceSet workspaceSet, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
|
||||
|
@ -2950,7 +2956,7 @@ public class UniversalFileTransferUtility
|
|||
* @param monitor the progress monitor
|
||||
* @param checkForCollisions indicates whether to check for collisions or not
|
||||
* @return the result remote object
|
||||
*
|
||||
*
|
||||
* @deprecated use uploadResourceFromWorkspace
|
||||
*/
|
||||
public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
|
||||
|
@ -2963,7 +2969,7 @@ public class UniversalFileTransferUtility
|
|||
* @param newTargetFolder
|
||||
* @param monitor
|
||||
* @throws Exception
|
||||
*
|
||||
*
|
||||
* @deprecated use compressedUploadFromWorkspace
|
||||
*/
|
||||
public static void compressedCopyWorkspaceResourceToRemote(IContainer directory, IRemoteFile newTargetFolder, IProgressMonitor monitor) throws Exception
|
||||
|
@ -2972,12 +2978,12 @@ public class UniversalFileTransferUtility
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param directory
|
||||
* @param monitor
|
||||
* @return
|
||||
* @throws Exception
|
||||
*
|
||||
*
|
||||
* @deprecated use compressedDownloadToWorkspace
|
||||
*/
|
||||
public static IResource compressedCopyRemoteResourceToWorkspace(IRemoteFile directory, IProgressMonitor monitor) throws Exception
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
|
||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||
|
@ -83,7 +83,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
* <li>{@link #setSystemTypes(IRSESystemType[])}
|
||||
* <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)}
|
||||
* <li>{@link #setPreSelection(IRemoteFile)}
|
||||
* <li>{@link #setFileTypes(String[])} or {@link #setFileTypes(String)}
|
||||
* <li>{@link #setFileTypes(String[])} or {@link #setFileTypes(String)}
|
||||
* <li>{@link #setAutoExpandDepth(int)}
|
||||
* <li>{@link #setShowPropertySheet(boolean)}
|
||||
* <li>{@link #enableAddMode(org.eclipse.rse.files.ui.ISystemAddFileListener)}
|
||||
|
@ -102,28 +102,28 @@ import org.eclipse.swt.widgets.Text;
|
|||
* <li>{@link #getSelectedConnection()}
|
||||
* </ul>
|
||||
*/
|
||||
public class SystemSelectRemoteFileOrFolderForm
|
||||
public class SystemSelectRemoteFileOrFolderForm
|
||||
implements ISelectionChangedListener
|
||||
{
|
||||
{
|
||||
protected static final int PROMPT_WIDTH = 400; // The maximum width of the dialog's prompt, in pixels.
|
||||
|
||||
|
||||
// GUI widgets
|
||||
protected Label verbiageLabel, spacer1, spacer2;
|
||||
protected Text nameEntryValue;
|
||||
private SystemViewForm tree;
|
||||
private SystemPropertySheetForm ps;
|
||||
protected ISystemMessageLine msgLine;
|
||||
protected Composite outerParent, ps_composite;
|
||||
protected ISystemMessageLine msgLine;
|
||||
protected Composite outerParent, ps_composite;
|
||||
// inputs
|
||||
protected ISystemRegistry sr = null;
|
||||
protected String verbiage = null;
|
||||
protected String treeTip = null;
|
||||
protected String treeTip = null;
|
||||
protected String locationPrompt = ""; //$NON-NLS-1$
|
||||
protected String fileTypes;
|
||||
protected boolean fileMode;
|
||||
protected boolean valid = true;
|
||||
protected boolean filesOnlyMode;
|
||||
protected boolean showRootFilter = true;
|
||||
protected boolean showRootFilter = true;
|
||||
protected boolean alwaysEnableOK = false;
|
||||
protected boolean multipleSelectionMode;
|
||||
protected boolean allowForMultipleParents = false;
|
||||
|
@ -134,8 +134,8 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
protected ISystemAddFileListener addButtonCallback = null;
|
||||
protected Vector listeners = new Vector();
|
||||
protected IValidatorRemoteSelection selectionValidator;
|
||||
// outputs
|
||||
protected Object[] outputObjects = null;
|
||||
// outputs
|
||||
protected Object[] outputObjects = null;
|
||||
protected IHost outputConnection = null;
|
||||
// state
|
||||
//protected ResourceBundle rb;
|
||||
|
@ -145,10 +145,10 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
protected boolean preSelectRoot;
|
||||
protected boolean initDone;
|
||||
protected boolean contentsCreated;
|
||||
|
||||
|
||||
//protected String errorMessage;
|
||||
protected Object caller;
|
||||
protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
|
||||
protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
|
||||
protected int autoExpandDepth = 0;
|
||||
|
||||
protected Object previousSelection = null;
|
||||
|
@ -165,13 +165,13 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
* @see #setSystemTypes(IRSESystemType[])
|
||||
* @see #setSelectionTreeToolTipText(String)
|
||||
*/
|
||||
public SystemSelectRemoteFileOrFolderForm(ISystemMessageLine msgLine, Object caller, boolean fileMode)
|
||||
public SystemSelectRemoteFileOrFolderForm(ISystemMessageLine msgLine, Object caller, boolean fileMode)
|
||||
{
|
||||
this.msgLine = msgLine;
|
||||
this.caller = caller;
|
||||
this.fileMode = fileMode;
|
||||
callerInstanceOfWizardPage = (caller instanceof WizardPage);
|
||||
callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
|
||||
callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
|
||||
//rb = RSEUIPlugin.getResourceBundle();
|
||||
sr = RSECorePlugin.getTheSystemRegistry();
|
||||
|
||||
|
@ -181,14 +181,14 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
|
||||
// create the input provider that drives the contents of the tree
|
||||
inputProvider = getInputProvider();
|
||||
|
||||
|
||||
String initialFilterString = "*"; // change to "*" for defect 43492 //$NON-NLS-1$
|
||||
inputProvider.setFilterString(fileMode ? initialFilterString : initialFilterString+" /nf"); //$NON-NLS-1$
|
||||
|
||||
|
||||
// create object matcher
|
||||
if (fileMode)
|
||||
objectMatcher = SystemRemoteFileMatcher.getFileOnlyMatcher();
|
||||
else
|
||||
else
|
||||
objectMatcher = SystemRemoteFileMatcher.getFolderOnlyMatcher();
|
||||
}
|
||||
|
||||
|
@ -198,19 +198,22 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
/**
|
||||
* Returns the input provider that drives the contents of the tree
|
||||
* Subclasses can override to provide custom tree contents
|
||||
*
|
||||
* @since 3.0 replaced SystemSelectRemoteObjectAPIProvider by
|
||||
* ISystemSelectRemoteObjectAPIProvider
|
||||
*/
|
||||
protected ISystemSelectRemoteObjectAPIProvider getInputProvider()
|
||||
{
|
||||
if (inputProvider == null)
|
||||
{
|
||||
// create the input provider that drives the contents of the tree
|
||||
inputProvider = new SystemSelectRemoteObjectAPIProviderImpl(null, ISystemFileRemoteTypes.TYPECATEGORY,
|
||||
inputProvider = new SystemSelectRemoteObjectAPIProviderImpl(null, ISystemFileRemoteTypes.TYPECATEGORY,
|
||||
true, null); // show new connection prompt, no system type restrictions
|
||||
|
||||
|
||||
}
|
||||
return inputProvider;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indicate whether the form should allow selection of objects from different parents
|
||||
*/
|
||||
|
@ -218,7 +221,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
allowForMultipleParents = flag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the connection to restrict the user to seeing
|
||||
*/
|
||||
|
@ -246,11 +249,11 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
inputProvider.setShowNewConnectionPrompt(show);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the system types to restrict what connections the user sees,
|
||||
* and what types of connections they can create.
|
||||
*
|
||||
*
|
||||
* @param systemTypes An array of system types, or
|
||||
* <code>null</code> to allow all registered valid system types.
|
||||
* A system type is valid if at least one subsystem configuration
|
||||
|
@ -260,7 +263,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
inputProvider.setSystemTypes(systemTypes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the message shown as the text at the top of the form. Eg, "Select a file"
|
||||
*/
|
||||
|
@ -284,17 +287,17 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
* Set the root folder from which to start listing folders or files.
|
||||
* This version identifies the folder via a connection object and absolute path.
|
||||
* There is another overload that identifies the folder via a single IRemoteFile object.
|
||||
*
|
||||
*
|
||||
* @param connection The connection to the remote system containing the root folder
|
||||
* @param folderAbsolutePath The fully qualified folder to start listing from (eg: "\folder1\folder2")
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
|
||||
*/
|
||||
public void setRootFolder(IHost connection, String folderAbsolutePath)
|
||||
{
|
||||
setSystemConnection(connection);
|
||||
setShowNewConnectionPrompt(false);
|
||||
setAutoExpandDepth(1);
|
||||
setAutoExpandDepth(1);
|
||||
//ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
||||
IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection);
|
||||
IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration();
|
||||
|
@ -303,7 +306,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
rffs.setShowSubDirs(!fileMode || !filesOnlyMode); // yes folders, always, for now
|
||||
if (fileTypes != null)
|
||||
rffs.setFile(fileTypes);
|
||||
|
||||
|
||||
// set the default filters we will show when the user expands a connection...
|
||||
String filterName = null;
|
||||
ISystemFilter filter = null;
|
||||
|
@ -312,7 +315,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
filterCount = 1;
|
||||
ISystemFilter[] filters = new ISystemFilter[filterCount];
|
||||
int idx = 0;
|
||||
|
||||
|
||||
// filter one: "Root files"/"Root folders" or "Drives"
|
||||
if (showRootFilter)
|
||||
{
|
||||
|
@ -331,7 +334,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
}
|
||||
else
|
||||
filterName = fileMode ? SystemFileResources.RESID_FILTER_DRIVES : SystemFileResources.RESID_FILTER_DRIVES;
|
||||
filter = SystemFilterUtil.makeSimpleFilter(filterName);
|
||||
filter = SystemFilterUtil.makeSimpleFilter(filterName);
|
||||
filter.setSubSystem(ss);
|
||||
filter.setFilterStrings(new String[] {rffs.toString()});
|
||||
filters[idx++] = filter;
|
||||
|
@ -343,20 +346,20 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
//RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!preSelectRoot)
|
||||
{
|
||||
|
||||
|
||||
// filter two: "\folder1\folder2"
|
||||
rffs.setPath(folderAbsolutePath);
|
||||
rffs.setPath(folderAbsolutePath);
|
||||
|
||||
filter = SystemFilterUtil.makeSimpleFilter(rffs.toStringNoSwitches());
|
||||
filter.setSubSystem(ss);
|
||||
filter.setFilterStrings(new String[] {rffs.toString()});
|
||||
filters[idx] = filter;
|
||||
|
||||
|
||||
preSelectFilter = filter;
|
||||
//RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString());
|
||||
//RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString());
|
||||
}
|
||||
inputProvider.setFilterString(null); // undo what ctor did
|
||||
inputProvider.setQuickFilters(filters);
|
||||
|
@ -365,9 +368,9 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
* Set the root folder from which to start listing folders.
|
||||
* This version identifies the folder via an IRemoteFile object.
|
||||
* There is another overload that identifies the folder via a connection and folder path.
|
||||
*
|
||||
*
|
||||
* @param rootFolder The IRemoteFile object representing the remote folder to start the list from
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString
|
||||
*/
|
||||
public void setRootFolder(IRemoteFile rootFolder)
|
||||
|
@ -377,7 +380,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
/**
|
||||
* Set a file or folder to preselect. This will:
|
||||
* <ul>
|
||||
* <li>Set the parent folder as the root folder
|
||||
* <li>Set the parent folder as the root folder
|
||||
* <li>Pre-expand the parent folder
|
||||
* <li>Pre-select the given file or folder after expansion
|
||||
* </ul>
|
||||
|
@ -399,16 +402,16 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
SystemBasePlugin.logInfo("parent of given is null"); //$NON-NLS-1$
|
||||
/**/
|
||||
// it might be a bug, bug when asking for the parent of '/', I get back '/'!!!
|
||||
if ((parentFolder != null) &&
|
||||
if ((parentFolder != null) &&
|
||||
(selection.getAbsolutePath().equals("/") && //$NON-NLS-1$
|
||||
(parentFolder.getAbsolutePath()!=null) &&
|
||||
parentFolder.getAbsolutePath().equals("/"))) //$NON-NLS-1$
|
||||
parentFolder = null;
|
||||
parentFolder = null;
|
||||
if (parentFolder != null)
|
||||
{
|
||||
IRemoteFileSubSystemConfiguration ssf = selection.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration();
|
||||
boolean isUnix = ssf.isUnixStyle();
|
||||
if (isUnix)
|
||||
if (isUnix)
|
||||
setRestrictFolders(parentFolder.isRoot());
|
||||
setRootFolder(parentFolder);
|
||||
preSelectFilterChild = selection.getName();
|
||||
|
@ -421,9 +424,9 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
setRestrictFolders(false);
|
||||
setRootFolder(selection);
|
||||
}
|
||||
inputProvider.setPreSelectFilterChild(preSelectFilterChild);
|
||||
inputProvider.setPreSelectFilterChild(preSelectFilterChild);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For files mode, restrict the files list by an array of file types
|
||||
* <p>
|
||||
|
@ -456,7 +459,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
this.autoExpandDepth = depth+1;
|
||||
}
|
||||
/**
|
||||
* Specify whether setRootFolder should prevent the user from being able to see or select
|
||||
* Specify whether setRootFolder should prevent the user from being able to see or select
|
||||
* any other folder. This causes two effects:
|
||||
* <ol>
|
||||
* <li>The special filter for root/drives is not shown
|
||||
|
@ -491,7 +494,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
this.showPropertySheet = show;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set multiple selection mode. Default is single selection mode
|
||||
* <p>
|
||||
|
@ -501,8 +504,8 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
* Further, if you turn this on, it has the side effect of allowing the user
|
||||
* to select any remote object. The assumption being if you are prompting for
|
||||
* files, you also want to allow the user to select a folder, with the meaning
|
||||
* being that all files within the folder are implicitly selected.
|
||||
*
|
||||
* being that all files within the folder are implicitly selected.
|
||||
*
|
||||
* @see #getSelectedObjects()
|
||||
*/
|
||||
public void setMultipleSelectionMode(boolean multiple)
|
||||
|
@ -511,7 +514,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
if (multiple)
|
||||
objectMatcher = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a listener to selection change events in the tree
|
||||
*/
|
||||
|
@ -532,7 +535,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
else
|
||||
listeners.removeElement(l);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Specify a validator to use when the user selects a remote file or folder.
|
||||
* This allows you to decide if OK should be enabled or not for that remote file or folder.
|
||||
|
@ -541,14 +544,14 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
this.selectionValidator = selectionValidator;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------
|
||||
// OUTPUT METHODS...
|
||||
// ---------------------------------
|
||||
/**
|
||||
* Return first selected object
|
||||
*/
|
||||
*/
|
||||
public Object getSelectedObject()
|
||||
{
|
||||
if ((outputObjects != null) && (outputObjects.length>=1))
|
||||
|
@ -557,22 +560,22 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
return null;
|
||||
}
|
||||
/**
|
||||
* Return all selected objects.
|
||||
* Return all selected objects.
|
||||
* @see #setMultipleSelectionMode(boolean)
|
||||
*/
|
||||
*/
|
||||
public Object[] getSelectedObjects()
|
||||
{
|
||||
return outputObjects;
|
||||
}
|
||||
/**
|
||||
* Return selected connection
|
||||
*/
|
||||
*/
|
||||
public IHost getSelectedConnection()
|
||||
{
|
||||
return outputConnection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return the multiple selection mode current setting
|
||||
*/
|
||||
|
@ -599,8 +602,8 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
public Control getInitialFocusControl()
|
||||
{
|
||||
return tree.getTreeControl();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Show or hide the property sheet. This is called after the contents are created when the user
|
||||
* toggles the Details button.
|
||||
|
@ -608,7 +611,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
* @param contents Use getContents() in your dialog or wizard page
|
||||
* @return new state -> true if showing, false if hiding
|
||||
*/
|
||||
public boolean toggleShowPropertySheet(Shell shell, Control contents)
|
||||
public boolean toggleShowPropertySheet(Shell shell, Control contents)
|
||||
{
|
||||
Point windowSize = shell.getSize();
|
||||
Point oldSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
|
@ -631,24 +634,24 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
|
||||
Point newSize = contents.computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
shell.setSize(new Point(windowSize.x + (newSize.x - oldSize.x), windowSize.y));
|
||||
|
||||
|
||||
if (ps != null)
|
||||
{
|
||||
ISelection s = tree.getSelection();
|
||||
if (s != null)
|
||||
ps.selectionChanged(s);
|
||||
ps.selectionChanged(s);
|
||||
}
|
||||
|
||||
|
||||
showPropertySheet = !showPropertySheet;
|
||||
return showPropertySheet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the property sheet viewer
|
||||
*/
|
||||
private void createPropertySheet(Composite outerParent, Shell shell)
|
||||
{
|
||||
ps_composite = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
|
||||
ps_composite = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
|
||||
((GridData)ps_composite.getLayoutData()).grabExcessVerticalSpace = true;
|
||||
((GridData)ps_composite.getLayoutData()).verticalAlignment = GridData.FILL;
|
||||
|
||||
|
@ -656,39 +659,39 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
spacer1 = SystemWidgetHelpers.createLabel(ps_composite, "", 1); //$NON-NLS-1$
|
||||
spacer2 = SystemWidgetHelpers.createLabel(ps_composite, "", 1); //$NON-NLS-1$
|
||||
// PROPERTY SHEET VIEWER
|
||||
ps = new SystemPropertySheetForm(shell, ps_composite, SWT.BORDER, msgLine);
|
||||
ps = new SystemPropertySheetForm(shell, ps_composite, SWT.BORDER, msgLine);
|
||||
}
|
||||
|
||||
|
||||
public void dispose()
|
||||
{
|
||||
if (tree != null)
|
||||
{
|
||||
tree.removeSelectionChangedListener(this);
|
||||
tree.removeSelectionChangedListener(this);
|
||||
for (int i = 0; i < listeners.size(); i++)
|
||||
{
|
||||
tree.removeSelectionChangedListener((ISelectionChangedListener)listeners.get(i));
|
||||
tree.removeSelectionChangedListener((ISelectionChangedListener)listeners.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* In this method, we populate the given SWT container with widgets and return the container
|
||||
* to the caller.
|
||||
* to the caller.
|
||||
* @param parent The parent composite
|
||||
*/
|
||||
public Control createContents(Shell shell, Composite parent)
|
||||
{
|
||||
contentsCreated = true;
|
||||
|
||||
outerParent = parent;
|
||||
|
||||
outerParent = parent;
|
||||
// OUTER COMPOSITE
|
||||
//if (showPropertySheet)
|
||||
{
|
||||
outerParent = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
|
||||
outerParent = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
|
||||
}
|
||||
|
||||
// INNER COMPOSITE
|
||||
int gridColumns = 2;
|
||||
Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(outerParent, gridColumns);
|
||||
Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(outerParent, gridColumns);
|
||||
|
||||
// PROPERTY SHEET COMPOSITE
|
||||
if (showPropertySheet)
|
||||
|
@ -706,22 +709,22 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
|
||||
// SPACER LINE
|
||||
SystemWidgetHelpers.createLabel(composite_prompts, "", gridColumns); //$NON-NLS-1$
|
||||
|
||||
|
||||
// LOCATION PROMPT
|
||||
if (showLocationPrompt)
|
||||
{
|
||||
SystemWidgetHelpers.createLabel(composite_prompts, locationPrompt, gridColumns);
|
||||
}
|
||||
|
||||
|
||||
// SELECT OBJECT READONLY TEXT FIELD
|
||||
Composite nameComposite = composite_prompts;
|
||||
int nameSpan = gridColumns;
|
||||
nameEntryValue = SystemWidgetHelpers.createReadonlyTextField(nameComposite);
|
||||
((GridData)nameEntryValue.getLayoutData()).horizontalSpan = nameSpan;
|
||||
|
||||
|
||||
// create an array of viewer filters from our list of viewer filters
|
||||
ViewerFilter[] initViewerFilters = null;
|
||||
|
||||
|
||||
// if we don't have a viewer filter list, then create an empty array
|
||||
if (viewerFilters == null) {
|
||||
initViewerFilters = new ViewerFilter[0];
|
||||
|
@ -729,11 +732,11 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
// otherwise copy from list to array
|
||||
else {
|
||||
initViewerFilters = new ViewerFilter[viewerFilters.size()];
|
||||
|
||||
|
||||
Iterator iter = viewerFilters.iterator();
|
||||
|
||||
|
||||
int idx = 0;
|
||||
|
||||
|
||||
// copy from list to array
|
||||
while (iter.hasNext()) {
|
||||
ViewerFilter filter = (ViewerFilter)(iter.next());
|
||||
|
@ -742,9 +745,9 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
}
|
||||
}
|
||||
|
||||
// TREE
|
||||
// TREE
|
||||
tree = new SystemViewForm(shell, composite_prompts, SWT.NULL, inputProvider, !multipleSelectionMode, msgLine, gridColumns, 1, initViewerFilters);
|
||||
|
||||
|
||||
if (treeTip != null)
|
||||
//tree.setToolTipText(treeTip); //EXTREMELY ANNOYING!
|
||||
if (autoExpandDepth != 0)
|
||||
|
@ -755,10 +758,10 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
|
||||
// initialize fields
|
||||
if (!initDone)
|
||||
doInitializeFields();
|
||||
doInitializeFields();
|
||||
|
||||
// add selection listeners
|
||||
tree.addSelectionChangedListener(this);
|
||||
tree.addSelectionChangedListener(this);
|
||||
if (listeners.size() > 0)
|
||||
for (int idx=0; idx<listeners.size(); idx++)
|
||||
tree.addSelectionChangedListener((ISelectionChangedListener)listeners.elementAt(idx));
|
||||
|
@ -770,21 +773,21 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
Object preSelectFilterChildObject = inputProvider.getPreSelectFilterChildObject();
|
||||
if (preSelectFilterChildObject != null)
|
||||
tree.select(preSelectFilterChildObject, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return composite_prompts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Completes processing of the wizard page or dialog. If this
|
||||
* method returns true, the wizard/dialog will close;
|
||||
* Completes processing of the wizard page or dialog. If this
|
||||
* method returns true, the wizard/dialog will close;
|
||||
* otherwise, it will stay active.
|
||||
*
|
||||
* @return true if no errors
|
||||
*/
|
||||
public boolean verify()
|
||||
public boolean verify()
|
||||
{
|
||||
msgLine.clearErrorMessage();
|
||||
msgLine.clearErrorMessage();
|
||||
outputConnection = internalGetConnection();
|
||||
return true;
|
||||
}
|
||||
|
@ -793,7 +796,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
// -----------------------------------------------------
|
||||
// PRIVATE METHODS USED BY US...
|
||||
// -----------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Return the current connection
|
||||
*/
|
||||
|
@ -806,7 +809,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
protected void setNameText(String text)
|
||||
{
|
||||
nameEntryValue.setText(text);
|
||||
|
@ -819,20 +822,20 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
setPageComplete();
|
||||
initDone = true;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the implementation of ISystemRemoteElement for the given
|
||||
* object. Returns null if this object does not adaptable to this.
|
||||
*/
|
||||
private ISystemRemoteElementAdapter getRemoteAdapter(Object o)
|
||||
private ISystemRemoteElementAdapter getRemoteAdapter(Object o)
|
||||
{
|
||||
return SystemAdapterHelpers.getRemoteAdapter(o);
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------
|
||||
// METHODS FOR SELECTION CHANGED LISTENER INTERFACE...
|
||||
// METHODS FOR SELECTION CHANGED LISTENER INTERFACE...
|
||||
// ---------------------------------------------------
|
||||
/**
|
||||
* User selected something in the tree.
|
||||
|
@ -841,10 +844,10 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
valid = true;
|
||||
ISelection selection = e.getSelection();
|
||||
|
||||
|
||||
if (ps != null)
|
||||
ps.selectionChanged(selection);
|
||||
|
||||
|
||||
outputObjects = null;
|
||||
int selectionSize = ((IStructuredSelection)selection).size();
|
||||
if ((selectionSize > 1) && !tree.sameParent() && !allowForMultipleParents)
|
||||
|
@ -854,19 +857,19 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
setPageComplete();
|
||||
return; // don't enable OK/Add if selections from different parents
|
||||
}
|
||||
|
||||
|
||||
Object errMsg = null;
|
||||
Object selectedObject = getFirstSelection(selection);
|
||||
if (selectedObject == previousSelection && selectionSize == 1)
|
||||
{
|
||||
// DKM we null set this before, so we need to reset it
|
||||
outputObjects = getSelections(selection);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
clearErrorMessage();
|
||||
setNameText(""); //$NON-NLS-1$
|
||||
setPageComplete();
|
||||
previousSelection = selectedObject;
|
||||
previousSelection = selectedObject;
|
||||
if (selectedObject != null)
|
||||
{
|
||||
|
||||
|
@ -874,7 +877,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
if (remoteAdapter != null)
|
||||
{
|
||||
setNameTextFromSelection(selection, selectedObject, remoteAdapter);
|
||||
|
||||
|
||||
outputConnection = internalGetConnection();
|
||||
if ((addButtonCallback != null) && (selectedObject instanceof IRemoteFile))
|
||||
{
|
||||
|
@ -886,12 +889,12 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
setErrorMessage((String)errMsg);
|
||||
else
|
||||
setErrorMessage((SystemMessage)errMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((objectMatcher == null) || objectMatcher.appliesTo(remoteAdapter, selectedObject))
|
||||
{
|
||||
SystemMessage selectionMsg = null;
|
||||
if (selectionValidator != null)
|
||||
if (selectionValidator != null)
|
||||
selectionMsg = selectionValidator.isValid(outputConnection, getSelections(selection), getRemoteAdapters(selection));
|
||||
|
||||
if (selectionMsg != null)
|
||||
|
@ -903,13 +906,13 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
}
|
||||
// if we're in file mode and folder selection is not allowed, then mark as invlaid selection
|
||||
else if (fileMode && !allowFolderSelection) {
|
||||
|
||||
|
||||
if (remoteAdapter.getRemoteType(selectedObject).equals(ISystemFileRemoteTypes.TYPE_FOLDER)) {
|
||||
valid = false;
|
||||
setPageComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -923,8 +926,8 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
}
|
||||
return adapters;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNameTextFromSelection(ISelection selection, Object selectedObject,ISystemRemoteElementAdapter remoteAdapter)
|
||||
{
|
||||
setNameText(remoteAdapter.getAbsoluteName(selectedObject));
|
||||
|
@ -945,9 +948,9 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
return selectionIterator.next();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return all items currently selected.
|
||||
*/
|
||||
|
@ -956,16 +959,16 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
IStructuredSelection sSelection = (IStructuredSelection)selection;
|
||||
if (sSelection != null)
|
||||
{
|
||||
Object[] selectedObjects = new Object[sSelection.size()];
|
||||
Object[] selectedObjects = new Object[sSelection.size()];
|
||||
Iterator selectionIterator = sSelection.iterator();
|
||||
int idx = 0;
|
||||
while (selectionIterator.hasNext())
|
||||
selectedObjects[idx++] = selectionIterator.next();
|
||||
return selectedObjects;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method can be called by the dialog or wizard page host, to decide whether to enable
|
||||
* or disable the next, final or ok buttons. It returns true if the minimal information is
|
||||
|
@ -975,7 +978,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
{
|
||||
return ( (getNameText().length() > 0) ) && valid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Inform caller of page-complete status of this form
|
||||
*/
|
||||
|
@ -988,7 +991,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
else if (callerInstanceOfSystemPromptDialog)
|
||||
{
|
||||
((SystemPromptDialog)caller).setPageComplete(isPageComplete());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1026,17 +1029,17 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void setShowLocationPrompt(boolean show)
|
||||
{
|
||||
showLocationPrompt = show;
|
||||
}
|
||||
|
||||
|
||||
public void setLocationPrompt(String prompt)
|
||||
{
|
||||
locationPrompt = prompt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add viewer filter.
|
||||
* @param filter a viewer filter.
|
||||
|
@ -1044,7 +1047,7 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
public void addViewerFilter(ViewerFilter filter) {
|
||||
viewerFilters.add(filter);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets whether to allow folder selection. The default selection validator will use this to
|
||||
* determine whether the OK button will be enabled when a folder is selected. The default
|
||||
|
@ -1054,16 +1057,21 @@ public class SystemSelectRemoteFileOrFolderForm
|
|||
public void setAllowFolderSelection(boolean allow) {
|
||||
allowFolderSelection = allow;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the system tree
|
||||
*
|
||||
* @return the system tree
|
||||
* @since 3.0 replacing the previous getSystemViewForm method
|
||||
*/
|
||||
public ISystemTree getSystemTree()
|
||||
{
|
||||
return tree.getSystemTree();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 3.0
|
||||
*/
|
||||
public Object getSelectedParent()
|
||||
{
|
||||
return tree.getSelectedParent();
|
||||
|
|
|
@ -73,6 +73,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
protected File file;
|
||||
protected long modTimeDuringCache;
|
||||
protected VirtualFileSystem vfs;
|
||||
/** @since 3.0 */
|
||||
protected SystemReentrantMutex _mutex;
|
||||
|
||||
/**
|
||||
|
@ -607,9 +608,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Update the virtual file system tree.
|
||||
* If newOldName HashMap is input, use the old name in the HashMap
|
||||
* to do the search in virtual file system tree.
|
||||
* Update the virtual file system tree. If newOldName HashMap is input, use
|
||||
* the old name in the HashMap to do the search in virtual file system tree.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected void updateTree(HashMap newOldNames)
|
||||
{
|
||||
|
@ -648,7 +650,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
|
||||
/**
|
||||
* Gets a tar file from the underlying file.
|
||||
* @return the tar file, or <code>null</code> if the tar file does not exist.
|
||||
*
|
||||
* @return the tar file, or <code>null</code> if the tar file does not
|
||||
* exist.
|
||||
* @since 3.0 TarFile moved to API
|
||||
*/
|
||||
protected TarFile getTarFile() {
|
||||
|
||||
|
@ -684,9 +689,9 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList(org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildrenList(ISystemOperationMonitor archiveOperationMonitor) {
|
||||
|
||||
|
@ -714,9 +719,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return children;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildrenList(String parent, ISystemOperationMonitor archiveOperationMonitor) {
|
||||
parent = ArchiveHandlerManager.cleanUpVirtualPath(parent);
|
||||
|
@ -753,9 +759,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return children;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildren(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildren(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
|
||||
|
||||
|
@ -771,9 +778,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return vfs.getChildren(fullVirtualName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildFolders(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildFolders(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
|
||||
|
||||
|
@ -789,9 +797,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return vfs.getChildrenFolders(fullVirtualName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualFile(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild getVirtualFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
|
||||
|
||||
|
@ -820,9 +829,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return entry;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#exists(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public boolean exists(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
|
||||
|
||||
|
@ -899,8 +909,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualFile(String fullVirtualName, File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
|
||||
|
@ -991,16 +1003,19 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, ISystemOperationMonitor)
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String fullVirtualName, File destinationParent, ISystemOperationMonitor archiveOperationMonitor)
|
||||
throws SystemMessageException {
|
||||
extractVirtualDirectory(fullVirtualName, destinationParent, (File) null, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String fullVirtualName, File destinationParent, File destination, ISystemOperationMonitor archiveOperationMonitor)
|
||||
throws SystemMessageException {
|
||||
|
@ -1100,9 +1115,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File file, String virtualPath, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
|
||||
|
@ -1179,6 +1195,8 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
* Helper method. Populates given List <code>found</code> with a collapsed
|
||||
* list of all nodes in the subtree of the file system rooted at
|
||||
* <code>parent</code>.
|
||||
*
|
||||
* @since 3.0 Vector changed into List
|
||||
*/
|
||||
public void listAllFiles(File parent, List found) {
|
||||
|
||||
|
@ -1194,9 +1212,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[], org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File[] files, String virtualPath, String[] names, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
|
||||
|
@ -1406,11 +1425,14 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Appends a file to a tar output stream, using the given entry that represents the file.
|
||||
* Appends a file to a tar output stream, using the given entry that
|
||||
* represents the file.
|
||||
*
|
||||
* @param file the file to be appended to the tar output stream.
|
||||
* @param entry the entry which represents the file.
|
||||
* @param outStream the tar output stream.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected void appendFile(File file, TarEntry entry, TarOutputStream outStream) throws IOException {
|
||||
|
||||
|
@ -1442,9 +1464,11 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
* Creates a tar entry for a file with the given virtual path. The entry
|
||||
* will contain the size and last modified time of the file. The entry's
|
||||
* checksum will be calculated.
|
||||
*
|
||||
* @param file the file for which to create a tar entry.
|
||||
* @param virtualPath the virtual path for the entry.
|
||||
* @return the tar entry representing the given file.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected TarEntry createTarEntry(File file, String virtualPath) {
|
||||
|
||||
|
@ -1528,13 +1552,16 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Changes a tar entry according to the file information and given path. The given path
|
||||
* will be the new name of the entry. The size and last modified fields will be changed
|
||||
* to the file's size and last modified time. The entry's checksum will be calculated.
|
||||
* Changes a tar entry according to the file information and given path. The
|
||||
* given path will be the new name of the entry. The size and last modified
|
||||
* fields will be changed to the file's size and last modified time. The
|
||||
* entry's checksum will be calculated.
|
||||
*
|
||||
* @param entry the entry that needs to be changed.
|
||||
* @param file the file for which the tar entry is being changed.
|
||||
* @param virtualPath the virtual path for the entry.
|
||||
* @return the changed entry.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected TarEntry changeTarEntry(TarEntry entry, File file, String virtualPath) {
|
||||
|
||||
|
@ -1582,8 +1609,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
|
||||
/**
|
||||
* Returns a virtual child given a tar entry.
|
||||
*
|
||||
* @param entry a tar entry.
|
||||
* @return the virtual child that represents the tar entry.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected VirtualChild getVirtualChild(TarEntry entry) {
|
||||
VirtualChild child = new VirtualChild(this, entry.getName());
|
||||
|
@ -1598,8 +1627,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
|
||||
/**
|
||||
* update a virtual child given a tar entry.
|
||||
*
|
||||
* @param entry a tar entry.
|
||||
* @return the virtual child that represents the tar entry.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected VirtualChild updateVirtualChild(TarEntry entry, VirtualChild child) {
|
||||
child.renameTo(entry.getName());
|
||||
|
@ -1651,9 +1682,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#replace(java.lang.String, java.io.File, java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void replace(String fullVirtualName, File file, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
|
||||
|
@ -1750,9 +1782,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#delete(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public boolean delete(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -1851,9 +1884,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#rename(java.lang.String, java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void rename(String fullVirtualName, String newName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
|
||||
|
@ -1873,9 +1907,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#move(java.lang.String, java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void move(String fullVirtualName, String destinationVirtualPath, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
|
||||
|
@ -1894,9 +1929,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#fullRename(java.lang.String, java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void fullRename(String fullVirtualName, String newFullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
|
||||
|
@ -2109,10 +2145,13 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Changes the name of a tar entry. Also calculates the new checksum for the entry.
|
||||
* Changes the name of a tar entry. Also calculates the new checksum for the
|
||||
* entry.
|
||||
*
|
||||
* @param entry the entry for which the name has to be changed.
|
||||
* @param newName the new name for the entry.
|
||||
* @return the changed entry.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected TarEntry changeTarEntryName(TarEntry entry, String newName) {
|
||||
|
||||
|
@ -2125,9 +2164,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return entry;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getFiles(java.lang.String[], org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public File[] getFiles(String[] fullNames, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
|
||||
|
@ -2159,9 +2199,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return files;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFolder(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void createFolder(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
|
||||
|
@ -2173,9 +2214,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFile(java.lang.String, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void createFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
|
||||
|
@ -2280,11 +2322,14 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a new tar entry and appends it to the tar output stream with the given name.
|
||||
* Creates a new tar entry and appends it to the tar output stream with the
|
||||
* given name.
|
||||
*
|
||||
* @param outStream the tar output stream.
|
||||
* @param name the name of the new tar entry.
|
||||
* @return the newly created tar entry.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
* @since 3.0 TarEntry moved into API
|
||||
*/
|
||||
protected TarEntry appendEmptyFile(TarOutputStream outStream, String name) throws IOException {
|
||||
|
||||
|
@ -2359,9 +2404,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return vc.fullName;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#create()
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void create() throws SystemMessageException {
|
||||
|
||||
|
@ -2384,6 +2430,11 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher, ISystemOperationMonitor archiveOperationMonitor)
|
||||
throws SystemMessageException {
|
||||
// if the search string is empty or if it is "*", then return no matches
|
||||
|
@ -2494,8 +2545,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
add(file, virtualPath, name, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File file, String virtualPath, String name,
|
||||
String sourceEncoding, String targetEncoding, boolean isText,
|
||||
|
@ -2503,8 +2556,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
add(file, virtualPath, name, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[], boolean[])
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File[] files, String virtualPath, String[] names,
|
||||
String[] sourceEncodings, String[] targetEncodings, boolean[] isTexts,
|
||||
|
@ -2512,8 +2567,10 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
add(files, virtualPath, names, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File, java.lang.String, boolean)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String dir, File destinationParent,
|
||||
File destination, String sourceEncoding, boolean isText,
|
||||
|
@ -2521,16 +2578,20 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
extractVirtualDirectory(dir, destinationParent, destination, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.lang.String, boolean)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
extractVirtualDirectory(dir, destinationParent, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File, java.lang.String, boolean)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
|
@ -2596,16 +2657,31 @@ public class SystemTarHandler implements ISystemArchiveHandler {
|
|||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "add"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
add(file, virtualPath, name, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
|
||||
throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "replace"); //$NON-NLS-1$
|
||||
|
|
|
@ -509,8 +509,9 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList()
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildrenList(ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -571,8 +572,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return new VirtualChild[0];
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildrenList(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildrenList(String parent, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -641,8 +644,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildren(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildren(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor)
|
||||
{
|
||||
|
@ -665,8 +670,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return values;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualChildFolders(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild[] getVirtualChildFolders(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor)
|
||||
{
|
||||
|
@ -692,8 +699,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return values;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getVirtualFile(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public VirtualChild getVirtualFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor)
|
||||
{
|
||||
|
@ -722,8 +731,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return vc;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#exists(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public boolean exists(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -859,16 +870,20 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualFile(String fullVirtualName, File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
extractVirtualFile(fullVirtualName, destination, true, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualFile(java.lang.String, java.io.File, java.lang.String, boolean)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -974,16 +989,20 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String dir, File destinationParent, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
extractVirtualDirectory(dir, destinationParent, (File) null, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.lang.String, boolean)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -991,8 +1010,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
extractVirtualDirectory(dir, destinationParent, (File) null, sourceEncoding, isText, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String dir, File destinationParent, File destination, ISystemOperationMonitor archiveOperationMonitor)
|
||||
throws SystemMessageException
|
||||
|
@ -1000,9 +1021,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
extractVirtualDirectory(dir, destinationParent, destination, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#extractVirtualDirectory(java.lang.String, java.io.File, java.io.File, java.lang.String, boolean, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void extractVirtualDirectory(String dir, File destinationParent, File destination, String sourceEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -1134,6 +1156,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
*
|
||||
* @param file An abstract file handle to create physically.
|
||||
* @throws SystemMessageException in case of an error otherwise.
|
||||
* @since 3.0 throws SystemMessageException
|
||||
*/
|
||||
protected void createFile(File file) throws SystemMessageException
|
||||
{
|
||||
|
@ -1161,17 +1184,20 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File file, String virtualPath, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
add(file, virtualPath, name, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.InputStream, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -1253,8 +1279,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[])
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File[] files, String virtualPath, String[] names, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -1268,9 +1296,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
add(files, virtualPath, names, encodings, encodings, isTexts, true, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File[], java.lang.String, java.lang.String[], java.lang.String[], java.lang.String[], boolean[], org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -1701,8 +1730,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
oldFile.delete();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#delete(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public boolean delete(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -1835,8 +1866,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#replace(java.lang.String, java.io.File, java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void replace(String fullVirtualName, File file, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -1920,9 +1953,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#replace(java.lang.String, java.io.InputStream, java.lang.String, java.lang.String, java.lang.String, boolean, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -1985,8 +2019,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#fullRename(java.lang.String, java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void fullRename(String fullVirtualName, String newFullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -2104,8 +2140,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#move(java.lang.String, java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void move(String fullVirtualName, String destinationVirtualPath, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -2120,8 +2158,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
fullRename(fullVirtualName, destinationVirtualPath + name, archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#rename(java.lang.String, java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void rename(String fullVirtualName, String newName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -2138,8 +2178,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getFiles(java.lang.String[])
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public File[] getFiles(String[] fullNames, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -2174,8 +2216,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return files;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFolder(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void createFolder(String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -2185,8 +2229,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#createFile(java.lang.String)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void createFile(String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -2409,9 +2455,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return entry;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#create()
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void create() throws SystemMessageException
|
||||
{
|
||||
|
@ -2440,9 +2487,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
_exists = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#search(java.lang.String, org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher, ISystemOperationMonitor archiveOperationMonitor)
|
||||
throws SystemMessageException
|
||||
|
@ -2686,9 +2734,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
return type;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.rse.services.clientserver.ISystemFileTypes, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes registry,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
@ -2767,9 +2816,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#add(java.io.File, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, org.eclipse.rse.services.clientserver.ISystemOperationMonitor)
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
|
||||
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
|
|
|
@ -124,6 +124,7 @@ public final class VirtualChild {
|
|||
|
||||
/**
|
||||
* @param value the time stamp value
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setTimeStamp(long value)
|
||||
{
|
||||
|
@ -145,6 +146,7 @@ public final class VirtualChild {
|
|||
|
||||
/**
|
||||
* @param value the size value
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setSize(long value)
|
||||
{
|
||||
|
@ -165,6 +167,7 @@ public final class VirtualChild {
|
|||
|
||||
/**
|
||||
* @param value the comment value
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setComment(String value)
|
||||
{
|
||||
|
@ -193,6 +196,7 @@ public final class VirtualChild {
|
|||
|
||||
/**
|
||||
* @param value the compressedSize value
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setCompressedSize(long value)
|
||||
{
|
||||
|
@ -213,6 +217,7 @@ public final class VirtualChild {
|
|||
|
||||
/**
|
||||
* @param value the compression method value
|
||||
* @since 3.0
|
||||
*/
|
||||
public void setCompressionMethod(String value)
|
||||
{
|
||||
|
@ -263,11 +268,13 @@ public final class VirtualChild {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return The extracted file or directory represented by this VirtualChild from the archive.
|
||||
* Assumes that the file has been encoded in the encoding specified.
|
||||
* Note that the extracted file is cached after it is extracted once, but if the
|
||||
* timestamps on the cached and archived files do not match, the cached file is erased,
|
||||
* and reextracted from the archive.
|
||||
* @return The extracted file or directory represented by this VirtualChild
|
||||
* from the archive. Assumes that the file has been encoded in the
|
||||
* encoding specified. Note that the extracted file is cached after
|
||||
* it is extracted once, but if the timestamps on the cached and
|
||||
* archived files do not match, the cached file is erased, and
|
||||
* re-extracted from the archive.
|
||||
* @since 3.0 throws SystemMessageException
|
||||
*/
|
||||
public File getExtractedFile(String sourceEncoding, boolean isText, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -341,10 +348,11 @@ public final class VirtualChild {
|
|||
* <code>destination</code> with that extracted file or directory. Note that
|
||||
* the extracted file is cached after it is extracted once, but if the
|
||||
* timestamps on the cached and archived files do not match, the cached file
|
||||
* is erased, and reextracted from the archive. <code>destination</code> is
|
||||
* is erased, and re-extracted from the archive. <code>destination</code> is
|
||||
* always overwritten with either what is cached, or what is in the archive.
|
||||
*
|
||||
* @throws SystemMessageException in case of an error
|
||||
* @since 3.0 throws SystemMessageException
|
||||
*/
|
||||
public void getExtractedFile(File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -362,6 +370,7 @@ public final class VirtualChild {
|
|||
* always overwritten with either what is cached, or what is in the archive.
|
||||
*
|
||||
* @throws SystemMessageException in case of an error
|
||||
* @since 3.0 throws SystemMessageException
|
||||
*/
|
||||
public void getExtractedFile(File destination, String sourceEncoding, boolean isText, ISystemOperationMonitor archiveOperationMonitor)
|
||||
throws SystemMessageException
|
||||
|
|
Loading…
Add table
Reference in a new issue