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 466)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaBuildLaunchListener.java	(revision 466)
@@ -0,0 +1,34 @@
+
+package org.modelica.mdt.ui;
+
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchListener;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.core.resources.*;
+
+public class MetaModelicaBuildLaunchListener implements ILaunchListener
+{
+
+	public void launchAdded(ILaunch launch)
+	{
+		// TODO Auto-generated method stub
+		IFile launchFile = launch.getLaunchConfiguration().getFile();
+		if (launchFile.getName().contains("OMDev") &&
+		    launchFile.getName().endsWith(".launch"))
+		{
+			UIPlugin.getDefault().deleteMarkers();
+		}
+	}
+
+	public void launchChanged(ILaunch launch)
+	{
+		// TODO Auto-generated method stub
+	}
+
+	public void launchRemoved(ILaunch launch)
+	{
+		// TODO Auto-generated method stub
+	}
+	
+
+}
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaJobListener.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaJobListener.java	(revision 466)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/MetaModelicaJobListener.java	(revision 466)
@@ -0,0 +1,49 @@
+
+package org.modelica.mdt.ui;
+
+import org.eclipse.core.runtime.jobs.*; 
+import org.eclipse.debug.core.DebugPlugin;
+
+public class MetaModelicaJobListener implements IJobChangeListener
+{
+	private boolean DEBUG = false;
+	
+    protected void debug(String message)
+    {
+    	if (DEBUG) System.out.println("MetaModelicaJobListener: " + message);
+    }
+	
+	public void aboutToRun(IJobChangeEvent event) 
+	{
+		debug("aboutToRun: " + event.getJob().getName());
+		debug("aboutToRunRule: " + event.getJob().getRule().toString());
+		// delete the markers before we run the job			
+		//if (event.getJob().getName().equals("Building workspace"))
+		//	UIPlugin.getDefault().deleteMarkers();
+	}
+  
+	public void awake(IJobChangeEvent event) 
+	{
+		debug("awake: " + event.getJob().getName());	}
+	
+	public void done(IJobChangeEvent event) 
+	{
+		debug("done: " + event.getJob().getName());		
+	}
+	
+	public void running(IJobChangeEvent event) 
+	{
+		debug("running: " + event.getJob().getName());		
+	}
+	
+	public void scheduled(IJobChangeEvent event) 
+	{
+		debug("scheduled: " + event.getJob().getName());		
+	}
+	
+	public void sleeping(IJobChangeEvent event) 
+	{
+		debug("sleeping: " + event.getJob().getName());
+	}
+
+}
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/ModelicaElementContentProvider.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/ModelicaElementContentProvider.java	(revision 465)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/ModelicaElementContentProvider.java	(revision 466)
@@ -46,5 +46,7 @@
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -61,4 +63,6 @@
 import org.modelica.mdt.internal.core.CorePlugin;
 import org.modelica.mdt.internal.core.ErrorManager;
+import org.eclipse.jface.util.Assert;
+import org.modelica.mdt.core.IModelicaElement;
 
 /**
@@ -270,7 +274,10 @@
 	{
 		  for (IModelicaElementChange change : changes)
-		  {
+		  {			  
+			  Assert.isNotNull(change);			  
+			  if (change == null) continue;
 			  Object element = change.getElement();
-
+			  Assert.isNotNull(element);			  
+			  if (element == null) continue;
 			  switch (change.getChangeType())
 			  {
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/ModelicaElementFactory.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/ModelicaElementFactory.java	(revision 465)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/ModelicaElementFactory.java	(revision 466)
@@ -45,4 +45,5 @@
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.util.Assert;
 import org.eclipse.ui.IElementFactory;
 import org.eclipse.ui.IMemento;
@@ -86,4 +87,11 @@
 	public IAdaptable createElement(IMemento memento)
 	{
+		Assert.isNotNull(memento);
+		if (memento == null) 
+		{
+			ErrorManager.logBug(UIPlugin.getSymbolicName(),
+			"the memento is null");			
+			return null;
+		}
 		Integer storedClass = memento.getInteger(STORED_CLASS_KEY);
 		
@@ -91,4 +99,6 @@
 		{
 			/* we don't know what class is stored in this memento, fail */
