Browse Source

Check dependencies when enabling/disabling AddIns.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@807 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
49b9f18bb1
  1. BIN
      data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.OK.png
  2. 1
      data/resources/image/BitmapResources/BitmapResources.res
  3. 9
      src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.Interpreter.addin
  4. 6
      src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InteractiveInterpreterControl.boo
  5. 5
      src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InterpreterWrapper.boo
  6. 4
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin
  7. 4
      src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin
  8. 2
      src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin
  9. 1
      src/AddIns/Misc/AddInManager/Project/Configuration/AssemblyInfo.cs
  10. 20
      src/AddIns/Misc/AddInManager/Project/Src/AddInControl.cs
  11. 12
      src/AddIns/Misc/AddInManager/Project/Src/Commands.cs
  12. 254
      src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs
  13. 7
      src/AddIns/Misc/AddinScout/Project/AddInScout.addin
  14. 9
      src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin
  15. 9
      src/AddIns/Misc/HighlightingEditor/Project/HighlightingEditor.addin
  16. 3
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin
  17. 2
      src/AddIns/Misc/MbUnitPad/Project/MbUnitPad.addin
  18. 6
      src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin
  19. 2
      src/AddIns/Misc/StartPage/Project/StartPage.addin
  20. 12
      src/Main/Base/Project/Src/Gui/FormLocationHelper.cs
  21. 10
      src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs
  22. 33
      src/Main/Core/Project/Src/AddInTree/AddIn/AddInReference.cs
  23. 12
      src/Main/Core/Project/Src/AddInTree/AddInManager.cs
  24. BIN
      src/Main/StartUp/Project/Resources/BitmapResources.resources

BIN
data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.OK.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

1
data/resources/image/BitmapResources/BitmapResources.res

@ -56,6 +56,7 @@ Icons.16x16.ClosedResourceFolder = ProjectBrowserIcons\Property @@ -56,6 +56,7 @@ Icons.16x16.ClosedResourceFolder = ProjectBrowserIcons\Property
Icons.16x16.ArrowLeftRight = BitmapResources-data\Icons.16x16.ArrowLeftRight.png
Icons.16x16.ArrowDown = BitmapResources-data\Icons.16x16.ArrowDown.png
Icons.16x16.ArrowUp = BitmapResources-data\Icons.16x16.ArrowUp.png
Icons.16x16.OK = BitmapResources-data\Icons.16x16.OK.png
Icons.16x16.Debug.Start = DebuggerIcons\Icons.16x16.Debug.Start.png
Icons.16x16.Debug.StartWithoutDebugging = DebuggerIcons\Icons.16x16.Debug.StartWithoutDebugging.png

9
src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.Interpreter.addin

@ -1,9 +1,12 @@ @@ -1,9 +1,12 @@
<AddIn name = "BooBinding"
<AddIn name = "Boo Interpreter Console"
author = "Daniel Grunwald"
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = "Interactive interpreter for boo"
version = "1.0.0">
description = "Interactive interpreter for boo">
<Manifest>
<Identity name = "ICSharpCode.BooInterpreter"/>
</Manifest>
<Runtime>
<Import assembly = "Boo.InterpreterAddIn.dll"/>

6
src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InteractiveInterpreterControl.boo

@ -121,7 +121,7 @@ class InteractiveInterpreterControl(TextEditorControl): @@ -121,7 +121,7 @@ class InteractiveInterpreterControl(TextEditorControl):
private def SingleLineInputState():
code = ConsumeCurrentLine()
if code[-1:] in ":", "\\":
if code[-1:] in (":", "\\"):
_state = InputState.Block
_block.GetStringBuilder().Length = 0
_block.WriteLine(code)
@ -218,7 +218,7 @@ class InteractiveInterpreterControl(TextEditorControl): @@ -218,7 +218,7 @@ class InteractiveInterpreterControl(TextEditorControl):
CtrlSpaceComplete()
return true
if key in Keys.Home, Keys.Shift|Keys.Home, Keys.Control|Keys.Home:
if key in (Keys.Home, Keys.Shift|Keys.Home, Keys.Control|Keys.Home):
MoveCaretToOffset(GetLastLineSegment().Offset + 4)
return true
@ -226,7 +226,7 @@ class InteractiveInterpreterControl(TextEditorControl): @@ -226,7 +226,7 @@ class InteractiveInterpreterControl(TextEditorControl):
ClearLine()
return true
if key in Keys.Back, Keys.Left:
if key in (Keys.Back, Keys.Left):
if self.CaretColumn < 5:
return true
else:

5
src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/InterpreterWrapper.boo

@ -17,11 +17,14 @@ class InterpreterWrapper: @@ -17,11 +17,14 @@ class InterpreterWrapper:
_interpreter = Boo.Lang.Interpreter.InteractiveInterpreter(
RememberLastValue: true,
Print: self.OnPrintLine)
_interpreter.SetValue("cls", { Cleared() })
_interpreter.SetValue("cls", RaiseClear)
event LinePrinted as callable(string)
event Cleared as MethodInvoker
private def RaiseClear():
Cleared()
private def OnPrintLine(text as string):
LinePrinted(text)

4
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<AddIn name = "BooBinding"
<AddIn name = "Boo Binding"
author = "Daniel Grunwald"
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = "Binding for the Boo language">
description = "Backing binding for Boo">
<Manifest>
<Identity name = "ICSharpCode.BooBinding"/>

4
src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<AddIn name = "IL Assembler binding"
<AddIn name = "ILAsm binding"
author = "Mike Krueger"
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = "Binding for IL ASM">
description = "Backing binding for IL Assembler">
<Manifest>
<Identity name = "ICSharpCode.ILAsmBinding"/>

2
src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
author = "Mike Krueger, Markus Palme"
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = "SharpDevelop VB.NET language binding">
description = "Backing binding for VB.NET">
<Manifest>
<Identity name = "ICSharpCode.VBNetBinding"/>

1
src/AddIns/Misc/AddInManager/Project/Configuration/AssemblyInfo.cs

@ -31,4 +31,3 @@ using System.Runtime.CompilerServices; @@ -31,4 +31,3 @@ using System.Runtime.CompilerServices;
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("2.0.0.1")]

