Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@novell.com>2011-01-28 04:13:30 +0300
committerLluis Sanchez Gual <lluis@novell.com>2011-01-28 14:15:54 +0300
commit76084e53464c21f857ba7345b5d87e07dbeac9b4 (patch)
treef78db843341d4b230a8bc45b2647839a65f9dfd4 /extras/MonoDevelop.AddinAuthoring
parentde9b9ceb5923466a71e9ec797cb3b8338d6aacd5 (diff)
The Extensions and Extension Points views are now shown as attachable views.
Diffstat (limited to 'extras/MonoDevelop.AddinAuthoring')
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.addin.xml5
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.csproj5
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.make4
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinAuthoringService.cs8
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs7
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/DomAssemblyReflector.cs2
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionBaseView.cs130
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorView.cs50
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorWidget.cs2
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorView.cs50
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorWidget.cs2
-rw-r--r--extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/StartupHandler.cs63
-rw-r--r--extras/MonoDevelop.AddinAuthoring/gtk-gui/MonoDevelop.AddinAuthoring.AddinDescriptionWidget.cs2
-rw-r--r--extras/MonoDevelop.AddinAuthoring/gtk-gui/gui.stetic4
14 files changed, 324 insertions, 10 deletions
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.addin.xml b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.addin.xml
index 18227fd215..b78a958c49 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.addin.xml
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.addin.xml
@@ -84,10 +84,11 @@
<CommandItem id="MonoDevelop.AddinAuthoring.Commands.ExtensionModelBrowser" />
</Extension>
- <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+<!-- <Extension path = "/MonoDevelop/Ide/DisplayBindings">
<DisplayBinding class = "MonoDevelop.AddinAuthoring.AddinDescriptionDisplayBinding" insertbefore="DefaultDisplayBinding"/>
</Extension>
-
+-->
+
<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
<Condition id="ItemType" value="ProjectReferenceCollection">
<CommandItem id = "MonoDevelop.AddinAuthoring.Commands.AddAddinDependency" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.AddReference"/>
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.csproj b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.csproj
index a515f3599a..aff5f8063b 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.csproj
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.csproj
@@ -9,7 +9,6 @@
<OutputType>Library</OutputType>
<ApplicationIcon>.</ApplicationIcon>
<AssemblyName>MonoDevelop.AddinAuthoring</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<RootNamespace>MonoDevelop.AddinAuthoring</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -124,6 +123,10 @@
<Compile Include="MonoDevelop.AddinAuthoring\DomAssemblyReflector.cs" />
<Compile Include="MonoDevelop.AddinAuthoring\AddinFileSystem.cs" />
<Compile Include="MonoDevelop.AddinAuthoring\RegistryEventArgs.cs" />
+ <Compile Include="MonoDevelop.AddinAuthoring\StartupHandler.cs" />
+ <Compile Include="MonoDevelop.AddinAuthoring\ExtensionPointsEditorView.cs" />
+ <Compile Include="MonoDevelop.AddinAuthoring\ExtensionEditorView.cs" />
+ <Compile Include="MonoDevelop.AddinAuthoring\ExtensionBaseView.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.make b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.make
index 27c5767f8a..58a9155c84 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.make
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.make
@@ -100,12 +100,15 @@ FILES = \
MonoDevelop.AddinAuthoring/CellRendererExtension.cs \
MonoDevelop.AddinAuthoring/Commands.cs \
MonoDevelop.AddinAuthoring/DomAssemblyReflector.cs \
+ MonoDevelop.AddinAuthoring/ExtensionBaseView.cs \
MonoDevelop.AddinAuthoring/ExtensionDomain.cs \
+ MonoDevelop.AddinAuthoring/ExtensionEditorView.cs \
MonoDevelop.AddinAuthoring/ExtensionEditorWidget.cs \
MonoDevelop.AddinAuthoring/ExtensionModelBrowser.cs \
MonoDevelop.AddinAuthoring/ExtensionModelBrowserWidget.cs \
MonoDevelop.AddinAuthoring/ExtensionNodeInfo.cs \
MonoDevelop.AddinAuthoring/ExtensionNodeTree.cs \
+ MonoDevelop.AddinAuthoring/ExtensionPointsEditorView.cs \
MonoDevelop.AddinAuthoring/ExtensionPointsEditorWidget.cs \
MonoDevelop.AddinAuthoring/ExtensionSelectorDialog.cs \
MonoDevelop.AddinAuthoring/NewExtensionPointDialog.cs \
@@ -120,6 +123,7 @@ FILES = \
MonoDevelop.AddinAuthoring/SelectNodeSetDialog.cs \
MonoDevelop.AddinAuthoring/SelectRepositoryDialog.cs \
MonoDevelop.AddinAuthoring/SolutionAddinData.cs \
+ MonoDevelop.AddinAuthoring/StartupHandler.cs \
MonoDevelop.AddinAuthoring/TypeCellEditor.cs \
MonoDevelop.AddinAuthoring/TypeSelector.cs \
MonoDevelop.AddinAuthoring/Util.cs
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinAuthoringService.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinAuthoringService.cs
index 8dd854eec1..2814b58775 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinAuthoringService.cs
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinAuthoringService.cs
@@ -286,13 +286,17 @@ namespace MonoDevelop.AddinAuthoring
public static void SaveFormatted (PolicyContainer policies, AddinDescription adesc)
{
+ File.WriteAllText (adesc.FileName, SaveFormattedXml (policies, adesc));
+ }
+
+ public static string SaveFormattedXml (PolicyContainer policies, AddinDescription adesc)
+ {
XmlDocument doc = adesc.SaveToXml ();
TextStylePolicy textPolicy = policies.Get<TextStylePolicy> (DesktopService.GetMimeTypeInheritanceChain ("application/x-addin+xml"));
XmlFormattingPolicy xmlPolicy = policies.Get<XmlFormattingPolicy> (DesktopService.GetMimeTypeInheritanceChain ("application/x-addin+xml"));
- string xml = XmlFormatter.FormatXml (textPolicy, xmlPolicy, doc.OuterXml);
- File.WriteAllText (adesc.FileName, xml);
+ return XmlFormatter.FormatXml (textPolicy, xmlPolicy, doc.OuterXml);
}
public static void NotifyRegistryChanged (AddinRegistry reg)
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs
index 28d06dd2f8..8ef91196e9 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/AddinData.cs
@@ -37,6 +37,8 @@ using MonoDevelop.Core.Serialization;
using Mono.Addins;
using Mono.Addins.Description;
using MonoDevelop.Xml.Formatting;
+using MonoDevelop.Projects.Dom.Parser;
+using MonoDevelop.Projects.Dom;
namespace MonoDevelop.AddinAuthoring
@@ -146,6 +148,11 @@ namespace MonoDevelop.AddinAuthoring
if (pfile.Name.EndsWith (".addin.xml") || pfile.Name.EndsWith (".addin"))
return new AddinData (project);
}
+ if (ProjectDomService.GetProjectDom (project).Attributes.Any (
+ a => a.AttributeType.FullName == "Mono.Addins.AddinAttribute" || a.AttributeType.FullName == "Mono.Addins.AddinRootAttribute"
+ )) {
+ return new AddinData (project);
+ }
}
return null;
}
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/DomAssemblyReflector.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/DomAssemblyReflector.cs
index d36aab34c9..ebd6ffbd12 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/DomAssemblyReflector.cs
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/DomAssemblyReflector.cs
@@ -71,7 +71,7 @@ namespace MonoDevelop.AddinAuthoring
else if (ob is IParameter)
return ((IParameter)ob).Attributes;
else if (ob is ProjectDom)
- return new IAttribute [0];
+ return ((ProjectDom)ob).Attributes;
else
throw new NotSupportedException ();
}
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionBaseView.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionBaseView.cs
new file mode 100644
index 0000000000..66a79030d9
--- /dev/null
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionBaseView.cs
@@ -0,0 +1,130 @@
+//
+// ExtensionView.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Mono.Addins.Description;
+using MonoDevelop.Ide.Gui;
+using System.IO;
+
+namespace MonoDevelop.AddinAuthoring
+{
+ public abstract class ExtensionBaseView: IAttachableViewContent
+ {
+ IExtensionViewWidget editor;
+ AddinDescription desc;
+ AddinData data;
+ bool changed;
+
+ public ExtensionBaseView (AddinDescription desc, AddinData data)
+ {
+ this.desc = desc;
+ this.data = data;
+ }
+
+ protected abstract IExtensionViewWidget CreateWidget ();
+
+ #region IAttachableViewContent implementation
+ public void Selected ()
+ {
+ string txt = WorkbenchWindow.Document.Editor.Text;
+ try {
+ desc = data.AddinRegistry.ReadAddinManifestFile (new StringReader (txt), WorkbenchWindow.Document.FileName);
+ Control.Sensitive = true;
+ editor.SetData (desc, data);
+ } catch {
+ desc = null;
+ Control.Sensitive = false;
+ }
+ changed = false;
+ }
+
+ public void Deselected ()
+ {
+ if (changed)
+ WorkbenchWindow.Document.Editor.Text = AddinAuthoringService.SaveFormattedXml (data.Project.Policies, desc);
+ }
+
+ public void BeforeSave ()
+ {
+ if (changed)
+ WorkbenchWindow.Document.Editor.Text = AddinAuthoringService.SaveFormattedXml (data.Project.Policies, desc);
+ }
+
+ public void BaseContentChanged ()
+ {
+ }
+ #endregion
+
+ #region IBaseViewContent implementation
+ public T GetContent<T> () where T:class
+ {
+ return null;
+ }
+
+ public bool CanReuseView (string fileName)
+ {
+ return false;
+ }
+
+ public void RedrawContent ()
+ {
+ }
+
+ public IWorkbenchWindow WorkbenchWindow { get; set; }
+
+ public Gtk.Widget Control {
+ get {
+ if (editor == null) {
+ editor = CreateWidget ();
+ editor.SetData (desc, data);
+ editor.Changed += HandleEditorChanged;
+ }
+ return (Gtk.Widget) editor;
+ }
+ }
+
+ void HandleEditorChanged (object sender, EventArgs e)
+ {
+ changed = true;
+ }
+
+ public abstract string TabPageLabel { get; }
+
+ #endregion
+
+ #region IDisposable implementation
+ public virtual void Dispose ()
+ {
+ }
+ #endregion
+ }
+
+ public interface IExtensionViewWidget
+ {
+ void SetData (AddinDescription desc, AddinData data);
+ event EventHandler Changed;
+ }
+}
+
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorView.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorView.cs
new file mode 100644
index 0000000000..d080d087e4
--- /dev/null
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorView.cs
@@ -0,0 +1,50 @@
+//
+// ExtensionEditorView.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Ide.Gui;
+using Mono.Addins.Description;
+
+namespace MonoDevelop.AddinAuthoring
+{
+ public class ExtensionEditorView: ExtensionBaseView
+ {
+ public ExtensionEditorView (AddinDescription desc, AddinData data): base (desc, data)
+ {
+ }
+
+ protected override IExtensionViewWidget CreateWidget ()
+ {
+ return new ExtensionEditorWidget ();
+ }
+
+ public override string TabPageLabel {
+ get {
+ return "Extensions";
+ }
+ }
+ }
+}
+
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorWidget.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorWidget.cs
index 3f77a60a21..d2868ed74a 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorWidget.cs
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionEditorWidget.cs
@@ -16,7 +16,7 @@ namespace MonoDevelop.AddinAuthoring
[System.ComponentModel.Category("widget")]
[System.ComponentModel.ToolboxItem(true)]
- public partial class ExtensionEditorWidget : Gtk.Bin
+ public partial class ExtensionEditorWidget : Gtk.Bin, IExtensionViewWidget
{
AddinData data;
AddinDescription adesc, compiledDesc;
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorView.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorView.cs
new file mode 100644
index 0000000000..7fa6b29c66
--- /dev/null
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorView.cs
@@ -0,0 +1,50 @@
+//
+// ExtensionPointsEditorView.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Ide.Gui;
+using Mono.Addins.Description;
+
+namespace MonoDevelop.AddinAuthoring
+{
+ public class ExtensionPointsEditorView: ExtensionBaseView
+ {
+ public ExtensionPointsEditorView (AddinDescription desc, AddinData data): base (desc, data)
+ {
+ }
+
+ protected override IExtensionViewWidget CreateWidget ()
+ {
+ return new ExtensionPointsEditorWidget ();
+ }
+
+ public override string TabPageLabel {
+ get {
+ return "Extension Points";
+ }
+ }
+ }
+}
+
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorWidget.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorWidget.cs
index 3e13e82921..c3b69071f5 100644
--- a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorWidget.cs
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/ExtensionPointsEditorWidget.cs
@@ -36,7 +36,7 @@ namespace MonoDevelop.AddinAuthoring
{
[System.ComponentModel.Category("MonoDevelop.AddinAuthoring")]
[System.ComponentModel.ToolboxItem(true)]
- public partial class ExtensionPointsEditorWidget : Gtk.Bin
+ public partial class ExtensionPointsEditorWidget : Gtk.Bin, IExtensionViewWidget
{
ListStore store;
AddinData data;
diff --git a/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/StartupHandler.cs b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/StartupHandler.cs
new file mode 100644
index 0000000000..d69454c5b3
--- /dev/null
+++ b/extras/MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring/StartupHandler.cs
@@ -0,0 +1,63 @@
+//
+// StartupHandler.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Mono.Addins;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Ide.Extensions;
+using MonoDevelop.Projects;
+using MonoDevelop.Ide.Gui;
+
+namespace MonoDevelop.AddinAuthoring
+{
+ [Extension ("/MonoDevelop/Ide/StartupHandlers", NodeName="Class")]
+ public class StartupHandler: CommandHandler
+ {
+ protected override void Run ()
+ {
+ Ide.IdeApp.Workbench.DocumentOpened += HandleDocumentOpened;
+ }
+
+ void HandleDocumentOpened (object sender, DocumentEventArgs e)
+ {
+ if (!(e.Document.Project is DotNetProject) || !e.Document.IsFile)
+ return;
+ string ext = e.Document.FileName;
+ if (!ext.EndsWith (".addin.xml") && !ext.EndsWith (".addin"))
+ return;
+
+ var data = AddinData.GetAddinData ((DotNetProject)e.Document.Project);
+ if (data != null) {
+ IWorkbenchWindow window = e.Document.Window;
+ var adesc = data.AddinRegistry.ReadAddinManifestFile (e.Document.FileName);
+
+ window.AttachViewContent (new ExtensionEditorView (adesc, data));
+ window.AttachViewContent (new ExtensionPointsEditorView (adesc, data));
+ }
+
+ }
+ }
+}
+
diff --git a/extras/MonoDevelop.AddinAuthoring/gtk-gui/MonoDevelop.AddinAuthoring.AddinDescriptionWidget.cs b/extras/MonoDevelop.AddinAuthoring/gtk-gui/MonoDevelop.AddinAuthoring.AddinDescriptionWidget.cs
index 2abfefacad..5651ea479a 100644
--- a/extras/MonoDevelop.AddinAuthoring/gtk-gui/MonoDevelop.AddinAuthoring.AddinDescriptionWidget.cs
+++ b/extras/MonoDevelop.AddinAuthoring/gtk-gui/MonoDevelop.AddinAuthoring.AddinDescriptionWidget.cs
@@ -57,7 +57,7 @@ namespace MonoDevelop.AddinAuthoring
this.notebook = new global::Gtk.Notebook ();
this.notebook.CanFocus = true;
this.notebook.Name = "notebook";
- this.notebook.CurrentPage = 0;
+ this.notebook.CurrentPage = 2;
this.notebook.TabPos = ((global::Gtk.PositionType)(3));
// Container child notebook.Gtk.Notebook+NotebookChild
this.vbox3 = new global::Gtk.VBox ();
diff --git a/extras/MonoDevelop.AddinAuthoring/gtk-gui/gui.stetic b/extras/MonoDevelop.AddinAuthoring/gtk-gui/gui.stetic
index 563a9ef1cd..bea15584b8 100644
--- a/extras/MonoDevelop.AddinAuthoring/gtk-gui/gui.stetic
+++ b/extras/MonoDevelop.AddinAuthoring/gtk-gui/gui.stetic
@@ -11,6 +11,7 @@
<widget-library name="MonoDevelop.NUnit, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.XmlEditor, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.Gettext, Version=2.6.0.0, Culture=neutral" />
+ <widget-library name="MonoDevelop.Deployment, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.Deployment.Linux, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.GtkCore, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.DesignerSupport, Version=2.6.0.0, Culture=neutral" />
@@ -19,6 +20,7 @@
<widget-library name="MonoDevelop.SourceEditor2, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.Debugger, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.AspNet, Version=2.6.0.0, Culture=neutral" />
+ <widget-library name="MonoDevelop.Autotools, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.Refactoring, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.Moonlight, Version=2.6.0.0, Culture=neutral" />
<widget-library name="MonoDevelop.Debugger.Soft, Version=2.6.0.0, Culture=neutral" />
@@ -84,7 +86,7 @@
<widget class="Gtk.Notebook" id="notebook">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="CurrentPage">0</property>
+ <property name="CurrentPage">2</property>
<property name="TabPos">Bottom</property>
<child>
<widget class="Gtk.VBox" id="vbox3">