1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 06:45:43 +02:00

2004-07-12 Alain Magloire

Remove some compiler warnings.

	* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
	* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
	* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java

	* mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvirnmentDirectory.java
	* src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
	* src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
	* src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
This commit is contained in:
Alain Magloire 2004-07-12 13:56:05 +00:00
parent 33193b4d7c
commit b78e2165a2
8 changed files with 29 additions and 22 deletions

View file

@ -1,3 +1,16 @@
2004-07-12 Alain Magloire
Remove some compiler warnings.
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
* mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvirnmentDirectory.java
* src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
* src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
* src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
2004-07-09 Alain Magloire 2004-07-09 Alain Magloire
Patch from gwatson to deal with Mac Patch from gwatson to deal with Mac

View file

@ -67,10 +67,10 @@ public class Register extends Variable implements ICDIRegister {
if ((exp.equals("private") || exp.equals("public") || exp.equals("protected"))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if ((exp.equals("private") || exp.equals("public") || exp.equals("protected"))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
fn = getFullName(); fn = getFullName();
} else { } else {
fn = getFullName() + "." + exp; fn = getFullName() + "." + exp; //$NON-NLS-1$
} }
} else { } else {
fn = getFullName() + "." + exp; fn = getFullName() + "." + exp; //$NON-NLS-1$
} }
RegisterObject regObj = new RegisterObject(getTarget(), RegisterObject regObj = new RegisterObject(getTarget(),
exp, fn, getPosition()); exp, fn, getPosition());

View file

@ -71,7 +71,7 @@ public class Thread extends CObject implements ICDIThread {
public String toString() { public String toString() {
String str = Integer.toString(id); String str = Integer.toString(id);
if (name != null) { if (name != null) {
str += " " + name; str += " " + name; //$NON-NLS-1$
} }
return str; return str;
} }

View file

@ -98,14 +98,13 @@ public class Variable extends VariableObject implements ICDIVariable {
Variable variable = (Variable) children[i]; Variable variable = (Variable) children[i];
if (name.equals(variable.getMIVar().getVarName())) { if (name.equals(variable.getMIVar().getVarName())) {
return variable; return variable;
} else { }
// Look also in the grandchildren. // Look also in the grandchildren.
Variable grandChild = variable.getChild(name); Variable grandChild = variable.getChild(name);
if (grandChild != null) { if (grandChild != null) {
return grandChild; return grandChild;
} }
} }
}
return null; return null;
} }

View file

@ -25,17 +25,17 @@ public class CygwinMIEnvironmentDirectory extends MIEnvironmentDirectory {
for (int i = 0; i < paths.length; i++) { for (int i = 0; i < paths.length; i++) {
// Use the cygpath utility to convert the path // Use the cygpath utility to convert the path
CommandLauncher launcher = new CommandLauncher(); CommandLauncher launcher = new CommandLauncher();
ByteArrayOutputStream output = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
launcher.execute( launcher.execute(
new Path("cygpath"), //$NON-NLS-1$ new Path("cygpath"), //$NON-NLS-1$
new String[] { "-u", paths[i] }, //$NON-NLS-1$ new String[] { "-u", paths[i] }, //$NON-NLS-1$
new String[0], new String[0],
new Path(".")); //$NON-NLS-1$ new Path(".")); //$NON-NLS-1$
if (launcher.waitAndRead(output, output) != CommandLauncher.OK) if (launcher.waitAndRead(out, out) != CommandLauncher.OK)
newpaths[i] = paths[i]; newpaths[i] = paths[i];
else else
newpaths[i] = output.toString().trim(); newpaths[i] = out.toString().trim();
} }
setParameters(newpaths); setParameters(newpaths);

View file

@ -4,20 +4,15 @@
*/ */
package org.eclipse.cdt.debug.mi.core; package org.eclipse.cdt.debug.mi.core;
import java.util.Collections;
import java.util.List;
import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.ICDISession; import org.eclipse.cdt.debug.core.cdi.ICDISession;
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
import org.eclipse.cdt.debug.mi.core.cdi.Session; import org.eclipse.cdt.debug.mi.core.cdi.Session;
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory; import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.CygwinCommandFactory; import org.eclipse.cdt.debug.mi.core.command.CygwinCommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIGDBSet; import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
import org.eclipse.cdt.debug.mi.core.output.MIInfo; import org.eclipse.cdt.debug.mi.core.output.MIInfo;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfiguration;

View file

@ -60,7 +60,7 @@ public class GDBTypeParser {
if (s == null) { if (s == null) {
s = new String(); s = new String();
} }
s = Pattern.compile("\\bconst\\b").matcher(s).replaceAll(""); s = Pattern.compile("\\bconst\\b").matcher(s).replaceAll(""); //$NON-NLS-1$//$NON-NLS-2$
s = s.trim(); s = s.trim();
// Initialize. // Initialize.

View file

@ -100,8 +100,8 @@ public class MIPlugin extends Plugin {
* @return MISession * @return MISession
*/ */
public MISession createMISession(Process process, PTY pty, int type) throws MIException { public MISession createMISession(Process process, PTY pty, int type) throws MIException {
MIPlugin plugin = getDefault(); MIPlugin miPlugin = getDefault();
Preferences prefs = plugin.getPluginPreferences(); Preferences prefs = miPlugin.getPluginPreferences();
int timeout = prefs.getInt(IMIConstants.PREF_REQUEST_TIMEOUT); int timeout = prefs.getInt(IMIConstants.PREF_REQUEST_TIMEOUT);
int launchTimeout = prefs.getInt(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT); int launchTimeout = prefs.getInt(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT);
return createMISession(process, pty, timeout, type, launchTimeout); return createMISession(process, pty, timeout, type, launchTimeout);
@ -389,8 +389,8 @@ public class MIPlugin extends Plugin {
syncStartup.start(); syncStartup.start();
synchronized (pgdb) { synchronized (pgdb) {
MIPlugin plugin = getDefault(); MIPlugin miPlugin = getDefault();
Preferences prefs = plugin.getPluginPreferences(); Preferences prefs = miPlugin.getPluginPreferences();
int launchTimeout = prefs.getInt(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT); int launchTimeout = prefs.getInt(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT);
while (syncStartup.isAlive()) { while (syncStartup.isAlive()) {
try { try {