Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1624 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
61 changed files with 2325 additions and 233 deletions
@ -0,0 +1,31 @@ |
|||||||
|
using System.Reflection; |
||||||
|
using System.Runtime.CompilerServices; |
||||||
|
using System.Runtime.InteropServices; |
||||||
|
|
||||||
|
// Information about this assembly is defined by the following
|
||||||
|
// attributes.
|
||||||
|
//
|
||||||
|
// change them to the information which is associated with the assembly
|
||||||
|
// you compile.
|
||||||
|
|
||||||
|
[assembly: AssemblyTitle("SdaUser")] |
||||||
|
[assembly: AssemblyDescription("")] |
||||||
|
[assembly: AssemblyConfiguration("")] |
||||||
|
[assembly: AssemblyCompany("")] |
||||||
|
[assembly: AssemblyProduct("SdaUser")] |
||||||
|
[assembly: AssemblyCopyright("")] |
||||||
|
[assembly: AssemblyTrademark("")] |
||||||
|
[assembly: AssemblyCulture("")] |
||||||
|
|
||||||
|
// This sets the default COM visibility of types in the assembly to invisible.
|
||||||
|
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
||||||
|
[assembly: ComVisible(false)] |
||||||
|
|
||||||
|
// The assembly version has following format :
|
||||||
|
//
|
||||||
|
// Major.Minor.Build.Revision
|
||||||
|
//
|
||||||
|
// You can specify all values by your own or you can build default build and revision
|
||||||
|
// numbers with the '*' character (the default):
|
||||||
|
|
||||||
|
[assembly: AssemblyVersion("1.0.*")] |
@ -0,0 +1,136 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 26.07.2006 |
||||||
|
* Time: 19:49 |
||||||
|
*/ |
||||||
|
namespace SdaUser |
||||||
|
{ |
||||||
|
partial class MainForm : System.Windows.Forms.Form |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Designer variable used to keep track of non-visual components.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Disposes resources used by the form.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing) |
||||||
|
{ |
||||||
|
if (disposing) { |
||||||
|
if (components != null) { |
||||||
|
components.Dispose(); |
||||||
|
} |
||||||
|
} |
||||||
|
base.Dispose(disposing); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This method is required for Windows Forms designer support.
|
||||||
|
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||||
|
/// not be able to load this method if it was changed manually.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent() |
||||||
|
{ |
||||||
|
this.runButton = new System.Windows.Forms.Button(); |
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox(); |
||||||
|
this.closeButton = new System.Windows.Forms.Button(); |
||||||
|
this.visibleCheckBox = new System.Windows.Forms.CheckBox(); |
||||||
|
this.unloadHostDomainButton = new System.Windows.Forms.Button(); |
||||||
|
this.openFileButton = new System.Windows.Forms.Button(); |
||||||
|
this.groupBox1.SuspendLayout(); |
||||||
|
this.SuspendLayout(); |
||||||
|
//
|
||||||
|
// runButton
|
||||||
|
//
|
||||||
|
this.runButton.Location = new System.Drawing.Point(28, 57); |
||||||
|
this.runButton.Name = "runButton"; |
||||||
|
this.runButton.Size = new System.Drawing.Size(221, 31); |
||||||
|
this.runButton.TabIndex = 0; |
||||||
|
this.runButton.Text = "Run Integrated SharpDevelop"; |
||||||
|
this.runButton.UseVisualStyleBackColor = true; |
||||||
|
this.runButton.Click += new System.EventHandler(this.RunButtonClick); |
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||||
|
| System.Windows.Forms.AnchorStyles.Left) |
||||||
|
| System.Windows.Forms.AnchorStyles.Right))); |
||||||
|
this.groupBox1.Controls.Add(this.closeButton); |
||||||
|
this.groupBox1.Controls.Add(this.visibleCheckBox); |
||||||
|
this.groupBox1.Enabled = false; |
||||||
|
this.groupBox1.Location = new System.Drawing.Point(12, 130); |
||||||
|
this.groupBox1.Name = "groupBox1"; |
||||||
|
this.groupBox1.Size = new System.Drawing.Size(268, 92); |
||||||
|
this.groupBox1.TabIndex = 1; |
||||||
|
this.groupBox1.TabStop = false; |
||||||
|
this.groupBox1.Text = "groupBox1"; |
||||||
|
//
|
||||||
|
// closeButton
|
||||||
|
//
|
||||||
|
this.closeButton.Location = new System.Drawing.Point(6, 50); |
||||||
|
this.closeButton.Name = "closeButton"; |
||||||
|
this.closeButton.Size = new System.Drawing.Size(123, 23); |
||||||
|
this.closeButton.TabIndex = 1; |
||||||
|
this.closeButton.Text = "Close Workbench"; |
||||||
|
this.closeButton.UseVisualStyleBackColor = true; |
||||||
|
this.closeButton.Click += new System.EventHandler(this.CloseButtonClick); |
||||||
|
//
|
||||||
|
// visibleCheckBox
|
||||||
|
//
|
||||||
|
this.visibleCheckBox.Checked = true; |
||||||
|
this.visibleCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; |
||||||
|
this.visibleCheckBox.Location = new System.Drawing.Point(6, 20); |
||||||
|
this.visibleCheckBox.Name = "visibleCheckBox"; |
||||||
|
this.visibleCheckBox.Size = new System.Drawing.Size(256, 24); |
||||||
|
this.visibleCheckBox.TabIndex = 0; |
||||||
|
this.visibleCheckBox.Text = "WorkbenchVisible"; |
||||||
|
this.visibleCheckBox.UseVisualStyleBackColor = true; |
||||||
|
this.visibleCheckBox.CheckedChanged += new System.EventHandler(this.VisibleCheckBoxCheckedChanged); |
||||||
|
//
|
||||||
|
// unloadHostDomainButton
|
||||||
|
//
|
||||||
|
this.unloadHostDomainButton.Enabled = false; |
||||||
|
this.unloadHostDomainButton.Location = new System.Drawing.Point(28, 94); |
||||||
|
this.unloadHostDomainButton.Name = "unloadHostDomainButton"; |
||||||
|
this.unloadHostDomainButton.Size = new System.Drawing.Size(221, 23); |
||||||
|
this.unloadHostDomainButton.TabIndex = 2; |
||||||
|
this.unloadHostDomainButton.Text = "Unload SharpDevelop AppDomain"; |
||||||
|
this.unloadHostDomainButton.UseVisualStyleBackColor = true; |
||||||
|
this.unloadHostDomainButton.Click += new System.EventHandler(this.UnloadHostDomainButtonClick); |
||||||
|
//
|
||||||
|
// openFileButton
|
||||||
|
//
|
||||||
|
this.openFileButton.Location = new System.Drawing.Point(18, 243); |
||||||
|
this.openFileButton.Name = "openFileButton"; |
||||||
|
this.openFileButton.Size = new System.Drawing.Size(75, 23); |
||||||
|
this.openFileButton.TabIndex = 3; |
||||||
|
this.openFileButton.Text = "Open File"; |
||||||
|
this.openFileButton.UseVisualStyleBackColor = true; |
||||||
|
this.openFileButton.Click += new System.EventHandler(this.OpenFileButtonClick); |
||||||
|
//
|
||||||
|
// MainForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
||||||
|
this.ClientSize = new System.Drawing.Size(292, 334); |
||||||
|
this.Controls.Add(this.openFileButton); |
||||||
|
this.Controls.Add(this.unloadHostDomainButton); |
||||||
|
this.Controls.Add(this.groupBox1); |
||||||
|
this.Controls.Add(this.runButton); |
||||||
|
this.Name = "MainForm"; |
||||||
|
this.Text = "SdaUser"; |
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormFormClosing); |
||||||
|
this.groupBox1.ResumeLayout(false); |
||||||
|
this.ResumeLayout(false); |
||||||
|
} |
||||||
|
private System.Windows.Forms.Button openFileButton; |
||||||
|
private System.Windows.Forms.Button unloadHostDomainButton; |
||||||
|
private System.Windows.Forms.Button closeButton; |
||||||
|
private System.Windows.Forms.CheckBox visibleCheckBox; |
||||||
|
private System.Windows.Forms.GroupBox groupBox1; |
||||||
|
private System.Windows.Forms.Button runButton; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,125 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 26.07.2006 |
||||||
|
* Time: 19:49 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Drawing; |
||||||
|
using System.IO; |
||||||
|
using System.Reflection; |
||||||
|
using System.Windows.Forms; |
||||||
|
using ICSharpCode.SharpDevelop.Sda; |
||||||
|
|
||||||
|
namespace SdaUser |
||||||
|
{ |
||||||
|
public partial class MainForm |
||||||
|
{ |
||||||
|
[STAThread] |
||||||
|
public static void Main(string[] args) |
||||||
|
{ |
||||||
|
Application.EnableVisualStyles(); |
||||||
|
Application.SetCompatibleTextRenderingDefault(false); |
||||||
|
Application.Run(new MainForm()); |
||||||
|
} |
||||||
|
|
||||||
|
public MainForm() |
||||||
|
{ |
||||||
|
//
|
||||||
|
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||||
|
//
|
||||||
|
InitializeComponent(); |
||||||
|
|
||||||
|
//
|
||||||
|
// TODO: Add constructor code after the InitializeComponent() call.
|
||||||
|
//
|
||||||
|
} |
||||||
|
|
||||||
|
void RunButtonClick(object sender, EventArgs e) |
||||||
|
{ |
||||||
|
Run(); |
||||||
|
} |
||||||
|
|
||||||
|
SharpDevelopHost host; |
||||||
|
|
||||||
|
void Run() |
||||||
|
{ |
||||||
|
runButton.Enabled = false; |
||||||
|
unloadHostDomainButton.Enabled = true; |
||||||
|
System.Threading.ThreadPool.QueueUserWorkItem(ThreadedRun); |
||||||
|
} |
||||||
|
|
||||||
|
void ThreadedRun(object state) |
||||||
|
{ |
||||||
|
RunWorkbench(new WorkbenchSettings()); |
||||||
|
} |
||||||
|
|
||||||
|
void RunWorkbench(WorkbenchSettings wbSettings) |
||||||
|
{ |
||||||
|
if (host == null) { |
||||||
|
StartupSettings startup = new StartupSettings(); |
||||||
|
startup.ApplicationName = "HostedSharpDevelop"; |
||||||
|
startup.DataDirectory = Path.Combine(Path.GetDirectoryName(typeof(SharpDevelopHost).Assembly.Location), "../data"); |
||||||
|
string sdaDir = Path.Combine(Path.GetDirectoryName(typeof(MainForm).Assembly.Location), "SdaAddIns"); |
||||||
|
startup.AddAddInFile(Path.Combine(sdaDir, "SdaBase.addin")); |
||||||
|
|
||||||
|
host = new SharpDevelopHost(startup); |
||||||
|
host.InvokeTarget = this; |
||||||
|
host.BeforeRunWorkbench += delegate { groupBox1.Enabled = true; }; |
||||||
|
host.WorkbenchClosed += delegate { groupBox1.Enabled = false; runButton.Enabled = true; }; |
||||||
|
} |
||||||
|
|
||||||
|
host.RunWorkbench(wbSettings); |
||||||
|
} |
||||||
|
|
||||||
|
void VisibleCheckBoxCheckedChanged(object sender, System.EventArgs e) |
||||||
|
{ |
||||||
|
host.WorkbenchVisible = visibleCheckBox.Checked; |
||||||
|
} |
||||||
|
|
||||||
|
void CloseButtonClick(object sender, System.EventArgs e) |
||||||
|
{ |
||||||
|
if (!host.CloseWorkbench(false)) { |
||||||
|
if (DialogResult.Yes == MessageBox.Show("Force close?", "Force", MessageBoxButtons.YesNo)) { |
||||||
|
host.CloseWorkbench(true); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void MainFormFormClosing(object sender, FormClosingEventArgs e) |
||||||
|
{ |
||||||
|
if (host != null && host.WorkbenchVisible == false) { |
||||||
|
if (!host.CloseWorkbench(false)) { |
||||||
|
host.WorkbenchVisible = true; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void UnloadHostDomainButtonClick(object sender, System.EventArgs e) |
||||||
|
{ |
||||||
|
unloadHostDomainButton.Enabled = false; |
||||||
|
host.UnloadDomain(); |
||||||
|
host = null; |
||||||
|
} |
||||||
|
|
||||||
|
void OpenFileButtonClick(object sender, System.EventArgs e) |
||||||
|
{ |
||||||
|
using (OpenFileDialog dlg = new OpenFileDialog()) { |
||||||
|
if (dlg.ShowDialog() == DialogResult.OK) { |
||||||
|
if (runButton.Enabled) { |
||||||
|
runButton.Enabled = false; |
||||||
|
unloadHostDomainButton.Enabled = true; |
||||||
|
|
||||||
|
WorkbenchSettings wbSettings = new WorkbenchSettings(); |
||||||
|
wbSettings.InitialFileList.Add(dlg.FileName); |
||||||
|
RunWorkbench(wbSettings); |
||||||
|
} else if (host != null) { |
||||||
|
host.OpenDocument(dlg.FileName); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,120 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<root> |
||||||
|
<!-- |
||||||
|
Microsoft ResX Schema |
||||||
|
|
||||||
|
Version 2.0 |
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format |
||||||
|
that is mostly human readable. The generation and parsing of the |
||||||
|
various data types are done through the TypeConverter classes |
||||||
|
associated with the data types. |
||||||
|
|
||||||
|
Example: |
||||||
|
|
||||||
|
... ado.net/XML headers & schema ... |
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||||
|
<resheader name="version">2.0</resheader> |
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||||
|
</data> |
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||||
|
<comment>This is a comment</comment> |
||||||
|
</data> |
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple |
||||||
|
name/value pairs. |
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a |
||||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||||
|
text/value conversion through the TypeConverter architecture. |
||||||
|
Classes that don't support this are serialized and stored with the |
||||||
|
mimetype set. |
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the |
||||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||||
|
that the ResXResourceWriter will generate, however the reader can |
||||||
|
read any of the formats listed below. |
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||||
|
value : The object must be serialized with |
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||||
|
: and then encoded with base64 encoding. |
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||||
|
value : The object must be serialized with |
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||||
|
: and then encoded with base64 encoding. |
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||||
|
value : The object must be serialized into a byte array |
||||||
|
: using a System.ComponentModel.TypeConverter |
||||||
|
: and then encoded with base64 encoding. |
||||||
|
--> |
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||||
|
<xsd:complexType> |
||||||
|
<xsd:choice maxOccurs="unbounded"> |
||||||
|
<xsd:element name="metadata"> |
||||||
|
<xsd:complexType> |
||||||
|
<xsd:sequence> |
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||||
|
</xsd:sequence> |
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||||
|
<xsd:attribute ref="xml:space" /> |
||||||
|
</xsd:complexType> |
||||||
|
</xsd:element> |
||||||
|
<xsd:element name="assembly"> |
||||||
|
<xsd:complexType> |
||||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||||
|
</xsd:complexType> |
||||||
|
</xsd:element> |
||||||
|
<xsd:element name="data"> |
||||||
|
<xsd:complexType> |
||||||
|
<xsd:sequence> |
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||||
|
</xsd:sequence> |
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||||
|
<xsd:attribute ref="xml:space" /> |
||||||
|
</xsd:complexType> |
||||||
|
</xsd:element> |
||||||
|
<xsd:element name="resheader"> |
||||||
|
<xsd:complexType> |
||||||
|
<xsd:sequence> |
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||||
|
</xsd:sequence> |
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||||
|
</xsd:complexType> |
||||||
|
</xsd:element> |
||||||
|
</xsd:choice> |
||||||
|
</xsd:complexType> |
||||||
|
</xsd:element> |
||||||
|
</xsd:schema> |
||||||
|
<resheader name="resmimetype"> |
||||||
|
<value>text/microsoft-resx</value> |
||||||
|
</resheader> |
||||||
|
<resheader name="version"> |
||||||
|
<value>2.0</value> |
||||||
|
</resheader> |
||||||
|
<resheader name="reader"> |
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||||
|
</resheader> |
||||||
|
<resheader name="writer"> |
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||||
|
</resheader> |
||||||
|
</root> |
@ -0,0 +1,238 @@ |
|||||||
|
<?xml version="1.0"?> |
||||||
|
<AddIn name = "Hosted SharpDevelop" |
||||||
|
author = "Daniel Grunwald" |
||||||
|
copyright = "prj:///doc/copyright.txt" |
||||||
|
url = "http://www.icsharpcode.net" |
||||||
|
description = "SharpDevelop main module" |
||||||
|
addInManagerHidden = "true"> |
||||||
|
|
||||||
|
<Manifest> |
||||||
|
<Identity name = "HostedSharpDevelop" version = "@SharpDevelopCoreVersion"/> |
||||||
|
</Manifest> |
||||||
|
|
||||||
|
<Runtime> |
||||||
|
<Import assembly=":ICSharpCode.SharpDevelop"> |
||||||
|
<!-- SharpDevelop defines more conditions and doozers, we just --> |
||||||
|
<!-- import those we need here. --> |
||||||
|
<ConditionEvaluator name="WindowActive" class="ICSharpCode.Core.WindowActiveConditionEvaluator"/> |
||||||
|
<ConditionEvaluator name="ActiveWindowState" class="ICSharpCode.Core.ActiveWindowStateConditionEvaluator"/> |
||||||
|
<ConditionEvaluator name="OpenWindowState" class="ICSharpCode.Core.OpenWindowStateConditionEvaluator"/> |
||||||
|
|
||||||
|
<Doozer name="DialogPanel" class="ICSharpCode.Core.DialogPanelDoozer"/> |
||||||
|
<Doozer name="DisplayBinding" class="ICSharpCode.Core.DisplayBindingDoozer"/> |
||||||
|
</Import> |
||||||
|
</Runtime> |
||||||
|
|
||||||
|
<!-- This is the minimum AddIn required to use SharpDevelop --> |
||||||
|
|
||||||
|
<!-- Every Application should provide this extension point, used by many addins (e.g. AddInManager) --> |
||||||
|
<Path name = "/Workspace/Tools"></Path> |
||||||
|
|
||||||
|
<!-- REQUIRED to load files --> |
||||||
|
<Path name = "/SharpDevelop/Workbench/Combine/FileFilter"> |
||||||
|
<FileFilter id = "AllFiles" |
||||||
|
name = "${res:SharpDevelop.FileFilter.AllFiles}" |
||||||
|
extensions = "*.*"/> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- REQUIRED for the open and save file dialogs --> |
||||||
|
<Path name = "/SharpDevelop/Workbench/FileFilter"> |
||||||
|
<FileFilter id = "AllFiles" |
||||||
|
name = "${res:SharpDevelop.FileFilter.AllFiles}" |
||||||
|
extensions = "*.*"/> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- REQUIRED to open views --> |
||||||
|
<Path name = "/SharpDevelop/Workbench/DisplayBindings"> |
||||||
|
<DisplayBinding id = "Text" |
||||||
|
supportedformats = "Text Files,Source Files" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.TextEditorDisplayBinding" /> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- REQUIRED to open views --> |
||||||
|
<Path name = "/SharpDevelop/Workbench/OpenFileTab/ContextMenu"> |
||||||
|
<MenuItem id = "Close" |
||||||
|
label = "${res:OpenFileTabEventHandler.ContextMenu.Close}" |
||||||
|
icon = "Icons.16x16.CloseFileIcon" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.TabStrip.CloseFileTab"/> |
||||||
|
<MenuItem id = "CloseAll" |
||||||
|
icon = "Icons.16x16.CloseAllDocuments" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.CloseAll}" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.CloseAllWindows" /> |
||||||
|
<MenuItem id = "CloseAllButThis" |
||||||
|
label = "${res:OpenFileTabEventHandler.ContextMenu.CloseAllButThis}" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.TabStrip.CloseAllButThisFileTab" /> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- REQUIRED if you use the default text editor (TextEditorDisplayBinding) --> |
||||||
|
<Path name = "/SharpDevelop/ViewContent/DefaultTextEditor/ContextMenu"> |
||||||
|
<Include id = "Cut" item = "/SharpDevelop/Workbench/MainMenu/Edit/Cut"/> |
||||||
|
<Include id = "Copy" item = "/SharpDevelop/Workbench/MainMenu/Edit/Copy"/> |
||||||
|
<Include id = "Paste" item = "/SharpDevelop/Workbench/MainMenu/Edit/Paste"/> |
||||||
|
<Include id = "Delete" item = "/SharpDevelop/Workbench/MainMenu/Edit/Delete"/> |
||||||
|
<MenuItem id = "Separator1" type = "Separator" /> |
||||||
|
<MenuItem id = "Options" |
||||||
|
label = "${res:XML.TextAreaContextMenu.BufferOptions}" |
||||||
|
icon = "Icons.16x16.PropertiesIcon" |
||||||
|
class ="ICSharpCode.SharpDevelop.DefaultEditor.Commands.ShowBufferOptions"/> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- required for BufferOptions command in text editor context menu --> |
||||||
|
<Path name = "/SharpDevelop/ViewContent/DefaultTextEditor/OptionsDialog"> |
||||||
|
<DialogPanel id = "General" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditor.General.PanelName}" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels.GeneralTextEditorPanel"/> |
||||||
|
<DialogPanel id = "Markers" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditor.Markers.PanelName}" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels.MarkersTextEditorPanel"/> |
||||||
|
<DialogPanel id = "Behavior" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.PanelName}" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels.BehaviorTextEditorPanel"/> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- required for main menu options command --> |
||||||
|
<Path name = "/SharpDevelop/Dialogs/OptionsDialog"> |
||||||
|
<DialogPanel id = "ToolsOptions" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.ToolsOptionsText}"> |
||||||
|
<DialogPanel id = "ExternalTools" |
||||||
|
label = "${res:Dialog.Options.ExternalToolsText}" |
||||||
|
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.ExternalToolPane"/> |
||||||
|
</DialogPanel> |
||||||
|
|
||||||
|
<DialogPanel id = "TextEditorOptions" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditorOptionsText}"> |
||||||
|
<DialogPanel id = "General" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditor.General.PanelName}" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels.GeneralTextEditorPanel"/> |
||||||
|
<DialogPanel id = "Markers" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditor.Markers.PanelName}" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels.MarkersTextEditorPanel"/> |
||||||
|
<DialogPanel id = "Behavior" |
||||||
|
label = "${res:Dialog.Options.IDEOptions.TextEditor.Behaviour.PanelName}" |
||||||
|
class = "ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels.BehaviorTextEditorPanel"/> |
||||||
|
</DialogPanel> |
||||||
|
</Path> |
||||||
|
|
||||||
|
<!-- Main menu --> |
||||||
|
<Path name = "/SharpDevelop/Workbench/MainMenu"> |
||||||
|
<MenuItem id = "File" label = "${res:XML.MainMenu.FileMenu}" type="Menu"> |
||||||
|
<MenuItem id = "File" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.New} ${res:XML.MainMenu.FileMenu.New.File}" |
||||||
|
icon = "Icons.16x16.NewDocumentIcon" |
||||||
|
shortcut = "Control|N" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.CreateNewFile"/> |
||||||
|
|
||||||
|
<MenuItem id = "File" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.Open} ${res:XML.MainMenu.FileMenu.Open.File}" |
||||||
|
icon = "Icons.16x16.OpenFileIcon" |
||||||
|
shortcut = "Control|O" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.OpenFile"/> |
||||||
|
|
||||||
|
<Condition name = "WindowActive" activewindow="*" action="Disable"> |
||||||
|
<MenuItem id = "CloseFile" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.Close} ${res:XML.MainMenu.FileMenu.Close.File}" |
||||||
|
icon = "Icons.16x16.CloseFileIcon" |
||||||
|
shortcut = "Control|F4" |
||||||
|
class ="ICSharpCode.SharpDevelop.Commands.CloseFile"/> |
||||||
|
</Condition> |
||||||
|
|
||||||
|
<MenuItem id = "SaveSeparator" type = "Separator" /> |
||||||
|
|
||||||
|
<Condition name = "ActiveWindowState" windowstate="Dirty, Untitled" nowindowstate="ViewOnly" action="Disable"> |
||||||
|
<MenuItem id = "Save" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.Save}" |
||||||
|
icon = "Icons.16x16.SaveIcon" |
||||||
|
shortcut = "Control|S" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.SaveFile"/> |
||||||
|
</Condition> |
||||||
|
|
||||||
|
<Condition name = "ActiveWindowState" windowstate="None" nowindowstate="ViewOnly" action="Disable"> |
||||||
|
<MenuItem id = "SaveAs" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.SaveAs}" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.SaveFileAs"/> |
||||||
|
</Condition> |
||||||
|
|
||||||
|
<Condition name = "OpenWindowState" openwindowstate="Dirty" action="Disable"> |
||||||
|
<MenuItem id = "SaveAll" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.SaveAll}" |
||||||
|
icon = "Icons.16x16.SaveAllIcon" |
||||||
|
shortcut = "Control|Shift|S" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.SaveAllFiles"/> |
||||||
|
</Condition> |
||||||
|
|
||||||
|
<MenuItem id = "ExitSeparator" type = "Separator" /> |
||||||
|
<MenuItem id = "Exit" |
||||||
|
label = "${res:XML.MainMenu.FileMenu.Exit}" |
||||||
|
icon = "Icons.16x16.CancelIcon" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.ExitWorkbenchCommand" /> |
||||||
|
</MenuItem> <!-- END File menu --> |
||||||
|
|
||||||
|
<MenuItem id = "Edit" label = "${res:XML.MainMenu.EditMenu}" type="Menu"> |
||||||
|
<MenuItem id = "Undo" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.Undo}" |
||||||
|
icon = "Icons.16x16.UndoIcon" |
||||||
|
type = "Item" |
||||||
|
shortcut = "Control|Z" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.Undo"/> |
||||||
|
<MenuItem id = "Redo" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.Redo}" |
||||||
|
icon = "Icons.16x16.RedoIcon" |
||||||
|
type = "Item" |
||||||
|
shortcut = "Control|Y" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.Redo"/> |
||||||
|
<MenuItem id = "Separator1" type = "Separator" /> |
||||||
|
<MenuItem id = "Cut" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.Cut}" |
||||||
|
icon = "Icons.16x16.CutIcon" |
||||||
|
type = "Item" |
||||||
|
shortcut = "Control|X" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.Cut"/> |
||||||
|
<MenuItem id = "Copy" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.Copy}" |
||||||
|
icon = "Icons.16x16.CopyIcon" |
||||||
|
type = "Item" |
||||||
|
shortcut = "Control|C" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.Copy"/> |
||||||
|
<MenuItem id = "Paste" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.Paste}" |
||||||
|
icon = "Icons.16x16.PasteIcon" |
||||||
|
type = "Item" |
||||||
|
shortcut = "Control|V" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.Paste"/> |
||||||
|
<MenuItem id = "Delete" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.Delete}" |
||||||
|
icon = "Icons.16x16.DeleteIcon" |
||||||
|
type = "Item" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.Delete"/> |
||||||
|
<MenuItem id = "SelectAll" |
||||||
|
label = "${res:XML.MainMenu.EditMenu.SelectAll}" |
||||||
|
type = "Item" |
||||||
|
shortcut = "Control|A" |
||||||
|
loadclasslazy = "false" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.SelectAll"/> |
||||||
|
</MenuItem> <!-- end EDIT menu --> |
||||||
|
|
||||||
|
<MenuItem id = "Tools" label = "${res:XML.MainMenu.ToolMenu}" type="Menu"> |
||||||
|
<!-- configurable tool list (Options Dialog > External Tools) --> |
||||||
|
<MenuItem id = "ToolBuilder" type="Builder" class = "ICSharpCode.SharpDevelop.Commands.ToolMenuBuilder" /> |
||||||
|
|
||||||
|
<MenuItem id = "Separator1" type = "Separator" /> |
||||||
|
|
||||||
|
<!-- AddIns can add tool commands here--> |
||||||
|
<Include id = "ToolList" path = "/Workspace/Tools" /> |
||||||
|
|
||||||
|
<MenuItem id = "LastSeparator" type = "Separator" /> |
||||||
|
|
||||||
|
<MenuItem id = "Options" |
||||||
|
label = "${res:XML.MainMenu.ToolMenu.Options}" |
||||||
|
icon = "Icons.16x16.Options" |
||||||
|
class = "ICSharpCode.SharpDevelop.Commands.OptionsCommand"/> |
||||||
|
</MenuItem> |
||||||
|
</Path> |
||||||
|
</AddIn> |
@ -0,0 +1,67 @@ |
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<PropertyGroup> |
||||||
|
<OutputType>WinExe</OutputType> |
||||||
|
<RootNamespace>SdaUser</RootNamespace> |
||||||
|
<AssemblyName>SdaUser</AssemblyName> |
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||||
|
<ProjectGuid>{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}</ProjectGuid> |
||||||
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
||||||
|
<NoStdLib>False</NoStdLib> |
||||||
|
<RegisterForComInterop>False</RegisterForComInterop> |
||||||
|
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> |
||||||
|
<BaseAddress>4194304</BaseAddress> |
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget> |
||||||
|
<FileAlignment>4096</FileAlignment> |
||||||
|
<WarningLevel>4</WarningLevel> |
||||||
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||||
|
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> |
||||||
|
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> |
||||||
|
<OutputPath>..\..\bin\</OutputPath> |
||||||
|
<Optimize>False</Optimize> |
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||||
|
<DebugSymbols>true</DebugSymbols> |
||||||
|
<DebugType>Full</DebugType> |
||||||
|
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||||
|
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> |
||||||
|
<IntermediateOutputPath>obj\Release\</IntermediateOutputPath> |
||||||
|
<OutputPath>bin\Release\</OutputPath> |
||||||
|
<Optimize>True</Optimize> |
||||||
|
<DefineConstants>TRACE</DefineConstants> |
||||||
|
<DebugSymbols>False</DebugSymbols> |
||||||
|
<DebugType>None</DebugType> |
||||||
|
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||||
|
</PropertyGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Reference Include="System" /> |
||||||
|
<Reference Include="System.Data" /> |
||||||
|
<Reference Include="System.Drawing" /> |
||||||
|
<Reference Include="System.Windows.Forms" /> |
||||||
|
<Reference Include="System.Xml" /> |
||||||
|
<Reference Include="ICSharpCode.SharpDevelop.Sda"> |
||||||
|
<HintPath>..\..\bin\ICSharpCode.SharpDevelop.Sda.dll</HintPath> |
||||||
|
<SpecificVersion>False</SpecificVersion> |
||||||
|
</Reference> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Compile Include="MainForm.cs" /> |
||||||
|
<Compile Include="MainForm.Designer.cs"> |
||||||
|
<DependentUpon>MainForm.cs</DependentUpon> |
||||||
|
</Compile> |
||||||
|
<Compile Include="AssemblyInfo.cs" /> |
||||||
|
<EmbeddedResource Include="MainForm.resx"> |
||||||
|
<DependentUpon>MainForm.cs</DependentUpon> |
||||||
|
</EmbeddedResource> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Folder Include="SdaAddIns" /> |
||||||
|
<Content Include="SdaAddIns\SdaBase.addin"> |
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||||
|
</Content> |
||||||
|
</ItemGroup> |
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> |
||||||
|
</Project> |
@ -0,0 +1,16 @@ |
|||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00 |
||||||
|
# SharpDevelop 2.1.0.1602 |
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SdaUser", "SdaUser.csproj", "{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}" |
||||||
|
EndProject |
||||||
|
Global |
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||||
|
Debug|Any CPU = Debug|Any CPU |
||||||
|
Release|Any CPU = Release|Any CPU |
||||||
|
EndGlobalSection |
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||||
|
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||||
|
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||||
|
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Release|Any CPU.Build.0 = Release|Any CPU |
||||||
|
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||||
|
EndGlobalSection |
||||||
|
EndGlobal |
Binary file not shown.
@ -1,21 +1,35 @@ |
|||||||
// <file>
|
// <file>
|
||||||
// <copyright see="prj:///doc/copyright.txt"/>
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
// <license see="prj:///doc/license.txt"/>
|
// <license see="prj:///doc/license.txt"/>
|
||||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||||
// <version>$Revision$</version>
|
// <version>$Revision$</version>
|
||||||
// </file>
|
// </file>
|
||||||
|
|
||||||
using System; |
using System; |
||||||
|
using System.Runtime.Serialization; |
||||||
|
|
||||||
namespace ICSharpCode.Core |
namespace ICSharpCode.Core |
||||||
{ |
{ |
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of AddInLoadException.
|
/// Exception used when loading an AddIn fails.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Serializable] |
||||||
public class AddInLoadException : CoreException |
public class AddInLoadException : CoreException |
||||||
{ |
{ |
||||||
|
public AddInLoadException() : base() |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
public AddInLoadException(string message) : base(message) |
public AddInLoadException(string message) : base(message) |
||||||
{ |
{ |
||||||
} |
} |
||||||
|
|
||||||
|
public AddInLoadException(string message, Exception innerException) : base(message, innerException) |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
protected AddInLoadException(SerializationInfo info, StreamingContext context) : base(info, context) |
||||||
|
{ |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,22 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
|
// <license see="prj:///doc/license.txt"/>
|
||||||
|
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||||
|
// <version>$Revision$</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Reflection; |
||||||
|
using System.Runtime.CompilerServices; |
||||||
|
using System.Security.Permissions; |
||||||
|
using System.Diagnostics.CodeAnalysis; |
||||||
|
|
||||||
|
[assembly: CLSCompliant(true)] |
||||||
|
[assembly: StringFreezing()] |
||||||
|
|
||||||
|
[assembly: AssemblyTitle("ICSharpCode.SharpDevelop.Sda")] |
||||||
|
[assembly: AssemblyDescription("SharpDevelop for Applications")] |
||||||
|
[assembly: AssemblyConfiguration("")] |
||||||
|
[assembly: AssemblyTrademark("")] |
||||||
|
[assembly: AssemblyCulture("")] |
||||||
|
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Unrestricted=true)] |
@ -0,0 +1,85 @@ |
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<PropertyGroup> |
||||||
|
<OutputType>Library</OutputType> |
||||||
|
<RootNamespace>ICSharpCode.SharpDevelop.Sda</RootNamespace> |
||||||
|
<AssemblyName>ICSharpCode.SharpDevelop.Sda</AssemblyName> |
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||||
|
<ProjectGuid>{80318B5F-A25D-45AB-8A95-EF31D2370A4C}</ProjectGuid> |
||||||
|
<OutputPath>..\..\..\bin\</OutputPath> |
||||||
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
||||||
|
<NoStdLib>False</NoStdLib> |
||||||
|
<RegisterForComInterop>False</RegisterForComInterop> |
||||||
|
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> |
||||||
|
<BaseAddress>4194304</BaseAddress> |
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget> |
||||||
|
<FileAlignment>4096</FileAlignment> |
||||||
|
<WarningLevel>4</WarningLevel> |
||||||
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
||||||
|
<DocumentationFile>..\..\..\bin\ICSharpCode.SharpDevelop.Sda.xml</DocumentationFile> |
||||||
|
<RunCodeAnalysis>True</RunCodeAnalysis> |
||||||
|
<SignAssembly>True</SignAssembly> |
||||||
|
<AssemblyOriginatorKeyFile>..\ICSharpCode.SharpDevelop.snk</AssemblyOriginatorKeyFile> |
||||||
|
<DelaySign>False</DelaySign> |
||||||
|
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode> |
||||||
|
<CodeAnalysisRules>-Microsoft.Naming#CA1704;-Microsoft.Performance#CA1822</CodeAnalysisRules> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||||
|
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> |
||||||
|
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> |
||||||
|
<Optimize>False</Optimize> |
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||||
|
<DebugSymbols>true</DebugSymbols> |
||||||
|
<DebugType>Full</DebugType> |
||||||
|
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||||
|
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> |
||||||
|
<IntermediateOutputPath>obj\Release\</IntermediateOutputPath> |
||||||
|
<Optimize>True</Optimize> |
||||||
|
<DefineConstants>TRACE</DefineConstants> |
||||||
|
<DebugSymbols>False</DebugSymbols> |
||||||
|
<DebugType>None</DebugType> |
||||||
|
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||||
|
</PropertyGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Reference Include="System" /> |
||||||
|
<Reference Include="System.Xml" /> |
||||||
|
<Reference Include="System.Drawing" /> |
||||||
|
<Reference Include="System.Windows.Forms" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Compile Include="..\GlobalAssemblyInfo.cs"> |
||||||
|
<Link>Configuration\GlobalAssemblyInfo.cs</Link> |
||||||
|
</Compile> |
||||||
|
<Compile Include="Configuration\AssemblyInfo.cs" /> |
||||||
|
<Compile Include="Src\CallHelper.cs" /> |
||||||
|
<Compile Include="Src\SharpDevelopHost.cs" /> |
||||||
|
<Compile Include="Src\ExceptionBox.cs"> |
||||||
|
<SubType>Form</SubType> |
||||||
|
</Compile> |
||||||
|
<Compile Include="Src\StartupSettings.cs" /> |
||||||
|
<Compile Include="Src\EventArgs.cs" /> |
||||||
|
<Compile Include="Src\WorkbenchSettings.cs" /> |
||||||
|
<Compile Include="Src\Document.cs" /> |
||||||
|
<Compile Include="Src\RunWorkbenchException.cs" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ProjectReference Include="..\Base\Project\ICSharpCode.SharpDevelop.csproj"> |
||||||
|
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project> |
||||||
|
<Name>ICSharpCode.SharpDevelop</Name> |
||||||
|
<Private>False</Private> |
||||||
|
</ProjectReference> |
||||||
|
<ProjectReference Include="..\Core\Project\ICSharpCode.Core.csproj"> |
||||||
|
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project> |
||||||
|
<Name>ICSharpCode.Core</Name> |
||||||
|
<Private>False</Private> |
||||||
|
</ProjectReference> |
||||||
|
<Folder Include="Configuration" /> |
||||||
|
<Content Include="ICSharpCode.SharpDevelop.Sda.dll.config"> |
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||||
|
</Content> |
||||||
|
<Folder Include="Src" /> |
||||||
|
</ItemGroup> |
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> |
||||||
|
</Project> |
@ -0,0 +1,72 @@ |
|||||||
|
<configuration> |
||||||
|
<configSections> |
||||||
|
<section name="log4net" type="System.Configuration.IgnoreSectionHandler" /> |
||||||
|
</configSections> |
||||||
|
<runtime> |
||||||
|
<!-- |
||||||
|
|
||||||
|
WARNING! |
||||||
|
|
||||||
|
This file is automatically generated and will be overwritten every time SharpDevelop is compiled. |
||||||
|
Change the template file "app.template.config" instead! |
||||||
|
|
||||||
|
--> |
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
||||||
|
<dependentAssembly> |
||||||
|
<assemblyIdentity name="ICSharpCode.Core" publicKeyToken="f829da5c02be14ee" culture="neutral"/> |
||||||
|
<bindingRedirect oldVersion="2.1.0.1-2.1.0.1609" newVersion="2.1.0.1609"/> |
||||||
|
</dependentAssembly> |
||||||
|
<dependentAssembly> |
||||||
|
<assemblyIdentity name="ICSharpCode.SharpDevelop" publicKeyToken="f829da5c02be14ee" culture="neutral"/> |
||||||
|
<bindingRedirect oldVersion="2.1.0.1-2.1.0.1609" newVersion="2.1.0.1609"/> |
||||||
|
</dependentAssembly> |
||||||
|
<dependentAssembly> |
||||||
|
<assemblyIdentity name="ICSharpCode.TextEditor" publicKeyToken="4d61825e8dd49f1a" culture="neutral"/> |
||||||
|
<bindingRedirect oldVersion="2.1.0.1-2.1.0.1609" newVersion="2.1.0.1609"/> |
||||||
|
</dependentAssembly> |
||||||
|
<dependentAssembly> |
||||||
|
<assemblyIdentity name="ICSharpCode.NRefactory" publicKeyToken="efe927acf176eea2" culture="neutral"/> |
||||||
|
<bindingRedirect oldVersion="2.1.0.1-2.1.0.1609" newVersion="2.1.0.1609"/> |
||||||
|
</dependentAssembly> |
||||||
|
</assemblyBinding> |
||||||
|
</runtime> |
||||||
|
<log4net> |
||||||
|
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender"> |
||||||
|
<mapping> |
||||||
|
<level value="FATAL" /> |
||||||
|
<foreColor value="Red, HighIntensity" /> |
||||||
|
</mapping> |
||||||
|
<mapping> |
||||||
|
<level value="ERROR" /> |
||||||
|
<foreColor value="Red" /> |
||||||
|
</mapping> |
||||||
|
<mapping> |
||||||
|
<level value="WARN" /> |
||||||
|
<foreColor value="Yellow" /> |
||||||
|
</mapping> |
||||||
|
<mapping> |
||||||
|
<level value="INFO" /> |
||||||
|
<foreColor value="White" /> |
||||||
|
</mapping> |
||||||
|
<mapping> |
||||||
|
<level value="DEBUG" /> |
||||||
|
<foreColor value="Green" /> |
||||||
|
</mapping> |
||||||
|
<layout type="log4net.Layout.PatternLayout"> |
||||||
|
<conversionPattern value="%date [%thread] %-5level- %message%newline" /> |
||||||
|
</layout> |
||||||
|
</appender> |
||||||
|
|
||||||
|
<appender name="FileAppender" type="log4net.Appender.FileAppender"> |
||||||
|
<file value="SharpDevelopLog.txt" /> |
||||||
|
<layout type="log4net.Layout.PatternLayout"> |
||||||
|
<conversionPattern value="%date [%thread] %-5level- %message%newline" /> |
||||||
|
</layout> |
||||||
|
</appender> |
||||||
|
|
||||||
|
<root> |
||||||
|
<level value="DEBUG" /> |
||||||
|
<appender-ref ref="ColoredConsoleAppender" /> |
||||||
|
</root> |
||||||
|
</log4net> |
||||||
|
</configuration> |
@ -0,0 +1,6 @@ |
|||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00 |
||||||
|
# SharpDevelop 2.1.0.1602 |
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" |
||||||
|
EndProject |
||||||
|
Global |
||||||
|
EndGlobal |
@ -0,0 +1,260 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 27.07.2006 |
||||||
|
* Time: 20:28 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Diagnostics.CodeAnalysis; |
||||||
|
using System.IO; |
||||||
|
using System.Reflection; |
||||||
|
using System.Resources; |
||||||
|
using System.Threading; |
||||||
|
|
||||||
|
using ICSharpCode.Core; |
||||||
|
using ICSharpCode.SharpDevelop.Commands; |
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
internal sealed class CallHelper : MarshalByRefObject |
||||||
|
{ |
||||||
|
private static readonly object[] emptyObjectArray = new object[0]; |
||||||
|
|
||||||
|
SharpDevelopHost.CallbackHelper callback; |
||||||
|
bool useSharpDevelopErrorHandler; |
||||||
|
|
||||||
|
#region Initialize Core
|
||||||
|
public void InitSharpDevelopCore(SharpDevelopHost.CallbackHelper callback, StartupSettings properties) |
||||||
|
{ |
||||||
|
LoggingService.Info("InitSharpDevelop..."); |
||||||
|
this.callback = callback; |
||||||
|
CoreStartup startup = new CoreStartup(properties.ApplicationName); |
||||||
|
if (properties.UseSharpDevelopErrorHandler) { |
||||||
|
this.useSharpDevelopErrorHandler = true; |
||||||
|
ExceptionBox.RegisterExceptionBoxForUnhandledExceptions(); |
||||||
|
} |
||||||
|
startup.ConfigDirectory = properties.ConfigDirectory; |
||||||
|
startup.DataDirectory = properties.DataDirectory; |
||||||
|
if (properties.PropertiesName != null) { |
||||||
|
startup.PropertiesName = properties.PropertiesName; |
||||||
|
} |
||||||
|
|
||||||
|
// disable RTL: translations for the RTL languages are inactive
|
||||||
|
RightToLeftConverter.RightToLeftLanguages = new string[0]; |
||||||
|
|
||||||
|
if (properties.ApplicationRootPath != null) { |
||||||
|
FileUtility.ApplicationRootPath = properties.ApplicationRootPath; |
||||||
|
} |
||||||
|
|
||||||
|
startup.StartCoreServices(); |
||||||
|
Assembly exe = Assembly.Load("SharpDevelop"); |
||||||
|
ResourceService.RegisterNeutralStrings(new ResourceManager("Resources.StringResources", exe)); |
||||||
|
ResourceService.RegisterNeutralImages(new ResourceManager("Resources.BitmapResources", exe)); |
||||||
|
|
||||||
|
MenuCommand.LinkCommandCreator = delegate(string link) { return new LinkCommand(link); }; |
||||||
|
StringParser.RegisterStringTagProvider(new SharpDevelopStringTagProvider()); |
||||||
|
|
||||||
|
LoggingService.Info("Looking for AddIns..."); |
||||||
|
foreach (string file in properties.addInFiles) { |
||||||
|
startup.AddAddInFile(file); |
||||||
|
} |
||||||
|
foreach (string dir in properties.addInDirectories) { |
||||||
|
startup.AddAddInsFromDirectory(dir); |
||||||
|
} |
||||||
|
|
||||||
|
if (properties.AllowAddInConfigurationAndExternalAddIns) { |
||||||
|
startup.ConfigureExternalAddIns(Path.Combine(PropertyService.ConfigDirectory, "AddIns.xml")); |
||||||
|
} |
||||||
|
if (properties.AllowUserAddIns) { |
||||||
|
startup.ConfigureUserAddIns(Path.Combine(PropertyService.ConfigDirectory, "AddInInstallTemp"), |
||||||
|
Path.Combine(PropertyService.ConfigDirectory, "AddIns")); |
||||||
|
} |
||||||
|
|
||||||
|
LoggingService.Info("Loading AddInTree..."); |
||||||
|
startup.RunInitialization(); |
||||||
|
|
||||||
|
// Register events to marshal back
|
||||||
|
Project.ProjectService.StartBuild += delegate { this.callback.StartBuild(); }; |
||||||
|
Project.ProjectService.EndBuild += delegate { this.callback.EndBuild(); }; |
||||||
|
Project.ProjectService.SolutionLoaded += delegate { this.callback.SolutionLoaded(); }; |
||||||
|
Project.ProjectService.SolutionClosed += delegate { this.callback.SolutionClosed(); }; |
||||||
|
Project.ProjectService.SolutionConfigurationChanged += delegate { this.callback.SolutionConfigurationChanged(); }; |
||||||
|
FileUtility.FileLoaded += delegate(object sender, FileNameEventArgs e) { this.callback.FileLoaded(e.FileName); }; |
||||||
|
FileUtility.FileSaved += delegate(object sender, FileNameEventArgs e) { this.callback.FileSaved(e.FileName); }; |
||||||
|
|
||||||
|
LoggingService.Info("InitSharpDevelop finished"); |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Initialize and run Workbench
|
||||||
|
public void RunWorkbench(WorkbenchSettings settings) |
||||||
|
{ |
||||||
|
if (settings.RunOnNewThread) { |
||||||
|
Thread t = new Thread(RunWorkbenchInternal); |
||||||
|
t.SetApartmentState(ApartmentState.STA); |
||||||
|
t.Name = "SDmain"; |
||||||
|
t.Start(settings); |
||||||
|
} else { |
||||||
|
RunWorkbenchInternal(settings); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] |
||||||
|
void RunWorkbenchInternal(object settings) |
||||||
|
{ |
||||||
|
WorkbenchSettings wbSettings = (WorkbenchSettings)settings; |
||||||
|
|
||||||
|
LoggingService.Info("Initializing workbench..."); |
||||||
|
WorkbenchSingleton.InitializeWorkbench(); |
||||||
|
|
||||||
|
// initialize workbench-dependent services:
|
||||||
|
Project.ProjectService.InitializeService(); |
||||||
|
|
||||||
|
LoggingService.Info("Starting workbench..."); |
||||||
|
Exception exception = null; |
||||||
|
// finally start the workbench.
|
||||||
|
try { |
||||||
|
StartWorkbenchCommand wbc = new StartWorkbenchCommand(); |
||||||
|
wbc.AllowTipOfTheDay = wbSettings.UseTipOfTheDay; |
||||||
|
callback.BeforeRunWorkbench(); |
||||||
|
wbc.Run(wbSettings.InitialFileList); |
||||||
|
} catch (Exception ex) { |
||||||
|
exception = ex; |
||||||
|
} finally { |
||||||
|
LoggingService.Info("Unloading services..."); |
||||||
|
try { |
||||||
|
Project.ProjectService.CloseSolution(); |
||||||
|
FileService.Unload(); |
||||||
|
PropertyService.Save(); |
||||||
|
} catch (Exception ex) { |
||||||
|
LoggingService.Warn("Exception during unloading", ex); |
||||||
|
if (exception != null) { |
||||||
|
exception = ex; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
LoggingService.Info("Finished running workbench."); |
||||||
|
callback.WorkbenchClosed(); |
||||||
|
if (exception != null) { |
||||||
|
const string errorText = "Unhandled exception terminated the workbench"; |
||||||
|
LoggingService.Fatal(exception); |
||||||
|
if (useSharpDevelopErrorHandler) { |
||||||
|
System.Windows.Forms.Application.Run(new ExceptionBox(exception, errorText, true)); |
||||||
|
} else { |
||||||
|
throw new RunWorkbenchException(errorText, exception); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
delegate T Func<T>(); |
||||||
|
delegate T Func<S, T>(S arg); |
||||||
|
|
||||||
|
public List<Document> OpenDocuments { |
||||||
|
get { |
||||||
|
List<Document> l = new List<Document>(); |
||||||
|
if (WorkbenchSingleton.InvokeRequired) { |
||||||
|
WorkbenchSingleton.SafeThreadCall(new Action<List<Document>>(GetOpenDocuments), l); |
||||||
|
} else { |
||||||
|
GetOpenDocuments(l); |
||||||
|
} |
||||||
|
return l; |
||||||
|
} |
||||||
|
} |
||||||
|
void GetOpenDocuments(List<Document> l) |
||||||
|
{ |
||||||
|
foreach (IViewContent vc in WorkbenchSingleton.Workbench.ViewContentCollection) { |
||||||
|
Document d = Document.FromWindow(vc.WorkbenchWindow); |
||||||
|
if (d != null) { |
||||||
|
l.Add(d); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Opens the document with the specified file name.
|
||||||
|
/// </summary>
|
||||||
|
public Document OpenDocument(string fileName) |
||||||
|
{ |
||||||
|
if (WorkbenchSingleton.InvokeRequired) { |
||||||
|
return (Document)WorkbenchSingleton.SafeThreadCall(new Func<string, Document>(OpenDocumentInternal), new object[] { fileName }); |
||||||
|
} else { |
||||||
|
return OpenDocumentInternal(fileName); |
||||||
|
} |
||||||
|
} |
||||||
|
Document OpenDocumentInternal(string fileName) |
||||||
|
{ |
||||||
|
return Document.FromWindow(FileService.OpenFile(fileName)); |
||||||
|
} |
||||||
|
|
||||||
|
public void OpenProject(string fileName) |
||||||
|
{ |
||||||
|
if (WorkbenchSingleton.InvokeRequired) { |
||||||
|
WorkbenchSingleton.SafeThreadCall(new Action<string>(OpenProjectInternal), new object[] { fileName }); |
||||||
|
} else { |
||||||
|
OpenProjectInternal(fileName); |
||||||
|
} |
||||||
|
} |
||||||
|
void OpenProjectInternal(string fileName) |
||||||
|
{ |
||||||
|
Project.ProjectService.LoadSolutionOrProject(fileName); |
||||||
|
} |
||||||
|
|
||||||
|
public bool IsSolutionOrProject(string fileName) |
||||||
|
{ |
||||||
|
return Project.ProjectService.HasProjectLoader(fileName); |
||||||
|
} |
||||||
|
|
||||||
|
public bool CloseWorkbench(bool force) |
||||||
|
{ |
||||||
|
if (WorkbenchSingleton.InvokeRequired) { |
||||||
|
return (bool)WorkbenchSingleton.SafeThreadCall(new Func<bool, bool>(CloseWorkbenchInternal), new object[] { force }); |
||||||
|
} else { |
||||||
|
return CloseWorkbenchInternal(force); |
||||||
|
} |
||||||
|
} |
||||||
|
bool CloseWorkbenchInternal(bool force) |
||||||
|
{ |
||||||
|
if (force) { |
||||||
|
foreach (IViewContent vc in WorkbenchSingleton.Workbench.ViewContentCollection.ToArray()) { |
||||||
|
vc.WorkbenchWindow.CloseWindow(true); |
||||||
|
} |
||||||
|
} |
||||||
|
WorkbenchSingleton.MainForm.Close(); |
||||||
|
return WorkbenchSingleton.MainForm.IsDisposed; |
||||||
|
} |
||||||
|
|
||||||
|
public void KillWorkbench() |
||||||
|
{ |
||||||
|
System.Windows.Forms.Application.Exit(); |
||||||
|
} |
||||||
|
|
||||||
|
public bool WorkbenchVisible { |
||||||
|
get { |
||||||
|
if (WorkbenchSingleton.InvokeRequired) { |
||||||
|
return (bool)WorkbenchSingleton.SafeThreadCall(new Func<bool>(GetWorkbenchVisibleInternal), emptyObjectArray); |
||||||
|
} else { |
||||||
|
return GetWorkbenchVisibleInternal(); |
||||||
|
} |
||||||
|
} |
||||||
|
set { |
||||||
|
if (WorkbenchSingleton.InvokeRequired) { |
||||||
|
WorkbenchSingleton.SafeThreadCall(new Action<bool>(SetWorkbenchVisibleInternal), new object[] { value }); |
||||||
|
} else { |
||||||
|
SetWorkbenchVisibleInternal(value); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
bool GetWorkbenchVisibleInternal() |
||||||
|
{ |
||||||
|
return WorkbenchSingleton.MainForm.Visible; |
||||||
|
} |
||||||
|
void SetWorkbenchVisibleInternal(bool value) |
||||||
|
{ |
||||||
|
WorkbenchSingleton.MainForm.Visible = value; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,78 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 27.07.2006 |
||||||
|
* Time: 21:54 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Wraps a file opened in SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class Document : MarshalByRefObject |
||||||
|
{ |
||||||
|
internal static Document FromWindow(IWorkbenchWindow window) |
||||||
|
{ |
||||||
|
if (window != null && window.ViewContent is IEditable) { |
||||||
|
return new Document(window, ((IEditable)window.ViewContent)); |
||||||
|
} else { |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
IWorkbenchWindow window; |
||||||
|
IEditable editable; |
||||||
|
|
||||||
|
private Document(IWorkbenchWindow window, IEditable editable) |
||||||
|
{ |
||||||
|
this.window = window; |
||||||
|
this.editable = editable; |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the file name assigned to this document. Can be null.
|
||||||
|
/// </summary>
|
||||||
|
public string FileName { |
||||||
|
get { |
||||||
|
return window.ViewContent.FileName; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets the text displayed in the document.
|
||||||
|
/// </summary>
|
||||||
|
public string Text { |
||||||
|
// IEditable implementor is responsible for thread-safety
|
||||||
|
get { |
||||||
|
return editable.Text; |
||||||
|
} |
||||||
|
set { |
||||||
|
editable.Text = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the document tab has been disposed because the document has been closed.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsDisposed { |
||||||
|
get { |
||||||
|
return window.IsDisposed; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the document.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="force">If true, the window is closed without giving the user
|
||||||
|
/// a change to save changes if there were modifications.</param>
|
||||||
|
/// <returns>true, if the window has been closed</returns>
|
||||||
|
public bool Close(bool force) |
||||||
|
{ |
||||||
|
return window.CloseWindow(force); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 27.07.2006 |
||||||
|
* Time: 21:05 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// EventArgs for the <see cref="SharpDevelopHost.FileLoaded">SharpDevelopHost.FileLoaded</see>
|
||||||
|
/// and <see cref="SharpDevelopHost.FileSaved">SharpDevelopHost.FileSaved</see> events.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable] |
||||||
|
public class FileEventArgs : EventArgs |
||||||
|
{ |
||||||
|
string fileName; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the file name.
|
||||||
|
/// </summary>
|
||||||
|
public string FileName { |
||||||
|
get { |
||||||
|
return fileName; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of the FileEventArgs class.
|
||||||
|
/// </summary>
|
||||||
|
public FileEventArgs(string fileName) |
||||||
|
{ |
||||||
|
this.fileName = fileName; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 27.07.2006 |
||||||
|
* Time: 22:37 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Runtime.Serialization; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Exception used when there's an unhandled exception running the workbench.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable()] |
||||||
|
public class RunWorkbenchException : Exception |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Create a new RunWorkbenchException instance.
|
||||||
|
/// </summary>
|
||||||
|
public RunWorkbenchException() : base() |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new RunWorkbenchException instance.
|
||||||
|
/// </summary>
|
||||||
|
public RunWorkbenchException(string message) : base(message) |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new RunWorkbenchException instance.
|
||||||
|
/// </summary>
|
||||||
|
public RunWorkbenchException(string message, Exception innerException) : base(message, innerException) |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new RunWorkbenchException instance.
|
||||||
|
/// </summary>
|
||||||
|
protected RunWorkbenchException(SerializationInfo info, StreamingContext context) : base(info, context) |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,378 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 26.07.2006 |
||||||
|
* Time: 19:20 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.ObjectModel; |
||||||
|
using System.IO; |
||||||
|
using System.Diagnostics.CodeAnalysis; |
||||||
|
using System.Reflection; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// This class can host an instance of SharpDevelop inside another
|
||||||
|
/// AppDomain.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class SharpDevelopHost |
||||||
|
{ |
||||||
|
#region CreateDomain
|
||||||
|
/// <summary>
|
||||||
|
/// Create an AppDomain capable of hosting SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public static AppDomain CreateDomain() |
||||||
|
{ |
||||||
|
return AppDomain.CreateDomain("SharpDevelop.Sda", null, CreateDomainSetup()); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates an AppDomainSetup specifying properties for an AppDomain capable of
|
||||||
|
/// hosting SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public static AppDomainSetup CreateDomainSetup() |
||||||
|
{ |
||||||
|
AppDomainSetup s = new AppDomainSetup(); |
||||||
|
s.ApplicationBase = Path.GetDirectoryName(SdaAssembly.Location); |
||||||
|
s.ConfigurationFile = SdaAssembly.Location + ".config"; |
||||||
|
s.ApplicationName = "SharpDevelop.Sda"; |
||||||
|
return s; |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Static helpers
|
||||||
|
internal static Assembly SdaAssembly { |
||||||
|
get { |
||||||
|
return typeof(SharpDevelopHost).Assembly; |
||||||
|
} |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SDInitStatus enum
|
||||||
|
enum SDInitStatus |
||||||
|
{ |
||||||
|
None, |
||||||
|
CoreInitialized, |
||||||
|
WorkbenchInitialized, |
||||||
|
Busy, |
||||||
|
AppDomainUnloaded |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
AppDomain appDomain; |
||||||
|
CallHelper helper; |
||||||
|
SDInitStatus initStatus; |
||||||
|
|
||||||
|
#region Constructors
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new AppDomain to host SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public SharpDevelopHost(StartupSettings startup) |
||||||
|
{ |
||||||
|
if (startup == null) { |
||||||
|
throw new ArgumentNullException("startup"); |
||||||
|
} |
||||||
|
this.appDomain = CreateDomain(); |
||||||
|
helper = (CallHelper)appDomain.CreateInstanceAndUnwrap(SdaAssembly.FullName, typeof(CallHelper).FullName); |
||||||
|
helper.InitSharpDevelopCore(new CallbackHelper(this), startup); |
||||||
|
initStatus = SDInitStatus.CoreInitialized; |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Host SharpDevelop in the existing AppDomain.
|
||||||
|
/// </summary>
|
||||||
|
public SharpDevelopHost(AppDomain appDomain, StartupSettings startup) |
||||||
|
{ |
||||||
|
if (appDomain == null) { |
||||||
|
throw new ArgumentNullException("appDomain"); |
||||||
|
} |
||||||
|
if (startup == null) { |
||||||
|
throw new ArgumentNullException("startup"); |
||||||
|
} |
||||||
|
this.appDomain = appDomain; |
||||||
|
helper = (CallHelper)appDomain.CreateInstanceAndUnwrap(SdaAssembly.FullName, typeof(CallHelper).FullName); |
||||||
|
helper.InitSharpDevelopCore(new CallbackHelper(this), startup); |
||||||
|
initStatus = SDInitStatus.CoreInitialized; |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Workbench Initialization and startup
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes the workbench (create the MainForm instance, construct menu from AddInTree etc.)
|
||||||
|
/// and runs it using the supplied settings.
|
||||||
|
/// This starts a new message loop for the workbench. By default the message loop
|
||||||
|
/// is created on a new thread, but you can change the settings so that
|
||||||
|
/// it is created on the thread calling RunWorkbench.
|
||||||
|
/// In that case, RunWorkbench will block until SharpDevelop is shut down!
|
||||||
|
/// </summary>
|
||||||
|
public void RunWorkbench(WorkbenchSettings settings) |
||||||
|
{ |
||||||
|
if (settings == null) { |
||||||
|
throw new ArgumentNullException("settings"); |
||||||
|
} |
||||||
|
if (initStatus == SDInitStatus.CoreInitialized) { |
||||||
|
initStatus = SDInitStatus.Busy; |
||||||
|
helper.RunWorkbench(settings); |
||||||
|
if (settings.RunOnNewThread) { |
||||||
|
initStatus = SDInitStatus.WorkbenchInitialized; |
||||||
|
} |
||||||
|
} else { |
||||||
|
throw new InvalidOperationException(); |
||||||
|
} |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Application control
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the list of currently opened documents.
|
||||||
|
/// </summary>
|
||||||
|
public ReadOnlyCollection<Document> OpenDocuments { |
||||||
|
get { |
||||||
|
if (initStatus != SDInitStatus.WorkbenchInitialized) { |
||||||
|
return new ReadOnlyCollection<Document>(new Document[0]); |
||||||
|
} |
||||||
|
return new ReadOnlyCollection<Document>(helper.OpenDocuments); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Opens the document with the specified file name.
|
||||||
|
/// Requires that the workbench is running.
|
||||||
|
/// </summary>
|
||||||
|
public Document OpenDocument(string fileName) |
||||||
|
{ |
||||||
|
if (initStatus != SDInitStatus.WorkbenchInitialized) { |
||||||
|
throw new InvalidOperationException(); |
||||||
|
} |
||||||
|
return helper.OpenDocument(fileName); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Opens the project or solution with the specified file name.
|
||||||
|
/// Requires that the workbench is running.
|
||||||
|
/// </summary>
|
||||||
|
public void OpenProject(string fileName) |
||||||
|
{ |
||||||
|
if (initStatus != SDInitStatus.WorkbenchInitialized) { |
||||||
|
throw new InvalidOperationException(); |
||||||
|
} |
||||||
|
helper.OpenProject(fileName); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets if the specified file is a project or solution file.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSolutionOrProject(string fileName) |
||||||
|
{ |
||||||
|
return helper.IsSolutionOrProject(fileName); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets whether the workbench is visible.
|
||||||
|
/// Requires that the workbench is running.
|
||||||
|
/// </summary>
|
||||||
|
public bool WorkbenchVisible { |
||||||
|
get { |
||||||
|
if (initStatus != SDInitStatus.WorkbenchInitialized) { |
||||||
|
return false; |
||||||
|
} else { |
||||||
|
return helper.WorkbenchVisible; |
||||||
|
} |
||||||
|
} |
||||||
|
set { |
||||||
|
if (initStatus != SDInitStatus.WorkbenchInitialized) { |
||||||
|
throw new InvalidOperationException(); |
||||||
|
} |
||||||
|
helper.WorkbenchVisible = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes and unloads the workbench. The user is asked to save his work
|
||||||
|
/// and can abort closing.
|
||||||
|
/// Requires that the workbench is running.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="force">When force is used (=true), unsaved changes to documents
|
||||||
|
/// are lost, but SharpDevelop still terminates correctly and saves changed
|
||||||
|
/// settings.</param>
|
||||||
|
/// <returns>True when the workbench was closed.</returns>
|
||||||
|
public bool CloseWorkbench(bool force) |
||||||
|
{ |
||||||
|
if (initStatus == SDInitStatus.CoreInitialized) { |
||||||
|
// Workbench not loaded/already closed: do nothing
|
||||||
|
return true; |
||||||
|
} |
||||||
|
if (initStatus != SDInitStatus.WorkbenchInitialized) { |
||||||
|
throw new InvalidOperationException(); |
||||||
|
} |
||||||
|
return helper.CloseWorkbench(force); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unload the SharpDevelop AppDomain. This will force SharpDevelop to close
|
||||||
|
/// without saving open files or changed settings.
|
||||||
|
/// Call CloseWorkbench before UnloadDomain to prompt the user to save documents and settings.
|
||||||
|
/// </summary>
|
||||||
|
public void UnloadDomain() |
||||||
|
{ |
||||||
|
if (initStatus != SDInitStatus.AppDomainUnloaded) { |
||||||
|
if (initStatus == SDInitStatus.WorkbenchInitialized) { |
||||||
|
helper.KillWorkbench(); |
||||||
|
} |
||||||
|
AppDomain.Unload(appDomain); |
||||||
|
initStatus = SDInitStatus.AppDomainUnloaded; |
||||||
|
} |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Callback Events
|
||||||
|
System.ComponentModel.ISynchronizeInvoke invokeTarget; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets an object to use to synchronize all events with a thread.
|
||||||
|
/// Use null (default) to handle all events on the thread they were
|
||||||
|
/// raised on.
|
||||||
|
/// </summary>
|
||||||
|
public System.ComponentModel.ISynchronizeInvoke InvokeTarget { |
||||||
|
get { |
||||||
|
return invokeTarget; |
||||||
|
} |
||||||
|
set { |
||||||
|
invokeTarget = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event before the workbench has been unloaded.
|
||||||
|
/// </summary>
|
||||||
|
[SuppressMessage("Microsoft.Naming", "CA1713:EventsShouldNotHaveBeforeOrAfterPrefix")] |
||||||
|
public event EventHandler BeforeRunWorkbench; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event after the workbench has been unloaded. Occurs on the thread
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler WorkbenchClosed; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when SharpDevelop starts to compile a project or solution.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler StartBuild; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when SharpDevelop finishes to compile a project or solution.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler EndBuild; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when a solution was loaded inside SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler SolutionLoaded; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when the current solution was closed.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler SolutionClosed; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when the active solution configuration was changed.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler SolutionConfigurationChanged; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when a file was loaded inside SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler<FileEventArgs> FileLoaded; |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event when a file was saved inside SharpDevelop.
|
||||||
|
/// </summary>
|
||||||
|
public event EventHandler<FileEventArgs> FileSaved; |
||||||
|
|
||||||
|
internal sealed class CallbackHelper : MarshalByRefObject |
||||||
|
{ |
||||||
|
private static readonly object[] emptyObjectArray = new object[0]; |
||||||
|
|
||||||
|
readonly SharpDevelopHost host; |
||||||
|
|
||||||
|
public CallbackHelper(SharpDevelopHost host) |
||||||
|
{ |
||||||
|
this.host = host; |
||||||
|
} |
||||||
|
|
||||||
|
private bool InvokeRequired { |
||||||
|
get { |
||||||
|
return host.invokeTarget != null && host.invokeTarget.InvokeRequired; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private void Invoke(System.Windows.Forms.MethodInvoker method) |
||||||
|
{ |
||||||
|
host.invokeTarget.BeginInvoke(method, emptyObjectArray); |
||||||
|
} |
||||||
|
|
||||||
|
private void Invoke(Action<string> method, string argument) |
||||||
|
{ |
||||||
|
host.invokeTarget.BeginInvoke(method, new object[] { argument }); |
||||||
|
} |
||||||
|
|
||||||
|
internal void BeforeRunWorkbench() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(BeforeRunWorkbench); return; } |
||||||
|
host.initStatus = SDInitStatus.WorkbenchInitialized; |
||||||
|
if (host.BeforeRunWorkbench != null) host.BeforeRunWorkbench(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void WorkbenchClosed() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(WorkbenchClosed); return; } |
||||||
|
host.initStatus = SDInitStatus.CoreInitialized; |
||||||
|
if (host.WorkbenchClosed != null) host.WorkbenchClosed(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void StartBuild() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(StartBuild); return; } |
||||||
|
if (host.StartBuild != null) host.StartBuild(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void EndBuild() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(EndBuild); return; } |
||||||
|
if (host.EndBuild != null) host.EndBuild(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void SolutionLoaded() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(SolutionLoaded); return; } |
||||||
|
if (host.SolutionLoaded != null) host.SolutionLoaded(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void SolutionClosed() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(SolutionClosed); return; } |
||||||
|
if (host.SolutionClosed != null) host.SolutionClosed(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void SolutionConfigurationChanged() |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(SolutionConfigurationChanged); return; } |
||||||
|
if (host.SolutionConfigurationChanged != null) host.SolutionConfigurationChanged(host, EventArgs.Empty); |
||||||
|
} |
||||||
|
|
||||||
|
internal void FileLoaded(string fileName) |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(FileLoaded, fileName); return; } |
||||||
|
if (host.FileLoaded != null) host.FileLoaded(host, new FileEventArgs(fileName)); |
||||||
|
} |
||||||
|
|
||||||
|
internal void FileSaved(string fileName) |
||||||
|
{ |
||||||
|
if (InvokeRequired) { Invoke(FileSaved, fileName); return; } |
||||||
|
if (host.FileSaved != null) host.FileSaved(host, new FileEventArgs(fileName)); |
||||||
|
} |
||||||
|
} |
||||||
|
#endregion
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,159 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 26.07.2006 |
||||||
|
* Time: 19:45 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// This class contains properties you can use to control how SharpDevelop is launched.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable] |
||||||
|
public sealed class StartupSettings |
||||||
|
{ |
||||||
|
bool useSharpDevelopErrorHandler = true; |
||||||
|
string applicationName = "SharpDevelop"; |
||||||
|
string applicationRootPath; |
||||||
|
bool allowAddInConfigurationAndExternalAddIns = true; |
||||||
|
bool allowUserAddIns; |
||||||
|
string propertiesName; |
||||||
|
string configDirectory; |
||||||
|
string dataDirectory; |
||||||
|
internal List<string> addInDirectories = new List<string>(); |
||||||
|
internal List<string> addInFiles = new List<string>(); |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets whether the SharpDevelop exception box should be used for
|
||||||
|
/// unhandled exceptions. The default is true.
|
||||||
|
/// </summary>
|
||||||
|
public bool UseSharpDevelopErrorHandler { |
||||||
|
get { |
||||||
|
return useSharpDevelopErrorHandler; |
||||||
|
} |
||||||
|
set { |
||||||
|
useSharpDevelopErrorHandler = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use the file <see cref="ConfigDirectory"/>\AddIns.xml to maintain
|
||||||
|
/// a list of deactivated AddIns and list of AddIns to load from
|
||||||
|
/// external locations.
|
||||||
|
/// The default value is true.
|
||||||
|
/// </summary>
|
||||||
|
public bool AllowAddInConfigurationAndExternalAddIns { |
||||||
|
get { |
||||||
|
return allowAddInConfigurationAndExternalAddIns; |
||||||
|
} |
||||||
|
set { |
||||||
|
allowAddInConfigurationAndExternalAddIns = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Allow user AddIns stored in the "application data" directory.
|
||||||
|
/// The default is false.
|
||||||
|
/// </summary>
|
||||||
|
public bool AllowUserAddIns { |
||||||
|
get { |
||||||
|
return allowUserAddIns; |
||||||
|
} |
||||||
|
set { |
||||||
|
allowUserAddIns = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets the application name used by the MessageService and some
|
||||||
|
/// SharpDevelop windows. The default is "SharpDevelop".
|
||||||
|
/// </summary>
|
||||||
|
public string ApplicationName { |
||||||
|
get { |
||||||
|
return applicationName; |
||||||
|
} |
||||||
|
set { |
||||||
|
if (value == null) |
||||||
|
throw new ArgumentNullException("value"); |
||||||
|
applicationName = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets the application root path to use.
|
||||||
|
/// Use null (default) to use the base directory of the SharpDevelop AppDomain.
|
||||||
|
/// </summary>
|
||||||
|
public string ApplicationRootPath { |
||||||
|
get { |
||||||
|
return applicationRootPath; |
||||||
|
} |
||||||
|
set { |
||||||
|
applicationRootPath = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets the directory used to store SharpDevelop properties,
|
||||||
|
/// settings and user AddIns.
|
||||||
|
/// Use null (default) to use "ApplicationData\ApplicationName"
|
||||||
|
/// </summary>
|
||||||
|
public string ConfigDirectory { |
||||||
|
get { |
||||||
|
return configDirectory; |
||||||
|
} |
||||||
|
set { |
||||||
|
configDirectory = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the data directory used to load resources.
|
||||||
|
/// Use null (default) to use the default path "ApplicationRootPath\data".
|
||||||
|
/// </summary>
|
||||||
|
public string DataDirectory { |
||||||
|
get { |
||||||
|
return dataDirectory; |
||||||
|
} |
||||||
|
set { |
||||||
|
dataDirectory = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the name used for the properties file (without path or extension).
|
||||||
|
/// Use null (default) to use the default name.
|
||||||
|
/// </summary>
|
||||||
|
public string PropertiesName { |
||||||
|
get { |
||||||
|
return propertiesName; |
||||||
|
} |
||||||
|
set { |
||||||
|
propertiesName = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Find AddIns by searching all .addin files recursively in <paramref name="addInDir"/>.
|
||||||
|
/// </summary>
|
||||||
|
public void AddAddInsFromDirectory(string addInDir) |
||||||
|
{ |
||||||
|
if (addInDir == null) |
||||||
|
throw new ArgumentNullException("addInDir"); |
||||||
|
addInDirectories.Add(addInDir); |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add the specified .addin file.
|
||||||
|
/// </summary>
|
||||||
|
public void AddAddInFile(string addInFile) |
||||||
|
{ |
||||||
|
if (addInFile == null) |
||||||
|
throw new ArgumentNullException("addInFile"); |
||||||
|
addInFiles.Add(addInFile); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,59 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Daniel Grunwald |
||||||
|
* Date: 27.07.2006 |
||||||
|
* Time: 21:17 |
||||||
|
*/ |
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.ObjectModel; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Sda |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// This class contains properties to control how the SharpDevelop
|
||||||
|
/// workbench is being run.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable] |
||||||
|
public sealed class WorkbenchSettings |
||||||
|
{ |
||||||
|
bool runOnNewThread = true; |
||||||
|
bool useTipOfTheDay; |
||||||
|
Collection<string> fileList = new Collection<string>(); |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets whether to create a new thread to run the workbench on.
|
||||||
|
/// The default value is true.
|
||||||
|
/// </summary>
|
||||||
|
public bool RunOnNewThread { |
||||||
|
get { |
||||||
|
return runOnNewThread; |
||||||
|
} |
||||||
|
set { |
||||||
|
runOnNewThread = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets/Sets whether the tip of the day is supported.
|
||||||
|
/// The default is false.
|
||||||
|
/// </summary>
|
||||||
|
public bool UseTipOfTheDay { |
||||||
|
get { |
||||||
|
return useTipOfTheDay; |
||||||
|
} |
||||||
|
set { |
||||||
|
useTipOfTheDay = value; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Put files to open at workbench startup into this collection.
|
||||||
|
/// </summary>
|
||||||
|
public Collection<string> InitialFileList { |
||||||
|
get { |
||||||
|
return fileList; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Binary file not shown.
Loading…
Reference in new issue