Browse Source

Improved project options (more strings translatable, reference paths tab works now)

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@494 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
9169d53913
  1. 15
      src/AddIns/BackendBindings/CSharpBinding/Project/Resources/BuildOptions.xfrm
  2. 2
      src/AddIns/BackendBindings/ILAsmBinding/Project/Src/ILAsmProject.cs
  3. 14
      src/AddIns/BackendBindings/VBNetBinding/Project/Resources/BuildOptions.xfrm
  4. 6
      src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.MSIL.targets
  5. 4
      src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs
  6. 2
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  7. 71
      src/Main/Base/Project/Resources/ProjectOptions/ReferencePaths.xfrm
  8. 3
      src/Main/Base/Project/Src/Dom/Implementations/AbstractDecoration.cs
  9. 348
      src/Main/Base/Project/Src/Gui/Components/StringListEditor.cs
  10. 5
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs
  11. 40
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ReferencePaths.cs
  12. 3
      src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlUserControl.cs
  13. 11
      src/Main/Base/Project/Src/Project/MSBuildEngine.cs
  14. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources

15
src/AddIns/BackendBindings/CSharpBinding/Project/Resources/BuildOptions.xfrm

@ -214,7 +214,8 @@
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox2" /> <Name value="groupBox2" />
<Location value="{X=3,Y=523}" /> <Location value="{X=3,Y=523}" />
<Text value="Treat Warnings as Errors" /> <UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors}" />
<Size value="{Width=521, Height=100}" /> <Size value="{Width=521, Height=100}" />
<TabIndex value="3" /> <TabIndex value="3" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
@ -229,7 +230,7 @@
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="allRadioButton" /> <Name value="allRadioButton" />
<Location value="{X=8,Y=68}" /> <Location value="{X=8,Y=68}" />
<Text value="A&amp;ll" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.All}" />
<Size value="{Width=128, Height=24}" /> <Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="3" /> <TabIndex value="3" />
@ -237,7 +238,7 @@
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="specificWarningsRadioButton" /> <Name value="specificWarningsRadioButton" />
<Location value="{X=8,Y=44}" /> <Location value="{X=8,Y=44}" />
<Text value="Sp&amp;ecific Warnings:" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.Specific}" />
<Size value="{Width=128, Height=24}" /> <Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="1" /> <TabIndex value="1" />
@ -245,7 +246,7 @@
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="noneRadioButton" /> <Name value="noneRadioButton" />
<Location value="{X=8,Y=20}" /> <Location value="{X=8,Y=20}" />
<Text value="&amp;None" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.None}" />
<Size value="{Width=128, Height=24}" /> <Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="0" /> <TabIndex value="0" />
@ -255,7 +256,7 @@
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox1" /> <Name value="groupBox1" />
<Location value="{X=3,Y=437}" /> <Location value="{X=3,Y=437}" />
<Text value="Errors and Warnings" /> <Text value="${res:Dialog.ProjectOptions.Build.ErrorsAndWarnings}" />
<Size value="{Width=521, Height=80}" /> <Size value="{Width=521, Height=80}" />
<TabIndex value="2" /> <TabIndex value="2" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
@ -270,7 +271,7 @@
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label4" /> <Name value="label4" />
<Location value="{X=4,Y=44}" /> <Location value="{X=4,Y=44}" />
<Text value="&amp;Suppress Warnings:" /> <Text value="${res:Dialog.ProjectOptions.Build.SuppressWarnings}" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" /> <Size value="{Width=154, Height=23}" />
<TabIndex value="2" /> <TabIndex value="2" />
@ -286,7 +287,7 @@
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label3" /> <Name value="label3" />
<Location value="{X=4,Y=20}" /> <Location value="{X=4,Y=20}" />
<Text value="&amp;Warning Level:" /> <Text value="${res:Dialog.ProjectOptions.Build.WarningLevel}" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" /> <Size value="{Width=154, Height=23}" />
<TabIndex value="0" /> <TabIndex value="0" />

2
src/AddIns/BackendBindings/ILAsmBinding/Project/Src/ILAsmProject.cs

@ -25,7 +25,7 @@ namespace ICSharpCode.ILAsmBinding
{ {
Language = "ILAsm"; Language = "ILAsm";
Create(info); Create(info);
imports.Add(@"$(SharpDevelopBuildBinPath)\SharpDevelop.Build.MSIL.Targets"); imports.Add(@"$(SharpDevelopBinPath)\SharpDevelop.Build.MSIL.Targets");
} }
public override bool CanCompile(string fileName) public override bool CanCompile(string fileName)

14
src/AddIns/BackendBindings/VBNetBinding/Project/Resources/BuildOptions.xfrm

@ -213,7 +213,7 @@
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox2" /> <Name value="groupBox2" />
<Location value="{X=3,Y=501}" /> <Location value="{X=3,Y=501}" />
<Text value="Treat Warnings as Errors" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors}" />
<Size value="{Width=521, Height=100}" /> <Size value="{Width=521, Height=100}" />
<TabIndex value="3" /> <TabIndex value="3" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
@ -228,7 +228,7 @@
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="allRadioButton" /> <Name value="allRadioButton" />
<Location value="{X=8,Y=68}" /> <Location value="{X=8,Y=68}" />
<Text value="A&amp;ll" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.All}" />
<Size value="{Width=128, Height=24}" /> <Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="3" /> <TabIndex value="3" />
@ -236,7 +236,7 @@
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="specificWarningsRadioButton" /> <Name value="specificWarningsRadioButton" />
<Location value="{X=8,Y=44}" /> <Location value="{X=8,Y=44}" />
<Text value="Sp&amp;ecific Warnings:" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.Specific}" />
<Size value="{Width=128, Height=24}" /> <Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="1" /> <TabIndex value="1" />
@ -244,7 +244,7 @@
<System.Windows.Forms.RadioButton> <System.Windows.Forms.RadioButton>
<Name value="noneRadioButton" /> <Name value="noneRadioButton" />
<Location value="{X=8,Y=20}" /> <Location value="{X=8,Y=20}" />
<Text value="&amp;None" /> <Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.None}" />
<Size value="{Width=128, Height=24}" /> <Size value="{Width=128, Height=24}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" /> <FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="0" /> <TabIndex value="0" />
@ -254,7 +254,7 @@
<System.Windows.Forms.GroupBox> <System.Windows.Forms.GroupBox>
<Name value="groupBox1" /> <Name value="groupBox1" />
<Location value="{X=3,Y=415}" /> <Location value="{X=3,Y=415}" />
<Text value="Errors and Warnings" /> <Text value="${res:Dialog.ProjectOptions.Build.ErrorsAndWarnings}" />
<Size value="{Width=521, Height=80}" /> <Size value="{Width=521, Height=80}" />
<TabIndex value="2" /> <TabIndex value="2" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
@ -269,7 +269,7 @@
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label4" /> <Name value="label4" />
<Location value="{X=4,Y=44}" /> <Location value="{X=4,Y=44}" />
<Text value="&amp;Suppress Warnings:" /> <Text value="${res:Dialog.ProjectOptions.Build.SuppressWarnings}" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" /> <Size value="{Width=154, Height=23}" />
<TabIndex value="2" /> <TabIndex value="2" />
@ -285,7 +285,7 @@
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label3" /> <Name value="label3" />
<Location value="{X=4,Y=20}" /> <Location value="{X=4,Y=20}" />
<Text value="&amp;Warning Level:" /> <Text value="${res:Dialog.ProjectOptions.Build.WarningLevel}" />
<TextAlign value="MiddleRight" /> <TextAlign value="MiddleRight" />
<Size value="{Width=154, Height=23}" /> <Size value="{Width=154, Height=23}" />
<TabIndex value="0" /> <TabIndex value="0" />

6
src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.MSIL.targets

@ -1,8 +1,8 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="ICSharpCode.Build.Tasks.ILAsm" AssemblyFile="$(SharpDevelopBuildBinPath)\ICSharpCode.Build.Tasks.dll"/> <UsingTask TaskName="ICSharpCode.Build.Tasks.ILAsm" AssemblyFile="$(SharpDevelopBinPath)\ICSharpCode.Build.Tasks.dll"/>
<PropertyGroup> <PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(SharpDevelopBuildBinPath)\SharpDevelop.Build.MSIL.targets</MSBuildAllProjects> <MSBuildAllProjects>$(MSBuildAllProjects);$(SharpDevelopBinPath)\SharpDevelop.Build.MSIL.targets</MSBuildAllProjects>
<DefaultLanguageSourceExtension>.il</DefaultLanguageSourceExtension> <DefaultLanguageSourceExtension>.il</DefaultLanguageSourceExtension>
<Language>ILAsm</Language> <Language>ILAsm</Language>
</PropertyGroup> </PropertyGroup>
@ -37,5 +37,5 @@
/> />
</Target> </Target>
<Import Project="$(SharpDevelopBuildBinPath)\SharpDevelop.Build.Common.targets" /> <Import Project="$(SharpDevelopBinPath)\SharpDevelop.Build.Common.targets" />
</Project> </Project>

4
src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs

@ -29,7 +29,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
if (curToken == null) { // first call of NextToken() if (curToken == null) { // first call of NextToken()
curToken = Next(); curToken = Next();
specialTracker.InformToken(curToken.kind); specialTracker.InformToken(curToken.kind);
Console.WriteLine("Tok:" + Tokens.GetTokenString(curToken.kind) + " --- " + curToken.val); //Console.WriteLine("Tok:" + Tokens.GetTokenString(curToken.kind) + " --- " + curToken.val);
return curToken; return curToken;
} }
@ -48,7 +48,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
curToken.next = new Token(Tokens.EOF, curToken.col, curToken.line, "\n"); curToken.next = new Token(Tokens.EOF, curToken.col, curToken.line, "\n");
specialTracker.InformToken(curToken.next.kind); specialTracker.InformToken(curToken.next.kind);
} }
Console.WriteLine("Tok:" + Tokens.GetTokenString(curToken.kind) + " --- " + curToken.val); //Console.WriteLine("Tok:" + Tokens.GetTokenString(curToken.kind) + " --- " + curToken.val);
return curToken; return curToken;
} }

2
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -614,7 +614,6 @@
<Compile Include="Src\Gui\Pads\PropertyPad\IDEContainer.cs" /> <Compile Include="Src\Gui\Pads\PropertyPad\IDEContainer.cs" />
<Compile Include="Src\Gui\Pads\PropertyPad\PropertyContainer.cs" /> <Compile Include="Src\Gui\Pads\PropertyPad\PropertyContainer.cs" />
<EmbeddedResource Include="Resources\ProjectOptions\Publish.xfrm" /> <EmbeddedResource Include="Resources\ProjectOptions\Publish.xfrm" />
<EmbeddedResource Include="Resources\ProjectOptions\ReferencePaths.xfrm" />
<EmbeddedResource Include="Resources\ProjectOptions\Signing.xfrm" /> <EmbeddedResource Include="Resources\ProjectOptions\Signing.xfrm" />
<EmbeddedResource Include="Resources\ProjectOptions\BuildEvents.xfrm" /> <EmbeddedResource Include="Resources\ProjectOptions\BuildEvents.xfrm" />
<EmbeddedResource Include="Resources\ProjectOptions\DebugOptions.xfrm" /> <EmbeddedResource Include="Resources\ProjectOptions\DebugOptions.xfrm" />
@ -702,6 +701,7 @@
<Compile Include="Src\Services\RefactoringService\LocalVariableRefactoring.cs" /> <Compile Include="Src\Services\RefactoringService\LocalVariableRefactoring.cs" />
<Compile Include="Src\Services\RefactoringService\FindReferencesAndRenameHelper.cs" /> <Compile Include="Src\Services\RefactoringService\FindReferencesAndRenameHelper.cs" />
<Compile Include="Src\Internal\Doozers\DirectoryDoozer.cs" /> <Compile Include="Src\Internal\Doozers\DirectoryDoozer.cs" />
<Compile Include="Src\Gui\Components\StringListEditor.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj"> <ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj">

71
src/Main/Base/Project/Resources/ProjectOptions/ReferencePaths.xfrm

