1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix generic and other warnings

Change-Id: I77173712bf2b775eae5573f0abfb7f9900123438
This commit is contained in:
Jonah Graham 2019-01-04 19:36:32 +00:00
parent 936dec3517
commit edfc7d4c0e
5 changed files with 15 additions and 16 deletions

View file

@ -20,8 +20,7 @@ import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
* Common function for debugger pages.
* @since 3.1
*/
abstract public class AbstractCDebuggerPage extends AbstractLaunchConfigurationTab
implements ICDebuggerPage, ICDebuggerPageExtension {
abstract public class AbstractCDebuggerPage extends AbstractLaunchConfigurationTab implements ICDebuggerPageExtension {
private String fDebuggerID = null;
private ListenerList<IContentChangeListener> fContentListeners;

View file

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
Bundle-Version: 2.6.200.qualifier
Bundle-Version: 2.6.300.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,

View file

@ -223,7 +223,8 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebuggerId());
ICDebuggerPage dynamicTab = getDynamicTab();
if (dynamicTab == null) {
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map) null);
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP,
(Map<String, String>) null);
} else {
dynamicTab.performApply(config);
}
@ -492,7 +493,8 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
}
}
if (wc != null) {
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map) null);
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP,
(Map<String, String>) null);
}
} else {
if (wc == null) {

View file

@ -119,7 +119,7 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
if (fSolibSearchPathBlock != null)
fSolibSearchPathBlock.performApply(configuration);
try {
Map attrs = configuration.getAttributes();
Map<String, Object> attrs = configuration.getAttributes();
if (fAutoSoLibButton != null)
attrs.put(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB,

View file

@ -59,7 +59,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@ -313,9 +313,8 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
if (fDirList != null) {
try {
@SuppressWarnings("unchecked")
List<String> values = configuration.getAttribute(
IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.emptyList());
ArrayList<Path> paths = new ArrayList<>(values.size());
Iterator<String> it = values.iterator();
while (it.hasNext()) {
@ -333,9 +332,8 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
}
public static File[] getAutoSolibs(ILaunchConfiguration configuration) throws CoreException {
@SuppressWarnings("unchecked")
List<String> autoSolibs = configuration
.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB_LIST, Collections.EMPTY_LIST);
.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB_LIST, Collections.emptyList());
List<File> list = new ArrayList<>(autoSolibs.size());
Iterator<String> it = autoSolibs.iterator();
@ -350,7 +348,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
*/
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.EMPTY_LIST);
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, Collections.emptyList());
}
/* (non-Javadoc)
@ -467,7 +465,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
@SuppressWarnings("unchecked")
List<IPath> dirList = fDirList.getSelectedElements();
final HashSet<IPath> libs = new HashSet<>(10);
final HashSet<File> libs = new HashSet<>(10);
if (generateLibraryList(dirList.toArray(new IPath[dirList.size()]), libs)) {
ITreeContentProvider cp = new ITreeContentProvider() {
@Override
@ -490,7 +488,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Set) {
return ((Set) inputElement).toArray();
return ((Set<?>) inputElement).toArray();
}
return new Object[0];
}
@ -517,7 +515,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
dialog.setTitle(LaunchUIMessages.getString("SolibSearchPathBlock.7")); //$NON-NLS-1$
dialog.setMessage(LaunchUIMessages.getString("SolibSearchPathBlock.8")); //$NON-NLS-1$
dialog.setEmptyListMessage(LaunchUIMessages.getString("SolibSearchPathBlock.9")); //$NON-NLS-1$
dialog.setComparator(new ViewerSorter());
dialog.setComparator(new ViewerComparator());
dialog.setInput(libs);
dialog.setInitialElementSelections(Arrays.asList(fAutoSolibs));
if (dialog.open() == Window.OK) {
@ -529,7 +527,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
return changed;
}
private boolean generateLibraryList(final IPath[] paths, final Set libs) {
private boolean generateLibraryList(final IPath[] paths, final Set<File> libs) {
boolean result = true;
IRunnableWithProgress runnable = new IRunnableWithProgress() {