• R/O
  • SSH
  • HTTPS

ginkgo: Commit


Commit MetaInfo

Revision115 (tree)
Time2008-10-24 18:46:20
Authoruk-ar

Log Message

(empty log message)

Change Summary

Incremental Difference

--- branches/for_merge/org.ginkgo.gcov/src/org/ginkgo/gcov/parser/CoverageSummaryParser.java (revision 114)
+++ branches/for_merge/org.ginkgo.gcov/src/org/ginkgo/gcov/parser/CoverageSummaryParser.java (revision 115)
@@ -12,7 +12,6 @@
1212 import java.util.regex.Pattern;
1313
1414 import org.eclipse.core.resources.IFile;
15-import org.eclipse.core.resources.IMarker;
1615 import org.eclipse.core.resources.IProject;
1716 import org.eclipse.core.resources.IResource;
1817 import org.eclipse.core.runtime.CoreException;
@@ -21,33 +20,24 @@
2120 import org.eclipse.core.runtime.IExtensionPoint;
2221 import org.eclipse.core.runtime.IExtensionRegistry;
2322 import org.eclipse.core.runtime.IPath;
24-import org.eclipse.core.runtime.IProgressMonitor;
25-import org.eclipse.core.runtime.IStatus;
2623 import org.eclipse.core.runtime.Platform;
27-import org.eclipse.core.runtime.QualifiedName;
28-import org.eclipse.core.runtime.Status;
2924 import org.eclipse.debug.core.DebugPlugin;
25+import org.eclipse.debug.core.ILaunchConfiguration;
26+import org.eclipse.debug.core.ILaunchConfigurationType;
3027 import org.eclipse.debug.core.ILaunchManager;
31-import org.eclipse.debug.core.IStreamListener;
3228 import org.eclipse.debug.core.Launch;
3329 import org.eclipse.debug.core.model.IProcess;
34-import org.eclipse.debug.core.model.IStreamMonitor;
35-import org.eclipse.osgi.util.NLS;
3630 import org.eclipse.swt.graphics.Color;
31+import org.eclipse.ui.PlatformUI;
3732 import org.eclipse.ui.console.ConsolePlugin;
3833 import org.eclipse.ui.console.IConsole;
3934 import org.eclipse.ui.console.IConsoleManager;
4035 import org.eclipse.ui.console.MessageConsole;
4136 import org.eclipse.ui.console.MessageConsoleStream;
42-import org.eclipse.ui.internal.Workbench;
43-import org.eclipse.ui.texteditor.MarkerUtilities;
4437 //import org.ginkgo.gcov.Activator;
4538 import org.ginkgo.gcov.GcovPlugin;
4639 import org.ginkgo.gcov.builder.ICoverageListener;
4740 import org.ginkgo.gcov.model.CoverageData;
48-import org.xml.sax.SAXException;
49-import org.xml.sax.SAXParseException;
50-import org.xml.sax.helpers.DefaultHandler;
5141
5242 public class CoverageSummaryParser implements IParser {
5343
@@ -58,8 +48,8 @@
5848 ArrayList<ICoverageListener> listeners = null;
5949
6050 public CoverageSummaryParser() {
61- funcPattern = Pattern.compile("Function `(.+)'");
62- filePattern = Pattern.compile("File `(.+)'");
51+ funcPattern = Pattern.compile("Function ['`](.+)'");
52+ filePattern = Pattern.compile("File ['`](.+)'");
6353 coveragePattern = Pattern.compile("Lines executed:(.+)% of (.+)$");
6454 }
6555
@@ -106,13 +96,23 @@
10696
10797 if (p != null) {
10898 // monitor.beginTask(NLS.bind(ExternalToolsProgramMessages.ProgramLaunchDelegate_3, new String[] {configuration.getName()}), IProgressMonitor.UNKNOWN);
109- process = DebugPlugin.newProcess(new Launch(null,ILaunchManager.RUN_MODE,null), p, programName, processAttributes);
110- //process = DebugPlugin.newProcess(launch, p, location.toOSString(), processAttributes);
111- if (process == null) {
112- p.destroy();
113-// throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, ExternalToolsProgramMessages.ProgramLaunchDelegate_4, null));
99+ ILaunchConfigurationType launchType = DebugPlugin
100+ .getDefault().getLaunchManager()
101+ .getLaunchConfigurationType(
102+ "org.eclipse.ui.externaltools.ProgramLaunchConfigurationType");
103+ try {
104+ ILaunchConfiguration lc = launchType.newInstance(null, "GNU coverage");
105+ process = DebugPlugin.newProcess(new Launch(lc,ILaunchManager.RUN_MODE,null), p, programName, processAttributes);
106+ //process = DebugPlugin.newProcess(launch, p, location.toOSString(), processAttributes);
107+ if (process == null) {
108+ p.destroy();
109+// throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, ExternalToolsProgramMessages.ProgramLaunchDelegate_4, null));
110+ }
111+
112+ } catch (CoreException e) {
113+ // TODO Auto-generated catch block
114+ e.printStackTrace();
114115 }
115-
116116 }
117117 while (!process.isTerminated()) {
118118 try {
@@ -160,7 +160,7 @@
160160 MessageConsoleStream commandStream = console.newMessageStream();
161161 commandStream.setActivateOnWrite(false);
162162 // commandStream.setActivateOnWrite(true);
163- commandStream.setColor(new Color(Workbench.getInstance().getDisplay(),0,0,255));
163+ commandStream.setColor(new Color(PlatformUI.getWorkbench().getDisplay(),0,0,255));
164164
165165 commandStream.print(">");
166166 commandStream.println(cmd);
@@ -220,11 +220,11 @@
220220 listeners = new ArrayList<ICoverageListener>();
221221 IExtensionRegistry registry = Platform.getExtensionRegistry();
222222
223- // 拡張ポイントを取得
223+ // ?ス?スg?ス?ス?ス?ス?ス?ス|?ス?スC?ス?ス?ス?ス?ス?スg?ス?ス?ス?ス隰ォ?セ
224224 IExtensionPoint point = registry.getExtensionPoint(
225225 GcovPlugin.getDefault().getBundle().getSymbolicName() + ".listeners");
226226
227- // コントリビュートされた拡張を取得
227+ // ?ス?スR?ス?ス?ス?ス?ス?スg?ス?ス?ス?ス?ス?スr?ス?ス?ス?ス?ス?ス[?ス?スg?ス?ス?ス?ス?ス?ス鮟キ?ス?ス?スg?ス?ス?ス?ス?ス?ス?ス?ス隰ォ?セ
228228 IExtension[] extensions = point.getExtensions();
229229
230230 for(int i=0;i<extensions.length;i++){
@@ -232,7 +232,7 @@
232232 for(int j=0;j<elements.length;j++){
233233 if(elements[j].getName().equals("provider")){
234234 try {
235- // class属性で指定されたクラスのインスタンスを取得
235+ // class?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス??欠?ス?ス髢ァ?ウ?ス?ス鮟キ?ス?ス?スN?ス?ス?ス?ス?ス?スX?ス?ス?後う?ス?ス?ス?ス?ス?スX?ス?ス^?ス?ス?ス?ス?ス?スX?ス?ス?ス?ス隰ォ?セ
236236 ICoverageListener provider
237237 = (ICoverageListener)elements[j].createExecutableExtension("class");
238238 listeners.add(provider);
Show on old repository browser