1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

Cleanup commented printouts

Change-Id: I2c0850456401cde432b3489f334614e06e27d58c
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/36270
This commit is contained in:
Marc Khouzam 2014-11-11 06:00:08 -05:00
parent 5e9f4f0d1f
commit bb5d400d4f
12 changed files with 3 additions and 117 deletions

View file

@ -21,7 +21,6 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
@Override
public void initialize(IWorkbenchConfigurer configurer) {
// TODO Auto-generated method stub
super.initialize(configurer);
configurer.setSaveAndRestore(false);
}

View file

@ -57,9 +57,6 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
private ILaunchConfiguration config;
private class StartupException extends FileNotFoundException {
/**
*
*/
private static final long serialVersionUID = 1L;
public StartupException(String s) {
@ -87,17 +84,6 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
configurer.setTitle(Messages.Debugger_Title);
}
// private class CWDTracker implements IWorkingDirectoryTracker {
//
// @Override
// public URI getWorkingDirectoryURI() {
// return null;
// }
//
// }
@Override
public void postWindowCreate() {
super.postWindowCreate();
@ -154,10 +140,9 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
String buildLog = null;
String arguments = null;
String[] args = Platform.getCommandLineArgs();
// System.out.println("program args length is " + args.length);
try {
for (int i = 0; i < args.length; ++i) {
// System.out.println("arg <" + i + "> is " + args[i]);
if ("-application".equals(args[i]))
i++; // ignore the application specifier
else if ("-product".equals(args[i]))
@ -358,21 +343,18 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
monitor.worked(7);
}
if (config != null) {
// System.out.println("about to add job change listener");
final JobContainer LaunchJobs = new JobContainer();
Job.getJobManager().addJobChangeListener(new JobChangeAdapter() {
@Override
public void scheduled(IJobChangeEvent event) {
Job job = event.getJob();
// System.out.println("Job name is " + job.getName());
if (job.getName().contains(config.getName()))
LaunchJobs.setLaunchJob(job);
}
@Override
public void done(IJobChangeEvent event) {
// System.out.println("Job " + event.getJob().getName() + " is done");
}
});
monitor.subTask(Messages.LaunchingConfig);
@ -381,7 +363,6 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
@Override
public void run() {
DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
// System.out.println("about to join " + LaunchJobs.getLaunchJob());
}
});
if (LaunchJobs.getLaunchJob() != null) {
@ -394,20 +375,15 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
}
}
}
// System.out.println("end");
} catch (InterruptedException e) {
// System.out.println("Interrupted exception");
throw e; // rethrow exception
} catch (CoreException e) {
// System.out.println("Core Exception");
e.printStackTrace();
} catch (StartupException e) {
// do nothing..just quit
} catch (Exception e) {
// System.out.println("Exception");
e.printStackTrace();
} finally {
// System.out.println("Finally");
monitor.done();
}
}

View file

@ -78,9 +78,6 @@ Workbench_addTaskToolTip=Add Task
Workbench_delete=&Delete
Workbench_deleteToolTip=Delete
ShowViewMenuName=Show &View
CoreFileMenuName=Debug &Core File...

View file

@ -87,13 +87,10 @@ public class BuildOptionsParser implements IWorkspaceRunnable, IMarkerGenerator
br.close();
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
monitor.done();

View file

@ -125,8 +125,6 @@ public class CompilerOptionParser implements IWorkspaceRunnable {
(ICompileOptionsFinder) reader;
for (String fileName : sourceFiles) {
parser.setCurrentResourceName(fileName);
// String cmdline = f.getCompileOptions(fileName);
// System.out.println("Command line is " + cmdline);
parser.processLine(f
.getCompileOptions(fileName));
monitor.worked(1);
@ -135,10 +133,8 @@ public class CompilerOptionParser implements IWorkspaceRunnable {
monitor.worked(1);
}
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
monitor.done();
@ -159,6 +155,4 @@ public class CompilerOptionParser implements IWorkspaceRunnable {
return currentFolder;
}
};

View file

@ -18,7 +18,6 @@ public class CustomizePerspectiveHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// TODO Auto-generated method stub
return null;
}

View file

