1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

remove a couple compiler warnings

This commit is contained in:
David McKnight 2007-01-09 20:01:24 +00:00
parent ced81d390f
commit f6328835f6
3 changed files with 9 additions and 19 deletions

View file

@ -71,6 +71,6 @@ public class Activator extends AbstractUIPlugin {
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.eclipse.filesystem", path);
return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.eclipse.filesystem", path); //$NON-NLS-1$
}
}

View file

@ -190,14 +190,14 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
{
if (_remoteFile.getName().equals(".project") && _remoteFile.getLength() == 0)
if (_remoteFile.getName().equals(".project") && _remoteFile.getLength() == 0) //$NON-NLS-1$
{
System.out.println("reading empty .project");
System.out.println("reading empty .project"); //$NON-NLS-1$
InputStream stream = getDummyProjectFileStream();
try
{
int size = stream.available();
_subSystem.upload(stream, size, _remoteFile, "utf8", monitor);
_subSystem.upload(stream, size, _remoteFile, "utf8", monitor); //$NON-NLS-1$
_remoteFile = _subSystem.getRemoteFileObject(_remoteFile.getAbsolutePath());
}
@ -222,7 +222,6 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
*/
}
if (file == null || !file.exists())
{
file = (IFile)UniversalFileTransferUtility.copyRemoteResourceToWorkspace(_remoteFile, monitor);
if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO))
@ -244,7 +243,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
{
file = (IFile)UniversalFileTransferUtility.getTempFileFor(_remoteFile);
}
if (!file.isSynchronized(IResource.DEPTH_ZERO) && !_remoteFile.getName().equals(".project"))
if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO) && !_remoteFile.getName().equals(".project")) //$NON-NLS-1$
{
try
{
@ -305,7 +304,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
String path = _remoteFile.getAbsolutePath();
if (path.charAt(0) != '/')
{
path = "/" + path.replace('\\', '/');
path = "/" + path.replace('\\', '/'); //$NON-NLS-1$
}
return new URI("rse", _subSystem.getHost().getHostName(), path, null); //$NON-NLS-1$
}
@ -355,7 +354,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
//checkReadOnlyParent(file, e);
String message;
String path = _remoteFile.getAbsolutePath();
if (file.isDirectory())
if (file != null && file.isDirectory())
message = NLS.bind(Messages.notAFile, path);
else
message = NLS.bind(Messages.couldNotWrite, path);
@ -443,7 +442,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
}
else
{
if (_remoteFile.getName().equals(".project"))
if (_remoteFile.getName().equals(".project")) //$NON-NLS-1$
{
file = UniversalFileTransferUtility.getTempFileFor(_remoteFile);
return file.getLocation().toFile();
@ -452,7 +451,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
{
try
{
return File.createTempFile(_remoteFile.getName(), "empty");
return File.createTempFile(_remoteFile.getName(), "empty"); //$NON-NLS-1$
}
catch (Exception e)
{

View file

@ -23,7 +23,6 @@ import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.filesystem.provider.FileSystem;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IConnectorService;
@ -31,8 +30,6 @@ 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;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
public class RSEFileSystem extends FileSystem
{
@ -106,12 +103,6 @@ public class RSEFileSystem extends FileSystem
IRemoteFileSubSystem ss = store.getRemoteFileSubSystem();
if (!ss.isConnected())
{
Shell shell = null;
if (PlatformUI.isWorkbenchRunning())
{
shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
}
try
{