+			ErrorManager.logBug(UIPlugin.getSymbolicName(),
+			"class stored in the memento is null");
 			return null;
 		}
@@ -100,4 +110,7 @@
 		case SYSTEM_FILE_EDITOR_INPUT:
 			return restoreSystemFileEditorInput(memento);
+		default:
+			ErrorManager.logBug(UIPlugin.getSymbolicName(),
+			"unknow class stored in the memento");			
 		}
 		
Index: trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/UIPlugin.java
===================================================================
--- trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/UIPlugin.java	(revision 465)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/UIPlugin.java	(revision 466)
@@ -4,10 +4,20 @@
 import org.eclipse.swt.widgets.Widget;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdapterFactory;
 import org.eclipse.core.runtime.IAdapterManager;
 import org.eclipse.core.runtime.Platform;
 import org.modelica.mdt.core.IModelicaElement;
+import org.modelica.mdt.core.IModelicaProject;
+import org.modelica.mdt.core.ModelicaCore;
 import org.osgi.framework.BundleContext;
 import org.modelica.mdt.ui.text.ModelicaTextTools;
+import java.util.*;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.debug.core.DebugPlugin;
 
 /**
@@ -17,4 +27,11 @@
 {
 	private ModelicaTextTools fModelicaTextTools;
+	//private List<IFile> markedFiles;
+	//private MetaModelicaJobListener jobListener;
+	private MetaModelicaBuildLaunchListener buildMetaModelicaLanuchListner;
+
+	
+	public static final String METAMODELICA_BULD_MARKER_ID =
+		"org.modelica.mdt.ui.MetaModelicaBuildMarker";
 	
 	/* the shared instance */
@@ -37,4 +54,9 @@
 
 		manager.registerAdapters(factory, IModelicaElement.class);
+		//jobListener = new MetaModelicaJobListener();
+		//Platform.getJobManager().addJobChangeListener(jobListener);
+		buildMetaModelicaLanuchListner = new MetaModelicaBuildLaunchListener();
+		DebugPlugin.getDefault().getLaunchManager().addLaunchListener(buildMetaModelicaLanuchListner);
+		//markedFiles = new Vector<IFile>();
 	}
 
@@ -46,4 +68,8 @@
 		super.stop(context);			
 		plugin = null;
+		//markedFiles.clear();
+		//markedFiles = null;
+		//Platform.getJobManager().removeJobChangeListener(jobListener);
+		DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(buildMetaModelicaLanuchListner);		
 	}
 
@@ -96,3 +122,53 @@
 	}
 	