@ -160,7 +160,6 @@ public class DebugAttachedExecutable {
}
}
// System.out.println("creating language settings providers");
// Create all the LanguageSettingsProviders
List<ILanguageSettingsProvider> providers = LanguageSettingsManager
.createLanguageSettingsProviders(langProviderIds);
@ -171,13 +170,10 @@ public class DebugAttachedExecutable {
monitor.worked(1);
// System.out.println("before setProjectDescription");
// Update the project description.
projDescManager.setProjectDescription(project,
projectDescription);
// System.out.println("after setProjectDescription");
// Serialize the language settings for the project now in case we don't run a
// language settings provider which will do this in shutdown.
@ -205,7 +201,7 @@ public class DebugAttachedExecutable {
activePage.closeAllEditors(false);
}
}
// System.out.println("about to create launch configuration");
config = createConfiguration(true);
monitor.worked(1);
return config;
@ -217,7 +213,6 @@ public class DebugAttachedExecutable {
}
protected static ILaunchConfiguration createConfiguration(boolean save) {
// System.out.println("creating launch configuration");
ILaunchConfiguration config = null;
try {
ILaunchConfigurationType configType = getLaunchConfigType();

View file

@ -30,56 +30,23 @@ public class DebugAttachedExecutableHandler extends AbstractHandler {
try {
final ILaunchConfiguration config = DebugAttachedExecutable.createLaunchConfig(new NullProgressMonitor(), null);
if (config != null) {
// System.out.println("about to add job change listener");
// final JobContainer LaunchJobs = new JobContainer();
// Job.getJobManager().addJobChangeListener(new JobChangeAdapter() {
//
// @Override
// public void scheduled(IJobChangeEvent event) {
// Job job = event.getJob();
// // System.out.println("Job name is " + job.getName());
// if (job.getName().contains(config.getName()))
// LaunchJobs.setLaunchJob(job);
// }
//
// @Override
// public void done(IJobChangeEvent event) {
// // System.out.println("Job " + event.getJob().getName() + " is done");
// }
// });
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
// System.out.println("about to join " + LaunchJobs.getLaunchJob());
}
});
// if (LaunchJobs.getLaunchJob() != null) {
// try {
// LaunchJobs.getLaunchJob().join();
// } catch (InterruptedException e) {
// IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
// Messages.LaunchInterruptedError, e);
// ResourcesPlugin.getPlugin().getLog().log(status);
// }
// }
}
// System.out.println("end");
} catch (InterruptedException e) {
// System.out.println("Interrupted exception");
e.printStackTrace();
} catch (CoreException e) {
// System.out.println("Core Exception");
e.printStackTrace();
} catch (Exception e) {
// System.out.println("Exception");
e.printStackTrace();
} finally {
// System.out.println("Finally");
}
return null;
}

View file

@ -43,7 +43,6 @@ public class DebugCoreFile {
throws CoreException, InterruptedException {
ILaunchConfiguration config = null;
// System.out.println("about to create launch configuration");
config = createConfiguration(coreFile, executable, true);
monitor.worked(1);
return config;
@ -55,7 +54,6 @@ public class DebugCoreFile {
}
protected static ILaunchConfiguration createConfiguration(String corePath, String exePath, boolean save) {
// System.out.println("creating launch configuration");
ILaunchConfiguration config = null;
try {
ILaunchConfigurationType configType = getLaunchConfigType();

View file

@ -43,31 +43,16 @@ public class DebugCoreFileHandler extends AbstractHandler {
@Override
public void run() {
DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
// System.out.println("about to join " + LaunchJobs.getLaunchJob());
}
});
// if (LaunchJobs.getLaunchJob() != null) {
// try {
// LaunchJobs.getLaunchJob().join();
// } catch (InterruptedException e) {
// IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
// Messages.LaunchInterruptedError, e);
// ResourcesPlugin.getPlugin().getLog().log(status);
// }
// }
}
// System.out.println("end");
} catch (InterruptedException e) {
// System.out.println("Interrupted exception");
e.printStackTrace();
} catch (CoreException e) {
// System.out.println("Core Exception");
e.printStackTrace();
} catch (Exception e) {
// System.out.println("Exception");
e.printStackTrace();
} finally {
// System.out.println("Finally");
}
}

View file

