mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
[cleanup] fix 'local variable/field is never read' compiler warnings
This commit is contained in:
parent
11b1b3ffb5
commit
dcc8a961a7
10 changed files with 53 additions and 73 deletions
|
@ -231,12 +231,12 @@ public class SystemBuildErrorViewPart extends ViewPart implements ISelectionList
|
|||
return;
|
||||
|
||||
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
|
||||
boolean alreadyHandled = false;
|
||||
//boolean alreadyHandled = false;
|
||||
if (adapter != null)
|
||||
{
|
||||
if (!adapter.hasChildren(element))
|
||||
{
|
||||
alreadyHandled = adapter.handleDoubleClick(element);
|
||||
/*alreadyHandled =*/ adapter.handleDoubleClick(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -290,16 +290,12 @@ public class SystemBuildErrorViewPart extends ViewPart implements ISelectionList
|
|||
if (object instanceof IRemoteOutput)
|
||||
{
|
||||
IRemoteOutput output = (IRemoteOutput)object;
|
||||
if (output != null)
|
||||
{
|
||||
_viewer.setInput(output.getParent());
|
||||
SystemBuildErrorViewProvider provider = (SystemBuildErrorViewProvider)_viewer.getContentProvider();
|
||||
provider.setOffset(output.getIndex() - 1);
|
||||
}
|
||||
_viewer.setInput(output.getParent());
|
||||
SystemBuildErrorViewProvider provider = (SystemBuildErrorViewProvider)_viewer.getContentProvider();
|
||||
provider.setOffset(output.getIndex() - 1);
|
||||
}
|
||||
else if (object instanceof IRemoteLineReference)
|
||||
{
|
||||
|
||||
_viewer.setInput(((IRemoteLineReference)object).getParent());
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,8 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
|||
import org.eclipse.jface.operation.IRunnableContext;
|
||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.internal.model.SystemProfileManager;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.model.ISystemProfile;
|
||||
import org.eclipse.rse.model.ISystemProfileManager;
|
||||
import org.eclipse.rse.model.ISystemRegistry;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
import org.eclipse.rse.ui.ISystemMessages;
|
||||
|
@ -49,7 +47,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction
|
|||
implements IRunnableWithProgress
|
||||
{
|
||||
private ISystemProfile profile, newProfile;
|
||||
private ISystemProfileManager mgr;
|
||||
//private ISystemProfileManager mgr;
|
||||
private ISystemRegistry sr;
|
||||
private String oldName,newName;
|
||||
private boolean makeActive;
|
||||
|
@ -63,7 +61,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction
|
|||
super(SystemResources.ACTION_PROFILE_COPY_LABEL, SystemResources.ACTION_PROFILE_COPY_TOOLTIP,
|
||||
PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY),
|
||||
shell);
|
||||
mgr = SystemProfileManager.getSystemProfileManager();
|
||||
//mgr = SystemProfileManager.getSystemProfileManager();
|
||||
sr = RSEUIPlugin.getTheSystemRegistry();
|
||||
setSelectionSensitive(true);
|
||||
allowOnMultipleSelection(false);
|
||||
|
|
|
@ -35,7 +35,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
|
|||
private IValidatorRemoteSelection _selectionValidator;
|
||||
private boolean _multipleSelectionMode;
|
||||
private boolean _showPropertySheet = false;
|
||||
private IHost _outputConnection;
|
||||
//private IHost _outputConnection;
|
||||
private SystemActionViewerFilter _customViewerFilter;
|
||||
private String _message, _tip;
|
||||
|
||||
|
@ -234,7 +234,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
|
|||
boolean closeDialog = _form.verify();
|
||||
if (closeDialog)
|
||||
{
|
||||
_outputConnection = _form.getSelectedConnection();
|
||||
//_outputConnection = _form.getSelectedConnection();
|
||||
if (_multipleSelectionMode)
|
||||
setOutputObject(_form.getSelectedObjects());
|
||||
else
|
||||
|
|
|
@ -79,7 +79,8 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
|||
|
||||
public static final boolean COLLISION_MODE = true;
|
||||
|
||||
private Button overwriteRadio, renameRadio;
|
||||
private Button overwriteRadio;
|
||||
//private Button renameRadio;
|
||||
private boolean overwriteMode = true;
|
||||
|
||||
private Composite renameGroup;
|
||||
|
@ -200,7 +201,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
|||
*/
|
||||
protected ISystemMessageLine createMessageLine(Composite c)
|
||||
{
|
||||
ISystemMessageLine msgLine = super.createMessageLine(c);
|
||||
/*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
|
||||
//form.setMessageLine(msgLine);
|
||||
return fMessageLine;
|
||||
}
|
||||
|
@ -243,8 +244,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
|||
{
|
||||
overwriteRadio = SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_TOOLTIP);
|
||||
overwriteRadio.setSelection(true);
|
||||
|
||||
renameRadio = SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_TOOLTIP);
|
||||
/*renameRadio =*/ SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_TOOLTIP);
|
||||
}
|
||||
|
||||
int nbrRenameColumns = 2;
|
||||
|
@ -526,12 +526,13 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
|||
Control controlInError = null;
|
||||
clearErrorMessage();
|
||||
errMsg = validateNameInput(newNameString);
|
||||
if (errMsg != null)
|
||||
controlInError = newName;
|
||||
else if (isRemote && checkIfWillBeFilteredOut(inputElement, newNameString))
|
||||
return false;
|
||||
if (errMsg != null)
|
||||
controlInError.setFocus();
|
||||
if (errMsg != null) {
|
||||
controlInError = newName;
|
||||
controlInError.setFocus();
|
||||
}
|
||||
else if (isRemote && checkIfWillBeFilteredOut(inputElement, newNameString)) {
|
||||
return false;
|
||||
}
|
||||
return (errMsg == null);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.eclipse.swt.SWT;
|
|||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
|
||||
|
@ -42,7 +41,7 @@ public class SystemSimpleCopyDialog
|
|||
ISelectionChangedListener
|
||||
{
|
||||
private String promptString;
|
||||
private Label prompt;
|
||||
//private Label prompt;
|
||||
private TreeViewer tree;
|
||||
private SystemSimpleContentProvider provider = new SystemSimpleContentProvider();
|
||||
private SystemSimpleContentElement copyTreeContent, initialSelection;
|
||||
|
@ -76,7 +75,7 @@ public class SystemSimpleCopyDialog
|
|||
*/
|
||||
protected ISystemMessageLine createMessageLine(Composite c)
|
||||
{
|
||||
ISystemMessageLine msgLine = super.createMessageLine(c);
|
||||
/*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
|
||||
return fMessageLine;
|
||||
}
|
||||
|
||||
|
@ -98,7 +97,7 @@ public class SystemSimpleCopyDialog
|
|||
Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
|
||||
|
||||
// PROMPT
|
||||
prompt = SystemWidgetHelpers.createLabel(composite_prompts, promptString);
|
||||
/*prompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, promptString);
|
||||
|
||||
// WORK-WITH TREE
|
||||
tree = new TreeViewer(new Tree(composite_prompts, SWT.SINGLE | SWT.BORDER));
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.eclipse.swt.SWT;
|
|||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
|
||||
|
@ -38,7 +37,7 @@ import org.eclipse.swt.widgets.Tree;
|
|||
* Works in concert with {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentElement}
|
||||
* and {@link org.eclipse.rse.ui.dialogs.SystemSimpleContentProvider}.
|
||||
* <p>
|
||||
* The {@link #setInputObject} method is used to populate the selection tree:
|
||||
* The {@link #setInputObject(SystemSimpleContentElement)} method is used to populate the selection tree:
|
||||
* <ul>
|
||||
* <li>The passed object must be of type SystemSimpleContentElement
|
||||
* <li>The method getChildren will be called on that object to get initial visible elements
|
||||
|
@ -63,7 +62,7 @@ public class SystemSimpleSelectDialog extends SystemPromptDialog
|
|||
ICheckStateListener
|
||||
{
|
||||
private String promptString;
|
||||
private Label prompt;
|
||||
//private Label prompt;
|
||||
private CheckboxTreeViewer tree;
|
||||
private SystemSimpleContentProvider provider = new SystemSimpleContentProvider();
|
||||
private SystemSimpleContentElement preSelectedRoot = null;
|
||||
|
@ -92,7 +91,7 @@ public class SystemSimpleSelectDialog extends SystemPromptDialog
|
|||
*/
|
||||
protected ISystemMessageLine createMessageLine(Composite c)
|
||||
{
|
||||
ISystemMessageLine msgLine = super.createMessageLine(c);
|
||||
/*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
|
||||
//form.setMessageLine(msgLine);
|
||||
return fMessageLine;
|
||||
}
|
||||
|
@ -122,7 +121,7 @@ public class SystemSimpleSelectDialog extends SystemPromptDialog
|
|||
Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
|
||||
|
||||
// PROMPT
|
||||
prompt = SystemWidgetHelpers.createLabel(composite_prompts, promptString);
|
||||
/*prompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, promptString);
|
||||
|
||||
// CHECKBOX SELECT TREE
|
||||
tree = new CheckboxTreeViewer(new Tree(composite_prompts, SWT.CHECK | SWT.BORDER));
|
||||
|
|
|
@ -113,7 +113,7 @@ public class SystemQuickOpenDialog extends Dialog implements ISystemQuickOpenPag
|
|||
private Button cancelButton;
|
||||
private Button openButton;
|
||||
|
||||
private String performActionLabel = JFaceResources.getString("finish");
|
||||
//private String performActionLabel = JFaceResources.getString("finish");
|
||||
|
||||
// the number of long running operations being executed from the dialog
|
||||
private long activeRunningOperations;
|
||||
|
@ -469,7 +469,6 @@ public class SystemQuickOpenDialog extends Dialog implements ISystemQuickOpenPag
|
|||
|
||||
/**
|
||||
* Gets the minimum size for the tab folder.
|
||||
* @return
|
||||
*/
|
||||
private Point getMinSize() {
|
||||
|
||||
|
@ -599,7 +598,7 @@ public class SystemQuickOpenDialog extends Dialog implements ISystemQuickOpenPag
|
|||
* Shows the progress monitor and disables the dialog.
|
||||
* @param enableCancelButton <code>true</code> if cancel button should be enabled, <code>false</code> otherwise.
|
||||
* @return the saved UI state.
|
||||
* @see #stopped(HashMap);
|
||||
* @see #stopped(HashMap)
|
||||
*/
|
||||
protected synchronized HashMap aboutToStart(boolean enableCancelButton) {
|
||||
HashMap savedState = null;
|
||||
|
@ -763,7 +762,7 @@ public class SystemQuickOpenDialog extends Dialog implements ISystemQuickOpenPag
|
|||
/**
|
||||
* Checks if any operations are running. If so, shows a message dialog alerting the user, and returns <code>false</code>
|
||||
* indicating the dialog should not be closed.
|
||||
* @param <code>true</code> if it is ok to close the dialog, <code>false</code> otherwise.
|
||||
* @return <code>true</code> if it is ok to close the dialog, <code>false</code> otherwise.
|
||||
*/
|
||||
public boolean okToClose() {
|
||||
|
||||
|
|
|
@ -112,19 +112,16 @@ import org.eclipse.ui.part.PluginTransfer;
|
|||
* <p>
|
||||
*/
|
||||
public class SystemScratchpadView
|
||||
// TODO change TreeViewer to ScratchpadViewer when Eclipse fixes SWT viewer
|
||||
//extends ScratchpadViewer
|
||||
extends TreeViewer
|
||||
implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget, ISystemResourceChangeListener, ISystemRemoteChangeListener, ISelectionChangedListener, ISelectionProvider
|
||||
// TODO change TreeViewer to ScratchpadViewer when Eclipse fixes SWT viewer
|
||||
// extends ScratchpadViewer
|
||||
extends TreeViewer
|
||||
implements IMenuListener, ISystemDeleteTarget,
|
||||
ISystemRenameTarget, ISystemSelectAllTarget,
|
||||
ISystemResourceChangeListener, ISystemRemoteChangeListener,
|
||||
ISelectionChangedListener, ISelectionProvider
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Object _objectInput;
|
||||
private ArrayList _attributeColumns;
|
||||
//private ArrayList _attributeColumns;
|
||||
private TableLayout _layout;
|
||||
private SystemScratchpadViewProvider _provider;
|
||||
private MenuManager _menuManager;
|
||||
|
@ -175,7 +172,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
{
|
||||
super(tableTree);
|
||||
_messageLine = msgLine;
|
||||
_attributeColumns = new ArrayList();
|
||||
//_attributeColumns = new ArrayList();
|
||||
_layout = new TableLayout();
|
||||
|
||||
_provider = new SystemScratchpadViewProvider(this);
|
||||
|
@ -257,10 +254,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
SystemScratchpadViewProvider provider = (SystemScratchpadViewProvider) getContentProvider();
|
||||
Object[] children = provider.getChildren(_objectInput);
|
||||
|
||||
|
||||
|
||||
super.inputChanged(newObject, oldObject);
|
||||
|
||||
}
|
||||
else if (newObject == null)
|
||||
{
|
||||
|
@ -426,7 +420,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
int eventType = event.getEventType();
|
||||
Object remoteResourceParent = event.getResourceParent();
|
||||
Object remoteResource = event.getResource();
|
||||
boolean originatedHere = (event.getOriginatingViewer() == this);
|
||||
//boolean originatedHere = (event.getOriginatingViewer() == this);
|
||||
Vector remoteResourceNames = null;
|
||||
if (remoteResource instanceof Vector)
|
||||
{
|
||||
|
@ -628,11 +622,8 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
|
||||
RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
|
||||
|
||||
Composite tree = getTree();
|
||||
|
||||
boolean isDisposed = tree.isDisposed();
|
||||
|
||||
|
||||
//Composite tree = getTree();
|
||||
//boolean isDisposed = tree.isDisposed();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -942,7 +933,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
||||
IStructuredSelection selection = (IStructuredSelection) getSelection();
|
||||
Iterator elements = selection.iterator();
|
||||
int selectedCount = selection.size();
|
||||
//int selectedCount = selection.size();
|
||||
Object element = null;
|
||||
|
||||
ISystemViewElementAdapter adapter = null;
|
||||
|
|
|
@ -81,20 +81,18 @@ import org.eclipse.ui.part.ViewPart;
|
|||
/**
|
||||
* This class defines the Remote Search view.
|
||||
*/
|
||||
public class SystemSearchViewPart extends ViewPart implements ISystemResourceChangeListener,
|
||||
IMenuListener, ISelectionChangedListener,
|
||||
ISystemMessageLine, IRSEViewPart
|
||||
public class SystemSearchViewPart extends ViewPart
|
||||
implements ISystemResourceChangeListener,
|
||||
IMenuListener, ISelectionChangedListener,
|
||||
ISystemMessageLine, IRSEViewPart
|
||||
{
|
||||
|
||||
|
||||
|
||||
private PageBook pageBook;
|
||||
private StructuredViewer currentViewer;
|
||||
|
||||
private IActionBars actionBars;
|
||||
private IMenuManager mMgr;
|
||||
private IToolBarManager tbMgr;
|
||||
private IStatusLineManager slMgr;
|
||||
//private IStatusLineManager slMgr;
|
||||
|
||||
private static final String MENU_HISTORY_GROUP_NAME = "historyGroup";
|
||||
private static final String MENU_CLEAR_HISTORY_GROUP_NAME = "clearHistoryGroup";
|
||||
|
@ -243,7 +241,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha
|
|||
initToolBarActions(tbMgr);
|
||||
|
||||
// get the status line manager
|
||||
slMgr = actionBars.getStatusLineManager();
|
||||
//slMgr = actionBars.getStatusLineManager();
|
||||
|
||||
// update action bars
|
||||
actionBars.updateActionBars();
|
||||
|
@ -404,7 +402,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha
|
|||
|
||||
/**
|
||||
* Add a search result set.
|
||||
* @param the search result set
|
||||
* @param resultSet the search result set
|
||||
*/
|
||||
public void addSearchResult(IAdaptable resultSet) {
|
||||
|
||||
|
@ -627,7 +625,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha
|
|||
|
||||
/**
|
||||
* Show search result with the given index.
|
||||
* @param the index in the result history list
|
||||
* @param index the index in the result history list
|
||||
*/
|
||||
public void showSearchResult(int index) {
|
||||
|
||||
|
@ -884,7 +882,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha
|
|||
|
||||
/**
|
||||
* Get the adapter for the given object.
|
||||
* @param the object the object for which I want the adapter.
|
||||
* @param element the object the object for which I want the adapter.
|
||||
* @return the adapter for the object.
|
||||
*/
|
||||
public ISystemViewElementAdapter getAdapter(Object element) {
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.view.team;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
|
@ -44,7 +43,7 @@ public class SystemTeamViewCategoryAdapter
|
|||
{
|
||||
|
||||
private boolean actionsCreated = false;
|
||||
private Hashtable categoriesByProfile = new Hashtable();
|
||||
//private Hashtable categoriesByProfile = new Hashtable();
|
||||
|
||||
// -------------------
|
||||
// property descriptors
|
||||
|
|
Loading…
Add table
Reference in a new issue