1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

[189130][api] Move SystemIFileProperties from UI to Core

This commit is contained in:
Martin Oberhuber 2007-05-25 13:07:20 +00:00
parent 09ae80cac7
commit 922b4d7e89
24 changed files with 115 additions and 95 deletions

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -54,6 +55,7 @@ import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -46,6 +47,7 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -32,6 +33,7 @@ import org.eclipse.rse.internal.files.ui.actions.SystemUploadConflictAction;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.RSEUIPlugin;

View file

@ -19,6 +19,7 @@
* Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -68,6 +69,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;

View file

@ -12,14 +12,15 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.window.Window;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction;

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -21,8 +21,8 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.view.DownloadJob;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.actions.SystemBaseAction;

View file

@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -20,7 +21,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.swt.widgets.Shell;

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -22,9 +22,9 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
import org.eclipse.rse.internal.files.ui.view.DownloadJob;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.actions.SystemBaseAction;

View file

@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -22,7 +23,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.subsystems.IRemoteLineReference;
import org.eclipse.rse.files.ui.resources.ISystemTextEditor;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;

View file

@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -28,10 +29,10 @@ import org.eclipse.jface.action.ContributionItem;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.view.DownloadJob;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.RSEUIPlugin;

View file

@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -19,8 +20,8 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.services.search.IHostSearchResult;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
import org.eclipse.rse.ui.SystemBasePlugin;

View file

@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -20,7 +21,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
import org.eclipse.rse.ui.SystemBasePlugin;

View file

@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions;
@ -33,7 +34,6 @@ import org.eclipse.rse.core.subsystems.SubSystem.SystemMessageDialogRunnable;
import org.eclipse.rse.files.ui.dialogs.ISaveAsDialog;
import org.eclipse.rse.files.ui.dialogs.SaveAsDialog;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
@ -41,6 +41,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.ISystemMessages;

View file

@ -14,6 +14,7 @@
* David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.propertypages;
@ -37,13 +38,13 @@ import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
import org.eclipse.rse.internal.ui.GenericMessages;
import org.eclipse.rse.internal.ui.view.SystemTableViewProvider;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.Mnemonics;
import org.eclipse.rse.ui.RSEUIPlugin;

View file

@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.resources;
@ -38,8 +39,8 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.files.ui.resources.ISystemMountPathMapper;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;

View file

@ -13,6 +13,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@ -20,28 +21,21 @@ package org.eclipse.rse.internal.files.ui.view;
import java.util.ArrayList;
import java.util.Vector;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.actions.SystemFileUpdateFilterAction;
import org.eclipse.rse.internal.files.ui.actions.SystemNewFileAction;
import org.eclipse.rse.internal.files.ui.actions.SystemNewFileFilterAction;
import org.eclipse.rse.internal.files.ui.actions.SystemNewFolderAction;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.internal.files.ui.wizards.SystemFileNewConnectionWizardPage;
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
import org.eclipse.rse.ui.view.IContextObject;
import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
@ -146,62 +140,6 @@ public class RemoteFileSubSystemConfigurationAdapter extends SubSystemConfigurat
return _additionalActions;
}
/**
* Called by SystemRegistry's renameSystemProfile method to ensure we update our
* subsystem names within each subsystem.
* <p>
* Must be called AFTER changing the profile's name!!
*/
public void renameSubSystemProfile(ISubSystemConfiguration factory, String oldProfileName, String newProfileName)
{
super.renameSubSystemProfile(factory, oldProfileName, newProfileName);
// change all IFile properties in remote systems temp files tree
IProject project = SystemBasePlugin.getWorkspaceRoot().getProject(SystemRemoteEditManager.REMOTE_EDIT_PROJECT_NAME);
if (project != null)
{
IFolder folder = project.getFolder(oldProfileName);
if (folder != null && folder.exists())
{
// recursively change all subsystem ids for the temp files
recursivelyUpdateIFileProperties(newProfileName, folder);
}
}
}
protected void recursivelyUpdateIFileProperties(String newName, IFolder container)
{
try
{
IResource[] resources = container.members();
for (int i = 0; i < resources.length; i++)
{
IResource resource = resources[i];
if (resource instanceof IFile)
{
IFile file = (IFile)resource;
SystemIFileProperties properties = new SystemIFileProperties(file);
String absoluteSubSystemName = properties.getRemoteFileSubSystem();
if (absoluteSubSystemName != null)
{
int profileDelim = absoluteSubSystemName.indexOf("."); //$NON-NLS-1$
String theRest = absoluteSubSystemName.substring(profileDelim, absoluteSubSystemName.length());
properties.setRemoteFileSubSystem(newName + theRest);
}
}
else if (resource instanceof IFolder)
{
recursivelyUpdateIFileProperties(newName, (IFolder)resource);
}
}
}
catch (Exception e)
{
}
}
/**
* Checks the preference setting for hidden files and filters out hidden files if the preference setting is to not show hidden files.
* @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#applyViewFilters(org.eclipse.rse.ui.view.IContextObject, java.lang.Object[])

View file

@ -21,6 +21,7 @@
* 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) - [186997] No deferred queries in Local Files
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@ -68,7 +69,6 @@ import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.actions.SystemAddToArchiveAction;
@ -103,6 +103,7 @@ import org.eclipse.rse.services.search.HostSearchResultSet;
import org.eclipse.rse.services.search.IHostSearchConstants;
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
import org.eclipse.rse.services.search.IHostSearchResultSet;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.view;
@ -32,11 +33,11 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.actions.SystemRemoteFileSearchOpenWithMenu;
import org.eclipse.rse.internal.ui.view.SystemViewResources;
import org.eclipse.rse.services.search.IHostSearchResult;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
import org.eclipse.rse.ui.ISystemContextMenuConstants;

View file

@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
*******************************************************************************/
package org.eclipse.rse.internal.importexport.files;
@ -32,12 +33,12 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.operation.ModalContext;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;

View file

@ -18,6 +18,7 @@
* Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.shells.ui.view;
@ -40,7 +41,6 @@ import org.eclipse.rse.core.subsystems.IRemoteLineReference;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties;
import org.eclipse.rse.internal.files.ui.actions.SystemRemoteFileLineOpenWithMenu;
import org.eclipse.rse.internal.shells.ui.ShellResources;
import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
@ -52,6 +52,7 @@ import org.eclipse.rse.internal.shells.ui.view.SystemCommandsUI;
import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart;
import org.eclipse.rse.internal.ui.view.SystemView;
import org.eclipse.rse.internal.ui.view.SystemViewResources;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -11,10 +11,10 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.internal.files.ui.resources;
package org.eclipse.rse.internal.subsystems.files.core;
public interface ISystemRemoteEditConstants {

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -11,10 +11,10 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
package org.eclipse.rse.internal.subsystems.files.core;
public interface ISystemTextEditorConstants {

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved.
* Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -11,16 +11,16 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
package org.eclipse.rse.subsystems.files.core;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.rse.internal.files.ui.resources.ISystemRemoteEditConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.internal.subsystems.files.core.ISystemRemoteEditConstants;
import org.eclipse.rse.internal.subsystems.files.core.ISystemTextEditorConstants;
@ -56,7 +56,7 @@ public class SystemIFileProperties {
// local encoding qualified name
// NOTE: DO NOT CHANGE THIS!! This exact qualified name is used by the IBM debugger.
private static QualifiedName _nameLocalEncoding = new QualifiedName(RSEUIPlugin.getDefault().getSymbolicName(), ISystemTextEditorConstants.LOCAL_ENCODING_KEY);
private static QualifiedName _nameLocalEncoding = new QualifiedName("org.eclipse.rse.ui", ISystemTextEditorConstants.LOCAL_ENCODING_KEY); //$NON-NLS-1$
protected IResource _resource = null;

View file

@ -13,11 +13,17 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
*******************************************************************************/
package org.eclipse.rse.subsystems.files.core.subsystems;
import java.util.Vector;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
@ -26,7 +32,9 @@ import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage;
import org.eclipse.rse.core.subsystems.IFileConstants;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
import org.eclipse.rse.internal.core.SystemResourceConstants;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString;
import org.eclipse.rse.ui.SystemBasePlugin;
@ -248,6 +256,59 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur
return false;
}
/*
* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#renameSubSystemProfile(java.lang.String, java.lang.String)
*/
public void renameSubSystemProfile(String oldProfileName, String newProfileName)
{
super.renameSubSystemProfile(oldProfileName, newProfileName);
// change all IFile properties in remote systems temp files tree
IProject project = SystemBasePlugin.getWorkspaceRoot().getProject(SystemResourceConstants.RESOURCE_TEMPFILES_PROJECT_NAME);
if (project != null)
{
IFolder folder = project.getFolder(oldProfileName);
if (folder != null && folder.exists())
{
// recursively change all subsystem ids for the temp files
recursivelyUpdateIFileProperties(newProfileName, folder);
}
}
}
protected void recursivelyUpdateIFileProperties(String newName, IFolder container)
{
try
{
IResource[] resources = container.members();
for (int i = 0; i < resources.length; i++)
{
IResource resource = resources[i];
if (resource instanceof IFile)
{
IFile file = (IFile)resource;
SystemIFileProperties properties = new SystemIFileProperties(file);
String absoluteSubSystemName = properties.getRemoteFileSubSystem();
if (absoluteSubSystemName != null)
{
int profileDelim = absoluteSubSystemName.indexOf("."); //$NON-NLS-1$
String theRest = absoluteSubSystemName.substring(profileDelim, absoluteSubSystemName.length());
properties.setRemoteFileSubSystem(newName + theRest);
}
}
else if (resource instanceof IFolder)
{
recursivelyUpdateIFileProperties(newName, (IFolder)resource);
}
}
}
catch (Exception e)
{
}
}
// -------------------------------------------------------
// PARENT METHODS RELATED TO FILTERS...
// ... ONLY INTERESTING IF supportsFilters() returns true!