[Monodevelop-patches-list] r1919 - in branches: . MonoDevelop-plan-43 MonoDevelop-plan-43/build MonoDevelop-plan-43/build/bin MonoDevelop-plan-43/build/lib MonoDevelop-plan-43/build/lib/monodevelop MonoDevelop-plan-43/build/share MonoDevelop-plan-43/build/share/monodevelop MonoDevelop-plan-43/build/share/monodevelop/ui MonoDevelop-plan-43/src MonoDevelop-plan-43/src/Content MonoDevelop-plan-43/src/Core MonoDevelop-plan-43/src/Editor MonoDevelop-plan-43/src/Node MonoDevelop-plan-43/src/Workbench

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Jul 27 13:19:59 EDT 2004


Author: tberman
Date: 2004-07-27 13:19:59 -0400 (Tue, 27 Jul 2004)
New Revision: 1919

Added:
   branches/MonoDevelop-plan-43/
   branches/MonoDevelop-plan-43/build/
   branches/MonoDevelop-plan-43/build/bin/
   branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll
   branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll.config
   branches/MonoDevelop-plan-43/build/bin/monodevelop.exe
   branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config
   branches/MonoDevelop-plan-43/build/bin/stock-close-12.png
   branches/MonoDevelop-plan-43/build/bin/stock-menu-left-12.png
   branches/MonoDevelop-plan-43/build/bin/stock-menu-right-12.png
   branches/MonoDevelop-plan-43/build/lib/
   branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll
   branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll.config
   branches/MonoDevelop-plan-43/build/lib/log4net.dll
   branches/MonoDevelop-plan-43/build/lib/monodevelop/
   branches/MonoDevelop-plan-43/build/lib/monodevelop/content.dll
   branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin
   branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.dll
   branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin
   branches/MonoDevelop-plan-43/build/lib/monodevelop/node.dll
   branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin
   branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.dll
   branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin
   branches/MonoDevelop-plan-43/build/share/
   branches/MonoDevelop-plan-43/build/share/monodevelop/
   branches/MonoDevelop-plan-43/build/share/monodevelop/ui/
   branches/MonoDevelop-plan-43/build/share/monodevelop/ui/content.ui
   branches/MonoDevelop-plan-43/build/share/monodevelop/ui/editor.ui
   branches/MonoDevelop-plan-43/build/share/monodevelop/ui/workbench.ui
   branches/MonoDevelop-plan-43/default.build
   branches/MonoDevelop-plan-43/src/
   branches/MonoDevelop-plan-43/src/Content/
   branches/MonoDevelop-plan-43/src/Content/ContentManager.cs
   branches/MonoDevelop-plan-43/src/Content/ContentManagerWidgetFactory.cs
   branches/MonoDevelop-plan-43/src/Content/ContentView.cs
   branches/MonoDevelop-plan-43/src/Content/INodeViewer.cs
   branches/MonoDevelop-plan-43/src/Content/INodeViewerFactory.cs
   branches/MonoDevelop-plan-43/src/Content/content.build
   branches/MonoDevelop-plan-43/src/Content/content.plugin.in
   branches/MonoDevelop-plan-43/src/Content/content.ui
   branches/MonoDevelop-plan-43/src/Core/
   branches/MonoDevelop-plan-43/src/Core/AssemblyInfo.cs
   branches/MonoDevelop-plan-43/src/Core/ICommand.cs
   branches/MonoDevelop-plan-43/src/Core/MonoDevelop.cs
   branches/MonoDevelop-plan-43/src/Core/core.build
   branches/MonoDevelop-plan-43/src/Core/monodevelop.exe.config.in
   branches/MonoDevelop-plan-43/src/Editor/
   branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewer.cs
   branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewerFactory.cs
   branches/MonoDevelop-plan-43/src/Editor/editor.build
   branches/MonoDevelop-plan-43/src/Editor/editor.plugin.in
   branches/MonoDevelop-plan-43/src/Editor/editor.ui
   branches/MonoDevelop-plan-43/src/Node/
   branches/MonoDevelop-plan-43/src/Node/Buffer.cs
   branches/MonoDevelop-plan-43/src/Node/FileNode.cs
   branches/MonoDevelop-plan-43/src/Node/Node.cs
   branches/MonoDevelop-plan-43/src/Node/Project.cs
   branches/MonoDevelop-plan-43/src/Node/TextFileNode.cs
   branches/MonoDevelop-plan-43/src/Node/node.build
   branches/MonoDevelop-plan-43/src/Node/node.plugin.in
   branches/MonoDevelop-plan-43/src/Workbench/
   branches/MonoDevelop-plan-43/src/Workbench/IWorkbenchWidgetFactory.cs
   branches/MonoDevelop-plan-43/src/Workbench/Workbench.cs
   branches/MonoDevelop-plan-43/src/Workbench/WorkbenchCommand.cs
   branches/MonoDevelop-plan-43/src/Workbench/workbench.build
   branches/MonoDevelop-plan-43/src/Workbench/workbench.plugin.in
   branches/MonoDevelop-plan-43/src/Workbench/workbench.ui
   branches/MonoDevelop-plan-43/src/plugins.build
Log:
some stuff from jeroen. if you have beef with this. email me.


Added: branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll.config
===================================================================
--- branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll.config	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/bin/gdl-sharp.dll.config	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,6 @@
+<configuration>
+  <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
+  <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
+  <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/>
+  <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
+</configuration>

Added: branches/MonoDevelop-plan-43/build/bin/monodevelop.exe
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/bin/monodevelop.exe
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config
===================================================================
--- branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/bin/monodevelop.exe.config	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+	<appSettings>
+		<add key="imagePath" value="@monodevelop_images_dir@"/>
+		<add key="pluginPath" value="/home/jeroen/Projects/monodevelop/build/lib/monodevelop"/>
+		<add key="resourcePath" value="@monodevelop_resource_dir@"/>
+		<add key="uiPath" value="/home/jeroen/Projects/monodevelop/build/share/monodevelop/ui"/>
+	</appSettings>
+	<configSections>
+		<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
+	</configSections>
+	<log4net>
+		<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
+			<layout type="log4net.Layout.PatternLayout">
+				<param name="ConversionPattern" value="%-5p - %m%n"/>
+			</layout>
+		</appender>
+		<root>
+			<level value="ALL"/>
+			<appender-ref ref="ConsoleAppender"/>
+		</root>
+	</log4net>
+</configuration>

Added: branches/MonoDevelop-plan-43/build/bin/stock-close-12.png
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/bin/stock-close-12.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/bin/stock-menu-left-12.png
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/bin/stock-menu-left-12.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/bin/stock-menu-right-12.png
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/bin/stock-menu-right-12.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll.config
===================================================================
--- branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll.config	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/lib/gdl-sharp.dll.config	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,6 @@
+<configuration>
+  <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
+  <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
+  <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/>
+  <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
+</configuration>

Added: branches/MonoDevelop-plan-43/build/lib/log4net.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/lib/log4net.dll
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/content.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/lib/monodevelop/content.dll
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin
===================================================================
--- branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/lib/monodevelop/content.plugin	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>/home/jeroen/Projects/monodevelop/build/lib/monodevelop/content.dll</assembly>
+	<class name="MonoDevelop.Content.ContentManager"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.dll
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin
===================================================================
--- branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/lib/monodevelop/editor.plugin	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>/home/jeroen/Projects/monodevelop/build/lib/monodevelop/editor.dll</assembly>
+	<class name="MonoDevelop.Editor.EditorNodeViewer"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/node.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/lib/monodevelop/node.dll
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin
===================================================================
--- branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/lib/monodevelop/node.plugin	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>/home/jeroen/Projects/monodevelop/build/lib/monodevelop/node.dll</assembly>
+	<class name="MonoDevelop.Node.Node"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.dll
===================================================================
(Binary files differ)


Property changes on: branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.dll
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin
===================================================================
--- branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/lib/monodevelop/workbench.plugin	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>/home/jeroen/Projects/monodevelop/build/lib/monodevelop/workbench.dll</assembly>
+	<class name="MonoDevelop.Workbench.Workbench"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/build/share/monodevelop/ui/content.ui
===================================================================
--- branches/MonoDevelop-plan-43/build/share/monodevelop/ui/content.ui	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/share/monodevelop/ui/content.ui	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<menubar>
+	<menu name="FileMenu" action="FileMenuAction">
+		<placeholder name="FileOpenPlaceholder">
+			<menuitem name="FileOpen" action="FileOpenAction"/>
+		</placeholder>
+	</menu>
+</menubar>
+<toolbar name="toolbar">
+	<placeholder name="FileOpenPlaceholder">
+		<toolitem name="FileOpenButton" action="FileOpenAction"/>
+	</placeholder>
+</toolbar>

Added: branches/MonoDevelop-plan-43/build/share/monodevelop/ui/editor.ui
===================================================================
--- branches/MonoDevelop-plan-43/build/share/monodevelop/ui/editor.ui	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/share/monodevelop/ui/editor.ui	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<menubar>
+	<menu name="EditMenu" action="EditMenuAction">
+		<placeholder name="EditEditorPlaceholder">
+			<menuitem name="EditUndo" action="EditUndoAction"/>
+			<menuitem name="EditRedo" action="EditRedoAction"/>
+			<separator/>
+			<menuitem name="EditCut" action="EditCutAction"/>
+			<menuitem name="EditCopy" action="EditCopyAction"/>
+			<menuitem name="EditPaste" action="EditPasteAction"/>
+			<menuitem name="EditDelete" action="EditDeleteAction"/>
+			<separator/>
+			<menuitem name="EditSelectAll" action="EditSelectAllaction"/>
+		</placeholder>
+	</menu>
+</menubar>
+<toolbar name="toolbar">
+	<toolitem name="EditUndo" action="EditUndoAction"/>
+	<toolitem name="EditRedo" action="EditRedoAction"/>
+	<separator/>
+	<toolitem name="EditCut" action="EditCutAction"/>
+	<toolitem name="EditCopy" action="EditCopyAction"/>
+	<toolitem name="EditPaste" action="EditPasteAction"/>
+</toolbar>

Added: branches/MonoDevelop-plan-43/build/share/monodevelop/ui/workbench.ui
===================================================================
--- branches/MonoDevelop-plan-43/build/share/monodevelop/ui/workbench.ui	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/build/share/monodevelop/ui/workbench.ui	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<menubar>
+	<menu name="FileMenu" action="FileMenuAction">
+		<placeholder name="FileOpenPlaceholder"/>
+		<placeholder name="FileOpenProjectPlaceholder"/>
+		<placeholder name="FileImportProjectPlaceholder"/>
+		<placeholder name="FileRecentFilesPlaceholder"/>
+		<placeholder name="FileSavePlaceholder"/>
+		<placeholder name="FileClosePlaceholder"/>
+		<placeholder name="FileCloseProject"/>
+		<placeholder name="FilePrintPlaceholder" position="top"/>
+		<separator/>
+		<menuitem name="FileCloseWindow" action="CloseWindowAction"/>
+		<menuitem name="FileQuit" action="QuitAction"/>
+	</menu>
+	
+	<menu name="EditMenu" action="EditMenuAction">
+		<placeholder name="EditEditorPlaceholder"/>
+		<placeholder name="EditPluginPlaceholder" position="top"/>
+		<placeholder name="EditPreferencesPlaceholder" position="top"/>
+	</menu>
+	
+	<menu name="ViewMenu" action="ViewMenuAction">
+	</menu>
+	
+	<placeholder name="SearchMenuPlaceholder"/>
+
+	<placeholder name="ProjectMenuPlaceholder"/>
+
+	<placeholder name="RunMenuPlaceholder"/>
+	
+	<placeholder name="ToolsMenuPlaceholder"/>
+
+	<menu name="WindowMenu" action="WindowMenuAction">
+		<menuitem name="WindowNew" action="NewWindowAction"/>
+		<separator/>
+		<menuitem name="WindowSaveLayout" action="SaveLayoutAction"/>
+		<separator/>
+		<menu name="WindowLayouts" action="LayoutsAction">
+			<placeholder name="Layouts"/>
+		</menu>
+	</menu>
+	
+	<menu name="HelpMenu" action="HelpMenuAction">
+		<placeholder name="HelpOps"/>
+		<placeholder name="HelpPlugins"/>
+		<menuitem name="HelpAbout" action="AboutAction"/>
+	</menu>
+</menubar>
+<toolbar name="toolbar">
+	<placeholder name="FileOpenPlaceholder"/>
+	<toolitem name="QuitButton" action="QuitAction"/>
+</toolbar>

Added: branches/MonoDevelop-plan-43/default.build
===================================================================
--- branches/MonoDevelop-plan-43/default.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/default.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<project name="monodevelop" default="build">
+    <!-- global project settings -->
+    <property name="basedir" value="${nant.project.basedir}"/>
+    <property name="project.name" value="monodevelop"/>
+    <property name="project.version" value="0.1" overwrite="false"/>
+    <!-- global build settings -->
+    <property name="build.debug" value="true"/>
+    <property name="build.dir" value="${path::combine(basedir, 'build')}"/>
+    <property name="bin.dir" value="${path::combine(build.dir, 'bin')}"/>
+    <property name="lib.dir" value="${path::combine(build.dir, 'lib')}"/>
+    <property name="share.dir" value="${path::combine(build.dir, 'share/monodevelop')}"/>
+
+    <!-- cleanup build files -->
+    <target name="clean" description="remove all files created by the build task">
+        <!-- clean up plugin build files -->
+        <nant buildfile="src/plugins.build" target="clean"/>
+        <!-- clean up monodevelop build files -->
+        <nant buildfile="src/Core/core.build" target="clean"/>
+        <!-- remove the build directory -->
+        <delete dir="${build.dir}" failonerror="false"/>
+    </target>
+
+    <!-- build the project -->
+    <target name="build" description="compiles the source code">
+        <!-- create directories -->
+        <mkdir dir="${build.dir}"/>
+        <mkdir dir="${bin.dir}"/>
+        <mkdir dir="${lib.dir}"/>
+        <mkdir dir="${share.dir}"/>
+        <!-- build monodevelop.exe -->
+        <nant buildfile="src/Core/core.build" target="build"/>
+        <!-- build the plugins -->
+        <nant buildfile="src/plugins.build" target="build"/>
+    </target>
+    
+    <!-- run MonoDevelop -->
+    <target name="run" depends="build" description="run the program">
+        <exec program="mono" commandline="${path::combine(bin.dir, 'monodevelop.exe')}" workingdir="${bin.dir}"/>
+    </target>
+</project>

