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
a4349288d1
commit
11b1b3ffb5
9 changed files with 64 additions and 78 deletions
|
@ -57,14 +57,12 @@ import org.eclipse.ui.IWorkbenchWindow;
|
|||
|
||||
public class SystemRemoteEditManager
|
||||
{
|
||||
|
||||
|
||||
public static final String REMOTE_EDIT_PROJECT_NAME = "RemoteSystemsTempFiles";
|
||||
public static final String REMOTE_EDIT_PROJECT_NATURE_ID = "org.eclipse.rse.ui.remoteSystemsTempNature";
|
||||
public static final String REMOTE_EDIT_PROJECT_BUILDER_ID = "org.eclipse.rse.ui.remoteSystemsTempBuilder";
|
||||
|
||||
private static SystemRemoteEditManager inst;
|
||||
private RSEUIPlugin plugin;
|
||||
//private RSEUIPlugin plugin;
|
||||
private List _mountPathMappers;
|
||||
|
||||
/**
|
||||
|
@ -73,7 +71,7 @@ public class SystemRemoteEditManager
|
|||
private SystemRemoteEditManager()
|
||||
{
|
||||
super();
|
||||
plugin = RSEUIPlugin.getDefault();
|
||||
//plugin = RSEUIPlugin.getDefault();
|
||||
registerMountPathMappers();
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public class SystemKillDialog extends SystemPromptDialog
|
|||
private String warningTip = SystemProcessesResources.RESID_KILL_WARNING_TOOLTIP;
|
||||
private String promptLabel;
|
||||
private SystemKillTableProvider sktp;
|
||||
private Label prompt;
|
||||
//private Label prompt;
|
||||
private Table table;
|
||||
private TableViewer tableViewer;
|
||||
private GridData tableData;
|
||||
|
@ -132,19 +132,19 @@ public class SystemKillDialog extends SystemPromptDialog
|
|||
int size = ((IStructuredSelection)input).size();
|
||||
|
||||
if (size > 1) {
|
||||
prompt = SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT, nbrColumns);
|
||||
/*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT, nbrColumns);
|
||||
}
|
||||
else {
|
||||
prompt = SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT_SINGLE, nbrColumns);
|
||||
/*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT_SINGLE, nbrColumns);
|
||||
}
|
||||
}
|
||||
// should never get here
|
||||
else {
|
||||
prompt = SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT, nbrColumns);
|
||||
/*prompt =*/ SystemWidgetHelpers.createLabel(composite, SystemProcessesResources.RESID_KILL_PROMPT, nbrColumns);
|
||||
}
|
||||
}
|
||||
else {
|
||||
prompt = SystemWidgetHelpers.createVerbiage(composite, promptLabel, nbrColumns, false, 200);
|
||||
/*prompt =*/ SystemWidgetHelpers.createVerbiage(composite, promptLabel, nbrColumns, false, 200);
|
||||
}
|
||||
|
||||
// WARNING
|
||||
|
@ -168,7 +168,9 @@ public class SystemKillDialog extends SystemPromptDialog
|
|||
if (warningTip != null)
|
||||
{
|
||||
warningLabel.setToolTipText(warningTip);
|
||||
imageLabel.setToolTipText(warningTip);
|
||||
if (imageLabel!=null) {
|
||||
imageLabel.setToolTipText(warningTip);
|
||||
}
|
||||
}
|
||||
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
|
||||
data.widthHint = 350;
|
||||
|
|
|
@ -18,7 +18,6 @@ package org.eclipse.rse.ui.actions;
|
|||
import org.eclipse.rse.core.SystemPreferencesManager;
|
||||
import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent;
|
||||
import org.eclipse.rse.model.ISystemPreferenceChangeEvents;
|
||||
import org.eclipse.rse.model.ISystemRegistry;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemResources;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -29,10 +28,9 @@ import org.eclipse.swt.widgets.Shell;
|
|||
* previous state.
|
||||
*/
|
||||
public class SystemPreferenceRestoreStateAction extends SystemBaseAction
|
||||
|
||||
{
|
||||
|
||||
private ISystemRegistry sr = null;
|
||||
//private ISystemRegistry sr = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -41,7 +39,7 @@ public class SystemPreferenceRestoreStateAction extends SystemBaseAction
|
|||
super(SystemResources.ACTION_RESTORE_STATE_PREFERENCE_LABEL,SystemResources.ACTION_RESTORE_STATE_PREFERENCE_TOOLTIP, parent);
|
||||
setSelectionSensitive(false);
|
||||
allowOnMultipleSelection(true);
|
||||
sr = RSEUIPlugin.getTheSystemRegistry();
|
||||
//sr = RSEUIPlugin.getTheSystemRegistry();
|
||||
setChecked(SystemPreferencesManager.getPreferencesManager().getRememberState());
|
||||
|
||||
setHelp(RSEUIPlugin.HELPPREFIX+"aprefres");
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package org.eclipse.rse.ui.actions;
|
||||
import org.eclipse.rse.core.SystemPerspectiveHelpers;
|
||||
import org.eclipse.rse.model.ISystemRegistry;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemResources;
|
||||
import org.eclipse.rse.ui.view.team.SystemTeamViewPart;
|
||||
|
@ -30,8 +29,8 @@ import org.eclipse.swt.widgets.Shell;
|
|||
public class SystemWorkWithProfilesAction extends SystemBaseAction
|
||||
|
||||
{
|
||||
|
||||
private ISystemRegistry sr = null;
|
||||
//private ISystemRegistry sr = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -40,7 +39,7 @@ public class SystemWorkWithProfilesAction extends SystemBaseAction
|
|||
super(SystemResources.ACTION_WORKWITH_PROFILES_LABEL, SystemResources.ACTION_WORKWITH_PROFILES_TOOLTIP, parent);
|
||||
setSelectionSensitive(false);
|
||||
allowOnMultipleSelection(true);
|
||||
sr = RSEUIPlugin.getTheSystemRegistry();
|
||||
//sr = RSEUIPlugin.getTheSystemRegistry();
|
||||
setHelp(RSEUIPlugin.HELPPREFIX+"actnwwpr");
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.eclipse.swt.widgets.Composite;
|
|||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.List;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
|
@ -53,7 +52,7 @@ public class SystemWorkWithHistoryDialog extends SystemPromptDialog implements I
|
|||
private String[] historyInput;
|
||||
private String[] historyOutput;
|
||||
private String[] defaultHistory;
|
||||
private Label verbage;
|
||||
//private Label verbage;
|
||||
private List historyList;
|
||||
private Button rmvButton, clearButton, mupButton, mdnButton;
|
||||
private Group group;
|
||||
|
@ -127,7 +126,7 @@ public class SystemWorkWithHistoryDialog extends SystemPromptDialog implements I
|
|||
Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
|
||||
|
||||
// verbage
|
||||
verbage = SystemWidgetHelpers.createLabel(composite,SystemResources.RESID_WORKWITHHISTORY_VERBAGE, nbrColumns);
|
||||
/*verbage =*/ SystemWidgetHelpers.createLabel(composite,SystemResources.RESID_WORKWITHHISTORY_VERBAGE, nbrColumns);
|
||||
|
||||
// History list
|
||||
init(composite, nbrColumns);
|
||||
|
|
|
@ -63,7 +63,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.ToolBar;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
|
@ -81,7 +80,7 @@ public class SystemFilterWorkWithFilterPoolsDialog
|
|||
{
|
||||
|
||||
private String promptString;
|
||||
private Label prompt;
|
||||
//private Label prompt;
|
||||
private SystemFilterWorkWithFilterPoolsTreeViewer tree;
|
||||
private ToolBar toolbar = null;
|
||||
private ToolBarManager toolbarMgr = null;
|
||||
|
@ -136,7 +135,7 @@ public class SystemFilterWorkWithFilterPoolsDialog
|
|||
*/
|
||||
protected ISystemMessageLine createMessageLine(Composite c)
|
||||
{
|
||||
ISystemMessageLine msgLine = super.createMessageLine(c);
|
||||
/*ISystemMessageLine msgLine =*/ super.createMessageLine(c);
|
||||
return fMessageLine;
|
||||
}
|
||||
|
||||
|
@ -177,7 +176,7 @@ public class SystemFilterWorkWithFilterPoolsDialog
|
|||
Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 1);
|
||||
|
||||
// PROMPT
|
||||
prompt = SystemWidgetHelpers.createLabel(composite_prompts, promptString);
|
||||
/*prompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, promptString);
|
||||
|
||||
// TOOLBAR
|
||||
createToolBar(composite_prompts);
|
||||
|
@ -300,8 +299,8 @@ public class SystemFilterWorkWithFilterPoolsDialog
|
|||
*/
|
||||
public void selectionChanged(SelectionChangedEvent event)
|
||||
{
|
||||
IStructuredSelection sel = (IStructuredSelection)event.getSelection();
|
||||
SystemSimpleContentElement element = (SystemSimpleContentElement)sel.getFirstElement();
|
||||
//IStructuredSelection sel = (IStructuredSelection)event.getSelection();
|
||||
//SystemSimpleContentElement element = (SystemSimpleContentElement)sel.getFirstElement();
|
||||
if (rnmAction != null)
|
||||
rnmAction.selectionChanged(event);
|
||||
}
|
||||
|
@ -399,18 +398,17 @@ public class SystemFilterWorkWithFilterPoolsDialog
|
|||
public boolean canDelete()
|
||||
{
|
||||
SystemSimpleContentElement element = getSelectedElement();
|
||||
if (element == null)
|
||||
return false;
|
||||
Object elementData = element.getData();
|
||||
//System.out.println("In SFWWFPsDlg.canDelete: element data class = " + elementData.getClass().getName());
|
||||
if ((elementData == null) || !(elementData instanceof ISystemFilterPool))
|
||||
return false;
|
||||
ISystemFilterPool pool = (ISystemFilterPool)elementData;
|
||||
if (pool == null)
|
||||
return false;
|
||||
else
|
||||
return (pool.isDeletable() && element.isDeletable());
|
||||
if (element != null) {
|
||||
Object elementData = element.getData();
|
||||
//System.out.println("In SFWWFPsDlg.canDelete: element data class = " + elementData.getClass().getName());
|
||||
if (elementData instanceof ISystemFilterPool) {
|
||||
ISystemFilterPool pool = (ISystemFilterPool)elementData;
|
||||
return (pool.isDeletable() && element.isDeletable());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually do the delete of currently selected items.
|
||||
*/
|
||||
|
@ -461,26 +459,22 @@ public class SystemFilterWorkWithFilterPoolsDialog
|
|||
*/
|
||||
public boolean canRename()
|
||||
{
|
||||
boolean canRename = false;
|
||||
SystemSimpleContentElement element = getSelectedElement();
|
||||
if (element == null)
|
||||
return false;
|
||||
Object elementData = element.getData();
|
||||
//System.out.println("In SFWWFPsDlg.canRename: element data class = " + elementData.getClass().getName());
|
||||
if ((elementData == null) || !(elementData instanceof ISystemFilterPool))
|
||||
return false;
|
||||
ISystemFilterPool pool = (ISystemFilterPool)elementData;
|
||||
if (pool == null)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
boolean renamable = (!pool.isNonRenamable() && element.isRenamable());
|
||||
if (renamable)
|
||||
{
|
||||
//poolNameValidator.setExistingNamesList(pool.getSystemFilterPoolManager().getSystemFilterPoolNamesVector());
|
||||
}
|
||||
return renamable;
|
||||
if (element != null) {
|
||||
Object elementData = element.getData();
|
||||
//System.out.println("In SFWWFPsDlg.canRename: element data class = " + elementData.getClass().getName());
|
||||
if (elementData instanceof ISystemFilterPool) {
|
||||
ISystemFilterPool pool = (ISystemFilterPool)elementData;
|
||||
canRename = (!pool.isNonRenamable() && element.isRenamable());
|
||||
//if (canRename) {
|
||||
// poolNameValidator.setExistingNamesList(pool.getSystemFilterPoolManager().getSystemFilterPoolNamesVector());
|
||||
//}
|
||||
}
|
||||
}
|
||||
return canRename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually do the rename of currently selected items.
|
||||
* The array of new names matches the currently selected items.
|
||||
|
|
|
@ -231,7 +231,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
}
|
||||
}
|
||||
private Object _objectInput;
|
||||
private ArrayList _attributeColumns;
|
||||
//private ArrayList _attributeColumns;
|
||||
private TableLayout _layout;
|
||||
protected SystemTableTreeViewProvider _provider;
|
||||
private HeaderSelectionListener _columnSelectionListener;
|
||||
|
@ -291,7 +291,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
{
|
||||
super(tableTree);
|
||||
_messageLine = msgLine;
|
||||
_attributeColumns = new ArrayList();
|
||||
//_attributeColumns = new ArrayList();
|
||||
_layout = new TableLayout();
|
||||
|
||||
_columnManager = new SystemTableViewColumnManager(this);
|
||||
|
@ -862,7 +862,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)
|
||||
{
|
||||
|
@ -1112,10 +1112,9 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec
|
|||
RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
|
||||
RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this);
|
||||
|
||||
Composite tree = getTableTree();
|
||||
|
||||
boolean isDisposed = tree.isDisposed();
|
||||
|
||||
// for debugging
|
||||
//Composite tree = getTableTree();
|
||||
//boolean isDisposed = tree.isDisposed();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1352,7 +1351,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;
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
|
||||
package org.eclipse.rse.ui.view.team;
|
||||
|
||||
import java.util.Hashtable;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.rse.core.ISystemUserIdConstants;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||
import org.eclipse.rse.filters.ISystemFilterPoolManager;
|
||||
import org.eclipse.rse.model.ISystemProfile;
|
||||
|
@ -40,11 +37,10 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
|
|||
*/
|
||||
public class SystemTeamViewSubSystemConfigurationAdapter
|
||||
extends AbstractSystemViewAdapter
|
||||
implements ISystemViewElementAdapter, ISystemUserIdConstants
|
||||
implements ISystemViewElementAdapter
|
||||
{
|
||||
|
||||
private boolean actionsCreated = false;
|
||||
private Hashtable categoriesByProfile = new Hashtable();
|
||||
//private Hashtable categoriesByProfile = new Hashtable();
|
||||
private SystemFilterWorkWithFilterPoolsAction wwPoolsAction;
|
||||
|
||||
// -------------------
|
||||
|
@ -216,24 +212,24 @@ public class SystemTeamViewSubSystemConfigurationAdapter
|
|||
*/
|
||||
public boolean hasChildren(Object element)
|
||||
{
|
||||
SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode)element;
|
||||
SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
|
||||
ISystemProfile profile = ssfNode.getProfile();
|
||||
SystemTeamViewSubSystemConfigurationNode ssConfNode = (SystemTeamViewSubSystemConfigurationNode)element;
|
||||
SystemTeamViewCategoryNode category = ssConfNode.getParentCategory();
|
||||
//ISystemProfile profile = ssConfNode.getProfile();
|
||||
String categoryType = category.getMementoHandle();
|
||||
ISubSystemConfiguration ssf = ssfNode.getSubSystemConfiguration();
|
||||
//ISubSystemConfiguration ssConf = ssConfNode.getSubSystemConfiguration();
|
||||
if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS))
|
||||
return true;
|
||||
else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS))
|
||||
{
|
||||
/* FIXME
|
||||
return (profile.getUserActions(ssf).length > 0);
|
||||
return (profile.getUserActions(ssConf).length > 0);
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS))
|
||||
{
|
||||
/* FIXME
|
||||
return (profile.getCompileCommandTypes(ssf).length > 0);
|
||||
return (profile.getCompileCommandTypes(ssConf).length > 0);
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ public class SystemPortPrompt
|
|||
{
|
||||
|
||||
private Composite composite_prompts;
|
||||
private Label labelPortPrompt, labelPort;
|
||||
//private Label labelPortPrompt;
|
||||
private Label labelPort;
|
||||
private InheritableEntryField textPort;
|
||||
protected SystemMessage errorMessage;
|
||||
|
||||
|
@ -282,7 +283,7 @@ public class SystemPortPrompt
|
|||
String portRange = " (1-" + ValidatorPortInput.MAXIMUM_PORT_NUMBER + ")";
|
||||
if (wantLabel) {
|
||||
String labelText = SystemWidgetHelpers.appendColon(SystemResources.RESID_SUBSYSTEM_PORT_LABEL + portRange);
|
||||
labelPortPrompt = SystemWidgetHelpers.createLabel(composite_prompts, labelText);
|
||||
/*labelPortPrompt =*/ SystemWidgetHelpers.createLabel(composite_prompts, labelText);
|
||||
}
|
||||
portApplicable = isPortApplicable();
|
||||
portEditable = isPortEditable();
|
||||
|
|
Loading…
Add table
Reference in a new issue