1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +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 * @return the image descriptor
*/ */
public static ImageDescriptor getImageDescriptor(String path) { 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(); InputStream stream = getDummyProjectFileStream();
try try
{ {
int size = stream.available(); 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()); _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); file = (IFile)UniversalFileTransferUtility.copyRemoteResourceToWorkspace(_remoteFile, monitor);
if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO)) if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO))
@ -244,7 +243,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
{ {
file = (IFile)UniversalFileTransferUtility.getTempFileFor(_remoteFile); 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 try
{ {
@ -305,7 +304,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
String path = _remoteFile.getAbsolutePath(); String path = _remoteFile.getAbsolutePath();
if (path.charAt(0) != '/') 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$ 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); //checkReadOnlyParent(file, e);
String message; String message;
String path = _remoteFile.getAbsolutePath(); String path = _remoteFile.getAbsolutePath();
if (file.isDirectory()) if (file != null && file.isDirectory())
message = NLS.bind(Messages.notAFile, path); message = NLS.bind(Messages.notAFile, path);
else else
message = NLS.bind(Messages.couldNotWrite, path); message = NLS.bind(Messages.couldNotWrite, path);
@ -443,7 +442,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
} }
else else
{ {
if (_remoteFile.getName().equals(".project")) if (_remoteFile.getName().equals(".project")) //$NON-NLS-1$
{ {
file = UniversalFileTransferUtility.getTempFileFor(_remoteFile); file = UniversalFileTransferUtility.getTempFileFor(_remoteFile);
return file.getLocation().toFile(); return file.getLocation().toFile();
@ -452,7 +451,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
{ {
try try
{ {
return File.createTempFile(_remoteFile.getName(), "empty"); return File.createTempFile(_remoteFile.getName(), "empty"); //$NON-NLS-1$
} }
catch (Exception e) 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.IFileStore;
import org.eclipse.core.filesystem.provider.FileSystem; import org.eclipse.core.filesystem.provider.FileSystem;
import org.eclipse.core.runtime.NullProgressMonitor; 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.IHost;
import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IConnectorService; 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.IRemoteFile;
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.RSEUIPlugin;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
public class RSEFileSystem extends FileSystem public class RSEFileSystem extends FileSystem
{ {
@ -106,12 +103,6 @@ public class RSEFileSystem extends FileSystem
IRemoteFileSubSystem ss = store.getRemoteFileSubSystem(); IRemoteFileSubSystem ss = store.getRemoteFileSubSystem();
if (!ss.isConnected()) if (!ss.isConnected())
{ {
Shell shell = null;
if (PlatformUI.isWorkbenchRunning())
{
shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
}
try try
{ {