20
src/AddIns/Misc/AddInManager/Project/Src/AddInControl.cs

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 26.11.2005
* Time: 15:54
*/
// <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.ComponentModel;
@ -14,9 +14,6 @@ using ICSharpCode.Core; @@ -14,9 +14,6 @@ using ICSharpCode.Core;
namespace ICSharpCode.AddInManager
{
/// <summary>
/// Description of AddInControl.
/// </summary>
public class AddInControl : Control
{
AddIn addIn;
@ -34,6 +31,7 @@ namespace ICSharpCode.AddInManager @@ -34,6 +31,7 @@ namespace ICSharpCode.AddInManager
this.Size = new Size(100, 40);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}
@ -65,8 +63,8 @@ namespace ICSharpCode.AddInManager @@ -65,8 +63,8 @@ namespace ICSharpCode.AddInManager
bounds.Offset(1, 1);
bounds.Inflate(-2, -2);
Brush gradient = new LinearGradientBrush(bounds,
selected ? SystemColors.ControlLight : SystemColors.ControlLightLight,
selected ? SystemColors.Highlight : SystemColors.ControlDark,
selected ? SystemColors.Control : SystemColors.ControlLightLight,
selected ? SystemColors.Highlight : SystemColors.ControlDark,
LinearGradientMode.ForwardDiagonal);
GraphicsPath path = new GraphicsPath();

12
src/AddIns/Misc/AddInManager/Project/Src/Commands.cs

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 26.11.2005
* Time: 14:53
*/
// <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.Core;

254
src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 26.11.2005
* Time: 14:53
*/
// <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
@ -47,7 +47,11 @@ namespace ICSharpCode.AddInManager @@ -47,7 +47,11 @@ namespace ICSharpCode.AddInManager
int index = 0;
AddInControl ctl;
foreach (AddIn addIn in AddInTree.AddIns) {
List<AddIn> addInList = new List<AddIn>(AddInTree.AddIns);
addInList.Sort(delegate(AddIn a, AddIn b) {
return a.Name.CompareTo(b.Name);
});
foreach (AddIn addIn in addInList) {
string identity = addIn.Manifest.PrimaryIdentity;
if (identity == null || identity == "SharpDevelop") // || identity == "ICSharpCode.AddInManager"
continue;
@ -61,7 +65,40 @@ namespace ICSharpCode.AddInManager @@ -61,7 +65,40 @@ namespace ICSharpCode.AddInManager
while (stack.Count > 0) {
splitContainer.Panel1.Controls.Add(stack.Pop());
}
ShowPreinstalledAddInsCheckBoxCheckedChanged(null, null);
splitContainer.Panel2Collapsed = true;
splitContainer.Panel1.Paint += delegate(object sender, PaintEventArgs e) {
if (visibleAddInCount == 0) {
Rectangle rect = splitContainer.Panel1.ClientRectangle;
rect.Offset(16, 16);
rect.Inflate(-32, -32);
e.Graphics.DrawString("You don't have any AddIns installed.\n" +
"Download an AddIn from the Internet, then click 'Install AddIn' and " +
"choose the downloaded file to install it.",
Font, SystemBrushes.ControlText, rect);
}
};
}
int visibleAddInCount = 0;
void ShowPreinstalledAddInsCheckBoxCheckedChanged(object sender, EventArgs e)
{
visibleAddInCount = 0;
foreach (AddInControl ctl in splitContainer.Panel1.Controls) {
if (showPreinstalledAddInsCheckBox.Checked) {
ctl.Visible = true;
} else {
if (ctl.Selected)
ctl.Selected = false;
if (ctl == oldFocus)
oldFocus = null;
ctl.Visible = !FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, ctl.AddIn.FileName);
}
if (ctl.Visible)
visibleAddInCount += 1;
}
UpdateActionBox();
}
void OnControlClick(object sender, EventArgs e)
@ -83,6 +120,7 @@ namespace ICSharpCode.AddInManager @@ -83,6 +120,7 @@ namespace ICSharpCode.AddInManager
if ((ModifierKeys & Keys.Shift) == Keys.Shift && sender != oldFocus) {
bool sel = false;
foreach (AddInControl ctl in splitContainer.Panel1.Controls) {
if (!ctl.Visible) continue;
if (ctl == sender || ctl == oldFocus) {
sel = !sel;
ctl.Selected = true;
@ -128,23 +166,34 @@ namespace ICSharpCode.AddInManager @@ -128,23 +166,34 @@ namespace ICSharpCode.AddInManager
bool allEnabled = true;
bool allDisabled = true;
bool allUninstallable = true;
foreach (AddIn addIn in selected) {
allEnabled &= addIn.Action == AddInAction.Enable;
allDisabled &= addIn.Action == AddInAction.Disable;
if (allUninstallable) {
if (FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addIn.FileName)) {
allUninstallable = false;
}
}
}
if (allEnabled) {
selectedAction = AddInAction.Disable;
actionGroupBox.Text = runActionButton.Text = "Disable";
actionDescription.Text = "Disables the selected AddIns.";
ShowDependencies(selected, false);
uninstallButton.Enabled = runActionButton.Enabled = !dependencyTable.Visible;
runActionButton.Enabled = ShowDependencies(selected, false);
if (dependencyTable.Visible) {
actionDescription.Text += "\nThese AddIns are used by:";
}
uninstallButton.Enabled = allUninstallable && runActionButton.Enabled;
} else if (allDisabled) {
selectedAction = AddInAction.Enable;
actionGroupBox.Text = runActionButton.Text = "Enable";
actionDescription.Text = "Enables the selected AddIns.";
ShowDependencies(selected, true);
runActionButton.Enabled = !dependencyTable.Visible;
uninstallButton.Enabled = true;
runActionButton.Enabled = ShowDependencies(selected, true);
if (dependencyTable.Visible) {
actionDescription.Text += "\nRequired dependencies:";
}
uninstallButton.Enabled = allUninstallable;
} else {
actionGroupBox.Text = "";
actionDescription.Text = "AddIns with multiple states are selected";
@ -155,9 +204,106 @@ namespace ICSharpCode.AddInManager @@ -155,9 +204,106 @@ namespace ICSharpCode.AddInManager
ignoreFocusChange = false;
}
void ShowDependencies(List<AddIn> addIns, bool enable)
bool ShowDependencies(List<AddIn> addIns, bool enable)
{
List<AddInReference> dependencies = new List<AddInReference>(); // only used with enable=true
List<KeyValuePair<AddIn, AddInReference>> dependenciesToSel = new List<KeyValuePair<AddIn, AddInReference>>();
Dictionary<string, Version> addInDict = new Dictionary<string, Version>();
Dictionary<string, Version> modifiedAddIns = new Dictionary<string, Version>();
// add available addins
foreach (AddIn addIn in AddInTree.AddIns) {
if (addIn.Action != AddInAction.Enable && addIn.Action != AddInAction.Install)
continue;
if (addIns.Contains(addIn))
continue;
foreach (KeyValuePair<string, Version> pair in addIn.Manifest.Identities) {
addInDict[pair.Key] = pair.Value;
}
}
// create list of modified addin names
foreach (AddIn addIn in addIns) {
foreach (KeyValuePair<string, Version> pair in addIn.Manifest.Identities) {
modifiedAddIns[pair.Key] = pair.Value;
}
}
// add new addins
if (enable) {
foreach (AddIn addIn in addIns) {
foreach (KeyValuePair<string, Version> pair in addIn.Manifest.Identities) {
addInDict[pair.Key] = pair.Value;
}
foreach (AddInReference dep in addIn.Manifest.Dependencies) {
if (!dependencies.Contains(dep))
dependencies.Add(dep);
}
}
}
// add dependencies to the to-be-changed addins
foreach (AddIn addIn in AddInTree.AddIns) {
if (addIn.Action != AddInAction.Enable && addIn.Action != AddInAction.Install)
continue;
if (addIns.Contains(addIn))
continue;
foreach (AddInReference dep in addIn.Manifest.Dependencies) {
if (modifiedAddIns.ContainsKey(dep.Name)) {
dependenciesToSel.Add(new KeyValuePair<AddIn, AddInReference>(addIn, dep));
}
}
}
foreach (Control ctl in dependencyTable.Controls) {
ctl.Dispose();
}
dependencyTable.Controls.Clear();
bool allDepenciesOK = true;
if (dependencies.Count > 0 || dependenciesToSel.Count > 0) {
dependencyTable.RowCount = dependencies.Count + dependenciesToSel.Count;
while (dependencyTable.RowStyles.Count < dependencyTable.RowCount) {
dependencyTable.RowStyles.Add(new RowStyle(SizeType.AutoSize));
}
int rowIndex = 0;
foreach (AddInReference dep in dependencies) {
if (!AddDependencyRow(addInDict, dep, rowIndex++, null))
allDepenciesOK = false;
}
foreach (KeyValuePair<AddIn, AddInReference> pair in dependenciesToSel) {
if (!AddDependencyRow(addInDict, pair.Value, rowIndex++, pair.Key.Name))
allDepenciesOK = false;
}
dependencyTable.Visible = true;
}
return allDepenciesOK;
}
bool AddDependencyRow(Dictionary<string, Version> addInDict, AddInReference dep, int rowIndex, string requiredByName)
{
string text = requiredByName ?? GetDisplayName(dep.Name);
Version versionFound;
Label label = new Label();
label.AutoSize = true;
label.Text = text;
PictureBox box = new PictureBox();
box.BorderStyle = BorderStyle.None;
box.Size = new Size(16, 16);
bool isOK = dep.Check(addInDict, out versionFound);
box.SizeMode = PictureBoxSizeMode.CenterImage;
box.Image = isOK ? ResourceService.GetBitmap("Icons.16x16.OK") : ResourceService.GetBitmap("Icons.16x16.DeleteIcon");
dependencyTable.Controls.Add(label, 1, rowIndex);
dependencyTable.Controls.Add(box, 0, rowIndex);
return isOK;
}
string GetDisplayName(string identity)
{
foreach (AddIn addIn in AddInTree.AddIns) {
if (addIn.Manifest.Identities.ContainsKey(identity))
return addIn.Name;
}
return identity;
}
void CloseButtonClick(object sender, EventArgs e)
@ -178,6 +324,20 @@ namespace ICSharpCode.AddInManager @@ -178,6 +324,20 @@ namespace ICSharpCode.AddInManager
UpdateActionBox();
}
void InstallButtonClick(object sender, EventArgs e)
{
using (OpenFileDialog dlg = new OpenFileDialog()) {
dlg.Filter = "SharpDevelop AddIns|*.addin;*.sdaddin|All files|*.*";
dlg.Multiselect = true;
if (dlg.ShowDialog() == DialogResult.OK) {
MessageService.ShowMessage("Not implemented.");
//foreach (string file in dlg.FileNames) {
//
//}
}
}
}
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
@ -196,11 +356,14 @@ namespace ICSharpCode.AddInManager @@ -196,11 +356,14 @@ namespace ICSharpCode.AddInManager
this.bottomPanel = new System.Windows.Forms.Panel();
this.installButton = new System.Windows.Forms.Button();
this.closeButton = new System.Windows.Forms.Button();
this.showPreinstalledAddInsCheckBox = new System.Windows.Forms.CheckBox();
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.actionGroupBox = new System.Windows.Forms.GroupBox();
this.actionFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.actionDescription = new System.Windows.Forms.Label();
this.dependencyTable = new System.Windows.Forms.TableLayoutPanel();
this.dummyLabel1 = new System.Windows.Forms.Label();
this.dummyLabel2 = new System.Windows.Forms.Label();
this.runActionButton = new System.Windows.Forms.Button();
this.uninstallButton = new System.Windows.Forms.Button();
this.bottomPanel.SuspendLayout();
@ -208,6 +371,7 @@ namespace ICSharpCode.AddInManager @@ -208,6 +371,7 @@ namespace ICSharpCode.AddInManager
this.splitContainer.SuspendLayout();
this.actionGroupBox.SuspendLayout();
this.actionFlowLayoutPanel.SuspendLayout();
this.dependencyTable.SuspendLayout();
this.SuspendLayout();
//
// topPanel
@ -217,11 +381,13 @@ namespace ICSharpCode.AddInManager @@ -217,11 +381,13 @@ namespace ICSharpCode.AddInManager
this.topPanel.Name = "topPanel";
this.topPanel.Size = new System.Drawing.Size(460, 33);
this.topPanel.TabIndex = 0;
this.topPanel.Visible = false;
//
// bottomPanel
//
this.bottomPanel.Controls.Add(this.installButton);
this.bottomPanel.Controls.Add(this.closeButton);
this.bottomPanel.Controls.Add(this.showPreinstalledAddInsCheckBox);
this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bottomPanel.Location = new System.Drawing.Point(0, 355);
this.bottomPanel.Name = "bottomPanel";
@ -234,10 +400,11 @@ namespace ICSharpCode.AddInManager @@ -234,10 +400,11 @@ namespace ICSharpCode.AddInManager
this.installButton.Location = new System.Drawing.Point(274, 6);
this.installButton.Name = "installButton";
this.installButton.Size = new System.Drawing.Size(93, 23);
this.installButton.TabIndex = 0;
this.installButton.TabIndex = 1;
this.installButton.Text = "Install AddIn";
this.installButton.UseCompatibleTextRendering = true;
this.installButton.UseVisualStyleBackColor = true;
this.installButton.Click += new System.EventHandler(this.InstallButtonClick);
//
// closeButton
//
@ -245,12 +412,23 @@ namespace ICSharpCode.AddInManager @@ -245,12 +412,23 @@ namespace ICSharpCode.AddInManager
this.closeButton.Location = new System.Drawing.Point(373, 6);
this.closeButton.Name = "closeButton";
this.closeButton.Size = new System.Drawing.Size(75, 23);
this.closeButton.TabIndex = 1;
this.closeButton.TabIndex = 2;
this.closeButton.Text = "Close";
this.closeButton.UseCompatibleTextRendering = true;
this.closeButton.UseVisualStyleBackColor = true;
this.closeButton.Click += new System.EventHandler(this.CloseButtonClick);
//
// showPreinstalledAddInsCheckBox
//
this.showPreinstalledAddInsCheckBox.Location = new System.Drawing.Point(3, 6);
this.showPreinstalledAddInsCheckBox.Name = "showPreinstalledAddInsCheckBox";
this.showPreinstalledAddInsCheckBox.Size = new System.Drawing.Size(169, 24);
this.showPreinstalledAddInsCheckBox.TabIndex = 0;
this.showPreinstalledAddInsCheckBox.Text = "Show preinstalled AddIns";
this.showPreinstalledAddInsCheckBox.UseCompatibleTextRendering = true;
this.showPreinstalledAddInsCheckBox.UseVisualStyleBackColor = true;
this.showPreinstalledAddInsCheckBox.CheckedChanged += new System.EventHandler(this.ShowPreinstalledAddInsCheckBoxCheckedChanged);
//
// splitContainer
//
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
@ -269,7 +447,7 @@ namespace ICSharpCode.AddInManager @@ -269,7 +447,7 @@ namespace ICSharpCode.AddInManager
this.splitContainer.Panel2.Controls.Add(this.actionGroupBox);
this.splitContainer.Panel2MinSize = 100;
this.splitContainer.Size = new System.Drawing.Size(460, 322);
this.splitContainer.SplitterDistance = 310;
this.splitContainer.SplitterDistance = 248;
this.splitContainer.TabIndex = 1;
//
// actionGroupBox
@ -278,7 +456,7 @@ namespace ICSharpCode.AddInManager @@ -278,7 +456,7 @@ namespace ICSharpCode.AddInManager
this.actionGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.actionGroupBox.Location = new System.Drawing.Point(0, 0);
this.actionGroupBox.Name = "actionGroupBox";
this.actionGroupBox.Size = new System.Drawing.Size(146, 322);
this.actionGroupBox.Size = new System.Drawing.Size(208, 322);
this.actionGroupBox.TabIndex = 0;
this.actionGroupBox.TabStop = false;
this.actionGroupBox.Text = "actionGroupBox";
@ -295,7 +473,7 @@ namespace ICSharpCode.AddInManager @@ -295,7 +473,7 @@ namespace ICSharpCode.AddInManager
this.actionFlowLayoutPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.actionFlowLayoutPanel.Location = new System.Drawing.Point(3, 17);
this.actionFlowLayoutPanel.Name = "actionFlowLayoutPanel";
this.actionFlowLayoutPanel.Size = new System.Drawing.Size(140, 302);
this.actionFlowLayoutPanel.Size = new System.Drawing.Size(202, 302);
this.actionFlowLayoutPanel.TabIndex = 0;
this.actionFlowLayoutPanel.WrapContents = false;
//
@ -311,21 +489,44 @@ namespace ICSharpCode.AddInManager @@ -311,21 +489,44 @@ namespace ICSharpCode.AddInManager
//
// dependencyTable
//
this.dependencyTable.AutoSize = true;
this.dependencyTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.dependencyTable.ColumnCount = 2;
this.dependencyTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.dependencyTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.dependencyTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.dependencyTable.Controls.Add(this.dummyLabel1, 1, 0);
this.dependencyTable.Controls.Add(this.dummyLabel2, 1, 1);
this.dependencyTable.Location = new System.Drawing.Point(3, 21);
this.dependencyTable.Name = "dependencyTable";
this.dependencyTable.RowCount = 2;
this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.dependencyTable.Size = new System.Drawing.Size(106, 100);
this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.dependencyTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.dependencyTable.Size = new System.Drawing.Size(55, 36);
this.dependencyTable.TabIndex = 1;
//
// dummyLabel1
//
this.dummyLabel1.AutoSize = true;
this.dummyLabel1.Location = new System.Drawing.Point(23, 0);
this.dummyLabel1.Name = "dummyLabel1";
this.dummyLabel1.Size = new System.Drawing.Size(29, 18);
this.dummyLabel1.TabIndex = 0;
this.dummyLabel1.Text = "dep1";
this.dummyLabel1.UseCompatibleTextRendering = true;
//
// dummyLabel2
//
this.dummyLabel2.AutoSize = true;
this.dummyLabel2.Location = new System.Drawing.Point(23, 18);
this.dummyLabel2.Name = "dummyLabel2";
this.dummyLabel2.Size = new System.Drawing.Size(29, 18);
this.dummyLabel2.TabIndex = 1;
this.dummyLabel2.Text = "dep2";
this.dummyLabel2.UseCompatibleTextRendering = true;
//
// runActionButton
//
this.runActionButton.Location = new System.Drawing.Point(3, 127);
this.runActionButton.Location = new System.Drawing.Point(3, 63);
this.runActionButton.Name = "runActionButton";
this.runActionButton.Size = new System.Drawing.Size(91, 23);
this.runActionButton.TabIndex = 2;
@ -336,7 +537,7 @@ namespace ICSharpCode.AddInManager @@ -336,7 +537,7 @@ namespace ICSharpCode.AddInManager
//
// uninstallButton
//
this.uninstallButton.Location = new System.Drawing.Point(3, 156);
this.uninstallButton.Location = new System.Drawing.Point(3, 92);
this.uninstallButton.Name = "uninstallButton";
this.uninstallButton.Size = new System.Drawing.Size(91, 23);
this.uninstallButton.TabIndex = 3;
@ -362,8 +563,13 @@ namespace ICSharpCode.AddInManager @@ -362,8 +563,13 @@ namespace ICSharpCode.AddInManager
this.actionGroupBox.ResumeLayout(false);
this.actionFlowLayoutPanel.ResumeLayout(false);
this.actionFlowLayoutPanel.PerformLayout();
this.dependencyTable.ResumeLayout(false);
this.dependencyTable.PerformLayout();
this.ResumeLayout(false);
}
private System.Windows.Forms.Label dummyLabel2;
private System.Windows.Forms.Label dummyLabel1;
private System.Windows.Forms.CheckBox showPreinstalledAddInsCheckBox;
private System.Windows.Forms.Button installButton;
private System.Windows.Forms.Button uninstallButton;
private System.Windows.Forms.Button runActionButton;

7
src/AddIns/Misc/AddinScout/Project/AddInScout.addin

@ -2,8 +2,11 @@ @@ -2,8 +2,11 @@
author = "Satguru P Srivastava"
copyright = "GPL"
url = "http://home.mchsi.com/~ssatguru"
description = "Display AddIn Information"
version = "0.1.0">
description = "Display AddIn Information">
<Manifest>
<Identity name = "ICSharpCode.AddInScout"/>
</Manifest>
<Runtime>
<Import assembly="AddInScout.dll"/>

9
src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin

@ -1,9 +1,12 @@ @@ -1,9 +1,12 @@
<AddIn name = "#develop Filetypes"
<AddIn name = "Filetype Registerer"
author = "Georg Brandl"
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = "Registers filetypes for #develop"
version = "1.0.0">
description = "Registers files in the Windows Explorer for #Develop">
<Manifest>
<Identity name = "ICSharpCode.FiletypeRegisterer"/>
</Manifest>
<Runtime>
<Import assembly = "ICSharpCode.FiletypeRegisterer.dll"/>

9
src/AddIns/Misc/HighlightingEditor/Project/HighlightingEditor.addin

@ -1,9 +1,12 @@ @@ -1,9 +1,12 @@
<AddIn name = "#develop highlighting editor"
<AddIn name = "Highlighting Editor"
author = "Georg Brandl"
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = "Editor for highlighting styles in #develop"
version = "1.0.0">
description = "Editor for syntax highlighting styles for the text editor">
<Manifest>
<Identity name = "ICSharpCode.HighlightingEditor"/>
</Manifest>
<Runtime>
<Import assembly="HighlightingEditor.dll"/>

3
src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin

@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
author = "Mathias Simmack"
copyright = "Copyright (c) 2005"
url = "unknown"
description = "integrates Microsoft's Help 2.0 Environment"
version = "2.0.0.3">
description = "integrates Microsoft's Help 2.0 Environment">
<Runtime>
<Import assembly="HtmlHelp2.dll"/>

2
src/AddIns/Misc/MbUnitPad/Project/MbUnitPad.addin

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
author = "Daniel Grunwald"
copyright = "GNU General Public License"
url = "http://www.icsharpcode.net"
description = "Integrated MbUnit test runner for #Develop">
description = "Runs MbUnit and NUnit tests inside #Develop">
<Manifest>
<Identity name = "ICSharpCode.MbUnitPad"/>

6
src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin

@ -1,10 +1,14 @@ @@ -1,10 +1,14 @@
<AddIn name = "Regular expressions toolkit addin"
<AddIn name = "Regular expressions toolkit"
author = "Markus Palme"
copyright = "GPL"
url = "unknown"
description = "Testing toolkit for regular expressions"
version = "1.0.0">
<Manifest>
<Identity name = "ICSharpCode.RegExpTk"/>
</Manifest>
<Runtime>
<Import assembly="RegExpTk.dll" />
</Runtime>

2
src/AddIns/Misc/StartPage/Project/StartPage.addin

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<AddIn name = "#develop Start Page"
<AddIn name = "Start Page"
author = "Georg Brandl"
copyright = "GPL"
url = "http://www.icsharpcode.net"

12
src/Main/Base/Project/Src/Gui/FormLocationHelper.cs

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 26.11.2005
* Time: 15:27
*/
// <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Drawing;

10
src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs

@ -12,10 +12,7 @@ using System.Xml; @@ -12,10 +12,7 @@ using System.Xml;
namespace ICSharpCode.Core
{
/// <summary>
/// Description of AddIn.
/// </summary>
public class AddIn
public sealed class AddIn
{
Properties properties = new Properties();
List<Runtime> runtimes = new List<Runtime>();
@ -44,6 +41,11 @@ namespace ICSharpCode.Core @@ -44,6 +41,11 @@ namespace ICSharpCode.Core
return null;
}
public override string ToString()
{
return "[AddIn: " + Name + "]";
}
/// <summary>
/// Action to execute when the application is restarted.
/// </summary>

33
src/Main/Core/Project/Src/AddInTree/AddIn/AddInReference.cs

@ -15,7 +15,7 @@ namespace ICSharpCode.Core @@ -15,7 +15,7 @@ namespace ICSharpCode.Core
/// <summary>
/// Represents a versioned reference to an AddIn. Used by <see cref="AddInManifest"/>.
/// </summary>
public class AddInReference
public class AddInReference : ICloneable
{
string name;
Version minimumVersion;
@ -37,6 +37,11 @@ namespace ICSharpCode.Core @@ -37,6 +37,11 @@ namespace ICSharpCode.Core
get {
return name;
}
set {
if (value == null) throw new ArgumentNullException("name");
if (value.Length == 0) throw new ArgumentException("name cannot be an empty string", "name");
name = value;
}
}
/// <returns>Returns true when the reference is valid.</returns>
@ -117,14 +122,24 @@ namespace ICSharpCode.Core @@ -117,14 +122,24 @@ namespace ICSharpCode.Core
public AddInReference(string name, Version minimumVersion, Version maximumVersion)
{
if (name == null) throw new ArgumentNullException("name");
if (name.Length == 0) throw new ArgumentException("name cannot be an empty string", "name");
this.Name = name;
if (minimumVersion == null) throw new ArgumentNullException("minimumVersion");
if (maximumVersion == null) throw new ArgumentNullException("maximumVersion");
this.minimumVersion = minimumVersion;
this.maximumVersion = maximumVersion;
this.name = name;
}
public override bool Equals(object obj)
{
if (!(obj is AddInReference)) return false;
AddInReference b = (AddInReference)obj;
return name == b.name && minimumVersion == b.minimumVersion && maximumVersion == b.maximumVersion;
}
public override int GetHashCode()
{
return name.GetHashCode() ^ minimumVersion.GetHashCode() ^ maximumVersion.GetHashCode();
}
public override string ToString()
@ -145,5 +160,15 @@ namespace ICSharpCode.Core @@ -145,5 +160,15 @@ namespace ICSharpCode.Core
}
}
}
public AddInReference Clone()
{
return new AddInReference(name, minimumVersion, maximumVersion);
}
object ICloneable.Clone()
{
return Clone();
}
}
}

12
src/Main/Core/Project/Src/AddInTree/AddInManager.cs

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 26.11.2005
* Time: 18:27
*/
// <file>
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
// <license see="prj:///doc/license.txt">GNU General Public License</license>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;

BIN
src/Main/StartUp/Project/Resources/BitmapResources.resources

Binary file not shown.
Loading…
Cancel
Save