mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 09:35:23 +02:00
[cleanup] fix 'local variable/field is never read' compiler warnings
This commit is contained in:
parent
579aa49ba5
commit
700df9b49d
1 changed files with 79 additions and 80 deletions
|
@ -45,7 +45,6 @@ import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
|
||||||
import org.eclipse.rse.ui.ISystemIconConstants;
|
import org.eclipse.rse.ui.ISystemIconConstants;
|
||||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||||
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
|
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
|
||||||
import org.eclipse.rse.ui.view.SystemTableViewProvider;
|
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.ui.ISharedImages;
|
import org.eclipse.ui.ISharedImages;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
@ -107,7 +106,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandEntryViewerConfiguration _configurator;
|
private CommandEntryViewerConfiguration _configurator;
|
||||||
private SystemTableViewProvider _provider;
|
//private SystemTableViewProvider _provider;
|
||||||
private HashMap _imageMap;
|
private HashMap _imageMap;
|
||||||
private IRemoteCommandShell _remoteCommand;
|
private IRemoteCommandShell _remoteCommand;
|
||||||
private char _fileSeparator;
|
private char _fileSeparator;
|
||||||
|
@ -126,7 +125,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
public CommandEntryContentAssistProcessor(CommandEntryViewerConfiguration configurator)
|
public CommandEntryContentAssistProcessor(CommandEntryViewerConfiguration configurator)
|
||||||
{
|
{
|
||||||
_configurator = configurator;
|
_configurator = configurator;
|
||||||
_provider = new SystemTableViewProvider();
|
//_provider = new SystemTableViewProvider();
|
||||||
_imageMap = new HashMap();
|
_imageMap = new HashMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +235,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
*/
|
*/
|
||||||
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset)
|
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset)
|
||||||
{
|
{
|
||||||
String text = viewer.getDocument().get();
|
//String text = viewer.getDocument().get();
|
||||||
boolean atFirstToken = isAtFirstToken(viewer.getDocument());
|
boolean atFirstToken = isAtFirstToken(viewer.getDocument());
|
||||||
String firstToken = getFirstToken(viewer.getDocument());
|
String firstToken = getFirstToken(viewer.getDocument());
|
||||||
String currentText = getCurrentText(viewer, documentOffset);
|
String currentText = getCurrentText(viewer, documentOffset);
|
||||||
|
@ -302,12 +301,15 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
descriptor = adapter.getImageDescriptor(object);
|
descriptor = adapter.getImageDescriptor(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (descriptor!=null)
|
||||||
|
{
|
||||||
image = (Image) _imageMap.get(descriptor);
|
image = (Image) _imageMap.get(descriptor);
|
||||||
if (image == null)
|
if (image == null)
|
||||||
{
|
{
|
||||||
image = descriptor.createImage();
|
image = descriptor.createImage();
|
||||||
_imageMap.put(descriptor, image);
|
_imageMap.put(descriptor, image);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,10 +330,8 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
Object context = _remoteCommand.getContext();
|
Object context = _remoteCommand.getContext();
|
||||||
if (context instanceof IRemoteFile)
|
if (context instanceof IRemoteFile)
|
||||||
{
|
{
|
||||||
|
|
||||||
IRemoteFile workingDirectory = (IRemoteFile)context;
|
IRemoteFile workingDirectory = (IRemoteFile)context;
|
||||||
if (workingDirectory != null)
|
|
||||||
{
|
|
||||||
int separatorIndex = currentText.lastIndexOf(_fileSeparator);
|
int separatorIndex = currentText.lastIndexOf(_fileSeparator);
|
||||||
int foreignseparatorIndex = currentText.lastIndexOf(_foreignFileSeparator);
|
int foreignseparatorIndex = currentText.lastIndexOf(_foreignFileSeparator);
|
||||||
if (foreignseparatorIndex > separatorIndex)
|
if (foreignseparatorIndex > separatorIndex)
|
||||||
|
@ -420,7 +420,6 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getCommandCompletions(currentText, results);
|
getCommandCompletions(currentText, results);
|
||||||
|
|
Loading…
Add table
Reference in a new issue