- Timestamp:
- 11/09/05 15:42:45 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/util/Area51Projects.java
r126 r128 49 49 import org.eclipse.core.resources.IFile; 50 50 import org.eclipse.core.resources.IFolder; 51 import org.eclipse.core.resources.IMarker;52 51 import org.eclipse.core.resources.IProject; 53 52 import org.eclipse.core.resources.ResourcesPlugin; … … 291 290 { 292 291 return new ByteArrayInputStream(content.getBytes()); 293 } 294 295 // TODO just toying around, remove me ! 296 public static void createProblemMarker() 297 { 298 // THIS is how you do a problem marker 299 try 300 { 301 createProjects(); // we need a project to add problem marker to 302 303 IFile file = modelica_project.getFile("problem_model.mo"); 304 305 String contents = 306 "model problem_model\n" + 307 "\n" + 308 "end problem_model;\n"; 309 310 file.create(getByteStream(contents), true, null); 311 312 IMarker marker = file.createMarker(IMarker.PROBLEM); 313 marker.setAttribute(IMarker.CHAR_START, 10); 314 marker.setAttribute(IMarker.CHAR_END, 15); 315 marker.setAttribute(IMarker.MESSAGE, "ojoj"); 316 marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); 317 marker.setAttribute(IMarker.LINE_NUMBER, 3); 318 marker.setAttribute(IMarker.LOCATION, "ajsjklasdfsdf"); 319 } 320 321 catch (Exception e) 322 { 323 Assert.fail("did not go all to well"); 324 } 325 326 } 292 } 327 293 } 328 294
Note: See TracChangeset
for help on using the changeset viewer.