(empty log message)
@@ -12,7 +12,6 @@ | ||
12 | 12 | import java.util.regex.Pattern; |
13 | 13 | |
14 | 14 | import org.eclipse.core.resources.IFile; |
15 | -import org.eclipse.core.resources.IMarker; | |
16 | 15 | import org.eclipse.core.resources.IProject; |
17 | 16 | import org.eclipse.core.resources.IResource; |
18 | 17 | import org.eclipse.core.runtime.CoreException; |
@@ -21,33 +20,24 @@ | ||
21 | 20 | import org.eclipse.core.runtime.IExtensionPoint; |
22 | 21 | import org.eclipse.core.runtime.IExtensionRegistry; |
23 | 22 | import org.eclipse.core.runtime.IPath; |
24 | -import org.eclipse.core.runtime.IProgressMonitor; | |
25 | -import org.eclipse.core.runtime.IStatus; | |
26 | 23 | import org.eclipse.core.runtime.Platform; |
27 | -import org.eclipse.core.runtime.QualifiedName; | |
28 | -import org.eclipse.core.runtime.Status; | |
29 | 24 | import org.eclipse.debug.core.DebugPlugin; |
25 | +import org.eclipse.debug.core.ILaunchConfiguration; | |
26 | +import org.eclipse.debug.core.ILaunchConfigurationType; | |
30 | 27 | import org.eclipse.debug.core.ILaunchManager; |
31 | -import org.eclipse.debug.core.IStreamListener; | |
32 | 28 | import org.eclipse.debug.core.Launch; |
33 | 29 | import org.eclipse.debug.core.model.IProcess; |
34 | -import org.eclipse.debug.core.model.IStreamMonitor; | |
35 | -import org.eclipse.osgi.util.NLS; | |
36 | 30 | import org.eclipse.swt.graphics.Color; |
31 | +import org.eclipse.ui.PlatformUI; | |
37 | 32 | import org.eclipse.ui.console.ConsolePlugin; |
38 | 33 | import org.eclipse.ui.console.IConsole; |
39 | 34 | import org.eclipse.ui.console.IConsoleManager; |
40 | 35 | import org.eclipse.ui.console.MessageConsole; |
41 | 36 | import org.eclipse.ui.console.MessageConsoleStream; |
42 | -import org.eclipse.ui.internal.Workbench; | |
43 | -import org.eclipse.ui.texteditor.MarkerUtilities; | |
44 | 37 | //import org.ginkgo.gcov.Activator; |
45 | 38 | import org.ginkgo.gcov.GcovPlugin; |
46 | 39 | import org.ginkgo.gcov.builder.ICoverageListener; |
47 | 40 | 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; | |
51 | 41 | |
52 | 42 | public class CoverageSummaryParser implements IParser { |
53 | 43 |
@@ -58,8 +48,8 @@ | ||
58 | 48 | ArrayList<ICoverageListener> listeners = null; |
59 | 49 | |
60 | 50 | public CoverageSummaryParser() { |
61 | - funcPattern = Pattern.compile("Function `(.+)'"); | |
62 | - filePattern = Pattern.compile("File `(.+)'"); | |
51 | + funcPattern = Pattern.compile("Function ['`](.+)'"); | |
52 | + filePattern = Pattern.compile("File ['`](.+)'"); | |
63 | 53 | coveragePattern = Pattern.compile("Lines executed:(.+)% of (.+)$"); |
64 | 54 | } |
65 | 55 |
@@ -106,13 +96,23 @@ | ||
106 | 96 | |
107 | 97 | if (p != null) { |
108 | 98 | // 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(); | |
114 | 115 | } |
115 | - | |
116 | 116 | } |
117 | 117 | while (!process.isTerminated()) { |
118 | 118 | try { |
@@ -160,7 +160,7 @@ | ||
160 | 160 | MessageConsoleStream commandStream = console.newMessageStream(); |
161 | 161 | commandStream.setActivateOnWrite(false); |
162 | 162 | // 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)); | |
164 | 164 | |
165 | 165 | commandStream.print(">"); |
166 | 166 | commandStream.println(cmd); |
@@ -220,11 +220,11 @@ | ||
220 | 220 | listeners = new ArrayList<ICoverageListener>(); |
221 | 221 | IExtensionRegistry registry = Platform.getExtensionRegistry(); |
222 | 222 | |
223 | - // 拡張ポイントを取得 | |
223 | + // ?ス?スg?ス?ス?ス?ス?ス?ス|?ス?スC?ス?ス?ス?ス?ス?スg?ス?ス?ス?ス隰ォ?セ | |
224 | 224 | IExtensionPoint point = registry.getExtensionPoint( |
225 | 225 | GcovPlugin.getDefault().getBundle().getSymbolicName() + ".listeners"); |
226 | 226 | |
227 | - // コントリビュートされた拡張を取得 | |
227 | + // ?ス?スR?ス?ス?ス?ス?ス?スg?ス?ス?ス?ス?ス?スr?ス?ス?ス?ス?ス?ス[?ス?スg?ス?ス?ス?ス?ス?ス鮟キ?ス?ス?スg?ス?ス?ス?ス?ス?ス?ス?ス隰ォ?セ | |
228 | 228 | IExtension[] extensions = point.getExtensions(); |
229 | 229 | |
230 | 230 | for(int i=0;i<extensions.length;i++){ |
@@ -232,7 +232,7 @@ | ||
232 | 232 | for(int j=0;j<elements.length;j++){ |
233 | 233 | if(elements[j].getName().equals("provider")){ |
234 | 234 | try { |
235 | - // class属性で指定されたクラスのインスタンスを取得 | |
235 | + // class?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス??欠?ス?ス髢ァ?ウ?ス?ス鮟キ?ス?ス?スN?ス?ス?ス?ス?ス?スX?ス?ス?後う?ス?ス?ス?ス?ス?スX?ス?ス^?ス?ス?ス?ス?ス?スX?ス?ス?ス?ス隰ォ?セ | |
236 | 236 | ICoverageListener provider |
237 | 237 | = (ICoverageListener)elements[j].createExecutableExtension("class"); |
238 | 238 | listeners.add(provider); |