mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
cleanup
This commit is contained in:
parent
c58ca88557
commit
7c4114a401
6 changed files with 4 additions and 16 deletions
|
@ -26,7 +26,6 @@ public class ProcessList implements IProcessList {
|
||||||
public IProcessInfo [] getProcessList() {
|
public IProcessInfo [] getProcessList() {
|
||||||
File proc = new File("/proc");
|
File proc = new File("/proc");
|
||||||
File[] pidFiles = null;
|
File[] pidFiles = null;
|
||||||
String[] pidNames = null;
|
|
||||||
|
|
||||||
// We are only interrested in the pid so filter the rest out.
|
// We are only interrested in the pid so filter the rest out.
|
||||||
try {
|
try {
|
||||||
|
@ -34,7 +33,7 @@ public class ProcessList implements IProcessList {
|
||||||
public boolean accept(File dir, String name) {
|
public boolean accept(File dir, String name) {
|
||||||
boolean isPID = false;
|
boolean isPID = false;
|
||||||
try {
|
try {
|
||||||
int pid = Integer.parseInt(name);
|
Integer.parseInt(name);
|
||||||
isPID = true;
|
isPID = true;
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
package org.eclipse.cdt.internal.core.win32;
|
package org.eclipse.cdt.internal.core.win32;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.StreamTokenizer;
|
import java.io.StreamTokenizer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.core.IProcessInfo;
|
import org.eclipse.cdt.core.IProcessInfo;
|
||||||
import org.eclipse.cdt.core.IProcessList;
|
import org.eclipse.cdt.core.IProcessList;
|
||||||
|
@ -43,7 +41,6 @@ public class ProcessList implements IProcessList {
|
||||||
}
|
}
|
||||||
in = p .getInputStream();
|
in = p .getInputStream();
|
||||||
InputStreamReader reader = new InputStreamReader(in);
|
InputStreamReader reader = new InputStreamReader(in);
|
||||||
String line;
|
|
||||||
StreamTokenizer tokenizer = new StreamTokenizer(reader);
|
StreamTokenizer tokenizer = new StreamTokenizer(reader);
|
||||||
tokenizer.eolIsSignificant(true);
|
tokenizer.eolIsSignificant(true);
|
||||||
tokenizer.parseNumbers();
|
tokenizer.parseNumbers();
|
||||||
|
|
|
@ -5,17 +5,14 @@ package org.eclipse.cdt.core.model;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.cdt.internal.core.model.CModelManager;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IFolder;
|
import org.eclipse.core.resources.IFolder;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
//import org.eclipse.cdt.core.model.ICElement;
|
|
||||||
import org.eclipse.cdt.internal.core.model.CModelManager;
|
|
||||||
|
|
||||||
// This should be done in the Plugin.
|
// This should be done in the Plugin.
|
||||||
|
|
||||||
public class CoreModel {
|
public class CoreModel {
|
||||||
|
|
|
@ -124,8 +124,6 @@ public class CCorePlugin extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public IConsole getConsole(String id) {
|
public IConsole getConsole(String id) {
|
||||||
IConsole consoleDocument = null;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint("CBuildConsole");
|
IExtensionPoint extension = getDescriptor().getExtensionPoint("CBuildConsole");
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
|
@ -136,7 +134,7 @@ public class CCorePlugin extends Plugin {
|
||||||
String builderID = configElements[j].getAttribute("builderID");
|
String builderID = configElements[j].getAttribute("builderID");
|
||||||
if ( (id == null && builderID == null) ||
|
if ( (id == null && builderID == null) ||
|
||||||
( id != null && builderID.equals(id))) {
|
( id != null && builderID.equals(id))) {
|
||||||
return consoleDocument = (IConsole)configElements[j].createExecutableExtension("class");
|
return (IConsole)configElements[j].createExecutableExtension("class");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@ public class CDescriptorManager implements IResourceChangeListener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IResource resource = event.getResource();
|
IResource resource = event.getResource();
|
||||||
IResourceDelta delta = event.getDelta();
|
|
||||||
if ( event.getType() == IResourceChangeEvent.PRE_DELETE ) {
|
if ( event.getType() == IResourceChangeEvent.PRE_DELETE ) {
|
||||||
if(resource.getType() == IResource.PROJECT ) {
|
if(resource.getType() == IResource.PROJECT ) {
|
||||||
fDescriptorMap.remove(resource);
|
fDescriptorMap.remove(resource);
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.cdt.internal.core;
|
package org.eclipse.cdt.internal.core;
|
||||||
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.ICDescriptor;
|
import org.eclipse.cdt.core.ICDescriptor;
|
||||||
import org.eclipse.cdt.core.ICOwner;
|
import org.eclipse.cdt.core.ICOwner;
|
||||||
|
|
Loading…
Add table
Reference in a new issue