@ -1,71 +0,0 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" />
<DockPadding value="" />
<ClientSize value="{Width=360, Height=256}" />
<Controls>
<System.Windows.Forms.Button>
<Name value="removeButton" />
<Location value="{X=8,Y=216}" />
<Size value="{Width=88, Height=23}" />
<Text value="&amp;Remove" />
<TabIndex value="7" />
</System.Windows.Forms.Button>
<System.Windows.Forms.ListView>
<Name value="referencePathListView" />
<Anchor value="Top, Left, Right" />
<TabIndex value="6" />
<Location value="{X=8,Y=120}" />
<Size value="{Width=336, Height=88}" />
</System.Windows.Forms.ListView>
<System.Windows.Forms.Label>
<Name value="label2" />
<Text value="Reference &amp;Path:" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="5" />
<Size value="{Width=336, Height=23}" />
<Location value="{X=8,Y=96}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="updateButton" />
<Location value="{X=112,Y=64}" />
<Size value="{Width=80, Height=23}" />
<Text value="&amp;Update" />
<TabIndex value="4" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Button>
<Name value="addFolderButton" />
<Location value="{X=8,Y=64}" />
<Size value="{Width=96, Height=23}" />
<Text value="&amp;Add Folder" />
<TabIndex value="3" />
</System.Windows.Forms.Button>
<System.Windows.Forms.TextBox>
<Name value="folderTextBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="1" />
<Location value="{X=8,Y=32}" />
<Size value="{Width=296, Height=21}" />
<Text value="" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label1" />
<Text value="&amp;Folder:" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Size value="{Width=344, Height=23}" />
<Location value="{X=8,Y=8}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="folderBrowseButton" />
<Location value="{X=312,Y=32}" />
<Size value="{Width=40, Height=23}" />
<Text value="..." />
<Anchor value="Top, Right" />
<TabIndex value="2" />
</System.Windows.Forms.Button>
</Controls>
</System.Windows.Forms.UserControl>
</Components>

3
src/Main/Base/Project/Src/Dom/Implementations/AbstractDecoration.cs

