1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

change to use SystemRemoteFolderDialog instead of SystemSelectRemoteFileOrFolderDialog since it picks up defined filters. Fix for 141829.

This commit is contained in:
David McKnight 2006-05-16 19:31:34 +00:00
parent b5841705a9
commit fb1d039fb2
2 changed files with 25 additions and 10 deletions

View file

@ -25,7 +25,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.model.IHost;
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
@ -320,14 +320,16 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
reset();
//return new SystemSimpleCopyDialog(parent, getPromptString(), mode, this, getTreeModel(), getTreeInitialSelection());
String dlgTitle = (mode==MODE_COPY ? SystemResources.RESID_COPY_TITLE : SystemResources.RESID_MOVE_TITLE);
SystemSelectRemoteFileOrFolderDialog dlg = new SystemSelectRemoteFileOrFolderDialog(shell,dlgTitle,SystemSelectRemoteFileOrFolderDialog.FOLDER_MODE);
dlg.setNeedsProgressMonitor(true);
dlg.setMessage(getPromptString());
dlg.setShowNewConnectionPrompt(false);
dlg.setShowPropertySheet(true, false);
firstSelection = getFirstSelectedFile();
sourceConnection = firstSelection.getSystemConnection();
dlg.setSystemConnection(sourceConnection);
SystemRemoteFolderDialog dlg = new SystemRemoteFolderDialog(shell, dlgTitle, sourceConnection);
dlg.setNeedsProgressMonitor(true);
dlg.setMessage(getPromptString());
dlg.setShowPropertySheet(true, false);
dlg.setDefaultSystemConnection(sourceConnection, true);
//dlg.setSystemConnection(sourceConnection);
if (mode==MODE_MOVE)
dlg.setSelectionValidator(this);
//RSEUIPlugin.logInfo("Calling getParentRemoteFile for '"+firstSelection.getAbsolutePath()+"'");
@ -363,7 +365,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
*/
protected Object getTargetContainer(Dialog dlg)
{
SystemSelectRemoteFileOrFolderDialog cpyDlg = (SystemSelectRemoteFileOrFolderDialog)dlg;
SystemRemoteFolderDialog cpyDlg = (SystemRemoteFolderDialog)dlg;
Object targetContainer = null;
if (!cpyDlg.wasCancelled())
targetContainer = cpyDlg.getSelectedObject();

View file

@ -37,6 +37,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
private boolean _showPropertySheet = false;
private IHost _outputConnection;
private SystemActionViewerFilter _customViewerFilter;
private String _message, _tip;
public SystemRemoteResourceDialog(Shell shell, String title, SystemResourceSelectionInputProvider inputProvider)
@ -77,6 +78,10 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
_form.setSelectionValidator(_selectionValidator);
_form.setShowPropertySheet(_showPropertySheet);
_form.setSelectionTreeToolTipText(getTreeTip());
if (_message != null)
_form.setMessage(_message);
if (_tip != null)
_form.setSelectionTreeToolTipText(_tip);
}
public void setDefaultSystemConnection(IHost connection, boolean onlyConnection)
@ -137,14 +142,22 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
*/
public void setMessage(String message)
{
_form.setMessage(message);
_message = message;
if (_form != null)
{
_form.setMessage(message);
}
}
/**
* Set the tooltip text for the remote systems tree from which an item is selected.
*/
public void setSelectionTreeToolTipText(String tip)
{
_form.setSelectionTreeToolTipText(tip);
_tip = tip;
if (_tip != null)
{
_form.setSelectionTreeToolTipText(tip);
}
}
/**