mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
Fixed compiler warnings.
This commit is contained in:
parent
14d28761a1
commit
95ba23d13a
1 changed files with 43 additions and 59 deletions
|
@ -31,11 +31,8 @@ import org.eclipse.debug.core.model.IStackFrame;
|
|||
* Locates sources for a C/C++ debug session.
|
||||
*/
|
||||
public class CSourceManager implements ICSourceLocator, IPersistableSourceLocator, IAdaptable {
|
||||
|
||||
private ISourceLocator fSourceLocator = null;
|
||||
|
||||
private ILaunch fLaunch = null;
|
||||
|
||||
private CDebugTarget fDebugTarget = null;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +59,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#getSourceLocations()
|
||||
*/
|
||||
public ICSourceLocation[] getSourceLocations() {
|
||||
|
@ -71,7 +67,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#setSourceLocations(ICSourceLocation[])
|
||||
*/
|
||||
public void setSourceLocations(ICSourceLocation[] locations) {
|
||||
|
@ -82,8 +77,7 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
Disassembly d = null;
|
||||
try {
|
||||
d = (Disassembly)target.getDisassembly();
|
||||
}
|
||||
catch( DebugException e ) {
|
||||
} catch (DebugException e) {
|
||||
}
|
||||
if (d != null) {
|
||||
d.reset();
|
||||
|
@ -94,7 +88,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#contains(IResource)
|
||||
*/
|
||||
public boolean contains(IResource resource) {
|
||||
|
@ -103,10 +96,9 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
|
||||
*/
|
||||
public Object getAdapter( Class adapter ) {
|
||||
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
|
||||
if (adapter.equals(CSourceManager.class))
|
||||
return this;
|
||||
if (adapter.equals(ICSourceLocator.class))
|
||||
|
@ -120,7 +112,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.debug.core.model.ISourceLocator#getSourceElement(IStackFrame)
|
||||
*/
|
||||
public Object getSourceElement(IStackFrame stackFrame) {
|
||||
|
@ -150,7 +141,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#findSourceElement(String)
|
||||
*/
|
||||
public Object findSourceElement(String fileName) {
|
||||
|
@ -162,7 +152,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.debug.core.model.IPersistableSourceLocator#getMemento()
|
||||
*/
|
||||
public String getMemento() throws CoreException {
|
||||
|
@ -173,7 +162,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.debug.core.model.IPersistableSourceLocator#initializeDefaults(org.eclipse.debug.core.ILaunchConfiguration)
|
||||
*/
|
||||
public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException {
|
||||
|
@ -183,7 +171,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.debug.core.model.IPersistableSourceLocator#initializeFromMemento(java.lang.String)
|
||||
*/
|
||||
public void initializeFromMemento(String memento) throws CoreException {
|
||||
|
@ -199,7 +186,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#getProject()
|
||||
*/
|
||||
public IProject getProject() {
|
||||
|
@ -216,7 +202,6 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#setSearchForDuplicateFiles(boolean)
|
||||
*/
|
||||
public void setSearchForDuplicateFiles(boolean search) {
|
||||
|
@ -226,10 +211,9 @@ public class CSourceManager implements ICSourceLocator, IPersistableSourceLocato
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#searchForDuplicateFiles()
|
||||
*/
|
||||
public boolean searchForDuplicateFiles() {
|
||||
return (getCSourceLocator() != null) ? getCSourceLocator().searchForDuplicateFiles() : false;
|
||||
return getCSourceLocator() != null && getCSourceLocator().searchForDuplicateFiles();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue