mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[199871] Apply patch from Kevin Doyle: LocalProcessService needs to implement getMessage()
This commit is contained in:
parent
ddc78dd3d1
commit
110355277d
6 changed files with 36 additions and 7 deletions
|
@ -20,6 +20,7 @@
|
|||
* Kevin Doyle (IBM) - [196211] Move a folder to a directory that contains a folder by that name errors
|
||||
* Martin Oberhuber (Wind River) - [199394] Allow real files/folders containing String #virtual#
|
||||
* Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
|
||||
* Kevin Doyle (IBM) - [199871] LocalFileService needs to implement getMessage()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.local.files;
|
||||
|
@ -52,6 +53,7 @@ import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
|
|||
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
|
||||
import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
|
||||
import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
|
||||
import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||
import org.eclipse.rse.services.files.AbstractFileService;
|
||||
|
@ -95,13 +97,20 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
private boolean _isWin95 = false;
|
||||
private boolean _isWinNT = false;
|
||||
private String _osCmdShell = null;
|
||||
|
||||
protected ISystemFileTypes _fileTypeRegistry;
|
||||
protected ISystemMessageProvider _msgProvider;
|
||||
|
||||
public LocalFileService(ISystemFileTypes fileTypeRegistry)
|
||||
{
|
||||
_fileTypeRegistry = fileTypeRegistry;
|
||||
}
|
||||
|
||||
public LocalFileService (ISystemFileTypes fileTypeRegistry, ISystemMessageProvider msgProvider) {
|
||||
this(fileTypeRegistry);
|
||||
_msgProvider = msgProvider;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalServiceResources.Local_File_Service_Name;
|
||||
|
@ -1436,7 +1445,6 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(String, String, boolean, IProgressMonitor)
|
||||
*/
|
||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
|
||||
|
||||
File file = new File(remoteParent, remoteFile);
|
||||
OutputStream stream = null;
|
||||
|
||||
|
@ -1449,4 +1457,8 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
|
||||
return stream;
|
||||
}
|
||||
|
||||
public SystemMessage getMessage(String messageID) {
|
||||
return (_msgProvider != null ? _msgProvider.getMessage(messageID) : super.getMessage(messageID));
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
* Kevin Doyle (IBM) - [199871] LocalProcessService needs to implement getMessage()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.local.processes;
|
||||
|
@ -23,6 +24,7 @@ import java.util.SortedSet;
|
|||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.rse.internal.services.local.ILocalService;
|
||||
import org.eclipse.rse.internal.services.local.LocalServiceResources;
|
||||
import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||
|
@ -36,12 +38,19 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
|||
{
|
||||
protected String[] _statusTypes;
|
||||
protected ProcessHandler handler;
|
||||
protected ISystemMessageProvider _msgProvider;
|
||||
|
||||
public LocalProcessService()
|
||||
{
|
||||
handler = ProcessHandlerManager.getInstance().getNewProcessHandler();
|
||||
}
|
||||
|
||||
public LocalProcessService(ISystemMessageProvider msgProvider)
|
||||
{
|
||||
this();
|
||||
_msgProvider = msgProvider;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalServiceResources.Local_Process_Service_Name;
|
||||
|
@ -157,4 +166,8 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
|||
public void uninitService(IProgressMonitor monitor)
|
||||
{
|
||||
}
|
||||
|
||||
public SystemMessage getMessage(String messageID) {
|
||||
return (_msgProvider != null ? _msgProvider.getMessage(messageID) : super.getMessage(messageID));
|
||||
}
|
||||
}
|
|
@ -2,13 +2,13 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.rse.subsystems.files.local;singleton:=true
|
||||
Bundle-Version: 2.0.0.qualifier
|
||||
Bundle-Version: 2.0.1.qualifier
|
||||
Bundle-Activator: org.eclipse.rse.internal.subsystems.files.local.Activator
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
org.eclipse.rse.services;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.services.local;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.services.local;bundle-version="[2.0.1,3.0.0)",
|
||||
org.eclipse.rse.connectorservice.local;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.subsystems.files.core;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.core;bundle-version="[2.0.0,3.0.0)",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||
* Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files
|
||||
* Kevin Doyle (IBM) - [199871] LocalFileService needs to implement getMessage()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.local;
|
||||
|
@ -45,6 +46,7 @@ import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSyst
|
|||
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystemConfiguration;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemBasePlugin;
|
||||
|
||||
|
||||
|
@ -222,7 +224,7 @@ public class LocalFileSubSystemConfiguration extends FileServiceSubSystemConfigu
|
|||
|
||||
public IFileService createFileService(IHost host)
|
||||
{
|
||||
return new LocalFileService(SystemFileTransferModeRegistry.getInstance());
|
||||
return new LocalFileService(SystemFileTransferModeRegistry.getInstance(), RSEUIPlugin.getDefault());
|
||||
}
|
||||
|
||||
public ISearchService createSearchService(IHost host)
|
||||
|
|
|
@ -2,13 +2,13 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.rse.subsystems.processes.local;singleton:=true
|
||||
Bundle-Version: 2.0.0.qualifier
|
||||
Bundle-Version: 2.0.1.qualifier
|
||||
Bundle-Activator: org.eclipse.rse.internal.subsystems.processes.local.Activator
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
org.eclipse.rse.services;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.services.local;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.services.local;bundle-version="[2.0.1,3.0.0)",
|
||||
org.eclipse.rse.connectorservice.local;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.subsystems.processes.core;bundle-version="[2.0.0,3.0.0)",
|
||||
org.eclipse.rse.core;bundle-version="[2.0.0,3.0.0)",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||
* Kevin Doyle (IBM) - [199871] LocalProcessService needs to implement getMessage()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.processes.local;
|
||||
|
@ -29,6 +30,7 @@ import org.eclipse.rse.services.processes.IProcessService;
|
|||
import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
|
||||
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
|
||||
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
|
||||
|
||||
public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemConfiguration
|
||||
|
@ -108,7 +110,7 @@ public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemC
|
|||
public IProcessService createProcessService(IHost host)
|
||||
{
|
||||
//LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
|
||||
return new LocalProcessService();
|
||||
return new LocalProcessService(RSEUIPlugin.getDefault());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue