mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Fix generic and other warnings
Change-Id: I77173712bf2b775eae5573f0abfb7f9900123438
This commit is contained in:
parent
936dec3517
commit
edfc7d4c0e
5 changed files with 15 additions and 16 deletions
|
@ -20,8 +20,7 @@ import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
|
||||||
* Common function for debugger pages.
|
* Common function for debugger pages.
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
abstract public class AbstractCDebuggerPage extends AbstractLaunchConfigurationTab
|
abstract public class AbstractCDebuggerPage extends AbstractLaunchConfigurationTab implements ICDebuggerPageExtension {
|
||||||
implements ICDebuggerPage, ICDebuggerPageExtension {
|
|
||||||
|
|
||||||
private String fDebuggerID = null;
|
private String fDebuggerID = null;
|
||||||
private ListenerList<IContentChangeListener> fContentListeners;
|
private ListenerList<IContentChangeListener> fContentListeners;
|
||||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
|
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-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -223,7 +223,8 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
||||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebuggerId());
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebuggerId());
|
||||||
ICDebuggerPage dynamicTab = getDynamicTab();
|
ICDebuggerPage dynamicTab = getDynamicTab();
|
||||||
if (dynamicTab == null) {
|
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 {
|
} else {
|
||||||
dynamicTab.performApply(config);
|
dynamicTab.performApply(config);
|
||||||
}
|
}
|
||||||
|
@ -492,7 +493,8 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wc != null) {
|
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 {
|
} else {
|
||||||
if (wc == null) {
|
if (wc == null) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
||||||
if (fSolibSearchPathBlock != null)
|
if (fSolibSearchPathBlock != null)
|
||||||
fSolibSearchPathBlock.performApply(configuration);
|
fSolibSearchPathBlock.performApply(configuration);
|
||||||
try {
|
try {
|
||||||
Map attrs = configuration.getAttributes();
|
Map<String, Object> attrs = configuration.getAttributes();
|
||||||
|
|
||||||
if (fAutoSoLibButton != null)
|
if (fAutoSoLibButton != null)
|
||||||
attrs.put(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB,
|
attrs.put(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB,
|
||||||
|
|
|
@ -59,7 +59,7 @@ import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.ITreeContentProvider;
|
import org.eclipse.jface.viewers.ITreeContentProvider;
|
||||||
import org.eclipse.jface.viewers.LabelProvider;
|
import org.eclipse.jface.viewers.LabelProvider;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
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.jface.window.Window;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.ModifyEvent;
|
import org.eclipse.swt.events.ModifyEvent;
|
||||||
|
@ -313,9 +313,8 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
|
|
||||||
if (fDirList != null) {
|
if (fDirList != null) {
|
||||||
try {
|
try {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
List<String> values = configuration.getAttribute(
|
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());
|
ArrayList<Path> paths = new ArrayList<>(values.size());
|
||||||
Iterator<String> it = values.iterator();
|
Iterator<String> it = values.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
@ -333,9 +332,8 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File[] getAutoSolibs(ILaunchConfiguration configuration) throws CoreException {
|
public static File[] getAutoSolibs(ILaunchConfiguration configuration) throws CoreException {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
List<String> autoSolibs = configuration
|
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());
|
List<File> list = new ArrayList<>(autoSolibs.size());
|
||||||
Iterator<String> it = autoSolibs.iterator();
|
Iterator<String> it = autoSolibs.iterator();
|
||||||
|
@ -350,7 +348,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
|
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)
|
/* (non-Javadoc)
|
||||||
|
@ -467,7 +465,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<IPath> dirList = fDirList.getSelectedElements();
|
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)) {
|
if (generateLibraryList(dirList.toArray(new IPath[dirList.size()]), libs)) {
|
||||||
ITreeContentProvider cp = new ITreeContentProvider() {
|
ITreeContentProvider cp = new ITreeContentProvider() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -490,7 +488,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
if (inputElement instanceof Set) {
|
if (inputElement instanceof Set) {
|
||||||
return ((Set) inputElement).toArray();
|
return ((Set<?>) inputElement).toArray();
|
||||||
}
|
}
|
||||||
return new Object[0];
|
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.setTitle(LaunchUIMessages.getString("SolibSearchPathBlock.7")); //$NON-NLS-1$
|
||||||
dialog.setMessage(LaunchUIMessages.getString("SolibSearchPathBlock.8")); //$NON-NLS-1$
|
dialog.setMessage(LaunchUIMessages.getString("SolibSearchPathBlock.8")); //$NON-NLS-1$
|
||||||
dialog.setEmptyListMessage(LaunchUIMessages.getString("SolibSearchPathBlock.9")); //$NON-NLS-1$
|
dialog.setEmptyListMessage(LaunchUIMessages.getString("SolibSearchPathBlock.9")); //$NON-NLS-1$
|
||||||
dialog.setComparator(new ViewerSorter());
|
dialog.setComparator(new ViewerComparator());
|
||||||
dialog.setInput(libs);
|
dialog.setInput(libs);
|
||||||
dialog.setInitialElementSelections(Arrays.asList(fAutoSolibs));
|
dialog.setInitialElementSelections(Arrays.asList(fAutoSolibs));
|
||||||
if (dialog.open() == Window.OK) {
|
if (dialog.open() == Window.OK) {
|
||||||
|
@ -529,7 +527,7 @@ public class SolibSearchPathBlock extends Observable implements IMILaunchConfigu
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean generateLibraryList(final IPath[] paths, final Set libs) {
|
private boolean generateLibraryList(final IPath[] paths, final Set<File> libs) {
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
|
|
||||||
IRunnableWithProgress runnable = new IRunnableWithProgress() {
|
IRunnableWithProgress runnable = new IRunnableWithProgress() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue