Skip to content

Instantly share code, notes, and snippets.

@mhutch
Created March 6, 2014 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhutch/9399848 to your computer and use it in GitHub Desktop.
Save mhutch/9399848 to your computer and use it in GitHub Desktop.
diff --git a/main/external/Newtonsoft.Json b/main/external/Newtonsoft.Json
--- a/main/external/Newtonsoft.Json
+++ b/main/external/Newtonsoft.Json
@@ -1 +1 @@
-Subproject commit b8ff206bd36247fe68e1ec4b862c47c27ef3f367
+Subproject commit b8ff206bd36247fe68e1ec4b862c47c27ef3f367-dirty
diff --git a/main/external/cecil b/main/external/cecil
--- a/main/external/cecil
+++ b/main/external/cecil
@@ -1 +1 @@
-Subproject commit fc76b93e3e0064b2d751796878f9cbe88df1d5f4
+Subproject commit fc76b93e3e0064b2d751796878f9cbe88df1d5f4-dirty
diff --git a/main/external/debugger-libs b/main/external/debugger-libs
--- a/main/external/debugger-libs
+++ b/main/external/debugger-libs
@@ -1 +1 @@
-Subproject commit 4167e311c13d88b1a090fdd30777ad2beb1ad0b6
+Subproject commit 4167e311c13d88b1a090fdd30777ad2beb1ad0b6-dirty
diff --git a/main/external/guiunit b/main/external/guiunit
--- a/main/external/guiunit
+++ b/main/external/guiunit
@@ -1 +1 @@
-Subproject commit 8877cb04f6f2486830eb79af0db81a2196bc06ab
+Subproject commit 8877cb04f6f2486830eb79af0db81a2196bc06ab-dirty
diff --git a/main/external/ikvm b/main/external/ikvm
--- a/main/external/ikvm
+++ b/main/external/ikvm
@@ -1 +1 @@
-Subproject commit aca7bf855027fa7f8c679701e07c9e589a16fc9b
+Subproject commit aca7bf855027fa7f8c679701e07c9e589a16fc9b-dirty
diff --git a/main/external/mono-addins b/main/external/mono-addins
--- a/main/external/mono-addins
+++ b/main/external/mono-addins
@@ -1 +1 @@
-Subproject commit 387f8db55c0d4bb542c979945411dc62f7eb6e0f
+Subproject commit 387f8db55c0d4bb542c979945411dc62f7eb6e0f-dirty
diff --git a/main/external/ngit b/main/external/ngit
--- a/main/external/ngit
+++ b/main/external/ngit
@@ -1 +1 @@
-Subproject commit 292a4e4ff81d1c4f59b04cd2b9bc1a1f588fa4eb
+Subproject commit 292a4e4ff81d1c4f59b04cd2b9bc1a1f588fa4eb-dirty
diff --git a/main/external/nrefactory b/main/external/nrefactory
--- a/main/external/nrefactory
+++ b/main/external/nrefactory
@@ -1 +1 @@
-Subproject commit c5ca3ac73640dbb7d2ed8c689097c27c6b16eb11
+Subproject commit c5ca3ac73640dbb7d2ed8c689097c27c6b16eb11-dirty
diff --git a/main/external/raygun4net b/main/external/raygun4net
--- a/main/external/raygun4net
+++ b/main/external/raygun4net
@@ -1 +1 @@
-Subproject commit f22449a80d87f34b1f1469171391b27bd627017d
+Subproject commit f22449a80d87f34b1f1469171391b27bd627017d-dirty
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs
index 33b26f8..adb0166 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs
+++ b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs
@@ -60,6 +60,12 @@ namespace MonoDevelop.XmlEditor.Gui
Gtk.TreeStore outlineTreeStore;
#region Setup and teardown
+
+ public override bool ExtendsEditor (MonoDevelop.Ide.Gui.Document doc, IEditableTextBuffer editor)
+ {
+ //can only attach if there is not already an attached BaseXmlEditorExtension
+ return doc.GetContent<BaseXmlEditorExtension> () == null;
+ }
protected virtual RootState CreateRootState ()
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
index 68842a1..51317c5 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
+++ b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
@@ -54,15 +54,11 @@ namespace MonoDevelop.XmlEditor
XmlSchemaCompletionData defaultSchemaCompletionData;
string defaultNamespacePrefix;
InferredXmlCompletionProvider inferredCompletionData;
- bool inferenceQueued = false;
-
-// bool showSchemaAnnotation;
-
+ bool inferenceQueued;
+
public override bool ExtendsEditor (MonoDevelop.Ide.Gui.Document doc, IEditableTextBuffer editor)
{
- if (doc == null)
- return false;
- return IsFileNameHandled (doc.Name);
+ return IsFileNameHandled (doc.Name) && base.ExtendsEditor (doc, editor);
}
public override void Initialize ()
@@ -450,8 +446,6 @@ namespace MonoDevelop.XmlEditor
foreach (var m in DesktopService.GetMimeTypeInheritanceChain (mimeType)) {
if (m == TextXmlMimeType || m == ApplicationXmlMimeType)
return true;
- if (m == MonoDevelop.XmlEditor.MSBuild.MSBuildTextEditorExtension.MSBuildMimeType)
- return false;
}
return false;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
index 5295ba8..f036f61 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
@@ -634,18 +634,20 @@ namespace MonoDevelop.Ide.Gui
foreach (TextEditorExtensionNode extNode in extensions) {
if (!extNode.Supports (FileName, mimetypeChain))
continue;
- TextEditorExtension ext = (TextEditorExtension)extNode.CreateInstance ();
+ var ext = (TextEditorExtension)extNode.CreateInstance ();
if (ext.ExtendsEditor (this, editor)) {
- if (editorExtension == null)
- editorExtension = ext;
- if (last != null)
+ if (last != null) {
+ ext.Next = last.Next;
last.Next = ext;
- last = ext;
+ last = ext;
+ } else {
+ editorExtension = last = ext;
+ last.Next = editor.AttachExtension (editorExtension);
+ }
ext.Initialize (this);
}
}
- if (editorExtension != null)
- last.Next = editor.AttachExtension (editorExtension);
+
}
void DetachExtensionChain ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment