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