Added: branches/MonoDevelop-plan-43/src/Content/ContentManager.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/ContentManager.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/ContentManager.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,126 @@
+//
+// ContentManager.cs: ContentManager (one instance per Workbench window) manages 
+// the display of open files in the Content Pane by providing one tab per file,
+// where each tab represents a ContentView that in turn uses one or more
+// NodeViewers to display the file content.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using System.Collections;
+using System.Reflection;
+using Gtk;
+using Gnome.Vfs;
+using log4net;
+using MonoDevelop.Node;
+using MonoDevelop.Workbench;
+
+namespace MonoDevelop.Content {
+	public class ContentManager : Notebook {
+		private static readonly ILog log = LogManager.GetLogger (typeof (ContentManager));
+		private static ArrayList factories = new ArrayList ();
+
+		public ContentManager ()
+		{
+			AddActions ();
+		}
+		
+		private void AddActions ()
+		{
+			ActionGroup group = new ActionGroup ("ContentManager");
+			Action action;
+			
+			action = new Action ("FileOpenAction", "_Open...",
+					     "Open a file", Gtk.Stock.Open);
+			action.Activated += new EventHandler (OnFileOpen);
+			group.Add (action);
+		
+			Workbench.Workbench.AddActionGroup (group);
+			Workbench.Workbench.AddUiFromFile ("content.ui");
+		}
+
+		////////////////////////////////////////////////////////////////////////
+		// Event handlers
+		////////////////////////////////////////////////////////////////////////
+
+		private void OnFileOpen (object obj, EventArgs e)
+		{
+			// Ask the user which file to open.
+			FileChooserDialog fcd = new FileChooserDialog ("Open File",
+								       (Window)Workbench.Workbench.ActiveWorkbench,
+								       FileChooserAction.Open,
+								       "gnome-vfs");
+			fcd.AddButton (Stock.Cancel, ResponseType.Cancel);
+			fcd.AddButton (Stock.Open, ResponseType.Ok);
+			fcd.DefaultResponse = ResponseType.Ok;
+			int resp = fcd.Run ();
+			fcd.Hide ();
+			
+			if (resp != (int)ResponseType.Ok)
+				return;
+
+			string mimetype = Mime.GetMimeType (fcd.Filename);
+			log.Debug ("Mimetype for " + fcd.Filename + " is " + mimetype);
+
+			// Find a FileNode Type for the specified mimetype.
+			FileNodeEntry entry = FileNode.FindFileNodeType (mimetype);
+			if (entry == null) {
+				log.Debug ("No matching FileNode found for mimetype \"" + mimetype + "\"");
+				return;
+			}
+
+			// Create a new FileNode for the specified file.
+			log.Debug ("Found FileNode type: " + entry.Type);
+			Type[] types = new Type[3];
+			types[0] = typeof (Project);
+			types[1] = typeof (Node);
+			types[2] = typeof (string);
+			ConstructorInfo ci = entry.Type.GetConstructor (BindingFlags.Instance | BindingFlags.Public,
+									null, CallingConventions.HasThis,
+									types, null);
+			object[] args = new object[3];
+			args[0] = null;
+			args[1] = null;
+			args[2] = fcd.Filename;
+			FileNode fn = (FileNode)ci.Invoke (args);
+			
+			// Find a suitable INodeViewer which can display the file.
+			foreach (INodeViewerFactory factory in factories) {
+				if (factory.CanDisplayNode (fn)) {
+					log.Debug ("" + factory + " can display node " + fn);
+					INodeViewer viewer = factory.CreateNodeViewer (fn);
+					AppendPage (viewer.ViewerWidget, new Label (fn.DisplayName));
+					viewer.ViewerWidget.ShowAll ();
+					break;
+				}
+			}
+		}
+	
+		////////////////////////////////////////////////////////////////////////
+		// Static methods
+		////////////////////////////////////////////////////////////////////////
+	
+		public static void AddNodeViewerFactory (INodeViewerFactory factory)
+		{
+			factories.Add (factory);
+		}
+	
+		public static void RemoveNodeViewerFactory (INodeViewerFactory factory)
+		{
+			factories.Remove (factory);
+		}
+		
+		public static void InitializePlugin (byte major, byte minor)
+		{
+			Workbench.Workbench.AddWidgetFactory (new ContentManagerWidgetFactory ());
+		}
+		
+		public static void FinalizePlugin ()
+		{
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Content/ContentManagerWidgetFactory.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/ContentManagerWidgetFactory.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/ContentManagerWidgetFactory.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,48 @@
+//
+// ContentManagerWidgetFactory.cs: Factory for the ContentManager widget.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using log4net;
+using Gtk;
+using MonoDevelop.Workbench;
+
+namespace MonoDevelop.Content {
+	class ContentManagerWidgetFactory : IWorkbenchWidgetFactory {
+		private static readonly ILog log = LogManager.GetLogger (typeof (ContentManagerWidgetFactory));
+	
+		public string WidgetName {
+			get {
+				return "ContentPane";
+			}
+		}
+	
+		public string WidgetTitle {
+			get {
+				return "Documents";
+			}
+		}
+		
+		public string WidgetIcon {
+			get {
+				return "gtk-justify-fill";
+			}
+		}
+		
+		public bool Dockable {
+			get {
+				return true;
+			}
+		}
+	
+		public Widget CreateWidget (Workbench workbench)
+		{
+			return new ContentManager ();
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Content/ContentView.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/ContentView.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/ContentView.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,24 @@
+//
+// ContentView.cs: Browser widget which displays Node's in a Notebook.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using Gtk;
+using log4net;
+
+namespace MonoDevelop.Content {
+	internal class ContentView : Gtk.Notebook {
+		private static readonly ILog log = LogManager.GetLogger (typeof (ContentView));
+		
+		public ContentView ()
+		{
+			InsertPage (new Label ("Content"), new Label ("Header"), 0);
+			InsertPage (new Label ("Another Content"), new Label ("Header 2"), 1);
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Content/INodeViewer.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/INodeViewer.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/INodeViewer.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,40 @@
+//
+// INodeViewer.cs: An implementation of the INodeViewer interface provides one 
+// view of the content for an open Node. The ContentManager creates ContentViews
+// for each open Node. The tabs at the top (or left if vertical orientation is
+// configured) of the ContentManager panel are for selecting a ContentView. 
+// Each ContentView uses tabs (at the bottom on its pane) for selecting among 
+// the available NodeViewer instances which can display the Node content.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using Gtk;
+using System;
+
+namespace MonoDevelop.Content {
+	public interface INodeViewer {
+		Widget StructureWidget {
+			get;
+		}
+	
+		Widget ViewerWidget {
+			get;
+		}
+	
+		string ViewerDescription {
+			get;
+		}
+	
+		string ViewerTitle {
+			get;
+		}
+	
+		Gdk.Pixbuf ViewerIcon {
+			get;
+		}	
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Content/INodeViewerFactory.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/INodeViewerFactory.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/INodeViewerFactory.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,23 @@
+//
+// INodeViewerFactory.cs: The INodeViewerFactory interface is used to implement a
+// factory that creates instances of NodeViewer as needed to display the content
+// of a given Node. Each NodeViewerFactory must register with Browser at
+// application startup.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2003
+//
+
+using Gtk;
+using System;
+using MonoDevelop.Node;
+
+namespace MonoDevelop.Content {
+	public interface INodeViewerFactory {
+		bool CanDisplayNode (Node node);
+		
+		INodeViewer CreateNodeViewer (Node node);
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Content/content.build
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/content.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/content.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<project name="monodevelop.plugins.content" default="build">
+    <!-- build the project -->
+    <target name="build" description="compiles the source code">
+        <property name="assemblyfile" value="${path::combine(plugin.dir, 'content.dll')}"/>
+        <csc target="library" output="${assemblyfile}" debug="${build.debug}">
+            <arg value="${gnome-sharp.libs}"/>
+            <arg value="-r:/usr/lib/gnome-vfs-sharp.dll"/>
+            <sources>
+                <include name="*.cs"/>
+            </sources>
+            <references basedir="${build.dir}">
+                <include name="bin/monodevelop.exe"/>
+                <include name="lib/gdl-sharp.dll"/>
+                <include name="lib/log4net.dll"/>
+                <include name="lib/monodevelop/node.dll"/>
+                <include name="lib/monodevelop/workbench.dll"/>
+            </references>
+        </csc>
+        
+        <!-- install the plugin file -->
+        <copy file="content.plugin.in" tofile="content.plugin"/>
+        <replaceregex match="@assembly@" replace="${assemblyfile}" file="content.plugin" byline="true" />
+        <move file="content.plugin" todir="${plugin.dir}"/>
+        
+        <!-- install the ui file -->
+        <copy file="content.ui" todir="${ui.dir}"/>
+    </target>
+</project>

Added: branches/MonoDevelop-plan-43/src/Content/content.plugin.in
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/content.plugin.in	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/content.plugin.in	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>@assembly@</assembly>
+	<class name="MonoDevelop.Content.ContentManager"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/src/Content/content.ui
===================================================================
--- branches/MonoDevelop-plan-43/src/Content/content.ui	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Content/content.ui	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<menubar>
+	<menu name="FileMenu" action="FileMenuAction">
+		<placeholder name="FileOpenPlaceholder">
+			<menuitem name="FileOpen" action="FileOpenAction"/>
+		</placeholder>
+	</menu>
+</menubar>
+<toolbar name="toolbar">
+	<placeholder name="FileOpenPlaceholder">
+		<toolitem name="FileOpenButton" action="FileOpenAction"/>
+	</placeholder>
+</toolbar>

Added: branches/MonoDevelop-plan-43/src/Core/AssemblyInfo.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Core/AssemblyInfo.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Core/AssemblyInfo.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,23 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("MonoDevelop")]
+[assembly: AssemblyDescription("free C# IDE")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MonoDevelop")]
+[assembly: AssemblyCopyright("Mike Krueger 2000")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: AssemblyVersion("0.1.0.0")]
+
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")] // ..\\src\\SharpDevelop\\sharpdevelop.key

Added: branches/MonoDevelop-plan-43/src/Core/ICommand.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Core/ICommand.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Core/ICommand.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,24 @@
+//
+// ICommand.cs: Interface for handling command-line parameters.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+
+namespace MonoDevelop {
+	public interface ICommand {
+		string CommandDescription {
+			get;
+		}
+	
+		bool TakesCommandArguments {
+			get;
+		}
+	
+		void InvokeCommand (string[] args);
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Core/MonoDevelop.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Core/MonoDevelop.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Core/MonoDevelop.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,404 @@
+// MonoDevelop - A .NET Integrated Development Environment
+// Copyright (C) 2004 Jeroen Zwartepoorte
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+// Jeroen Zwartepoorte (jeroen at xs4all.nl)
+
+using System;
+using System.Collections;
+using System.Configuration;
+using System.IO;
+using System.Reflection;
+using System.Xml;
+
+using log4net;
+using log4net.Config;
+
+// Configure log4net using the .config file.
+[assembly: log4net.Config.DOMConfigurator(Watch=true)]
+namespace MonoDevelop {
+	class Plugin {
+		private string assembly;
+		private string name;
+		private ArrayList dependencies;
+		private int resolvePass;
+		private int discovered;
+		private int finished;
+		private MethodInfo finalizePlugin;
+	
+		public Plugin (string assembly, string name) {
+			this.assembly = assembly;
+			this.name = name;
+			dependencies = new ArrayList ();
+			resolvePass = -1;
+			discovered = -1;
+			finished = -1;
+			finalizePlugin = null;
+		}
+	
+		public string Assembly {
+			get {
+				return assembly;
+			}
+		}
+	
+		public string Name {
+			get {
+				return name;
+			}
+		}
+		
+		public ArrayList Dependencies {
+			get {
+				return dependencies;
+			}
+		}
+		
+		internal int ResolvePass {
+			get {
+				return resolvePass;
+			}
+			set {
+				resolvePass = value;
+			}
+		}
+		
+		internal int Discovered {
+			get {
+				return discovered;
+			}
+			set {
+				discovered = value;
+			}
+		}
+		
+		internal int Finished {
+			get {
+				return finished;
+			}
+			set {
+				finished = value;
+			}
+		}
+		
+		internal MethodInfo FinalizePlugin {
+			get {
+				return finalizePlugin;
+			}
+			set {
+				finalizePlugin = value;
+			}
+		}
+	}
+	
+	class NameComparer : IComparer
+	{
+		public int Compare (Object obj1, Object obj2)
+		{
+			string className = (string)obj1;
+			Plugin plugin = (Plugin)obj2;
+			return String.Compare (className, plugin.Name);
+		}
+	}
+	
+	public class MonoDevelop
+	{
+		private static readonly ILog log = LogManager.GetLogger (typeof (MonoDevelop));
+		private static NameComparer nameComparer = new NameComparer ();
+		private static int time = 0;
+		private static ArrayList plugins;
+		private static Hashtable commands = new Hashtable ();
+		private static ICommand defaultCommand = null;
+	
+		//
+		// Registers a command handler for a particular command line option.
+		// An option value of null is used for the "default" handler. Set both
+		// parameters to null if you want to disable the default handler.
+		//
+		public static void RegisterCommand (string option, ICommand cmd)
+		{
+			if (option == null) {
+				defaultCommand = cmd;
+			} else {
+				if (commands.Contains (option))
+					log.Warn ("Command " + option + " is already registered");
+				else
+					commands.Add (option, cmd);
+			}
+		}
+	
+		static void Main (string[] args)
+		{
+			log.Debug ("Starting MonoDevelop...");
+			DateTime timeStarted = DateTime.Now;
+			
+			// Make a list of plugin directories.
+			ArrayList pluginDirs = new ArrayList ();
+			string path = ConfigurationSettings.AppSettings["pluginPath"];
+			if (path == null) {
+				log.Error ("Unknown configuration property \"pluginPath\"");
+				log.Error ("Your monodevelop.exe.config is likely broken");
+				log.Error ("Please reinstall MonoDevelop");
+				return;
+			}
+			pluginDirs.Add (path);
+			
+			// Add directories from the $MONODEVELOP_PLUGIN_PATH environment var.
+			path = Environment.GetEnvironmentVariable ("MONODEVELOP_PLUGIN_PATH");
+			if (path != null) {
+				string[] dirs = path.Split (Path.DirectorySeparatorChar);
+				foreach (string dir in dirs)
+					pluginDirs.Add (dir);
+			}
+	
+			// Scan for .plugin files in the plugin directories.
+			log.Debug ("Looking for .plugin files");
+			ArrayList pluginFiles = new ArrayList ();
+			foreach (string pluginDir in pluginDirs) {
+				if (!Directory.Exists (pluginDir))
+					continue;
+				log.Debug ("Scanning " + pluginDir);
+				DirectoryInfo di = new DirectoryInfo (pluginDir);
+				FileInfo[] files = di.GetFiles ("*.plugin");
+				pluginFiles.AddRange (files);
+			}
+			log.Debug ("" + pluginFiles.Count + " plugin file(s) found");
+			
+			// Parse the .plugin files and build a list of plugins
+			// and dependencies.
+			plugins = new ArrayList ();
+			foreach (FileInfo file in pluginFiles) {
+				log.Debug ("Parsing " + file.FullName);
+				ParsePluginFile (file.FullName);
+			}
+			
+			// Determine the order in which to load plugins.
+			SortedList loadOrder = ResolveDependencies ();
+			
+			// Load the plugins in proper order from the loadOrder SortedList.
+			foreach (Plugin plugin in loadOrder.Values) {
+				try {
+					log.Debug ("Loading " + plugin.Name);
+					Assembly a = Assembly.LoadFrom (plugin.Assembly);
+					Type t = a.GetType (plugin.Name);
+					if (t == null) {
+						log.Error ("Unknown plugin class " + plugin.Name);
+						continue;
+					}
+					
+					// Check if the class contians an InitializePlugin method.
+					MethodInfo ip = t.GetMethod ("InitializePlugin",
+								     new Type[] {typeof (byte), typeof (byte)});
+					if (ip == null || !ip.IsStatic || !ip.IsPublic || 
+					    ip.ReturnType != typeof (void)) {
+						log.Error ("Plugin class \"" + plugin.Name +
+							   "\" doesn't contain an InitializePlugin method with signature \"" +
+							   "public static void InitializePlugin (byte, byte)\"");
+						continue;
+					}
+					
+					// Check if the class contains a FinalizePlugin method.
+					MethodInfo fp = t.GetMethod ("FinalizePlugin", new Type[] {});
+					if (fp == null || !fp.IsStatic || !fp.IsPublic ||
+					    fp.ReturnType != typeof (void)) {
+						log.Error ("Plugin class \"" + plugin.Name +
+							   "\" doesn't contain a FinalizePlugin method with signature \"" +
+							   "public static void FinalizePlugin ()\"");
+						continue;
+					}
+
+					// Call InitializePlugin.					
+					ip.Invoke (null, new object[] {(byte)1, (byte)0});
+					// Cache the FinalizePlugin MethodInfo for later use.
+					plugin.FinalizePlugin = fp;
+				} catch (System.Exception e) {
+					log.Error ("Error loading " + plugin.Name, e);
+					continue;
+				}
+			}
+	
+			// Check for --help argument.
+			if (Array.BinarySearch (args, "--help") >= 0) {
+				Usage ();
+				return;
+			}
+			
+			// Print how much time it took to start.
+			log.Debug ("Started in " + (DateTime.Now - timeStarted).Seconds + " seconds");
+			
+			// If the first argument isn't a registered ICommand,
+			// then interpret all the arguments as input for the
+			// default command handler.
+			if (args.Length == 0 || !commands.Contains (args[0])) {
+				// Invoke the default ICommand.
+				if (defaultCommand == null)
+					log.Error ("No default command handler registered; Exiting");
+				else
+					defaultCommand.InvokeCommand (args);
+			} else {
+				// Parse the commandline arguments.
+				for (int i = 0; i < args.Length; i++) {
+					ICommand cmd = (ICommand)commands[args[i]];
+					if (cmd.TakesCommandArguments) {
+						ArrayList p = new ArrayList ();
+						while ((args.Length > i + 1) && !commands.Contains (args[i+1]))
+							p.Add (args[++i]);
+						string[] result = new string[p.Count];
+						p.CopyTo (result);
+						cmd.InvokeCommand (result);
+					} else {
+						cmd.InvokeCommand (null);
+					}
+				}
+			}
+			
+			// At this point, the command handler has finished its task.
+			// Example: it has finished a --build command or the default
+			// command handler has returned from the GTK+ main loop.
+
+			// Finalize all plugins in the reverse order they were loaded.
+			for (int i = loadOrder.Count - 1; i >= 0; i--) {
+				Plugin plugin = (Plugin)loadOrder.GetByIndex (i);
+				plugin.FinalizePlugin.Invoke (null, null);
+			}
+			commands.Clear ();
+			loadOrder.Clear ();
+			plugins.Clear ();
+			
+			// And exit.
+			log.Debug ("Exiting MonoDevelop");
+		}
+		
+		//
+		// Output information about monodevelop's usage and possible commandline
+		// parameters to the console.
+		//
+		private static void Usage ()
+		{
+			Console.WriteLine ("Usage is: monodevelop [options] files");
+			foreach (ICommand cmd in commands.Values)
+				Console.WriteLine ("   {0}", cmd.CommandDescription);
+			Console.WriteLine ("");
+		}
+		
+		//
+		// Parses a .plugin file and creates a new Plugin class with the
+		// attributes from the .plugin file.
+		//
+		private static void ParsePluginFile (string file)
+		{
+			XmlTextReader reader = new XmlTextReader (file);
+			Plugin plugin = null;
+			string assembly = null;			
+
+			while (reader.Read ()) {
+				if (reader.NodeType == XmlNodeType.Element) {
+					switch (reader.Name) {
+						case "assembly":
+							assembly = reader.ReadElementString ();
+							break;
+						case "class":
+							plugin = new Plugin (assembly, reader["name"]);
+							plugins.Add (plugin);
+							break;
+						case "depends":
+							plugin.Dependencies.Add (reader.ReadElementString());
+							break;
+					}
+				}
+			}
+		}
+		
+		//
+		// Returns the PluginInfo belonging to the specified className. Returns
+		// null if a matching PluginInfo wasn't found.
+		//
+		private static Plugin FindPlugin (ArrayList list, string className)
+		{
+			int idx = plugins.BinarySearch (className, nameComparer);
+			
+			if (idx >= 0)
+				return (Plugin)list[idx];
+			else
+				return null;
+		}
+		
+		//
+		// Resolve the plugin dependencies. Check for cycles and whether
+		// dependency classes exist. The end result will be that the loadOrder
+		// SortedList will contain the plugins in the order that they need to be
+		// loaded.
+		//
+		private static SortedList ResolveDependencies ()
+		{
+			time = 0;
+			int pass = 0;
+			SortedList result = new SortedList ();
+		
+			foreach (Plugin plugin in plugins) {
+				if (plugin.ResolvePass == -1) {
+					if (!TraversePlugin (plugin, result, pass++))
+						log.Error ("Unable to load: " + plugin.Name);
+				}
+			}
+	
+			return result;		
+		}
+		
+		//
+		// Traverse the graph using a Depth First Search and sort the plugins
+		// based on the "finished time". During each "pass", the ResolvePass 
+		// attribute is set on each PluginInfo to detect when a cycle has 
+		// occurred. When this happens, false will be returned through the 
+		// recursion and the cycle will be excluded from the loadOrder list. The
+		// same occurs when a plugin depends on a class which is not listed in 
+		// any .plugin file.
+		//
+		private static bool TraversePlugin (Plugin plugin,
+						    SortedList order,
+						    int pass)
+		{
+			plugin.ResolvePass = pass;
+			plugin.Discovered = ++time;
+			
+			foreach (string className in plugin.Dependencies) {
+				Plugin child = FindPlugin (plugins, className);
+				
+				// Check that the dependency class exists.
+				if (child == null) {
+					log.Error ("Class not found: " + className);
+					return false;
+				}
+				
+				// Check for cycles in the dependency graph.
+				if (child.ResolvePass != pass) {
+					if (!TraversePlugin (child, order, pass)) {
+						log.Error ("Unable to load: " + child.Name);
+						return false;
+					}
+				} else {
+					log.Error ("Circular dependency: " + child.Name);
+					return false;
+				}
+			}
+			
+			plugin.Finished = ++time;
+			order.Add (plugin.Finished, plugin);
+			
+			return true;
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Core/core.build
===================================================================
--- branches/MonoDevelop-plan-43/src/Core/core.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Core/core.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<project name="core" default="build">
+    <target name="build" description="compiles the source code">
+        <!-- build monodevelop.exe -->
+        <csc target="exe" output="${path::combine(bin.dir, 'monodevelop.exe')}" debug="${build.debug}">
+            <sources>
+                <include name="*.cs"/>
+            </sources>
+            <!-- FIXME: use $prefix/lib? -->
+            <references basedir="/usr/lib">
+                <include name="log4net.dll"/>
+            </references>
+        </csc>
+
+        <!-- install the plugin file -->
+        <copy file="monodevelop.exe.config.in" tofile="monodevelop.exe.config"/>
+        <replaceregex match="@monodevelop_plugin_dir@" replace="${path::combine(lib.dir, 'monodevelop')}" file="monodevelop.exe.config"/>
+        <replaceregex match="@monodevelop_ui_dir@" replace="${path::combine(share.dir, 'ui')}" file="monodevelop.exe.config"/>
+        <move file="monodevelop.exe.config" todir="${bin.dir}"/>
+    </target>
+</project>

Added: branches/MonoDevelop-plan-43/src/Core/monodevelop.exe.config.in
===================================================================
--- branches/MonoDevelop-plan-43/src/Core/monodevelop.exe.config.in	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Core/monodevelop.exe.config.in	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+	<appSettings>
+		<add key="imagePath" value="@monodevelop_images_dir@"/>
+		<add key="pluginPath" value="@monodevelop_plugin_dir@"/>
+		<add key="resourcePath" value="@monodevelop_resource_dir@"/>
+		<add key="uiPath" value="@monodevelop_ui_dir@"/>
+	</appSettings>
+	<configSections>
+		<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
+	</configSections>
+	<log4net>
+		<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
+			<layout type="log4net.Layout.PatternLayout">
+				<param name="ConversionPattern" value="%-5p - %m%n"/>
+			</layout>
+		</appender>
+		<root>
+			<level value="ALL"/>
+			<appender-ref ref="ConsoleAppender"/>
+		</root>
+	</log4net>
+</configuration>

Added: branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewer.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewer.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewer.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,76 @@
+//
+// EditorNodeViewer.cs: Node viewer for text/* mimetypes.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using Gtk;
+using MonoDevelop.Content;
+
+namespace MonoDevelop.Editor {
+	public class EditorNodeViewer : INodeViewer {
+		private ScrolledWindow structure;
+		private TreeView tree;
+		private ScrolledWindow viewer;
+		private TextView editor;
+		private string description;
+		private string title;
+		private Gdk.Pixbuf icon;
+	
+		public EditorNodeViewer ()
+		{
+			structure = new ScrolledWindow ();
+			structure.ShadowType = ShadowType.In;
+			tree = new TreeView ();
+			structure.Add (tree);
+			
+			viewer = new ScrolledWindow ();
+			viewer.ShadowType = ShadowType.In;
+			editor = new TextView ();
+			viewer.Add (editor);
+		}
+		
+		public Widget StructureWidget {
+			get {
+				return structure;
+			}
+		}
+	
+		public Widget ViewerWidget {
+			get {
+				return viewer;
+			}
+		}
+	
+		public string ViewerDescription {
+			get {
+				return description;
+			}
+		}
+	
+		public string ViewerTitle {
+			get {
+				return title;
+			}
+		}
+	
+		public Gdk.Pixbuf ViewerIcon {
+			get {
+				return icon;
+			}
+		}
+		
+		public static void InitializePlugin (byte major, byte minor)
+		{
+			ContentManager.AddNodeViewerFactory (new EditorNodeViewerFactory ());
+		}
+		
+		public static void FinalizePlugin ()
+		{
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewerFactory.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewerFactory.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Editor/EditorNodeViewerFactory.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,30 @@
+//
+// EditorNodeViewerFactory.cs: Node viewer factory for text/* mimetypes.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using MonoDevelop.Content;
+using MonoDevelop.Node;
+
+namespace MonoDevelop.Editor {
+	public class EditorNodeViewerFactory : INodeViewerFactory {
+		public EditorNodeViewerFactory ()
+		{
+		}
+		
+		public bool CanDisplayNode (Node node)
+		{
+			return true;
+		}
+		
+		public INodeViewer CreateNodeViewer (Node node)
+		{
+			return new EditorNodeViewer ();
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Editor/editor.build
===================================================================
--- branches/MonoDevelop-plan-43/src/Editor/editor.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Editor/editor.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<project name="monodevelop.plugins.editor" default="build">
+    <!-- build the project -->
+    <target name="build" description="compiles the source code">
+        <property name="assemblyfile" value="${path::combine(plugin.dir, 'editor.dll')}"/>
+        <csc target="library" output="${assemblyfile}" debug="${build.debug}">
+            <arg value="${gnome-sharp.libs}"/>
+            <sources>
+                <include name="*.cs"/>
+            </sources>
+            <references basedir="${build.dir}">
+                <include name="bin/monodevelop.exe"/>
+                <include name="lib/gdl-sharp.dll"/>
+                <include name="lib/log4net.dll"/>
+                <include name="lib/monodevelop/content.dll"/>
+                <include name="lib/monodevelop/node.dll"/>
+                <include name="lib/monodevelop/workbench.dll"/>
+            </references>
+        </csc>
+        
+        <!-- install the plugin file -->
+        <copy file="editor.plugin.in" tofile="editor.plugin"/>
+        <replaceregex match="@assembly@" replace="${assemblyfile}" file="editor.plugin" byline="true" />
+        <move file="editor.plugin" todir="${plugin.dir}"/>
+        
+        <!-- install the ui file -->
+        <copy file="editor.ui" todir="${ui.dir}"/>
+    </target>
+</project>

Added: branches/MonoDevelop-plan-43/src/Editor/editor.plugin.in
===================================================================
--- branches/MonoDevelop-plan-43/src/Editor/editor.plugin.in	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Editor/editor.plugin.in	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>@assembly@</assembly>
+	<class name="MonoDevelop.Editor.EditorNodeViewer"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/src/Editor/editor.ui
===================================================================
--- branches/MonoDevelop-plan-43/src/Editor/editor.ui	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Editor/editor.ui	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<menubar>
+	<menu name="EditMenu" action="EditMenuAction">
+		<placeholder name="EditEditorPlaceholder">
+			<menuitem name="EditUndo" action="EditUndoAction"/>
+			<menuitem name="EditRedo" action="EditRedoAction"/>
+			<separator/>
+			<menuitem name="EditCut" action="EditCutAction"/>
+			<menuitem name="EditCopy" action="EditCopyAction"/>
+			<menuitem name="EditPaste" action="EditPasteAction"/>
+			<menuitem name="EditDelete" action="EditDeleteAction"/>
+			<separator/>
+			<menuitem name="EditSelectAll" action="EditSelectAllaction"/>
+		</placeholder>
+	</menu>
+</menubar>
+<toolbar name="toolbar">
+	<toolitem name="EditUndo" action="EditUndoAction"/>
+	<toolitem name="EditRedo" action="EditRedoAction"/>
+	<separator/>
+	<toolitem name="EditCut" action="EditCutAction"/>
+	<toolitem name="EditCopy" action="EditCopyAction"/>
+	<toolitem name="EditPaste" action="EditPasteAction"/>
+</toolbar>

Added: branches/MonoDevelop-plan-43/src/Node/Buffer.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/Buffer.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/Buffer.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,102 @@
+//
+// Buffer.cs: A Buffer is an in-memory representation of the information
+//            referred to by a FileNode, and as such may represent changes to a
+//            FileNode that have not yet been saved to permanent storage.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using System.IO;
+using Gnome.Vfs;
+
+namespace MonoDevelop.Node {
+	public delegate byte[] BufferContentCallback (Buffer buffer);
+
+	public class Buffer {
+		private BufferContentCallback callback;
+		private long lastModified;
+		private long sourceLastModified;
+		private string uri;
+
+		internal Buffer (string uri)
+		{
+		}
+		
+		internal Buffer (Gnome.Vfs.Uri uri)
+		{
+		}
+		
+		public BufferContentCallback BufferUpdater {
+			set {
+				callback = value;
+			}
+		}
+		
+		public long LastModified {
+			get {
+				return lastModified;
+			}
+		}
+		
+		public bool Modified {
+			get {
+				return false;
+			}
+			set {
+			}
+		}
+		
+		public bool ReadOnly {
+			get {
+				return true;
+			}
+		}
+		
+		public int Size {
+			get {
+				return 0;
+			}
+		}
+		
+		
+		public long SourceLastModified {
+			get {
+				return sourceLastModified;
+			}
+		}
+		
+		public string Uri {
+			get {
+				return uri;
+			}
+		}
+		
+		public Stream Reader {
+			get {
+				return null;
+			}
+		}
+
+		public Stream Writer {
+			get {
+				return null;
+			}
+		}
+		
+		public void Check ()
+		{
+		}
+		
+		public void Revert ()
+		{
+		}
+		
+		public void Save ()
+		{
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Node/FileNode.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/FileNode.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/FileNode.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,262 @@
+//
+// FileNode.cs: Abstract base class from which all nodes must inherit.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Reflection;
+using Gdk;
+using Gnome.Vfs;
+using log4net;
+
+namespace MonoDevelop.Node {
+	public class FileNode : Node {
+		static private readonly ILog log = LogManager.GetLogger (typeof (FileNode));
+		static private Hashtable fileNodeTypes = new Hashtable ();
+	
+		private Node parent;
+		private Project project;
+		private Gnome.Vfs.Uri uri;
+		private Gnome.Vfs.FileInfo info;
+
+		public FileNode (Project project, Node parent, string uri)
+		{
+			this.project = project;
+			this.parent = parent;
+			this.uri = new Gnome.Vfs.Uri (uri);
+		}
+		
+		public override bool CanDelete {
+			get {
+				return uri.Exists && 
+				       ((File.GetAttributes (filename) &
+				         FileAttributes.ReadOnly) != FileAttributes.ReadOnly);
+			}
+		}
+		
+		public override bool CanRename {
+			get {
+				return uri.Exists && 
+				       ((File.GetAttributes (filename) &
+				         FileAttributes.ReadOnly) != FileAttributes.ReadOnly);
+			}
+		}
+		
+		public override bool CanRevert {
+			get {
+				return Vfs.Exists (filename);
+			}
+		}
+		
+		public override bool CanSave {
+			get {
+				return !uri.Exists || 
+				       (uri.Exists && 
+				        ((File.GetAttributes (filename) &
+				          FileAttributes.ReadOnly) != FileAttributes.ReadOnly));
+			}
+		}
+		
+		public override bool CanSaveAs {
+			get {
+				return true;
+			}
+		}
+		
+		public override Node[] Children {
+			get {
+				return null;
+			}
+		}
+		
+		public override Node[] DisplayChildren {
+			get {
+				return null;
+			}
+		}
+		
+		public override Pixbuf DisplayIcon {
+			get {
+				return null;
+			}
+		}
+		
+		public override string DisplayName {
+			get {
+				return Path.GetFileName (filename);
+			}
+		}
+		
+		public override bool HasChildren {
+			get {
+				return false;
+			}
+		}
+		
+		public override bool HasDisplayChildren {
+			get {
+				return false;
+			}
+		}
+		
+		public override string LongDisplayName {
+			get {
+				return Path.GetFullPath (filename);
+			}
+		}
+		
+		public string MimeType {
+			get {
+				return mimetype;
+			}
+		}
+		
+		public override Node Parent {
+			get {
+				return parent;
+			}
+			set {
+			}
+		}
+		
+		public override bool Modified {
+			get {
+				return false;
+			}
+		}
+		
+		public override bool Persistent {
+			get {
+				return false;
+			}
+		}
+		
+		public override Project Project {
+			get {
+				return project;
+			}
+		}
+		
+		protected Gnome.Vfs.FileInfo FileInfo {
+			get {
+				if (info == null)
+					info = new Gnome.Vfs.FileInfo (uri);
+				return info;
+			}
+		}
+		
+		public override void Delete ()
+		{
+		}
+		
+		public override void MakePersistent ()
+		{
+		}
+
+		public override void Rename ()
+		{
+		}
+		
+		public override void Revert ()
+		{
+		}
+		
+		public override void Save ()
+		{
+		}
+		
+		public override void SaveAndDelete ()
+		{
+		}
+		
+		public override void SaveAs ()
+		{
+		}
+		
+		////////////////////////////////////////////////////////////////////////
+		// Static methods
+		////////////////////////////////////////////////////////////////////////
+	
+		static public FileNodeEntry FindFileNodeType (string mimetype)
+		{
+			if (fileNodeTypes.Contains (mimetype)) {
+				ArrayList types = fileNodeTypes[mimetype] as ArrayList;
+				return types[0] as FileNodeEntry;
+			} else {
+				Console.WriteLine ("doesn't contain {0}", mimetype);
+				return null;
+			}
+		}
+		
+		static public void RegisterFileNodeType (string mimetype,
+							 string description,
+							 Type type,
+							 Pixbuf icon)
+		{
+			ArrayList types;
+			
+			log.Debug ("Registering filenode: " + mimetype);
+
+			if (fileNodeTypes.Contains (mimetype)) {
+				types = fileNodeTypes[mimetype] as ArrayList;
+				types.Add (new FileNodeEntry (mimetype,
+							      description,
+							      type, icon));			
+				fileNodeTypes[mimetype] = types;
+			} else {
+				types = new ArrayList ();
+				types.Add (new FileNodeEntry (mimetype,
+							      description,
+							      type, icon));			
+				fileNodeTypes.Add (mimetype, types);
+			}
+
+		}
+	}
+	
+	public class FileNodeEntry {
+		private string mimetype;
+		private string description;
+		private Type type;
+		private Pixbuf icon;
+		
+		public string MimeType {
+			get {
+				return mimetype;
+			}
+		}
+		
+		public string Description {
+			get {
+				return description;
+			}
+		}
+		
+		public Type Type {
+			get {
+				return type;
+			}
+		}
+		
+		public Pixbuf Icon {
+			get {
+				return icon;
+			}
+		}
+	
+		public FileNodeEntry (string mimetype, string description,
+				      Type type, Pixbuf icon)
+		{
+			this.mimetype = mimetype;
+			this.description = description;
+			this.type = type;
+			this.icon = icon;
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Node/Node.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/Node.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/Node.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,106 @@
+//
+// Node.cs: Abstract base class from which all nodes must inherit.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using Gdk;
+using System;
+
+namespace MonoDevelop.Node {
+	abstract public class Node {
+		abstract public bool CanDelete {
+			get;
+		}
+		
+		abstract public bool CanRename {
+			get;
+		}
+		
+		abstract public bool CanRevert {
+			get;
+		}
+		
+		abstract public bool CanSave {
+			get;
+		}
+		
+		abstract public bool CanSaveAs {
+			get;
+		}
+		
+		abstract public Node[] Children {
+			get;
+		}
+		
+		abstract public Node[] DisplayChildren {
+			get;
+		}
+		
+		abstract public Pixbuf DisplayIcon {
+			get;
+		}
+		
+		abstract public string DisplayName {
+			get;
+		}
+		
+		abstract public bool HasChildren {
+			get;
+		}
+	
+		abstract public bool HasDisplayChildren {
+			get;
+		}
+	
+		abstract public string LongDisplayName {
+			get;
+		}
+	
+		abstract public Node Parent {
+			get;
+			set;
+		}
+		
+		abstract public bool Modified {
+			get;
+		}
+		
+		abstract public bool Persistent {
+			get;
+		}
+		
+		abstract public Project Project {
+			get;
+		}
+		
+		abstract public void Delete ();
+		
+		abstract public void MakePersistent ();
+
+		abstract public void Rename ();
+		
+		abstract public void Revert ();
+		
+		abstract public void Save ();
+		
+		abstract public void SaveAndDelete ();
+		
+		abstract public void SaveAs ();
+		
+		public static void InitializePlugin (byte major, byte minor)
+		{
+			FileNode.RegisterFileNodeType ("text/x-csharp",
+						       "Text file",
+						       typeof (TextFileNode),
+						       null);
+		}
+		
+		public static void FinalizePlugin ()
+		{
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Node/Project.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/Project.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/Project.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,13 @@
+//
+// Project.cs: Abstract base class from which all nodes must inherit.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+namespace MonoDevelop.Node {
+	abstract public class Project : Node {
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Node/TextFileNode.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/TextFileNode.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/TextFileNode.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,22 @@
+//
+// TextFileNode.cs: Class for text files.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using log4net;
+
+namespace MonoDevelop.Node {
+	public class TextFileNode : FileNode {
+		static private readonly ILog log = LogManager.GetLogger (typeof (TextFileNode));
+	
+		public TextFileNode (Project project, Node parent, string filename)
+			: base (project, parent, filename)
+		{
+			log.Debug ("Created instance of TextFileNode");
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Node/node.build
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/node.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/node.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<project name="monodevelop.plugins.node" default="build">
+    <!-- build the project -->
+    <target name="build" description="compiles the source code">
+        <property name="assemblyfile" value="${path::combine(plugin.dir, 'node.dll')}"/>
+        <csc target="library" output="${assemblyfile}" debug="${build.debug}">
+            <arg value="${gtk-sharp.libs}"/>
+            <arg value="${gnome-vfs-sharp.libs}"/>
+            <sources>
+                <include name="*.cs"/>
+            </sources>
+            <references basedir="${build.dir}">
+                <include name="lib/log4net.dll"/>
+                <include name="bin/monodevelop.exe"/>
+            </references>
+        </csc>
+        
+        <!-- install the plugin file -->
+        <copy file="node.plugin.in" tofile="node.plugin"/>
+        <replaceregex match="@assembly@" replace="${assemblyfile}" file="node.plugin" byline="true" />
+        <move file="node.plugin" todir="${plugin.dir}"/>
+    </target>
+</project>

Added: branches/MonoDevelop-plan-43/src/Node/node.plugin.in
===================================================================
--- branches/MonoDevelop-plan-43/src/Node/node.plugin.in	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Node/node.plugin.in	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>@assembly@</assembly>
+	<class name="MonoDevelop.Node.Node"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/src/Workbench/IWorkbenchWidgetFactory.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Workbench/IWorkbenchWidgetFactory.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Workbench/IWorkbenchWidgetFactory.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,33 @@
+//
+// IWorkbenchWidgetFactory.cs: Factory interface for creating workbench widgets.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2003
+//
+
+using Gtk;
+using System;
+
+namespace MonoDevelop.Workbench {
+	public interface IWorkbenchWidgetFactory {
+		string WidgetName {
+			get;
+		}
+	
+		string WidgetTitle {
+			get;
+		}
+		
+		string WidgetIcon {
+			get;
+		}
+		
+		bool Dockable {
+			get;
+		}
+	
+		Widget CreateWidget (Workbench workbench);
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Workbench/Workbench.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Workbench/Workbench.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Workbench/Workbench.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,286 @@
+//
+// Workbench.cs: Main window containing a menu-, tool- and statusbar.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using System.Collections;
+using System.Configuration;
+using System.IO;
+using Gdk;
+using Gtk;
+using Gnome;
+using Gdl;
+using log4net;
+
+namespace MonoDevelop.Workbench {
+	public class Workbench : Gtk.Window {
+		private static readonly ILog log = LogManager.GetLogger (typeof (Workbench));
+		private static bool initialized = false;
+		private static ArrayList workbenches = new ArrayList ();
+		private static ArrayList widgets = new ArrayList ();
+		private static ArrayList groups = new ArrayList ();
+		private static ArrayList uiinfos = new ArrayList ();
+	
+		private VBox box;
+		private Dock dock;
+		private Statusbar statusbar;
+		private UIManager manager;
+	
+		private Workbench () : base ("MonoDevelop")
+		{
+			box = new VBox (false, 0);
+			Add (box);
+	
+			statusbar = new Statusbar ();
+			box.PackEnd (statusbar, false, true, 0);
+	
+			dock = new Dock ();
+			box.PackEnd (dock, true, true, 0);
+			
+			manager = new UIManager ();
+			manager.AddWidget += new AddWidgetHandler (OnWidgetAdd);
+			manager.ConnectProxy += new ConnectProxyHandler (OnProxyConnect);
+			
+			AddActions ();
+			AddWidgets ();
+			UpdateUI ();
+		}
+		
+		private Workbench (string[] files) : this ()
+		{
+		}
+	
+		private void AddActions ()
+		{
+			ActionGroup group = new ActionGroup ("Workbench");
+			Action action;
+
+			// File menu.
+			action = new Action ("FileMenuAction", "_File", null, null);
+			group.Add (action);
+			
+			action = new Action ("CloseWindowAction", "Close _Window",
+					     "Close this window", null);
+			action.Activated += new EventHandler (OnCloseWindow);
+			group.Add (action, "<control><shift>q");
+
+			action = new Action ("QuitAction", null, "Quit the program",
+					     Gtk.Stock.Quit);
+			action.Activated += new EventHandler (OnQuit);
+			group.Add (action, "<control>q");
+
+			// Edit menu.
+			action = new Action ("EditMenuAction", "_Edit", null, null);
+			group.Add (action);
+			
+			// View menu.
+			action = new Action ("ViewMenuAction", "_View", null, null);
+			group.Add (action);
+			
+			// Window menu.
+			action = new Action ("WindowMenuAction", "_Window", null,
+					     null);
+			group.Add (action);
+			
+			action = new Action ("NewWindowAction", "_New Window",
+					     "Create a new window", null);
+			group.Add (action);
+			
+			action = new Action ("SaveLayoutAction", "_Save Layout...",
+					     "Save the current layout",
+					     Gtk.Stock.Save);
+			group.Add (action);
+			
+			action = new Action ("LayoutsAction", "_Layouts",
+					     null, null);
+			group.Add (action);
+			
+			// Help menu.
+			action = new Action ("HelpMenuAction", "_Help", null, null);
+			group.Add (action);
+
+			action = new Action ("AboutAction", "_About",
+					     "About this application",
+					     Gnome.Stock.About);
+			action.Activated += new EventHandler (OnAbout);
+			group.Add (action);
+			
+			AddActionGroup (group);
+			AddUiFromFile ("workbench.ui");
+		}
+	
+		private void AddWidgets ()
+		{
+			foreach (IWorkbenchWidgetFactory factory in widgets) {
+				DockItem item = new DockItem (factory.WidgetName,
+							      factory.WidgetTitle,
+							      factory.WidgetIcon,
+							      factory.Dockable ? 
+								DockItemBehavior.Normal :
+								DockItemBehavior.Locked);
+				item.Add (factory.CreateWidget (this));
+				dock.AddItem (item, DockPlacement.Top);
+			}
+		}
+	
+		private void UpdateUI ()
+		{
+			foreach (ActionGroup group in groups)
+				manager.InsertActionGroup (group, 0);
+	
+			foreach (string ui in uiinfos)
+				manager.AddUiFromString (ui);
+		}
+	
+		////////////////////////////////////////////////////////////////////////
+		// Event handlers
+		////////////////////////////////////////////////////////////////////////
+	
+		private void OnCloseWindow (object obj, EventArgs args)
+		{
+		}
+	
+		private void OnQuit (object obj, EventArgs args)
+		{
+			Application.Quit ();
+		}
+	
+		private void OnAbout (object obj, EventArgs args)
+		{
+			/*AboutDialog about = new AboutDialog ();
+			about.Run ();
+			about.Destroy ();*/
+		}
+		
+		private void OnWidgetAdd (object obj, AddWidgetArgs args)
+		{
+			box.PackStart (args.Widget, false, true, 0);
+			args.Widget.Show ();
+		}
+	
+		private void OnProxyConnect (object obj, ConnectProxyArgs args)
+		{
+			if (args.Proxy is MenuItem) {
+				((GLib.Object)args.Proxy).Data ["action"] = args.Action;
+				((Item)args.Proxy).Selected += new EventHandler (OnSelect);
+				((Item)args.Proxy).Deselected += new EventHandler (OnDeselect);
+			}
+		}
+
+		private void OnSelect (object obj, EventArgs args)
+		{
+			Action action = ((GLib.Object)obj).Data["action"] as Action;
+			if (action.Tooltip != null)
+				statusbar.Push (0, action.Tooltip);
+		}
+
+		private void OnDeselect (object obj, EventArgs args)
+		{
+			statusbar.Pop (0);
+		}
+
+		////////////////////////////////////////////////////////////////////////
+		// Static methods
+		////////////////////////////////////////////////////////////////////////
+	
+		internal static void CreateDefaultInstance (string[] args)
+		{
+			if (initialized) {
+				log.Error ("Workbench.CreateDefaultInstance may only be called once");
+				return;
+			}
+	
+			Program program = new Program ("Workbench", "0.1", Modules.UI, args);
+	
+			Workbench wb = new Workbench (args);
+			wb.DeleteEvent += new DeleteEventHandler (OnWindowDelete);
+			wb.ShowAll ();
+			workbenches.Add (wb);
+			
+			initialized = true;
+			
+			program.Run ();
+		}
+	
+		static void OnWindowDelete (object obj, DeleteEventArgs args)
+		{
+			Workbench wb = obj as Workbench;
+			workbenches.Remove (wb);
+			
+			if (workbenches.Count == 0)
+				Application.Quit ();
+	
+			args.RetVal = true;
+		}
+	
+		public static Workbench ActiveWorkbench {
+			get {
+				return workbenches[0] as Workbench;
+			}
+		}
+	
+		public static void AddActionGroup (ActionGroup group)
+		{
+			groups.Add (group);
+		}
+	
+		public static void RemoveActionGroup (ActionGroup group)
+		{
+			groups.Remove (group);
+		}
+	
+		public static void AddUiFromString (string ui)
+		{
+			uiinfos.Add (ui);
+		}
+		
+		public static void AddUiFromFile (string filename)
+		{
+			// Look in the uiPath if the filename doesn't exist.
+			if (!System.IO.File.Exists (filename)) {
+				string uidir = ConfigurationSettings.AppSettings["uiPath"];
+				string uifile = uidir + System.IO.Path.DirectorySeparatorChar + filename;
+	
+				if (System.IO.File.Exists (uifile)) {
+					filename = uifile;
+				} else {
+					log.Error ("UI file " + filename + " not found");
+					return;
+				}
+			}
+	
+			// Read the complete file and add it to uiinfos.
+			Stream stream = System.IO.File.OpenRead (filename);
+			StreamReader sr = new StreamReader (stream);
+			uiinfos.Add (sr.ReadToEnd ());
+		}
+	
+		public static void AddWidgetFactory (IWorkbenchWidgetFactory factory)
+		{
+			widgets.Add (factory);
+		}
+		
+		public static void RemoveWidgetFactory (IWorkbenchWidgetFactory factory)
+		{
+			widgets.Remove (factory);
+		}
+
+		////////////////////////////////////////////////////////////////////////
+		// Plugin methods
+		////////////////////////////////////////////////////////////////////////
+
+		public static void InitializePlugin (byte major, byte minor)
+		{
+			MonoDevelop.RegisterCommand (null, new WorkbenchCommand ());
+		}
+		
+		public static void FinalizePlugin ()
+		{
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Workbench/WorkbenchCommand.cs
===================================================================
--- branches/MonoDevelop-plan-43/src/Workbench/WorkbenchCommand.cs	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Workbench/WorkbenchCommand.cs	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,35 @@
+//
+// WorkbenchCommand.cs: Default command handler which creates a new Workbench window.
+//
+// Author:
+//   Jeroen Zwartepoorte <jeroen at xs4all.nl>
+//
+// (C) Copyright Jeroen Zwartepoorte 2004
+//
+
+using System;
+using log4net;
+using MonoDevelop;
+
+namespace MonoDevelop.Workbench {
+	class WorkbenchCommand : ICommand {
+		private static readonly ILog log = LogManager.GetLogger (typeof (WorkbenchCommand));
+	
+		public string CommandDescription {
+			get {
+				return null;
+			}
+		}
+		
+		public bool TakesCommandArguments {
+			get {
+				return true;
+			}
+		}
+		
+		public void InvokeCommand (string[] args)
+		{
+			Workbench.CreateDefaultInstance (args);
+		}
+	}
+}

Added: branches/MonoDevelop-plan-43/src/Workbench/workbench.build
===================================================================
--- branches/MonoDevelop-plan-43/src/Workbench/workbench.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Workbench/workbench.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<project name="monodevelop.plugins.workbench" default="build">
+    <!-- build the project -->
+    <target name="build" description="compiles the source code">
+        <property name="assemblyfile" value="${path::combine(plugin.dir, 'workbench.dll')}"/>
+        <csc target="library" output="${assemblyfile}" debug="${build.debug}">
+            <arg value="${gnome-sharp.libs}"/>
+            <sources>
+                <include name="*.cs"/>
+            </sources>
+            <references basedir="${build.dir}">
+                <include name="lib/gdl-sharp.dll"/>
+                <include name="lib/log4net.dll"/>
+                <include name="bin/monodevelop.exe"/>
+            </references>
+        </csc>
+        
+        <!-- install the plugin file -->
+        <copy file="workbench.plugin.in" tofile="workbench.plugin"/>
+        <replaceregex match="@assembly@" replace="${assemblyfile}" file="workbench.plugin" byline="true" />
+        <move file="workbench.plugin" todir="${plugin.dir}"/>
+        
+        <!-- install the ui file -->
+        <copy file="workbench.ui" todir="${ui.dir}"/>
+    </target>
+</project>

Added: branches/MonoDevelop-plan-43/src/Workbench/workbench.plugin.in
===================================================================
--- branches/MonoDevelop-plan-43/src/Workbench/workbench.plugin.in	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Workbench/workbench.plugin.in	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin version="1.0">
+	<assembly>@assembly@</assembly>
+	<class name="MonoDevelop.Workbench.Workbench"/>
+</plugin>

Added: branches/MonoDevelop-plan-43/src/Workbench/workbench.ui
===================================================================
--- branches/MonoDevelop-plan-43/src/Workbench/workbench.ui	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/Workbench/workbench.ui	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<menubar>
+	<menu name="FileMenu" action="FileMenuAction">
+		<placeholder name="FileOpenPlaceholder"/>
+		<placeholder name="FileOpenProjectPlaceholder"/>
+		<placeholder name="FileImportProjectPlaceholder"/>
+		<placeholder name="FileRecentFilesPlaceholder"/>
+		<placeholder name="FileSavePlaceholder"/>
+		<placeholder name="FileClosePlaceholder"/>
+		<placeholder name="FileCloseProject"/>
+		<placeholder name="FilePrintPlaceholder" position="top"/>
+		<separator/>
+		<menuitem name="FileCloseWindow" action="CloseWindowAction"/>
+		<menuitem name="FileQuit" action="QuitAction"/>
+	</menu>
+	
+	<menu name="EditMenu" action="EditMenuAction">
+		<placeholder name="EditEditorPlaceholder"/>
+		<placeholder name="EditPluginPlaceholder" position="top"/>
+		<placeholder name="EditPreferencesPlaceholder" position="top"/>
+	</menu>
+	
+	<menu name="ViewMenu" action="ViewMenuAction">
+	</menu>
+	
+	<placeholder name="SearchMenuPlaceholder"/>
+
+	<placeholder name="ProjectMenuPlaceholder"/>
+
+	<placeholder name="RunMenuPlaceholder"/>
+	
+	<placeholder name="ToolsMenuPlaceholder"/>
+
+	<menu name="WindowMenu" action="WindowMenuAction">
+		<menuitem name="WindowNew" action="NewWindowAction"/>
+		<separator/>
+		<menuitem name="WindowSaveLayout" action="SaveLayoutAction"/>
+		<separator/>
+		<menu name="WindowLayouts" action="LayoutsAction">
+			<placeholder name="Layouts"/>
+		</menu>
+	</menu>
+	
+	<menu name="HelpMenu" action="HelpMenuAction">
+		<placeholder name="HelpOps"/>
+		<placeholder name="HelpPlugins"/>
+		<menuitem name="HelpAbout" action="AboutAction"/>
+	</menu>
+</menubar>
+<toolbar name="toolbar">
+	<placeholder name="FileOpenPlaceholder"/>
+	<toolitem name="QuitButton" action="QuitAction"/>
+</toolbar>

Added: branches/MonoDevelop-plan-43/src/plugins.build
===================================================================
--- branches/MonoDevelop-plan-43/src/plugins.build	2004-07-27 11:05:03 UTC (rev 1918)
+++ branches/MonoDevelop-plan-43/src/plugins.build	2004-07-27 17:19:59 UTC (rev 1919)
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<project name="monodevelop.plugins" default="build">
+    <property name="plugin.dir" value="${path::combine(lib.dir, 'monodevelop')}"/>
+    <property name="ui.dir" value="${path::combine(share.dir, 'ui')}"/>
+
+    <!-- check for pkg-config dependencies and initialize properties -->
+    <target name="init" description="initializes build properties">
+        <!-- check for gtk-sharp-2.0 -->
+        <if test="${pkg-config::exists('gtk-sharp-2.0')}">
+            <if test="${pkg-config::is-atleast-version('gtk-sharp-2.0', '1.2.99')}">
+                <property name="gtk-sharp.libs" value="${pkg-config::get-link-flags('gtk-sharp-2.0')}"/>
+            </if>
+        </if>
+        <!-- check for gnome-vfs-sharp-2.0 -->
+        <if test="${pkg-config::exists('gnome-vfs-sharp-2.0')}">
+            <if test="${pkg-config::is-atleast-version('gnome-vfs-sharp-2.0', '1.2.99')}">
+                <property name="gnome-vfs-sharp.libs" value="${pkg-config::get-link-flags('gnome-vfs-sharp-2.0')}"/>
+            </if>
+        </if>
+        <!-- check for gtksourceview-sharp -->
+        <if test="${pkg-config::exists('gtksourceview-sharp')}">
+            <if test="${pkg-config::is-atleast-version('gtksourceview-sharp', '0.3')}">
+                <property name="gtksourceview-sharp.libs" value="${pkg-config::get-link-flags('gtksourceview-sharp')}"/>
+            </if>
+        </if>
+        
+        <!-- output a message about required dependencies if not all dependencies exist -->
+        <if test="${not(property::exists('gtk-sharp.libs'))}">
+            <call target="dependencies"/>
+            <fail message="gtk-sharp dependency not found"/>
+        </if>
+        <if test="${not(property::exists('gnome-vfs-sharp.libs'))}">
+            <call target="dependencies"/>
+            <fail message="gnome-vfs-sharp dependency not found"/>
+        </if>
+        <if test="${not(property::exists('gtksourceview-sharp.libs'))}">
+            <call target="dependencies"/>
+            <fail message="gtksourceview-sharp dependency not found"/>
+        </if>
+    </target>
+
+    <!-- output a list of required dependencies -->
+    <target name="dependencies" description="outputs a list of required dependencies">
+        <echo message="MonoDevelop requires the following dependencies:"/>
+        <echo message="    gtk-sharp-2.0 >= 1.2.99"/>
+        <echo message="    gtksourceview-sharp >= 0.4"/>
+        <echo message=""/>
+        <echo message="Install these packages first before building MonoDevelop"/>
+    </target>
+
+    <!-- cleanup build files -->
+    <target name="clean" description="remove all files created by the build task">
+        <delete dir="${plugin.dir}" failonerror="false"/>
+    </target>
+
+    <!-- build the project -->
+    <target name="build" depends="init" description="compiles the source code">
+        <!-- create directories -->
+        <mkdir dir="${plugin.dir}"/>
+        <!-- build MonoDevelop.Node assembly -->
+        <nant buildfile="Node/node.build" target="build"/>
+        <!-- build MonoDevelop.Workbench assembly -->
+        <nant buildfile="Workbench/workbench.build" target="build"/>
+        <!-- build MonoDevelop.Content assembly -->
+        <nant buildfile="Content/content.build" target="build"/>
+        <!-- build MonoDevelop.Editor assembly -->
+        <nant buildfile="Editor/editor.build" target="build"/>
+    </target>
+</project>




More information about the Monodevelop-patches-list mailing list