Index: trunk/org.modelica.mdt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.modelica.mdt.ui/META-INF/MANIFEST.MF	(revision 471)
+++ trunk/org.modelica.mdt.ui/META-INF/MANIFEST.MF	(revision 472)
@@ -3,5 +3,5 @@
 Bundle-Name: Modelica Development Tooling UI
 Bundle-SymbolicName: org.modelica.mdt.ui; singleton:=true
-Bundle-Version: 0.6.4
+Bundle-Version: 0.6.5
 Bundle-Activator: org.modelica.mdt.ui.UIPlugin
 Bundle-Localization: plugin
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaBuildLaunchListener.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaBuildLaunchListener.java	(revision 471)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaBuildLaunchListener.java	(revision 472)
@@ -3,4 +3,5 @@
 
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchListener;
 import org.eclipse.debug.core.model.IProcess;
@@ -13,5 +14,9 @@
 	{
 		// TODO Auto-generated method stub
-		IFile launchFile = launch.getLaunchConfiguration().getFile();
+		if (launch == null) return;
+		ILaunchConfiguration launchConfig = launch.getLaunchConfiguration();
+		if (launchConfig == null) return;		
+		IFile launchFile = launchConfig.getFile();
+		if (launchFile == null) return; 
 		if (launchFile.getName().contains("OMDev") &&
 		    launchFile.getName().endsWith(".launch"))
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MarkProblemsVisitor.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MarkProblemsVisitor.java	(revision 471)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MarkProblemsVisitor.java	(revision 472)
@@ -72,5 +72,5 @@
 	protected int offset;
 	protected TextConsole console;
-    private boolean DEBUG = true;	
+    private boolean DEBUG = false;	
 	
 	public MarkProblemsVisitor(
@@ -116,6 +116,7 @@
 			IFile iFile = iResource.getProject().getFile(path);
 			//iFile = (IFile) iResource;
-			iFile.deleteMarkers(UIPlugin.METAMODELICA_BULD_MARKER_ID, false,
-					IResource.DEPTH_INFINITE);
+			// do not delete any markers, they are deleted someplace else
+			//iFile.deleteMarkers(UIPlugin.METAMODELICA_BULD_MARKER_ID, false,
+			//		IResource.DEPTH_INFINITE);
 	    	try
 	    	{
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MetaModelicaPatternMatchListener.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MetaModelicaPatternMatchListener.java	(revision 471)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MetaModelicaPatternMatchListener.java	(revision 472)
@@ -32,6 +32,6 @@
 	public static String ID = "org.modelica.mdt.ui.console.MetaModelicaPatternMatchListener";	
 
-	private String regexpMetaModelica = "\n(.*)\\:([0-9]*)\\.[0-9]*\\-[0-9]*\\.[0-9]*(.*)";
-	private String regexpGeneral = "\n([^:]+)\\:([0-9]+):(.*)";    	
+	private String regexpMetaModelica = "^([^:]+)\\:([0-9]*)\\.[0-9]*\\-[0-9]*\\.[0-9]*(.*)";
+	private String regexpGeneral = "^([^:]+)\\:([0-9]+):(.*)";    	
 
     private Pattern patternMetaModelica = Pattern.compile(regexpMetaModelica);
@@ -41,5 +41,5 @@
     private Matcher matcherGeneral;	
     
-    private boolean DEBUG = true;
+    private boolean DEBUG = false;
     private TextConsole omdevConsole;
     
@@ -83,4 +83,10 @@
 		}
 		
+		while(line.charAt(0) == '\n' || line.charAt(0) == '\r')
+		{
+			line = line.substring(1);
+			offset++;
+		}
+		
 		try
 		{
@@ -118,5 +124,5 @@
 						strLine, 
 						strMsg, 
-						offset+1, // +1 for \n 
+						offset,  
 						console);
 			IModelicaProject[] projects = ModelicaCore.getModelicaRoot().getProjects();
@@ -175,5 +181,5 @@
 	{
 		debug("getPattern");		
-		return "\n([^:]+)\\:([0-9]+)(.*)";
+		return "\n([^:\n\r]+)\\:([0-9]+)(.*)";
 	}	
 }
