mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
[cleanup] fix compiler warnings
This commit is contained in:
parent
aa5c3d4cb7
commit
7b4385aadb
27 changed files with 29 additions and 66 deletions
|
@ -298,7 +298,7 @@ public abstract class SystemBaseDialogAction extends SystemBaseAction
|
|||
((SystemPromptDialog)dlg).setNeedsProgressMonitor(needsProgressMonitor);
|
||||
}
|
||||
|
||||
int rc = dlg.open();
|
||||
dlg.open();
|
||||
|
||||
// if (rc != 0) NOT RELIABLE!
|
||||
if (dlg instanceof SystemWizardDialog)
|
||||
|
|
|
@ -61,8 +61,7 @@ public class SystemCopyConnectionAction extends SystemBaseCopyAction
|
|||
*/
|
||||
public boolean updateSelection(IStructuredSelection selection)
|
||||
{
|
||||
boolean enable = true;
|
||||
ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
||||
boolean enable = true;
|
||||
ISystemProfile prevProfile = null;
|
||||
Iterator e= selection.iterator();
|
||||
while (enable && e.hasNext())
|
||||
|
|
|
@ -97,7 +97,6 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements
|
|||
|
||||
if (targetAdapter != null)
|
||||
{
|
||||
ISubSystem targetSubSystem = targetAdapter.getSubSystem(target);
|
||||
List rulesList = new ArrayList();
|
||||
int j = 0;
|
||||
for (int i = 0; i < srcObjects.size(); i++)
|
||||
|
|
|
@ -83,7 +83,7 @@ public class SystemCopyProfileDialog extends SystemPromptDialog
|
|||
*/
|
||||
protected ISystemMessageLine createMessageLine(Composite c)
|
||||
{
|
||||
ISystemMessageLine msgLine = super.createMessageLine(c);
|
||||
super.createMessageLine(c);
|
||||
//form.setMessageLine(msgLine);
|
||||
return fMessageLine;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ public class SystemFilterTableDialog extends SystemPromptDialog implements KeyLi
|
|||
inputC.setLayoutData(igd);
|
||||
|
||||
// input
|
||||
Label objFilterLabel= SystemWidgetHelpers.createLabel(inputC, "Input"); //$NON-NLS-1$
|
||||
SystemWidgetHelpers.createLabel(inputC, "Input"); //$NON-NLS-1$
|
||||
_inputText = new Combo(inputC, SWT.DROP_DOWN | SWT.READ_ONLY);
|
||||
_inputText.addListener(SWT.Selection, this);
|
||||
|
||||
|
@ -175,7 +175,7 @@ public class SystemFilterTableDialog extends SystemPromptDialog implements KeyLi
|
|||
filterC.setLayoutData(fgd);
|
||||
|
||||
// type filter strings
|
||||
Label typeFilterLabel= SystemWidgetHelpers.createLabel(filterC, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL);
|
||||
SystemWidgetHelpers.createLabel(filterC, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL);
|
||||
_typeCombo = new Combo(filterC, SWT.DROP_DOWN | SWT.READ_ONLY);
|
||||
for (int i = 0; i < _typeFilterStrings.length; i++)
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ public class SystemFilterTableDialog extends SystemPromptDialog implements KeyLi
|
|||
_typeCombo.addListener(SWT.Selection, this);
|
||||
|
||||
// view filter strings
|
||||
Label viewFilterLabel= SystemWidgetHelpers.createLabel(filterC, SystemResources.RESID_FILTERSTRING_STRING_LABEL);
|
||||
SystemWidgetHelpers.createLabel(filterC, SystemResources.RESID_FILTERSTRING_STRING_LABEL);
|
||||
_filterCombo = SystemWidgetHelpers.createCombo(filterC, this);
|
||||
_filterCombo.setText(_viewFilterStrings[0]);
|
||||
for (int i = 0; i < _viewFilterStrings.length; i++)
|
||||
|
@ -350,7 +350,6 @@ public class SystemFilterTableDialog extends SystemPromptDialog implements KeyLi
|
|||
if (input != _currentInput)
|
||||
{
|
||||
_currentInput = input;
|
||||
ISystemViewElementAdapter adapter = getAdatperFor(_currentInput);
|
||||
_inputText.setText(inputStr);
|
||||
applyViewFilter(false);
|
||||
_viewer.setInput(_currentInput);
|
||||
|
|
|
@ -191,7 +191,7 @@ public class SystemTestFilterStringDialog
|
|||
}
|
||||
public void widgetSelected(SelectionEvent event)
|
||||
{
|
||||
Object src = event.getSource();
|
||||
|
||||
//if (src == connectionCombo.getCombo())
|
||||
{
|
||||
//System.out.println("connection changed");
|
||||
|
|
|
@ -100,7 +100,6 @@ public class SystemFilterMoveUpFilterAction extends SystemBaseAction
|
|||
(selectedObject instanceof ISystemFilterReference)))
|
||||
return false;
|
||||
ISystemFilter filter = getSystemFilter(selectedObject);
|
||||
ISystemFilterPoolManager fpMgr = filter.getSystemFilterPoolManager();
|
||||
ISystemFilterContainer fpContainer = filter.getParentFilterContainer();
|
||||
int pos = fpContainer.getSystemFilterPosition(filter);
|
||||
return (pos>0);
|
||||
|
|
|
@ -81,7 +81,6 @@ public class SystemFilterRemoveFilterPoolReferenceAction
|
|||
public void run()
|
||||
{
|
||||
IStructuredSelection selections = getSelection();
|
||||
ISystemFilterPoolReference poolReferences[] = new ISystemFilterPoolReference[selections.size()];
|
||||
Iterator i = selections.iterator();
|
||||
ISystemFilterPoolReferenceManager fprMgr = null;
|
||||
while (i.hasNext())
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.eclipse.core.runtime.Status;
|
|||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
|
@ -63,10 +62,6 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
|
|||
* The Details button.
|
||||
*/
|
||||
private Button detailsButton=null;
|
||||
/**
|
||||
* The title of the dialog.
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* The message to display.
|
||||
|
@ -183,8 +178,6 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
|
|||
IStatus status, int displayMask)
|
||||
{
|
||||
super(parentShell, dialogTitle, message, status, displayMask);
|
||||
this.title = (dialogTitle == null) ? JFaceResources.getString("Problem_Occurred"): //$NON-NLS-1$
|
||||
dialogTitle;
|
||||
this.status = status;
|
||||
statusList = Arrays.asList(status.getChildren());
|
||||
this.displayMask = displayMask;
|
||||
|
@ -547,7 +540,7 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
|
|||
private void toggleDetailsArea()
|
||||
{
|
||||
Point windowSize = getShell().getSize();
|
||||
Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
|
||||
if (listCreated)
|
||||
{
|
||||
|
@ -575,11 +568,11 @@ public class SystemMessageDialog extends ErrorDialog implements Listener {
|
|||
private void toggleDetailsArea2(Composite composite)
|
||||
{
|
||||
Point windowSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
Point oldSize = getDialogArea().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
getDialogArea().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
list = createDropDownList2(composite.getParent());
|
||||
detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
|
||||
Point newSize = composite.getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
Point buttonSize=composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
|
||||
// yantzi:5.1.2 this leaves a gap at the bottom of the dialog when opened with details,
|
||||
// why not just set it to the newSize.y?
|
||||
|
|
|
@ -61,7 +61,6 @@ public class SystemChangeFilterPropertyPage extends SystemBasePropertyPage
|
|||
public SystemChangeFilterPropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
changeFilterPane = new SystemChangeFilterPane(null, this, this);
|
||||
changeFilterPane.addPageCompleteListener(this);
|
||||
setHelp(RSEUIPlugin.HELPPREFIX+"dufr0000"); //$NON-NLS-1$
|
||||
|
|
|
@ -47,8 +47,6 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage
|
|||
public SystemConnectionPropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
|
||||
parentHelpId = RSEUIPlugin.HELPPREFIX + "pcon0000"; //$NON-NLS-1$
|
||||
form = new SystemConnectionForm(this, this);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ public class SystemFilterPoolPropertyPage extends SystemBasePropertyPage
|
|||
public SystemFilterPoolPropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
}
|
||||
/**
|
||||
* Create the page's GUI contents.
|
||||
|
|
|
@ -45,7 +45,6 @@ public class SystemFilterPoolReferencePropertyPage extends SystemBasePropertyPag
|
|||
public SystemFilterPoolReferencePropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
}
|
||||
/**
|
||||
* Create the page's GUI contents.
|
||||
|
@ -101,8 +100,7 @@ public class SystemFilterPoolReferencePropertyPage extends SystemBasePropertyPag
|
|||
initDone = true;
|
||||
ISystemFilterPoolReference poolRef = getFilterPoolReference();
|
||||
ISystemFilterPool pool = poolRef.getReferencedFilterPool();
|
||||
ISubSystem ss = (ISubSystem)poolRef.getProvider();
|
||||
ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
|
||||
ISubSystem ss = (ISubSystem)poolRef.getProvider();
|
||||
|
||||
// name
|
||||
labelName.setText(pool.getName());
|
||||
|
|
|
@ -45,7 +45,6 @@ public class SystemFilterPropertyPage extends SystemBasePropertyPage
|
|||
public SystemFilterPropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
}
|
||||
/**
|
||||
* Create the page's GUI contents.
|
||||
|
|
|
@ -71,7 +71,6 @@ public class SystemFilterStringPropertyPage extends SystemBasePropertyPage imple
|
|||
public SystemFilterStringPropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
}
|
||||
|
||||
// configuration methods, called by customizeFilterStringPropertyPage in SubSystemConfigurationImpl...
|
||||
|
|
|
@ -87,8 +87,7 @@ public class SystemDropActionDelegate implements IDropActionDelegate
|
|||
//StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
|
||||
String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$
|
||||
ArrayList srcObjects = new ArrayList();
|
||||
ArrayList rulesList = new ArrayList();
|
||||
int j = 0;
|
||||
|
||||
//while (tokenizer.hasMoreTokens())
|
||||
for (int i = 0; i <tokens.length; i++)
|
||||
{
|
||||
|
|
|
@ -178,18 +178,17 @@ public class SystemPropertySheetForm extends Composite
|
|||
protected void addOurSelectionListener()
|
||||
{
|
||||
// Add the button listener
|
||||
SelectionListener selectionListener = new SelectionListener()
|
||||
/* SelectionListener selectionListener = new SelectionListener()
|
||||
{
|
||||
public void widgetDefaultSelected(SelectionEvent event)
|
||||
{
|
||||
};
|
||||
}
|
||||
public void widgetSelected(SelectionEvent event)
|
||||
{
|
||||
if (!enabledMode)
|
||||
return;
|
||||
Object src = event.getSource();
|
||||
};
|
||||
};
|
||||
}
|
||||
};*/
|
||||
//tree.getControl().addSelectionListener(selectionListener);
|
||||
}
|
||||
|
||||
|
|
|
@ -964,7 +964,6 @@ public class SystemTableView
|
|||
int eventType = event.getEventType();
|
||||
Object remoteResourceParent = event.getResourceParent();
|
||||
Object remoteResource = event.getResource();
|
||||
boolean originatedHere = (event.getOriginatingViewer() == this);
|
||||
Vector remoteResourceNames = null;
|
||||
if (remoteResource instanceof Vector)
|
||||
{
|
||||
|
@ -1507,7 +1506,6 @@ public class SystemTableView
|
|||
SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
||||
IStructuredSelection selection = (IStructuredSelection) getSelection();
|
||||
Iterator elements = selection.iterator();
|
||||
int selectedCount = selection.size();
|
||||
Object element = null;
|
||||
|
||||
ISystemViewElementAdapter adapter = null;
|
||||
|
@ -1651,7 +1649,6 @@ public class SystemTableView
|
|||
public void fillContextMenu(IMenuManager menu)
|
||||
{
|
||||
IStructuredSelection selection = (IStructuredSelection) getSelection();
|
||||
int selectionCount = selection.size();
|
||||
|
||||
{
|
||||
|
||||
|
|
|
@ -107,7 +107,6 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
|
|||
public void dragStart(DragSourceEvent event)
|
||||
{
|
||||
ISelection selection = _selectionProvider.getSelection();
|
||||
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
|
||||
if (selection instanceof IStructuredSelection)
|
||||
{
|
||||
IStructuredSelection ss = (IStructuredSelection) selection;
|
||||
|
@ -170,7 +169,6 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
|
|||
public void dragSetData(DragSourceEvent event)
|
||||
{
|
||||
ISelection selection = _selectionProvider.getSelection();
|
||||
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
|
||||
if (selection instanceof IStructuredSelection)
|
||||
{
|
||||
IStructuredSelection ss = (IStructuredSelection) selection;
|
||||
|
@ -220,9 +218,9 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
|
|||
String[] fileNames = new String[ss.size()];
|
||||
Iterator iterator = ss.iterator();
|
||||
int i = 0;
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Object dragObject = iterator.next();
|
||||
//while (iterator.hasNext())
|
||||
//{
|
||||
iterator.next();
|
||||
/** FIXME - IREmoteFile is systems.core independent now
|
||||
if (dragObject instanceof IRemoteFile)
|
||||
{
|
||||
|
@ -236,7 +234,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter
|
|||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
//}
|
||||
if (i > 0)
|
||||
{
|
||||
event.data = fileNames;
|
||||
|
|
|
@ -492,7 +492,7 @@ class SubSetAction extends BrowseAction
|
|||
{
|
||||
Composite main = SystemWidgetHelpers.createComposite(parent, 1);
|
||||
|
||||
Label label = SystemWidgetHelpers.createLabel(main, SystemResources.RESID_TABLE_SELECT_COLUMNS_DESCRIPTION_LABEL);
|
||||
SystemWidgetHelpers.createLabel(main, SystemResources.RESID_TABLE_SELECT_COLUMNS_DESCRIPTION_LABEL);
|
||||
|
||||
Composite c = SystemWidgetHelpers.createComposite(main, 4);
|
||||
c.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
@ -845,7 +845,6 @@ class SubSetAction extends BrowseAction
|
|||
public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
|
||||
{
|
||||
int eventType = event.getEventType();
|
||||
Object remoteResourceParent = event.getResourceParent();
|
||||
Object remoteResource = event.getResource();
|
||||
|
||||
Vector remoteResourceNames = null;
|
||||
|
@ -884,12 +883,12 @@ class SubSetAction extends BrowseAction
|
|||
{
|
||||
if (child instanceof Vector)
|
||||
{
|
||||
Vector vec = (Vector)child;
|
||||
/*Vector vec = (Vector)child;
|
||||
for (int v = 0; v < vec.size(); v++)
|
||||
{
|
||||
Object c = vec.get(v);
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -177,7 +177,6 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList
|
|||
return;
|
||||
|
||||
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
|
||||
boolean alreadyHandled = false;
|
||||
|
||||
if (adapter != null)
|
||||
{
|
||||
|
@ -187,7 +186,7 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList
|
|||
}
|
||||
else
|
||||
{
|
||||
alreadyHandled = adapter.handleDoubleClick(element);
|
||||
adapter.handleDoubleClick(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -276,9 +275,7 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList
|
|||
*/
|
||||
public void systemResourceChanged(ISystemResourceChangeEvent event)
|
||||
{
|
||||
Object child = event.getSource();
|
||||
Object parent = event.getParent();
|
||||
Object input = _viewer.getInput();
|
||||
|
||||
if (event.getType() == ISystemResourceChangeEvents.EVENT_RENAME)
|
||||
{
|
||||
|
|
|
@ -168,9 +168,7 @@ public class SystemTeamView extends TreeViewer implements ISystemSelectAllTarget
|
|||
*/
|
||||
public void systemResourceChanged(ISystemResourceChangeEvent event)
|
||||
{
|
||||
int type = event.getType();
|
||||
Object src = event.getSource();
|
||||
Object parent = event.getParent();
|
||||
int type = event.getType();
|
||||
switch(type)
|
||||
{
|
||||
case ISystemResourceChangeEvents.EVENT_COLLAPSE_ALL:
|
||||
|
|
|
@ -291,7 +291,6 @@ public class SystemTeamViewProfileAdapter
|
|||
if (propertyDescriptorArray == null)
|
||||
{
|
||||
propertyDescriptorArray = new PropertyDescriptor[1];
|
||||
RSEUIPlugin plugin = RSEUIPlugin.getDefault();
|
||||
int idx = 0;
|
||||
// status
|
||||
propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE,SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_TOOLTIP);
|
||||
|
|
|
@ -127,7 +127,7 @@ public class SystemNewConnectionWizard
|
|||
if (restrictSystemTypesTo != null)
|
||||
mainPage.restrictSystemTypes(restrictSystemTypesTo);
|
||||
|
||||
ISystemProfile defaultProfile = SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
|
||||
SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
|
||||
|
||||
showProfilePageInitially = RSEUIPlugin.getDefault().getShowProfilePageInitially();
|
||||
/* DKM - I don't think we should force profiles into the faces of users
|
||||
|
|
|
@ -82,7 +82,6 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
|||
SystemBasePlugin.logError("Exception reading priority for subsystem configuration " + name + " defined in plugin " + element.getDeclaringExtension().getNamespaceIdentifier(), e); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
String className = element.getAttribute("class"); //$NON-NLS-1$
|
||||
if (vendor == null) vendor = "Unknown"; //$NON-NLS-1$
|
||||
if (category == null) category = "Unknown"; //$NON-NLS-1$
|
||||
if (types == null) types = "*"; //$NON-NLS-1$
|
||||
|
|
|
@ -191,10 +191,9 @@ public class SystemResourceHelpers implements FileFilter
|
|||
RSEUIPlugin.logError(msg, e);
|
||||
}
|
||||
*/
|
||||
boolean ok = true;
|
||||
IFolder folder = getFolder(parentFolder, folderName);
|
||||
if (!exists(folder))
|
||||
ok = createFolder(folder);
|
||||
createFolder(folder);
|
||||
return folder;
|
||||
}
|
||||
/**
|
||||
|
@ -503,8 +502,7 @@ public class SystemResourceHelpers implements FileFilter
|
|||
file.refreshLocal(IResource.DEPTH_INFINITE, null);
|
||||
} catch (Exception exc) {}
|
||||
|
||||
boolean ok = true;
|
||||
String name = file.getName();
|
||||
boolean ok = true;
|
||||
file.delete(true,false,null); // force-yes, keep-history-no, no progress monitor
|
||||
SystemResourceManager.turnOnResourceEventListening();
|
||||
return ok;
|
||||
|
|
|
@ -141,7 +141,7 @@ public class SystemCommunicationsDaemon extends Thread {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see Thread.run()
|
||||
* @see Thread#run()
|
||||
*/
|
||||
public void run() {
|
||||
byte[] buffer;
|
||||
|
|
Loading…
Add table
Reference in a new issue