@ -197,9 +197,6 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
// TODO: check inner classes for protected members too. // TODO: check inner classes for protected members too.
// TODO: look for FullyQualifiedName == FullyQualifiedName. Must be replaced by a function wich pays attention to the case.
// Look at NRefactoryResolver.IsSameName. Also pay attention if you can put this Function in IClass, and if you have to
// compare the names instead of the FullyQualifiedNames
public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree) public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree)
{ {
if (IsInternal) { if (IsInternal) {

348
src/Main/Base/Project/Src/Gui/Components/StringListEditor.cs

@ -0,0 +1,348 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 17.09.2005
* Time: 18:31
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui
{
/// <summary>
/// Control to edit a list of strings.
/// </summary>
public class StringListEditor : System.Windows.Forms.UserControl
{
public StringListEditor()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
this.ManualOrder = true;
this.BrowseForDirectory = false;
// init enabled states:
ListBoxSelectedIndexChanged(null, null);
EditTextBoxTextChanged(null, null);
updateButton.Text = StringParser.Parse(updateButton.Text);
removeButton.Text = StringParser.Parse(removeButton.Text);
moveUpButton.Image = ResourceService.GetBitmap("Icons.16x16.ArrowUp");
moveDownButton.Image = ResourceService.GetBitmap("Icons.16x16.ArrowDown");
deleteButton.Image = ResourceService.GetBitmap("Icons.16x16.DeleteIcon");
}
#region Windows Forms Designer generated code
/// <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.Size = new System.Drawing.Size(380, 272);
//
// StringListEditor
//
removeButton = new System.Windows.Forms.Button();
//
// removeButton
//
removeButton.Location = new System.Drawing.Point(165, 53);
removeButton.Name = "removeButton";
removeButton.Size = new System.Drawing.Size(75, 23);
removeButton.TabIndex = 5;
removeButton.Text = "${res:Global.DeleteButtonText}";
removeButton.Click += new System.EventHandler(this.RemoveButtonClick);
deleteButton = new System.Windows.Forms.Button();
//
// deleteButton
//
deleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
deleteButton.Location = new System.Drawing.Point(329, 164);
deleteButton.Name = "deleteButton";
deleteButton.Size = new System.Drawing.Size(24, 24);
deleteButton.TabIndex = 10;
deleteButton.Click += new System.EventHandler(this.RemoveButtonClick);
moveDownButton = new System.Windows.Forms.Button();
//
// moveDownButton
//
moveDownButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
moveDownButton.Location = new System.Drawing.Point(329, 134);
moveDownButton.Name = "moveDownButton";
moveDownButton.Size = new System.Drawing.Size(24, 24);
moveDownButton.TabIndex = 9;
moveDownButton.Click += new System.EventHandler(this.MoveDownButtonClick);
moveUpButton = new System.Windows.Forms.Button();
//
// moveUpButton
//
moveUpButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
moveUpButton.Location = new System.Drawing.Point(329, 104);
moveUpButton.Name = "moveUpButton";
moveUpButton.Size = new System.Drawing.Size(24, 24);
moveUpButton.TabIndex = 8;
moveUpButton.Click += new System.EventHandler(this.MoveUpButtonClick);
listBox = new System.Windows.Forms.ListBox();
//
// listBox
//
listBox.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)));
listBox.FormattingEnabled = true;
listBox.Location = new System.Drawing.Point(3, 104);
listBox.Name = "listBox";
listBox.Size = new System.Drawing.Size(320, 160);
listBox.TabIndex = 7;
listBox.SelectedIndexChanged += new System.EventHandler(this.ListBoxSelectedIndexChanged);
listLabel = new System.Windows.Forms.Label();
//
// listLabel
//
listLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
listLabel.Location = new System.Drawing.Point(3, 89);
listLabel.Name = "listLabel";
listLabel.Size = new System.Drawing.Size(350, 23);
listLabel.TabIndex = 6;
listLabel.Text = "List:";
updateButton = new System.Windows.Forms.Button();
//
// updateButton
//
updateButton.Location = new System.Drawing.Point(84, 53);
updateButton.Name = "updateButton";
updateButton.Size = new System.Drawing.Size(75, 23);
updateButton.TabIndex = 4;
updateButton.Text = "${res:Global.UpdateButtonText}";
updateButton.Click += new System.EventHandler(this.UpdateButtonClick);
addButton = new System.Windows.Forms.Button();
//
// addButton
//
addButton.Location = new System.Drawing.Point(3, 53);
addButton.Name = "addButton";
addButton.Size = new System.Drawing.Size(75, 23);
addButton.TabIndex = 3;
addButton.Text = "Add Item";
addButton.Click += new System.EventHandler(this.AddButtonClick);
editTextBox = new System.Windows.Forms.TextBox();
//
// editTextBox
//
editTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
editTextBox.Location = new System.Drawing.Point(3, 26);
editTextBox.Name = "editTextBox";
editTextBox.Size = new System.Drawing.Size(316, 21);
editTextBox.TabIndex = 1;
editTextBox.TextChanged += new System.EventHandler(this.EditTextBoxTextChanged);
browseButton = new System.Windows.Forms.Button();
//
// browseButton
//
browseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
browseButton.Location = new System.Drawing.Point(325, 24);
browseButton.Name = "browseButton";
browseButton.Size = new System.Drawing.Size(28, 23);
browseButton.TabIndex = 2;
browseButton.Text = "...";
browseButton.Click += new System.EventHandler(this.BrowseButtonClick);
TitleLabel = new System.Windows.Forms.Label();
//
// TitleLabel
//
TitleLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
TitleLabel.Location = new System.Drawing.Point(3, 10);
TitleLabel.Name = "TitleLabel";
TitleLabel.Size = new System.Drawing.Size(350, 23);
TitleLabel.TabIndex = 0;
TitleLabel.Text = "Title:";
this.Controls.Add(removeButton);
this.Controls.Add(deleteButton);
this.Controls.Add(moveDownButton);
this.Controls.Add(moveUpButton);
this.Controls.Add(listBox);
this.Controls.Add(listLabel);
this.Controls.Add(updateButton);
this.Controls.Add(addButton);
this.Controls.Add(editTextBox);
this.Controls.Add(browseButton);
this.Controls.Add(TitleLabel);
this.Name = "StringListEditor";
}
private System.Windows.Forms.Button removeButton;
private System.Windows.Forms.Button deleteButton;
private System.Windows.Forms.Button moveDownButton;
private System.Windows.Forms.Button moveUpButton;
private System.Windows.Forms.ListBox listBox;
private System.Windows.Forms.Label listLabel;
private System.Windows.Forms.Button updateButton;
private System.Windows.Forms.Button addButton;
private System.Windows.Forms.TextBox editTextBox;
private System.Windows.Forms.Button browseButton;
private System.Windows.Forms.Label TitleLabel;
#endregion
public event EventHandler ListChanged;
protected virtual void OnListChanged(EventArgs e)
{
if (ListChanged != null) {
ListChanged(this, e);
}
}
public bool ManualOrder {
get {
return !listBox.Sorted;
}
set {
moveUpButton.Visible = moveDownButton.Visible = deleteButton.Visible = value;
removeButton.Visible = !value;
listBox.Sorted = !value;
}
}
bool browseForDirectory;
public bool BrowseForDirectory {
get {
return browseForDirectory;
}
set {
browseForDirectory = value;
browseButton.Visible = browseForDirectory; // || browseForFile;
}
}
public string TitleText {
get {
return TitleLabel.Text;
}
set {
TitleLabel.Text = value;
}
}
public string AddButtonText {
get {
return addButton.Text;
}
set {
addButton.Text = value;
}
}
public string ListCaption {
get {
return listLabel.Text;
}
set {
listLabel.Text = value;
}
}
public void LoadList(IEnumerable<string> list)
{
listBox.Items.Clear();
foreach (string str in list) {
listBox.Items.Add(str);
}
}
public string[] GetList()
{
string[] list = new string[listBox.Items.Count];
for (int i = 0; i < list.Length; i++) {
list[i] = listBox.Items[i].ToString();
}
return list;
}
void BrowseButtonClick(object sender, EventArgs e)
{
FolderDialog fdiag = new FolderDialog();
if (fdiag.DisplayDialog("Select folder") == DialogResult.OK) {
string path = fdiag.Path;
if (!path.EndsWith("\\") && !path.EndsWith("/"))
path += "\\";
editTextBox.Text = path;
}
}
void AddButtonClick(object sender, EventArgs e)
{
editTextBox.Text = editTextBox.Text.Trim();
if (editTextBox.TextLength > 0) {
int index = listBox.Items.IndexOf(editTextBox.Text);
if (index < 0) {
index = listBox.Items.Add(editTextBox.Text);
OnListChanged(EventArgs.Empty);
}
listBox.SelectedIndex = index;
}
}
void UpdateButtonClick(object sender, EventArgs e)
{
editTextBox.Text = editTextBox.Text.Trim();
if (editTextBox.TextLength > 0) {
listBox.Items[listBox.SelectedIndex] = editTextBox.Text;
OnListChanged(EventArgs.Empty);
}
}
void RemoveButtonClick(object sender, EventArgs e)
{
listBox.Items.RemoveAt(listBox.SelectedIndex);
OnListChanged(EventArgs.Empty);
}
void MoveUpButtonClick(object sender, EventArgs e)
{
int index = listBox.SelectedIndex;
object tmp = listBox.Items[index];
listBox.Items[index] = listBox.Items[index - 1];
listBox.Items[index - 1] = tmp;
listBox.SelectedIndex = index - 1;
OnListChanged(EventArgs.Empty);
}
void MoveDownButtonClick(object sender, EventArgs e)
{
int index = listBox.SelectedIndex;
object tmp = listBox.Items[index];
listBox.Items[index] = listBox.Items[index + 1];
listBox.Items[index + 1] = tmp;
listBox.SelectedIndex = index + 1;
OnListChanged(EventArgs.Empty);
}
void ListBoxSelectedIndexChanged(object sender, EventArgs e)
{
if (listBox.SelectedIndex >= 0) {
editTextBox.Text = listBox.Items[listBox.SelectedIndex].ToString();
}
moveUpButton.Enabled = listBox.SelectedIndex > 0;
moveDownButton.Enabled = listBox.SelectedIndex >= 0 && listBox.SelectedIndex < listBox.Items.Count - 1;
removeButton.Enabled = deleteButton.Enabled = listBox.SelectedIndex >= 0;
updateButton.Enabled = listBox.SelectedIndex >= 0 && editTextBox.TextLength > 0;
}
void EditTextBoxTextChanged(object sender, System.EventArgs e)
{
addButton.Enabled = editTextBox.TextLength > 0;
updateButton.Enabled = listBox.SelectedIndex >= 0 && editTextBox.TextLength > 0;
}
}
}