+	public void deleteMarkers()
+	{
+		System.out.println("DeleteMarkers Called!");
+		IModelicaProject[] projects = ModelicaCore.getModelicaRoot().getProjects();
+		for (IModelicaProject project: projects)
+		{
+			if (project == null) continue;
+			IProject pro = project.getWrappedProject();
+			if (pro == null) continue;
+			if (!pro.isOpen()) continue;
+			try
+			{
+				pro.deleteMarkers(IMarker.PROBLEM, false, IResource.DEPTH_INFINITE);				
+				pro.deleteMarkers(UIPlugin.METAMODELICA_BULD_MARKER_ID, false, IResource.DEPTH_INFINITE);
+			}
+			catch(CoreException c)
+			{
+				c.printStackTrace();
+			}
+		}
+		/*
+		if (markedFiles == null) return;
+		for (IFile file : markedFiles)
+		{	
+			try
+			{
+				file.deleteMarkers(UIPlugin.METAMODELICA_BULD_MARKER_ID, false, IResource.DEPTH_INFINITE);			
+			}
+			catch(Exception e)
+			{	
+			}
+		}
+		markedFiles.clear();
+		*/
+	}
+	
+//	public void addMarkedFile(IFile file)
+//	{
+//		markedFiles.add(file);
+//	}
+//	
+//	public void deleteMarkedFile(IFile file)
+//	{
+//		markedFiles.remove(file);
+//	}
+//
+//	public boolean containsMarkedFile(IFile file)
+//	{
+//		return markedFiles.contains(file);
+//	}
 }
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 466)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MarkProblemsVisitor.java	(revision 466)
@@ -0,0 +1,208 @@
+/*
+ * This file is part of Modelica Development Tooling.
+ *
+ * Copyright (c) 2005, Link�pings universitet, Department of
+ * Computer and Information Science, PELAB
+ *
+ * All rights reserved.
+ *
+ * (The new BSD license, see also
+ * http://www.opensource.org/licenses/bsd-license.php)
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in
+ *   the documentation and/or other materials provided with the
+ *   distribution.
+ *
+ * * Neither the name of Link�pings universitet nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.modelica.mdt.ui.console;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.ui.console.FileLink;
+import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+import org.modelica.mdt.internal.core.ErrorManager;
+import org.modelica.mdt.ui.UIPlugin;
+
+/**
+ * Visitor used to load set markers on files with problems
+ * 
+ * @author Adrian Pop
+ */
+public class MarkProblemsVisitor implements IResourceVisitor
+{
+	protected String strFileName;
+	protected String strLine;
+	protected String strMsg;
+	protected int offset;
+	protected TextConsole console;
+    private boolean DEBUG = true;	
+	
+	public MarkProblemsVisitor(
+			String problemFileName, 
+			String problemLine, 
+			String problemMessage, 
+			int problemOffset, 
+			TextConsole problemConsole)
+	{
+		strFileName = problemFileName;
+		strLine = problemLine;
+		strMsg = problemMessage;
+		offset = problemOffset;
+		console = problemConsole;
+		String value = Platform.getDebugOption  /*load trace/ConsolePatternMatching flag */
+		("org.modelica.mdt.omc/trace/MarkProblemsVisitor");
+		if (value != null && value.equalsIgnoreCase("true"))
+		{
+			DEBUG = true;
+		}
+		debug("constructor");    	
+    }
+    
+    protected void debug(String message)
+    {
+    	if (DEBUG) System.out.println("MarkProbemsVisitor: " + message);
+    }
+	
+	/**
+	 * @param resource the resource in the project that we are 'visiting'
+	 */
+	public boolean visit(IResource resource) throws CoreException
+	{
+		IResource iResource = null;		
+		if (resource.getType() == IResource.FOLDER)
+		{
+			IFolder f = (IFolder)resource;
+			iResource = f.findMember(strFileName);
+		}
+		if (iResource != null)
+		{			
+			IPath path = iResource.getProjectRelativePath();
+			IFile iFile = iResource.getProject().getFile(path);
+			//iFile = (IFile) iResource;
+			iFile.deleteMarkers(UIPlugin.METAMODELICA_BULD_MARKER_ID, false,
+					IResource.DEPTH_INFINITE);
+	    	try
+	    	{
+	        	int lineNumber = Integer.parseInt(strLine);
+	        	FileLink fileLink = null;
+	        	if (iFile != null)
+	        	{
+	            	debug("FileInProject:"+iResource.getName());        		
+		        	String editorID = null;
+//			        	if (iFile.getName().endsWith(".mo")) 
+//			        		editorID = "org.modelica.mdt.ui.editor.ModelicaEditor";
+//			        	if (iFile.getName().endsWith(".c")   || 
+//			        		iFile.getName().endsWith(".cpp") ||
+//			        		iFile.getName().endsWith(".h") ||
+//			        		iFile.getName().endsWith(".cc")) 
+//			        		editorID = "org.";	        	
+		        	fileLink = new FileLink(iFile, null /* default Editor! */,-1,-1,lineNumber);    		
+		    		console.addHyperlink(
+		    					fileLink, 
+		    					offset, 
+		    					strFileName.length() + 1 + strLine.length());
+			        setMarker(iFile, strMsg, lineNumber);
+			        /*
+			        if (UIPlugin.getDefault().containsMarkedFile(iFile))
+			        {
+			        	//delete the marked file
+				        UIPlugin.getDefault().deleteMarkedFile(iFile);			        	
+			        }
+			        UIPlugin.getDefault().addMarkedFile(iFile);
+			        */
+	        	}
+	        	else
+	              debug("FileInProject: not found!");
+	    	}
+	    	catch(Exception e)
+	    	{
+	    		e.printStackTrace();
+	    	}
+	    	return false; /* if we found it, don't visit further */
+		}
+		
+		/*
+		 * Return true to indicate that the children of this resource should
+		 * be visited.
+		 */
+		return true;
+	}
+	
+    protected static final String ERROR = "Error"; 
+    protected static final String WARNING = "Warning"; 
+    protected static final String C_ERROR = "error"; 
+    protected static final String C_WARNING = "warning";     
+	
+    /**
+     * @param in_file
+     * @param message
+     * @param lineNumber
+     * @throws CoreException
+     */
+    protected void setMarker(IFile in_file, String message, int lineNumber) throws CoreException 
+    {
+    	debug("MetaModelicaPaternMatchListener.setMarker:");
+    	debug("File:" + in_file.getName());
+    	debug("Line:" + lineNumber);
+    	debug("Message:" + message);    	
+        Map attributes = new HashMap();
+        message = message.trim();        
+        if (message.startsWith(":") || Character.isDigit(message.charAt(0)))
+        {        	
+            message = message.substring(1);
+            message = message.trim();            
+        	while (Character.isDigit(message.charAt(0))) message = message.substring(1);
+            message = message.trim();
+            if (message.startsWith(":")) message = message.substring(1);
+        }
+        message = message.trim();
+        if (message.startsWith(ERROR) || message.startsWith(C_ERROR))
+            attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
+        else if (message.startsWith(WARNING) || message.startsWith(C_WARNING))
+            attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
+        else
+            attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
+    
+        debug("Creating marker: "+in_file.getName()+":"+lineNumber+" "+message);
+        MarkerUtilities.setLineNumber(attributes, lineNumber);
+        MarkerUtilities.setMessage(attributes, message);
+        MarkerUtilities.createMarker(in_file, attributes, UIPlugin.METAMODELICA_BULD_MARKER_ID);
+    }    
+	
+}
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 466)
+++ trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/console/MetaModelicaPatternMatchListener.java	(revision 466)
@@ -0,0 +1,179 @@
+
+package org.modelica.mdt.ui.console;
+
+import org.eclipse.ui.console.IPatternMatchListener;
+import org.eclipse.ui.console.IPatternMatchListenerDelegate;
+import org.eclipse.ui.console.PatternMatchEvent;
+import org.eclipse.ui.console.TextConsole;
+import org.eclipse.jface.text.BadLocationException;
+import java.util.regex.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.ui.console.FileLink;
+import org.modelica.mdt.core.*;
+import org.modelica.mdt.ui.UIPlugin;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+
+public class MetaModelicaPatternMatchListener implements IPatternMatchListener
+{
+	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 Pattern patternMetaModelica = Pattern.compile(regexpMetaModelica);
+    private Matcher matcherMetaModelica; 
+
+    private Pattern patternGeneral = Pattern.compile(regexpGeneral);
+    private Matcher matcherGeneral;	
+    
+    private boolean DEBUG = true;
+    private TextConsole omdevConsole;
+    
+    public MetaModelicaPatternMatchListener()
+    {
+    	super();
+		String value = Platform.getDebugOption  /*load trace/ConsolePatternMatching flag */
+		("org.modelica.mdt.omc/trace/ConsolePatternMatching");
+		if (value != null && value.equalsIgnoreCase("true"))
+		{
+			DEBUG = true;
+		}
+		debug("constructor");
+    }
+    
+    protected void debug(String message)
+    {
+    	if (DEBUG) System.out.println("MetaModelicaPatternMatchListener: " + message);
+    }
+
+	public void matchFound(PatternMatchEvent event)
+	{
+    	String strFileName = null;
+    	String strLine = null;
+    	String strMsg = null;
+		debug("matchFound");
+		/* get the existing consoles */
+		TextConsole console = (TextConsole)event.getSource();		
+		debug("Console:"+console.getName());
+		String line = "";
+		int offset = event.getOffset();
+		try
+		{
+			line = console.getDocument().get(
+					event.getOffset(), event.getLength());
+			debug("MatchedLine:" + line);
+		}
+		catch (BadLocationException e)
+		{
+			e.printStackTrace();
+		}
+		
+		try
+		{
+			matcherMetaModelica = patternMetaModelica.matcher(line);        
+			if (matcherMetaModelica.matches()) 
+			{
+				debug("Matches:" + matcherMetaModelica.groupCount());				
+				if (matcherMetaModelica.groupCount() != 3) return;
+				strFileName = matcherMetaModelica.group(1);
+				strLine = matcherMetaModelica.group(2);
+				strMsg = matcherMetaModelica.group(3);
+				debug("Matches:[" + strFileName + "|" + strLine + "|" + strMsg + "]" );
+			}
+			else /* if the MetaModelica pattern does not match try the general pattern! */
+			{
+				matcherGeneral = patternGeneral.matcher(line);
+				debug("General Matches:" + matcherGeneral.groupCount());				
+				if (matcherGeneral.matches()) 
+				{        	
+					if (matcherGeneral.groupCount() != 3) return;
+					strFileName = matcherGeneral.group(1);
+					strLine = matcherGeneral.group(2);
+					strMsg = matcherGeneral.group(3);
+					debug("Matches:[" + strFileName + "|" + strLine + "|" + strMsg + "]" );					
+				}
+				else
+				{
+					debug("No pattern matched");
+					return;
+				}
+			}
+			MarkProblemsVisitor problemsVisitor = 
+				new	MarkProblemsVisitor(
+						strFileName, 
+						strLine, 
+						strMsg, 
+						offset+1, // +1 for \n 
+						console);
+			IModelicaProject[] projects = ModelicaCore.getModelicaRoot().getProjects();
+			for (IModelicaProject project: projects)
+			{
+				IProject pro = project.getWrappedProject();
+				if (pro != null) pro.accept(problemsVisitor);
+			}
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+		}
+    }
+		
+	
+	public void connect(TextConsole console)
+	{
+		debug("should connect?:"+console.getName());		
+		/*
+		debug("should connect?:"+console.getName());
+		if (omdevConsole != null && console.equals(omdevConsole)) // already connected
+		{
+			debug("already conected:"+console.getName());
+			return;
+		}
+		*/
+		if (console.getName().contains("OMDev"))
+		{
+			debug("connect:"+console.getName());		
+			console.addPatternMatchListener(this);
+			omdevConsole = console;
+		}
+	}
+
+	public void disconnect()	
+	{		
+		if (omdevConsole == null) return;
+		debug("disconnect");
+		omdevConsole.removePatternMatchListener(this);
+	}
+	
+	public int getCompilerFlags()
+	{
+		debug("getCompilerFlags");		
+		return 0;
+	}
+	
+	public String getLineQualifier()
+	{
+		debug("getLineQualifer");		
+		return null;
+	}
+	
+	public String getPattern()
+	{
+		debug("getPattern");		
+		return "\n([^:]+)\\:([0-9]+)(.*)";
+	}	
+}
