Index: trunk/org.modelica.mdt/src/org/modelica/mdt/core/IModelicaFolder.java
===================================================================
--- trunk/org.modelica.mdt/src/org/modelica/mdt/core/IModelicaFolder.java	(revision 93)
+++ trunk/org.modelica.mdt/src/org/modelica/mdt/core/IModelicaFolder.java	(revision 94)
@@ -54,9 +54,11 @@
 {
 	public List<IModelicaFolder> getFolders() throws CoreException;
-	public List<IModelicaPackage> getPackages(); 
+	public List<IModelicaPackage> getPackages() throws CoreException; 
 	public List<IModelicaFile> getModelicaFiles() throws CoreException;
+	
 	/**
 	 * @return all non modelica files in this folder
+	 * @throws CoreException if there was an error compiling the file list 
 	 */
-	public List<IFile> getFiles();
+	public List<IFile> getFiles() throws CoreException;
 }
Index: trunk/org.modelica.mdt/src/org/modelica/mdt/core/IParent.java
===================================================================
--- trunk/org.modelica.mdt/src/org/modelica/mdt/core/IParent.java	(revision 93)
+++ trunk/org.modelica.mdt/src/org/modelica/mdt/core/IParent.java	(revision 94)
@@ -12,4 +12,6 @@
 
 import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
 
 
@@ -29,5 +31,5 @@
 	 * @return the immediate children of this element
 	 */
-	List<? extends IModelicaElement> getChildren();
+	List<?> getChildren();
 	
 	/**
@@ -37,5 +39,6 @@
 	 *
 	 * @return true if the immediate children of this element, false otherwise
+	 * @throws CoreException 
 	 */
-	boolean hasChildren();
+	boolean hasChildren() throws CoreException;
 }
Index: trunk/org.modelica.mdt/src/org/modelica/mdt/internal/core/ModelicaFolder.java
===================================================================
--- trunk/org.modelica.mdt/src/org/modelica/mdt/internal/core/ModelicaFolder.java	(revision 93)
+++ trunk/org.modelica.mdt/src/org/modelica/mdt/internal/core/ModelicaFolder.java	(revision 94)
@@ -46,7 +46,7 @@
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
-import org.modelica.mdt.core.IModelicaElement;
 import org.modelica.mdt.core.IModelicaFile;
 import org.modelica.mdt.core.IModelicaFolder;
@@ -67,4 +67,61 @@
 	}
 	
+	private boolean isPackage(IResource res)
+	{
+		if (res.getType() == IResource.FOLDER)
+		{
+			/* if folder contains a package.mo file, then consider it a package */
+			IFolder fol = (IFolder) res;
+			if (fol.getFile("package.mo").exists())
+			{
+				return true;
+			}
+		}
+
+		return false;
+	}
+	
+	private boolean isFolder(IResource res)
+	{
+		if (res.getType() == IResource.FOLDER)
+		{
+			IFolder fol = (IFolder) res;
+			if (!fol.getFile("package.mo").exists())
+			{
+				return true;
+			}
+		}
+		
+		return false;
+	}
+	
+	private boolean isModelicaFile(IResource res)
+	{
+		if (res.getType() == IResource.FILE)
+		{
+			String extension = res.getFileExtension(); 
+			if (extension != null && extension.equals("mo"))
+			{
+				return true;
+			}
+		}
+
+		return false;
+	}
+	
+	private boolean isFile(IResource res)
+	{
+		if (res.getType() == IResource.FILE)
+		{
+			String extension = res.getFileExtension(); 
+			if (extension == null || (!extension.equals("mo")))
+			{
+				return true;
+			}
+		}
+
+		return false;
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.modelica.mdt.core.IModelicaFolder#getFolders()
@@ -77,5 +134,5 @@
 		for (IResource res : members)
 		{
-			if (res.getType() == IResource.FOLDER)
+			if (isFolder(res))
 			{
 				folders.add(new ModelicaFolder((IContainer)res));
@@ -89,10 +146,21 @@
 	 * @see org.modelica.mdt.core.IModelicaFolder#getPackages()
 	 */
-	public List<IModelicaPackage> getPackages()
-	{
-		// TODO Auto-generated method stub
-		return null;
-	}
-
+	public List<IModelicaPackage> getPackages() throws CoreException
+	{
+		IResource[] members = cont.members();
+		LinkedList<IModelicaPackage> pkgs = new LinkedList<IModelicaPackage>();
+
+		for (IResource res : members)
+		{
+			if (isPackage(res))
+			{
+				pkgs.add(new ModelicaPackage((IFolder)res));
+			}
+		}
+
+		return pkgs;
+	}
+	
+	
 	/* (non-Javadoc)
 	 * @see org.modelica.mdt.core.IModelicaFolder#getModelicaFiles()
@@ -102,15 +170,10 @@
 		IResource[] members = cont.members();
 		LinkedList<IModelicaFile> mofiles = new LinkedList<IModelicaFile>();
-		String extension;
 		
 		for (IResource res : members)
 		{
-			if (res.getType() == IResource.FILE)
-			{
-				extension = res.getFileExtension(); 
-				if (extension != null && extension.equals("mo"))
-				{
-					mofiles.add(new ModelicaFile((IFile)res));
-				}
+			if (isModelicaFile(res))
+			{
+				mofiles.add(new ModelicaFile((IFile)res));
 			}
 		}
@@ -122,8 +185,17 @@
 	 * @see org.modelica.mdt.core.IModelicaFolder#getFiles()
 	 */
-	public List<IFile> getFiles()
-	{
-		// TODO Auto-generated method stub
-		return null;
+	public List<IFile> getFiles() throws CoreException
+	{
+		IResource[] members = cont.members();
+		LinkedList<IFile> files = new LinkedList<IFile>();
+		
+		for (IResource res : members)
+		{
+			if (isFile(res))
+			{
+				files.add((IFile)res);
+			}
+		}
+		return files;
 	}
 
@@ -137,22 +209,14 @@
 
 
-	public List<IModelicaElement> getChildren() 
+	public List<?> getChildren() 
 	{
 		try 
 		{
-			List<IModelicaElement> children = new LinkedList<IModelicaElement>();
-			List<IModelicaFolder> folders = getFolders();
+			List<Object> children = new LinkedList<Object>();
 			
-			List<IModelicaFile> files = getModelicaFiles();
-			
-			if (folders != null)
-			{
-				children.addAll(folders);
-			}
-			
-			if (files != null)
-			{
-				children.addAll(files);
-			}
+			children.addAll(getPackages());
+			children.addAll(getFolders());
+			children.addAll(getModelicaFiles());
+			children.addAll(getFiles());
 			
 			return children;
@@ -166,7 +230,7 @@
 	}
 
-	public boolean hasChildren() 
-	{
-		return true;
+	public boolean hasChildren() throws CoreException 
+	{
+		return !getChildren().isEmpty();
 	}
 
Index: trunk/org.modelica.mdt/src/org/modelica/mdt/ui/ModelicaElementContentProvider.java
===================================================================
--- trunk/org.modelica.mdt/src/org/modelica/mdt/ui/ModelicaElementContentProvider.java	(revision 93)
+++ trunk/org.modelica.mdt/src/org/modelica/mdt/ui/ModelicaElementContentProvider.java	(revision 94)
@@ -130,5 +130,13 @@
 		else if (element instanceof IParent)
 		{
-			return true;
+			try 
+			{
+				return ((IParent)element).hasChildren();
+			} 
+			catch (CoreException e) 
+			{
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
 		}
 		return false;
