mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +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
|
* 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) - [199394] Allow real files/folders containing String #virtual#
|
||||||
* Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
|
* 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;
|
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.ArchiveHandlerManager;
|
||||||
import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
|
import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
|
||||||
import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
|
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.SystemMessage;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.services.files.AbstractFileService;
|
import org.eclipse.rse.services.files.AbstractFileService;
|
||||||
|
@ -95,13 +97,20 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
private boolean _isWin95 = false;
|
private boolean _isWin95 = false;
|
||||||
private boolean _isWinNT = false;
|
private boolean _isWinNT = false;
|
||||||
private String _osCmdShell = null;
|
private String _osCmdShell = null;
|
||||||
|
|
||||||
protected ISystemFileTypes _fileTypeRegistry;
|
protected ISystemFileTypes _fileTypeRegistry;
|
||||||
|
protected ISystemMessageProvider _msgProvider;
|
||||||
|
|
||||||
public LocalFileService(ISystemFileTypes fileTypeRegistry)
|
public LocalFileService(ISystemFileTypes fileTypeRegistry)
|
||||||
{
|
{
|
||||||
_fileTypeRegistry = fileTypeRegistry;
|
_fileTypeRegistry = fileTypeRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalFileService (ISystemFileTypes fileTypeRegistry, ISystemMessageProvider msgProvider) {
|
||||||
|
this(fileTypeRegistry);
|
||||||
|
_msgProvider = msgProvider;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return LocalServiceResources.Local_File_Service_Name;
|
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)
|
* @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 {
|
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
|
||||||
|
|
||||||
File file = new File(remoteParent, remoteFile);
|
File file = new File(remoteParent, remoteFile);
|
||||||
OutputStream stream = null;
|
OutputStream stream = null;
|
||||||
|
|
||||||
|
@ -1449,4 +1457,8 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SystemMessage getMessage(String messageID) {
|
||||||
|
return (_msgProvider != null ? _msgProvider.getMessage(messageID) : super.getMessage(messageID));
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -12,6 +12,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
* 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;
|
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.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.rse.internal.services.local.ILocalService;
|
import org.eclipse.rse.internal.services.local.ILocalService;
|
||||||
import org.eclipse.rse.internal.services.local.LocalServiceResources;
|
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.SystemMessage;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
|
||||||
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
|
||||||
|
@ -36,12 +38,19 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
||||||
{
|
{
|
||||||
protected String[] _statusTypes;
|
protected String[] _statusTypes;
|
||||||
protected ProcessHandler handler;
|
protected ProcessHandler handler;
|
||||||
|
protected ISystemMessageProvider _msgProvider;
|
||||||
|
|
||||||
public LocalProcessService()
|
public LocalProcessService()
|
||||||
{
|
{
|
||||||
handler = ProcessHandlerManager.getInstance().getNewProcessHandler();
|
handler = ProcessHandlerManager.getInstance().getNewProcessHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalProcessService(ISystemMessageProvider msgProvider)
|
||||||
|
{
|
||||||
|
this();
|
||||||
|
_msgProvider = msgProvider;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
return LocalServiceResources.Local_Process_Service_Name;
|
return LocalServiceResources.Local_Process_Service_Name;
|
||||||
|
@ -157,4 +166,8 @@ public class LocalProcessService extends AbstractProcessService implements ILoca
|
||||||
public void uninitService(IProgressMonitor monitor)
|
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-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.rse.subsystems.files.local;singleton:=true
|
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-Activator: org.eclipse.rse.internal.subsystems.files.local.Activator
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
org.eclipse.rse.services;bundle-version="[2.0.0,3.0.0)",
|
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.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.subsystems.files.core;bundle-version="[2.0.0,3.0.0)",
|
||||||
org.eclipse.rse.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:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
|
||||||
* Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files
|
* 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;
|
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.servicesubsystem.FileServiceSubSystemConfiguration;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||||
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
import org.eclipse.rse.ui.SystemBasePlugin;
|
import org.eclipse.rse.ui.SystemBasePlugin;
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,7 +224,7 @@ public class LocalFileSubSystemConfiguration extends FileServiceSubSystemConfigu
|
||||||
|
|
||||||
public IFileService createFileService(IHost host)
|
public IFileService createFileService(IHost host)
|
||||||
{
|
{
|
||||||
return new LocalFileService(SystemFileTransferModeRegistry.getInstance());
|
return new LocalFileService(SystemFileTransferModeRegistry.getInstance(), RSEUIPlugin.getDefault());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISearchService createSearchService(IHost host)
|
public ISearchService createSearchService(IHost host)
|
||||||
|
|
|
@ -2,13 +2,13 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.rse.subsystems.processes.local;singleton:=true
|
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-Activator: org.eclipse.rse.internal.subsystems.processes.local.Activator
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
org.eclipse.rse.services;bundle-version="[2.0.0,3.0.0)",
|
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.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.subsystems.processes.core;bundle-version="[2.0.0,3.0.0)",
|
||||||
org.eclipse.rse.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:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* 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;
|
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.core.subsystem.IHostProcessToRemoteProcessAdapter;
|
||||||
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
|
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
|
||||||
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
|
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
|
||||||
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
|
|
||||||
|
|
||||||
public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemConfiguration
|
public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemConfiguration
|
||||||
|
@ -108,7 +110,7 @@ public class LocalProcessSubSystemConfiguration extends ProcessServiceSubSystemC
|
||||||
public IProcessService createProcessService(IHost host)
|
public IProcessService createProcessService(IHost host)
|
||||||
{
|
{
|
||||||
//LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
|
//LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
|
||||||
return new LocalProcessService();
|
return new LocalProcessService(RSEUIPlugin.getDefault());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue