builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/errorParsers/CarbideErrorParserTestHarness.java
equal
deleted
inserted
replaced
36 import org.eclipse.core.resources.IProject; |
36 import org.eclipse.core.resources.IProject; |
37 import org.eclipse.core.resources.IResource; |
37 import org.eclipse.core.resources.IResource; |
38 import org.eclipse.core.runtime.CoreException; |
38 import org.eclipse.core.runtime.CoreException; |
39 import org.eclipse.core.runtime.IPath; |
39 import org.eclipse.core.runtime.IPath; |
40 import org.eclipse.core.runtime.IProgressMonitor; |
40 import org.eclipse.core.runtime.IProgressMonitor; |
|
41 import org.eclipse.core.runtime.Path; |
41 import org.jdom.Attribute; |
42 import org.jdom.Attribute; |
42 import org.jdom.Comment; |
43 import org.jdom.Comment; |
43 import org.jdom.DefaultJDOMFactory; |
44 import org.jdom.DefaultJDOMFactory; |
44 import org.jdom.Document; |
45 import org.jdom.Document; |
45 import org.jdom.Element; |
46 import org.jdom.Element; |
242 if (expected.externalPath.toString().equals(EMPTY) == false) { |
243 if (expected.externalPath.toString().equals(EMPTY) == false) { |
243 Assert.fail("External path string IDE marker is null, expected value is " + expected.externalPath); |
244 Assert.fail("External path string IDE marker is null, expected value is " + expected.externalPath); |
244 } |
245 } |
245 } else { |
246 } else { |
246 if (result.externalPath.equals(expected.externalPath) == false) { |
247 if (result.externalPath.equals(expected.externalPath) == false) { |
247 // note: for some reason, on Unix, relative paths become full paths |
248 // note: since we're processing Win32-style paths in our input, these |
|
249 // get mangled on Unix. Ignore differences in relative vs. absolute |
248 if (result.externalPath.makeRelative().equals(expected.externalPath.makeRelative())) { |
250 if (result.externalPath.makeRelative().equals(expected.externalPath.makeRelative())) { |
249 // fine |
251 // fine |
250 } else { |
252 } else { |
251 Assert.assertEquals("External path string from IDE marker", expected.externalPath, result.externalPath); |
253 Assert.assertEquals("External path string from IDE marker", expected.externalPath, result.externalPath); |
252 return false; |
254 return false; |
298 |
300 |
299 Attribute variableNameNode = markerInfo.getAttribute(VARIABLE_NAME); |
301 Attribute variableNameNode = markerInfo.getAttribute(VARIABLE_NAME); |
300 variableName = variableNameNode.getValue(); |
302 variableName = variableNameNode.getValue(); |
301 |
303 |
302 Attribute externalPathStringNode = markerInfo.getAttribute(EXTERNAL_PATH_STRING); |
304 Attribute externalPathStringNode = markerInfo.getAttribute(EXTERNAL_PATH_STRING); |
303 externalPath = HostOS.createPathFromString(externalPathStringNode.getValue()); |
305 // need to regress to non-portability here, since CDT doesn't have the Win32 device hack that we do |
|
306 externalPath = new Path(externalPathStringNode.getValue().replaceAll("\\\\", "/")); |
304 |
307 |
305 ProblemMarkerInfo details = new ProblemMarkerInfo(file, lineNumber, description, severity, variableName, externalPath); |
308 ProblemMarkerInfo details = new ProblemMarkerInfo(file, lineNumber, description, severity, variableName, externalPath); |
306 xmlFilePromblemMarkerInfoList.add(details); |
309 xmlFilePromblemMarkerInfoList.add(details); |
307 |
310 |
308 } |
311 } |