5
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs

@ -113,11 +113,6 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
helper.BindEnum<DebugSymbolType>("debugInfoComboBox", "DebugType"); helper.BindEnum<DebugSymbolType>("debugInfoComboBox", "DebugType");
helper.BindBoolean("registerCOMInteropCheckBox", "RegisterForComInterop", false); helper.BindBoolean("registerCOMInteropCheckBox", "RegisterForComInterop", false);
helper.BindStringEnum("generateSerializationAssemblyComboBox", "GenerateSerializationAssemblies",
"Auto",
new StringPair("Off", "Off"),
new StringPair("On", "On"),
new StringPair("Auto", "Auto"));
helper.BindStringEnum("generateSerializationAssemblyComboBox", "GenerateSerializationAssemblies", helper.BindStringEnum("generateSerializationAssemblyComboBox", "GenerateSerializationAssemblies",
"Auto", "Auto",
new StringPair("Off", "Off"), new StringPair("Off", "Off"),

40
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ReferencePaths.cs

@ -15,20 +15,46 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{ {
public class ReferencePaths : AbstractOptionPanel public class ReferencePaths : AbstractProjectOptionPanel
{ {
MSBuildProject project;
public override void LoadPanelContents() public override void LoadPanelContents()
{ {
SetupFromXmlResource("ProjectOptions.ReferencePaths.xfrm"); InitializeHelper();
this.project = (MSBuildProject)((Properties)CustomizationObject).Get("Project");
StringListEditor editor = new StringListEditor();
editor.BrowseForDirectory = true;
editor.ListCaption = StringParser.Parse("&${res:Dialog.ProjectOptions.ReferencePaths}:");
editor.TitleText = StringParser.Parse("&${res:Dialog.ExportProjectToHtml.FolderLabel}");
editor.AddButtonText = StringParser.Parse("${res:Dialog.ProjectOptions.ReferencePaths.AddPath}");
editor.ListChanged += delegate { IsDirty = true; };
helper.AddBinding("ReferencePath", new SemicolonSeparatedStringListBinding(editor));
this.Controls.Add(editor);
}
public class SemicolonSeparatedStringListBinding : ConfigurationGuiBinding
{
StringListEditor editor;
public SemicolonSeparatedStringListBinding(StringListEditor editor)
{
this.editor = editor;
}
public override void Load()
{
string[] values = Get("").Split(';');
if (values.Length == 1 && values[0].Length == 0) {
editor.LoadList(new string[0]);
} else {
editor.LoadList(values);
}
} }
public override bool StorePanelContents() public override bool Save()
{ {
// TODO Set(string.Join(";", editor.GetList()));
return true; return true;
} }
} }
} }
}

3
src/Main/Base/Project/Src/Gui/XmlForms/Lib/XmlUserControl.cs

@ -29,6 +29,9 @@ namespace ICSharpCode.SharpDevelop.Gui.XmlForms
/// </summary> /// </summary>
public Dictionary<string, Control> ControlDictionary { public Dictionary<string, Control> ControlDictionary {
get { get {
if (xmlLoader == null)
return null;
else
return xmlLoader.ControlDictionary; return xmlLoader.ControlDictionary;
} }
} }

11
src/Main/Base/Project/Src/Project/MSBuildEngine.cs

@ -27,10 +27,16 @@ namespace ICSharpCode.SharpDevelop.Project
{ {
/// <summary> /// <summary>
/// Gets a list of the task names that cause a "Compiling ..." log message. /// Gets a list of the task names that cause a "Compiling ..." log message.
/// The contents of the list can be changed by addins.
/// All names must be in lower case! /// All names must be in lower case!
/// </summary> /// </summary>
public static readonly List<string> CompileTaskNames = new List<string>(new string[] {"csc", "vbc", "ilasm"}); public static readonly List<string> CompileTaskNames = new List<string>(new string[] {"csc", "vbc", "ilasm"});
/// <summary>
/// Gets a list where addins can add additional properties for use in MsBuild.
/// </summary>
public static readonly List<KeyValuePair<string, string>> MsBuildProperties = new List<KeyValuePair<string, string>>();
MessageViewCategory messageView; MessageViewCategory messageView;
/// <summary> /// <summary>
@ -64,7 +70,10 @@ namespace ICSharpCode.SharpDevelop.Project
CompilerResults results = new CompilerResults(null); CompilerResults results = new CompilerResults(null);
BuildPropertyGroup properties = new BuildPropertyGroup(); BuildPropertyGroup properties = new BuildPropertyGroup();
string location = Path.GetDirectoryName(typeof(MSBuildEngine).Assembly.Location); string location = Path.GetDirectoryName(typeof(MSBuildEngine).Assembly.Location);
properties.SetProperty("SharpDevelopBuildBinPath", location); properties.SetProperty("SharpDevelopBinPath", location);
foreach (KeyValuePair<string, string> entry in MsBuildProperties) {
properties.SetProperty(entry.Key, entry.Value);
}
Engine engine = new Engine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()); Engine engine = new Engine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
SharpDevelopLogger logger = new SharpDevelopLogger(this, results); SharpDevelopLogger logger = new SharpDevelopLogger(this, results);

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

Binary file not shown.
Loading…
Cancel
Save