Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2019-01-04 14:36:32 -0500
committerJonah Graham2019-07-09 21:17:22 -0400
commitedfc7d4c0eeb1b99a45302ec6fa324538a4e74d5 (patch)
tree6eec68d575b5998f7367f63f7ae45a61da220efa
parent936dec35174222ecac199460f07657d4b5caed11 (diff)
downloadorg.eclipse.cdt-edfc7d4c0eeb1b99a45302ec6fa324538a4e74d5.tar.gz
org.eclipse.cdt-edfc7d4c0eeb1b99a45302ec6fa324538a4e74d5.tar.xz
org.eclipse.cdt-edfc7d4c0eeb1b99a45302ec6fa324538a4e74d5.zip
Fix generic and other warnings
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java18
5 files changed, 15 insertions, 16 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java
index 24bf8b8eba..809d49d173 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/AbstractCDebuggerPage.java
@@ -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;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
index c37b595367..436b782c60 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
@@ -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,
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
index 51d56df9f9..b66396dec7 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
@@ -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) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java
index 023be02689..067bdd23e5 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GDBSolibBlock.java
@@ -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,
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java
index c526ae5a18..c64bd742b2 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/SolibSearchPathBlock.java
@@ -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() {

Back to the top