@ -101,7 +101,6 @@ public class DebugExecutable {
monitor.worked(1);
// Find last launch if one exists
String memento = ResourcesPlugin.getWorkspace().getRoot().getPersistentProperty(new QualifiedName(STANDALONE_QUALIFIER, LAST_LAUNCH));
// System.out.println("memento is " + memento);
if (memento != null) {
ILaunchConfiguration lastConfiguration = getLaunchManager().getLaunchConfiguration(memento);
try {
@ -141,7 +140,6 @@ public class DebugExecutable {
importJob.join();
monitor.worked(3);
if (importJob.getResult() == Status.OK_STATUS) {
// System.out.println("importJob successful");
// See if the default project exists
Collection<Executable> executables = ExecutablesManager.getExecutablesManager().getExecutables();
for (Executable exec : executables) {
@ -213,7 +211,6 @@ public class DebugExecutable {
}
}
// System.out.println("creating language settings providers");
// Create all the LanguageSettingsProviders
List<ILanguageSettingsProvider> providers = LanguageSettingsManager
.createLanguageSettingsProviders(langProviderIds);
@ -223,8 +220,6 @@ public class DebugExecutable {
.setLanguageSettingProviders(providers);
monitor.worked(1);
// System.out.println("before setProjectDescription");
// Update the project description.
projDescManager.setProjectDescription(project,
@ -237,8 +232,6 @@ public class DebugExecutable {
false);
LanguageSettingsManager.serializeLanguageSettings(projDescReadOnly);
// System.out.println("after setProjectDescription");
monitor.worked(1);
if (!("".equals(executable)))
@ -256,7 +249,6 @@ public class DebugExecutable {
ResourcesPlugin.getWorkspace().getRoot(), IWorkspace.AVOID_UPDATE, new NullProgressMonitor());
}
// System.out.println("about to close all editors");
IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench != null) {
final IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
@ -266,7 +258,7 @@ public class DebugExecutable {
activePage.closeAllEditors(false);
}
}
// System.out.println("about to create launch configuration");
config = createConfiguration(executable, arguments, buildLog, true);
// If we are starting up the debugger, save the executable as the default executable to use
if (startup) {
@ -286,10 +278,8 @@ public class DebugExecutable {
"org.eclipse.cdt.launch.applicationLaunchType"); //$NON-NLS-1$
}
protected static ILaunchConfiguration createConfiguration(String bin,
String arguments, String buildLog, boolean save) {
// System.out.println("creating launch configuration");
ILaunchConfiguration config = null;
try {
String progName = bin;
@ -321,5 +311,4 @@ public class DebugExecutable {
}
return config;
}
}

View file

@ -50,21 +50,18 @@ public class DebugNewExecutableHandler extends AbstractHandler {
try {
final ILaunchConfiguration config = DebugExecutable.importAndCreateLaunchConfig(new NullProgressMonitor(), executable, buildLog, arguments, false);
if (config != null) {
// System.out.println("about to add job change listener");
final JobContainer LaunchJobs = new JobContainer();
Job.getJobManager().addJobChangeListener(new JobChangeAdapter() {
@Override
public void scheduled(IJobChangeEvent event) {
Job job = event.getJob();
// System.out.println("Job name is " + job.getName());
if (job.getName().contains(config.getName()))
LaunchJobs.setLaunchJob(job);
}
@Override
public void done(IJobChangeEvent event) {
// System.out.println("Job " + event.getJob().getName() + " is done");
}
});
Display.getDefault().syncExec(new Runnable() {
@ -72,7 +69,6 @@ public class DebugNewExecutableHandler extends AbstractHandler {
@Override
public void run() {
DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
// System.out.println("about to join " + LaunchJobs.getLaunchJob());
}
});
if (LaunchJobs.getLaunchJob() != null) {
@ -85,22 +81,16 @@ public class DebugNewExecutableHandler extends AbstractHandler {
}
}
}
// System.out.println("end");
} catch (InterruptedException e) {
// System.out.println("Interrupted exception");
e.printStackTrace();
} catch (CoreException e) {
// System.out.println("Core Exception");
e.printStackTrace();
} catch (Exception e) {
// System.out.println("Exception");
e.printStackTrace();
} finally {
// System.out.println("Finally");
}
}
return null;
}