Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1228 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
46 changed files with 996 additions and 177 deletions
@ -0,0 +1,184 @@ |
|||||||
|
<Components version="1.0"> |
||||||
|
<System.Windows.Forms.UserControl> |
||||||
|
<Name value="booBuildOptionsPanel" /> |
||||||
|
<ClientSize value="{Width=510, Height=396}" /> |
||||||
|
<AutoScroll value="True" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.GroupBox> |
||||||
|
<Name value="generalGroupBox" /> |
||||||
|
<Location value="{X=3,Y=3}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.BuildOptions.General}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<Size value="{Width=504, Height=146}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="pipelineTextBox" /> |
||||||
|
<TabIndex value="7" /> |
||||||
|
<Size value="{Width=386, Height=21}" /> |
||||||
|
<Location value="{X=112,Y=87}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="pipelineLabel" /> |
||||||
|
<Location value="{X=6,Y=87}" /> |
||||||
|
<Text value="Pipeline:" /> |
||||||
|
<TextAlign value="MiddleRight" /> |
||||||
|
<Size value="{Width=100, Height=23}" /> |
||||||
|
<TabIndex value="6" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="conditionalSymbolsLabel" /> |
||||||
|
<Location value="{X=6,Y=16}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.BuildOptions.ConditionalSymbols}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<Visible value="False" /> |
||||||
|
<TextAlign value="BottomLeft" /> |
||||||
|
<Size value="{Width=492, Height=16}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="conditionalSymbolsTextBox" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
<Size value="{Width=492, Height=21}" /> |
||||||
|
<Visible value="False" /> |
||||||
|
<Location value="{X=6,Y=36}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.CheckBox> |
||||||
|
<Name value="noCorlibCheckBox" /> |
||||||
|
<Location value="{X=6,Y=63}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.BuildOptions.NoCorlib}" /> |
||||||
|
<TabIndex value="5" /> |
||||||
|
<Size value="{Width=480, Height=21}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.CheckBox> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.GroupBox> |
||||||
|
<System.Windows.Forms.GroupBox> |
||||||
|
<Name value="outputGroupBox" /> |
||||||
|
<Location value="{X=3,Y=152}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.Output}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<Size value="{Width=504, Height=226}" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="outputPathLabel" /> |
||||||
|
<Location value="{X=12,Y=17}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.OutputPath}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<TextAlign value="BottomLeft" /> |
||||||
|
<Size value="{Width=486, Height=16}" /> |
||||||
|
<TabIndex value="3" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="outputPathTextBox" /> |
||||||
|
<TabIndex value="4" /> |
||||||
|
<Size value="{Width=448, Height=21}" /> |
||||||
|
<Location value="{X=12,Y=37}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.Button> |
||||||
|
<Name value="outputPathBrowseButton" /> |
||||||
|
<Location value="{X=463,Y=37}" /> |
||||||
|
<UseCompatibleTextRendering value="True" /> |
||||||
|
<Text value="..." /> |
||||||
|
<Anchor value="Top, Right" /> |
||||||
|
<Size value="{Width=40, Height=21}" /> |
||||||
|
<TabIndex value="5" /> |
||||||
|
</System.Windows.Forms.Button> |
||||||
|
<System.Windows.Forms.CheckBox> |
||||||
|
<Name value="xmlDocumentationCheckBox" /> |
||||||
|
<Visible value="False" /> |
||||||
|
<Location value="{X=12,Y=61}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.XmlDocumentationFile}" /> |
||||||
|
<TabIndex value="6" /> |
||||||
|
<Size value="{Width=154, Height=21}" /> |
||||||
|
</System.Windows.Forms.CheckBox> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="xmlDocumentationTextBox" /> |
||||||
|
<TabIndex value="7" /> |
||||||
|
<Size value="{Width=333, Height=21}" /> |
||||||
|
<Visible value="False" /> |
||||||
|
<Location value="{X=170,Y=61}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="debugInfoLabel" /> |
||||||
|
<Location value="{X=12,Y=85}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.DebugInfo}" /> |
||||||
|
<TextAlign value="MiddleRight" /> |
||||||
|
<Size value="{Width=154, Height=16}" /> |
||||||
|
<TabIndex value="8" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.ComboBox> |
||||||
|
<Name value="debugInfoComboBox" /> |
||||||
|
<Size value="{Width=140, Height=21}" /> |
||||||
|
<TabIndex value="9" /> |
||||||
|
<DropDownStyle value="DropDownList" /> |
||||||
|
<Location value="{X=170,Y=85}" /> |
||||||
|
</System.Windows.Forms.ComboBox> |
||||||
|
<System.Windows.Forms.GroupBox> |
||||||
|
<Name value="advancedOutputGroupBox" /> |
||||||
|
<Location value="{X=6,Y=112}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.Advanced}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<Size value="{Width=492, Height=105}" /> |
||||||
|
<TabIndex value="9" /> |
||||||
|
<Controls> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="baseIntermediateOutputPathLabel" /> |
||||||
|
<Location value="{X=6,Y=17}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.BaseIntermediateOutputPath}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<TextAlign value="BottomLeft" /> |
||||||
|
<Size value="{Width=480, Height=16}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="baseIntermediateOutputPathTextBox" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
<Size value="{Width=429, Height=21}" /> |
||||||
|
<Location value="{X=6,Y=36}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.Button> |
||||||
|
<Name value="baseIntermediateOutputPathBrowseButton" /> |
||||||
|
<Location value="{X=446,Y=36}" /> |
||||||
|
<Text value="..." /> |
||||||
|
<Anchor value="Top, Right" /> |
||||||
|
<Size value="{Width=40, Height=21}" /> |
||||||
|
<TabIndex value="2" /> |
||||||
|
</System.Windows.Forms.Button> |
||||||
|
<System.Windows.Forms.Label> |
||||||
|
<Name value="intermediateOutputPathLabel" /> |
||||||
|
<Location value="{X=6,Y=60}" /> |
||||||
|
<Text value="${res:Dialog.ProjectOptions.Build.IntermediateOutputPath}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
<TextAlign value="BottomLeft" /> |
||||||
|
<Size value="{Width=480, Height=16}" /> |
||||||
|
<TabIndex value="0" /> |
||||||
|
</System.Windows.Forms.Label> |
||||||
|
<System.Windows.Forms.TextBox> |
||||||
|
<Name value="intermediateOutputPathTextBox" /> |
||||||
|
<TabIndex value="1" /> |
||||||
|
<Size value="{Width=429, Height=21}" /> |
||||||
|
<Location value="{X=6,Y=76}" /> |
||||||
|
<Anchor value="Top, Left, Right" /> |
||||||
|
</System.Windows.Forms.TextBox> |
||||||
|
<System.Windows.Forms.Button> |
||||||
|
<Name value="intermediateOutputPathBrowseButton" /> |
||||||
|
<Location value="{X=446,Y=75}" /> |
||||||
|
<Text value="..." /> |
||||||
|
<Anchor value="Top, Right" /> |
||||||
|
<Size value="{Width=40, Height=21}" /> |
||||||
|
<TabIndex value="2" /> |
||||||
|
</System.Windows.Forms.Button> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.GroupBox> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.GroupBox> |
||||||
|
</Controls> |
||||||
|
</System.Windows.Forms.UserControl> |
||||||
|
</Components> |
||||||
@ -0,0 +1,57 @@ |
|||||||
|
// <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.Collections.Generic; |
||||||
|
using System.Windows.Forms; |
||||||
|
|
||||||
|
using ICSharpCode.SharpDevelop.Project; |
||||||
|
using ICSharpCode.Core; |
||||||
|
using ICSharpCode.SharpDevelop; |
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||||
|
using ICSharpCode.SharpDevelop.Gui.OptionPanels; |
||||||
|
|
||||||
|
using StringPair = System.Collections.Generic.KeyValuePair<string, string>; |
||||||
|
|
||||||
|
namespace Grunwald.BooBinding |
||||||
|
{ |
||||||
|
public sealed class BuildOptions : AbstractBuildOptions |
||||||
|
{ |
||||||
|
public override void LoadPanelContents() |
||||||
|
{ |
||||||
|
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream(GetType().Namespace + ".Resources.BuildOptions.xfrm")); |
||||||
|
InitializeHelper(); |
||||||
|
|
||||||
|
InitOutputPath(); |
||||||
|
//InitXmlDoc();
|
||||||
|
InitDebugInfo(); |
||||||
|
|
||||||
|
ConfigurationGuiBinding b; |
||||||
|
|
||||||
|
//b = helper.BindString("conditionalSymbolsTextBox", "DefineConstants");
|
||||||
|
//b.DefaultLocation = PropertyStorageLocations.ConfigurationSpecific;
|
||||||
|
//b.CreateLocationButton("conditionalSymbolsTextBox");
|
||||||
|
|
||||||
|
b = helper.BindBoolean("noCorlibCheckBox", "NoStdLib", false); |
||||||
|
b.CreateLocationButton("noCorlibCheckBox"); |
||||||
|
|
||||||
|
helper.BindString("pipelineTextBox", "Pipeline").CreateLocationButton("pipelineLabel"); |
||||||
|
|
||||||
|
//InitWarnings();
|
||||||
|
|
||||||
|
//
|
||||||
|
helper.BindString("baseIntermediateOutputPathTextBox", "BaseIntermediateOutputPath").CreateLocationButton("baseIntermediateOutputPathTextBox"); |
||||||
|
ConnectBrowseFolder("baseIntermediateOutputPathBrowseButton", "baseIntermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); |
||||||
|
helper.BindString("intermediateOutputPathTextBox", "IntermediateOutputPath").CreateLocationButton("intermediateOutputPathTextBox"); |
||||||
|
ConnectBrowseFolder("intermediateOutputPathBrowseButton", "intermediateOutputPathTextBox", "${res:Dialog.Options.PrjOptions.Configuration.FolderBrowserDescription}"); |
||||||
|
//
|
||||||
|
|
||||||
|
helper.AddConfigurationSelector(this); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,56 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
|
// <license see="prj:///doc/license.txt"/>
|
||||||
|
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||||
|
// <version>$Revision$</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using ICSharpCode.TextEditor.Gui.CompletionWindow; |
||||||
|
using ICSharpCode.XmlEditor; |
||||||
|
using NUnit.Framework; |
||||||
|
using System; |
||||||
|
using System.IO; |
||||||
|
|
||||||
|
namespace XmlEditor.Tests.Schema |
||||||
|
{ |
||||||
|
[TestFixture] |
||||||
|
public class MissingSchemaElementTestFixture : SchemaTestFixtureBase |
||||||
|
{ |
||||||
|
ICompletionData[] barElementAttributes; |
||||||
|
|
||||||
|
public override void FixtureInit() |
||||||
|
{ |
||||||
|
XmlElementPath path = new XmlElementPath(); |
||||||
|
path.Elements.Add(new QualifiedName("root", "http://foo")); |
||||||
|
path.Elements.Add(new QualifiedName("bar", "http://foo")); |
||||||
|
barElementAttributes = SchemaCompletionData.GetAttributeCompletionData(path); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void BarHasOneAttribute() |
||||||
|
{ |
||||||
|
Assert.AreEqual(1, barElementAttributes.Length, "Should have 1 attribute."); |
||||||
|
} |
||||||
|
|
||||||
|
protected override string GetSchema() |
||||||
|
{ |
||||||
|
return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n" + |
||||||
|
" targetNamespace=\"http://foo\"\r\n" + |
||||||
|
" xmlns=\"http://foo\"\r\n" + |
||||||
|
" elementFormDefault=\"qualified\">\r\n" + |
||||||
|
"\t<xs:complexType name=\"root\">\r\n" + |
||||||
|
"\t\t<xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\r\n" + |
||||||
|
"\t\t\t<xs:element ref=\"foo\"/>\r\n" + |
||||||
|
"\t\t\t<xs:element ref=\"bar\"/>\r\n" + |
||||||
|
"\t\t</xs:choice>\r\n" + |
||||||
|
"\t\t<xs:attribute name=\"id\" type=\"xs:string\" use=\"required\"/>\r\n" + |
||||||
|
"\t</xs:complexType>\r\n" + |
||||||
|
"\t<xs:element name=\"root\" type=\"root\"/>\r\n" + |
||||||
|
"\t<xs:complexType name=\"bar\">\r\n" + |
||||||
|
"\t\t<xs:attribute name=\"id\" type=\"xs:string\" use=\"required\"/>\r\n" + |
||||||
|
"\t</xs:complexType>\r\n" + |
||||||
|
"\t<xs:element name=\"bar\" type=\"bar\"/>\r\n" + |
||||||
|
"</xs:schema>"; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue