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

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--main/Main.sln40
-rw-r--r--main/configure.in2
-rw-r--r--main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj10
-rw-r--r--main/src/addins/Makefile.am2
-rw-r--r--main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj10
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/AUTHORS15
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/COPYING504
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/ChangeLog2030
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XDom.cs636
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XState.cs84
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParser.cs299
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathHistoryList.cs96
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNamespaceList.cs96
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeMatch.cs184
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeTextMarker.cs82
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPad.cs131
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPadOptions.cs94
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryWidget.cs515
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/EncodedStringWriter.cs64
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenStylesheetCommand.cs59
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedNameCollection.cs288
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs417
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorCommandBase.cs24
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorView.cs138
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorViewContent.cs614
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlNamespace.cs82
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlParser.cs704
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/README79
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/TODO64
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/AssemblyInfo.cs32
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/ChangeLog86
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs55
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs70
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs40
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs68
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs78
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs76
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs49
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs54
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs57
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs89
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs37
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs106
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs161
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs89
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs72
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeValueUnderCursorTests.cs67
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs100
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs112
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs62
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs46
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs169
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs107
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs130
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs18
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceToStringTests.cs50
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.cs159
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs67
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs179
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/gtk-gui/generated.cs81
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/gtk-gui/gui.stetic491
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs14
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs11
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj24
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs8
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs28
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs6
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs12
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs8
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs22
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs14
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs1
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs12
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs13
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs14
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs9
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs15
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs27
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj14
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs7
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs13
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorRootState.cs (renamed from main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorFreeState.cs)10
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs8
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs8
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs8
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs9
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs9
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs2
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs19
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs7
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs4
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs9
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs9
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsRootState.cs (renamed from main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsFreeState.cs)10
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs5
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs1
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs40
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs3
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs5
-rw-r--r--main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs7
-rw-r--r--main/src/addins/Xml/Completion/EmptyXmlCompletionProvider.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/EmptyXmlCompletionProvider.cs)11
-rw-r--r--main/src/addins/Xml/Completion/ILazilyLoadedProvider.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/ILazilyLoadedProvider.cs)2
-rw-r--r--main/src/addins/Xml/Completion/IXmlCompletionProvider.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/IXmlCompletionProvider.cs)3
-rw-r--r--main/src/addins/Xml/Completion/InferredXmlCompletionProvider.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/InferredXmlCompletionProvider.cs)12
-rw-r--r--main/src/addins/Xml/Completion/LocalOnlyXmlResolver.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/LocalOnlyXmlResolver.cs)2
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Completion/QualifiedName.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedName.cs)2
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Completion/XmlCompletionData.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs)16
-rw-r--r--main/src/addins/Xml/Completion/XmlCompletionDataList.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlCompletionDataList.cs)2
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Completion/XmlElementPath.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlElementPath.cs)67
-rw-r--r--main/src/addins/Xml/Completion/XmlMultipleClosingTagCompletionData.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs)12
-rw-r--r--main/src/addins/Xml/Completion/XmlNamespacePrefixMap.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlNamespacePrefixMap.cs)2
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs)14
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Completion/XmlSchemaCompletionDataCollection.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionDataCollection.cs)2
-rw-r--r--main/src/addins/Xml/Completion/XmlTagCompletionData.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs)2
-rw-r--r--main/src/addins/Xml/Dom/IAttributedXObject.cs35
-rw-r--r--main/src/addins/Xml/Dom/INamedXObject.cs34
-rw-r--r--main/src/addins/Xml/Dom/XAttribute.cs74
-rw-r--r--main/src/addins/Xml/Dom/XAttributeCollection.cs122
-rw-r--r--main/src/addins/Xml/Dom/XCData.cs44
-rw-r--r--main/src/addins/Xml/Dom/XClosingTag.cs60
-rw-r--r--main/src/addins/Xml/Dom/XComment.cs44
-rw-r--r--main/src/addins/Xml/Dom/XContainer.cs83
-rw-r--r--main/src/addins/Xml/Dom/XDocType.cs76
-rw-r--r--main/src/addins/Xml/Dom/XDocument.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenXPathQueryPadCommand.cs)57
-rw-r--r--main/src/addins/Xml/Dom/XElement.cs144
-rw-r--r--main/src/addins/Xml/Dom/XName.cs103
-rw-r--r--main/src/addins/Xml/Dom/XNode.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/RemoveXPathHighlightingCommand.cs)39
-rw-r--r--main/src/addins/Xml/Dom/XObject.cs110
-rw-r--r--main/src/addins/Xml/Dom/XProcessingInstruction.cs44
-rw-r--r--main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs)159
-rw-r--r--main/src/addins/Xml/Editor/XmlCommands.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/Commands.cs)13
-rw-r--r--main/src/addins/Xml/Editor/XmlDocumentParser.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlDocumentParser.cs)13
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Editor/XmlEditorOptions.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorOptions.cs)78
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Editor/XmlEditorOptionsPanel.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs)10
-rw-r--r--main/src/addins/Xml/Editor/XmlEditorOptionsPanelWidget.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanelWidget.cs)27
-rw-r--r--main/src/addins/Xml/Editor/XmlEditorService.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs)50
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Editor/XmlFileAssociation.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs)4
-rw-r--r--main/src/addins/Xml/Editor/XmlFileAssociationManager.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociationManager.cs)5
-rw-r--r--main/src/addins/Xml/Editor/XmlFileAssociationNode.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociationNode.cs)2
-rw-r--r--main/src/addins/Xml/Editor/XmlParsedDocument.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParsedDocument.cs)5
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Editor/XmlSchemaManager.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaManager.cs)12
-rw-r--r--main/src/addins/Xml/Editor/XmlSchemaNode.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaNode.cs)2
-rw-r--r--main/src/addins/Xml/Editor/XmlSchemasPanel.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs)4
-rw-r--r--main/src/addins/Xml/Editor/XmlSchemasPanelWidget.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs)71
-rw-r--r--main/src/addins/Xml/Editor/XmlTextEditorExtension.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs)75
-rw-r--r--main/src/addins/Xml/Formatting/MonoXmlPolicy.xml (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/MonoXmlPolicy.xml)0
-rw-r--r--main/src/addins/Xml/Formatting/XmlFormatter.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatter.cs)0
-rw-r--r--main/src/addins/Xml/Formatting/XmlFormatterWriter.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs)2
-rw-r--r--main/src/addins/Xml/Formatting/XmlFormattingPolicy.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicy.cs)0
-rw-r--r--main/src/addins/Xml/Formatting/XmlFormattingPolicyPanel.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanel.cs)0
-rw-r--r--main/src/addins/Xml/Formatting/XmlFormattingPolicyPanelWidget.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanelWidget.cs)95
-rw-r--r--main/src/addins/Xml/MSBuild/MSBuildDocumentParser.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildDocumentParser.cs)4
-rw-r--r--main/src/addins/Xml/MSBuild/MSBuildElement.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildElement.cs)2
-rw-r--r--main/src/addins/Xml/MSBuild/MSBuildResolveContext.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildResolveContext.cs)7
-rw-r--r--main/src/addins/Xml/MSBuild/MSBuildTextEditorExtension.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildTextEditorExtension.cs)13
-rw-r--r--main/src/addins/Xml/Makefile.am (renamed from main/src/addins/MonoDevelop.XmlEditor/Makefile.am)0
-rw-r--r--main/src/addins/Xml/MonoDevelop.Xml.csproj (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj)187
-rw-r--r--main/src/addins/Xml/Parser/XmlAttributeState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlAttributeState.cs)17
-rw-r--r--main/src/addins/Xml/Parser/XmlAttributeValueState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs)9
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Parser/XmlCDataState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlCDataState.cs)12
-rw-r--r--main/src/addins/Xml/Parser/XmlChar.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlChar.cs)2
-rw-r--r--main/src/addins/Xml/Parser/XmlClosingTagState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs)13
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Parser/XmlCommentState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlCommentState.cs)12
-rw-r--r--main/src/addins/Xml/Parser/XmlDocTypeState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs)13
-rw-r--r--main/src/addins/Xml/Parser/XmlNameState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlNameState.cs)12
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Parser/XmlParser.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/Parser.cs)69
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Parser/XmlParserState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/State.cs)30
-rw-r--r--main/src/addins/Xml/Parser/XmlProcessingInstructionState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs)12
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Parser/XmlRootState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlFreeState.cs)31
-rw-r--r--main/src/addins/Xml/Parser/XmlTagState.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlTagState.cs)11
-rw-r--r--main/src/addins/Xml/Properties/AddinInfo.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/AddinInfo.cs)5
-rw-r--r--main/src/addins/Xml/Properties/AssemblyInfo.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/AssemblyInfo.cs)0
-rw-r--r--main/src/addins/Xml/Properties/MonoDevelop.XmlEditor.addin.xml (renamed from main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml)81
-rw-r--r--main/src/addins/Xml/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs)4
-rw-r--r--main/src/addins/Xml/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs)4
-rw-r--r--main/src/addins/Xml/Tests/MonoDevelop.Xml.Tests.csproj (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj)56
-rw-r--r--main/src/addins/Xml/Tests/Parser/ActiveElementStartPathTestFixture.cs95
-rw-r--r--main/src/addins/Xml/Tests/Parser/ActiveElementUnderCursorTests.cs157
-rw-r--r--main/src/addins/Xml/Tests/Parser/AttributeNameTestFixture.cs98
-rw-r--r--main/src/addins/Xml/Tests/Parser/AttributeNameUnderCursorTests.cs56
-rw-r--r--main/src/addins/Xml/Tests/Parser/AttributeValueUnderCursorTests.cs68
-rw-r--r--main/src/addins/Xml/Tests/Parser/InsideAttributeValueTestFixture.cs109
-rw-r--r--main/src/addins/Xml/Tests/Parser/NamespaceDeclarationTestFixture.cs109
-rw-r--r--main/src/addins/Xml/Tests/Parser/ParentElementPathTestFixture.cs57
-rw-r--r--main/src/addins/Xml/Tests/Parser/ParsingTests.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/ParsingTests.cs)37
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Parser/QualifiedNameTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs)4
-rw-r--r--main/src/addins/Xml/Tests/Parser/TestXmlParser.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/TestParser.cs)65
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Paths/NoElementPathTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Paths/SingleElementPathTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs)14
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Paths/TwoElementPathTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs)32
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Resources/XMLSchema.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Resources/XMLSchema.xsd)0
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Resources/xhtml1-strict-modified.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Resources/xhtml1-strict-modified.xsd)0
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/AbstractElementTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs)6
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/AllElementTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs)6
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/AttributeAnnotationTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/AttributeGroupRefTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/AttributeRefTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/AttributeValueAnnotationTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ChildElementAttributesTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ChoiceTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ComplexContentExtensionTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/DuplicateElementTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ElementAnnotationTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ElementRefAnnotationTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/EnumAttributeValueTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ExtensionElementTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs)6
-rw-r--r--main/src/addins/Xml/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/GroupRefCompositorTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/GroupRefTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/Includes/AttributeGroupRefSchemaIncludeTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs)8
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/Includes/TwoElementSchemaIncludeTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs)8
-rw-r--r--main/src/addins/Xml/Tests/Schema/MissingSchemaElementTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/NamespaceCompletionTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/NestedAttributeGroupRefTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/NestedChoiceTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/NestedElementSchemaTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/NestedSequenceTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/ReferencedElementsTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/RestrictionElementTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs)6
-rw-r--r--main/src/addins/Xml/Tests/Schema/SchemaAssociationTests.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs)5
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/SchemaTestFixtureBase.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/SequencedChoiceTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/SimpleContentWithAttributeTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/SingleElementSchemaTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/TwoElementSchemaTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs)3
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/Uri/GetUriTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/XhtmlStrictSchemaTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs)7
-rw-r--r--main/src/addins/Xml/Tests/Schema/XmlSchemaNamespaceTests.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs)4
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Schema/XsdSchemaTestFixture.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs)7
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Utils/ResourceManager.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs)2
-rw-r--r--[-rwxr-xr-x]main/src/addins/Xml/Tests/Utils/SchemaIncludeTestFixtureHelper.cs (renamed from main/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs)4
-rw-r--r--main/src/addins/Xml/icons/light/prefs-xml-16.png (renamed from main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-16.png)bin422 -> 422 bytes
-rw-r--r--main/src/addins/Xml/icons/light/prefs-xml-16@2x.png (renamed from main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-16@2x.png)bin917 -> 917 bytes
-rw-r--r--main/src/addins/Xml/icons/light/prefs-xml-schemas-16.png (renamed from main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-schemas-16.png)bin422 -> 422 bytes
-rw-r--r--main/src/addins/Xml/icons/light/prefs-xml-schemas-16@2x.png (renamed from main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-schemas-16@2x.png)bin917 -> 917 bytes
-rw-r--r--main/src/addins/Xml/schemas/MonoDevelopAddIn.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/MonoDevelopAddIn.xsd)0
-rwxr-xr-xmain/src/addins/Xml/schemas/W3C-License.html (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/W3C-License.html)0
-rwxr-xr-xmain/src/addins/Xml/schemas/XMLSchema.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/XMLSchema.xsd)0
-rwxr-xr-xmain/src/addins/Xml/schemas/appconfig.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/appconfig.xsd)0
-rwxr-xr-xmain/src/addins/Xml/schemas/manifest.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/manifest.xsd)0
-rwxr-xr-xmain/src/addins/Xml/schemas/nant.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/nant.xsd)0
-rwxr-xr-xmain/src/addins/Xml/schemas/readme.txt (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/readme.txt)0
-rwxr-xr-xmain/src/addins/Xml/schemas/xslt.xsd (renamed from main/src/addins/MonoDevelop.XmlEditor/schemas/xslt.xsd)0
-rw-r--r--main/tests/UnitTests/UnitTests.csproj5
274 files changed, 2981 insertions, 11519 deletions
diff --git a/.gitignore b/.gitignore
index 44d2705e62..2f2e64bedc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,7 +78,7 @@ Thumbs.db
/main/man/Makefile
/main/build/MacOSX/Makefile
/main/build/Makefile
-main/external/Makefile
+/main/external/Makefile
/main/contrib/Makefile
/main/contrib/Mono.Cecil/Makefile
/main/contrib/ICSharpCode.NRefactory.CSharp/Makefile
@@ -122,7 +122,7 @@ main/external/Makefile
/main/src/addins/MonoDevelop.RegexToolkit/Makefile
/main/src/addins/MonoDevelop.SourceEditor2/Makefile
/main/src/addins/MonoDevelop.WebReferences/Makefile
-/main/src/addins/MonoDevelop.XmlEditor/Makefile
+/main/src/addins/Xml/Makefile
/main/src/addins/MonoDeveloperExtensions/Makefile
/main/src/addins/MonoDeveloperExtensions/NUnit/Makefile
/main/src/addins/NUnit/Makefile
diff --git a/main/Main.sln b/main/Main.sln
index 59df01890f..69a3472427 100644
--- a/main/Main.sln
+++ b/main/Main.sln
@@ -109,11 +109,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Deployment", "s
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Deployment.Linux", "src\addins\Deployment\MonoDevelop.Deployment.Linux\MonoDevelop.Deployment.Linux.csproj", "{BA9020AD-A2D1-47C8-9A7C-756162C38296}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonoDevelop.XmlEditor", "MonoDevelop.XmlEditor", "{2A39DAE0-09B8-481E-950D-DF9DE0E87208}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Xml", "Xml", "{2A39DAE0-09B8-481E-950D-DF9DE0E87208}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.XmlEditor.Tests", "src\addins\MonoDevelop.XmlEditor\Tests\MonoDevelop.XmlEditor.Tests.csproj", "{8E47B77A-A649-494C-9BF2-B845E39CADE9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Xml.Tests", "src\addins\Xml\Tests\MonoDevelop.Xml.Tests.csproj", "{8E47B77A-A649-494C-9BF2-B845E39CADE9}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.XmlEditor", "src\addins\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj", "{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Xml", "src\addins\Xml\MonoDevelop.Xml.csproj", "{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonoDevelop.NUnit", "MonoDevelop.NUnit", "{DE462010-393D-4655-A42C-2C78BB14D2FA}"
EndProject
@@ -1436,22 +1436,6 @@ Global
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.ReleaseMac|Any CPU.Build.0 = Release|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.ReleaseWin32|Any CPU.ActiveCfg = Release|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.ReleaseWin32|Any CPU.Build.0 = Release|x86
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.Release|Any CPU.Build.0 = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -1492,6 +1476,22 @@ Global
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {BEFADF93-EE92-4806-9C0B-937B25311C95}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
{BFE8691A-D323-4622-9021-7B8B27F81599}.Debug|Any CPU.ActiveCfg = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.Debug|Any CPU.Build.0 = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.DebugGnome|Any CPU.ActiveCfg = Debug|x86
@@ -2111,7 +2111,7 @@ Global
$12.scope = image/svg+xml
$0.XmlFormattingPolicy = $13
$13.inheritsSet = null
- $13.scope = image/svg+xml
+ $13.scope = image/svgxml
outputpath = build\bin\
MakePkgConfig = False
MakeLibPC = True
diff --git a/main/configure.in b/main/configure.in
index f5799cfd4a..293933bd8e 100644
--- a/main/configure.in
+++ b/main/configure.in
@@ -330,7 +330,7 @@ src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Makefile
src/addins/WindowsPlatform/WindowsPlatform/Makefile
src/addins/MonoDevelop.AssemblyBrowser/Makefile
src/addins/MonoDevelop.SourceEditor2/Makefile
-src/addins/MonoDevelop.XmlEditor/Makefile
+src/addins/Xml/Makefile
src/addins/MonoDevelop.Refactoring/Makefile
src/addins/MonoDevelop.Debugger/Makefile
src/addins/MonoDevelop.Debugger.Gdb/Makefile
diff --git a/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj b/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj
index b18ea2c62f..2b54fe4ba2 100644
--- a/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj
+++ b/main/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj
@@ -94,11 +94,6 @@
<Name>MonoDevelop.Deployment</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj">
- <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
- <Name>MonoDevelop.XmlEditor</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj">
<Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project>
<Name>MonoDevelop.SourceEditor</Name>
@@ -124,6 +119,11 @@
<Name>MonoDevelop.AspNet</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\Xml\MonoDevelop.Xml.csproj">
+ <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
+ <Name>MonoDevelop.Xml</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/main/src/addins/Makefile.am b/main/src/addins/Makefile.am
index a079855e87..0b42163c0b 100644
--- a/main/src/addins/Makefile.am
+++ b/main/src/addins/Makefile.am
@@ -12,7 +12,7 @@ SUBDIRS = \
VersionControl \
MonoDevelop.Autotools \
MonoDevelop.Gettext \
- MonoDevelop.XmlEditor \
+ Xml \
TextTemplating \
Web \
CSharpBinding \
diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj
index 91bc329e95..c34ffa5bbf 100644
--- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj
+++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj
@@ -82,11 +82,6 @@
<Name>MonoDevelop.DesignerSupport</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj">
- <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
- <Name>MonoDevelop.XmlEditor</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj">
<Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project>
<Name>MonoDevelop.SourceEditor</Name>
@@ -117,6 +112,11 @@
<Name>MonoDevelop.AspNet</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\Xml\MonoDevelop.Xml.csproj">
+ <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
+ <Name>MonoDevelop.Xml</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AspNetSoftDebuggerEngine.cs" />
diff --git a/main/src/addins/MonoDevelop.XmlEditor/AUTHORS b/main/src/addins/MonoDevelop.XmlEditor/AUTHORS
deleted file mode 100644
index 15ca80c2f1..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/AUTHORS
+++ /dev/null
@@ -1,15 +0,0 @@
-Matthew Ward
-
-Classes that use code from MonoDevelop:
-
-XmlCompletionListWindow
-XmlCompletionDataProvider
-XmlEditorViewContent
-
-authored by
-
-Lluis Sanchez Gual
-Todd Berman
-John Luke
-
-Anybody else I have missed from MonoDevelop team.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/COPYING b/main/src/addins/MonoDevelop.XmlEditor/COPYING
deleted file mode 100644
index 8add30ad59..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/COPYING
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/main/src/addins/MonoDevelop.XmlEditor/ChangeLog b/main/src/addins/MonoDevelop.XmlEditor/ChangeLog
deleted file mode 100644
index 3f2788c935..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/ChangeLog
+++ /dev/null
@@ -1,2030 +0,0 @@
-2010-07-22 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Use
- delegation methods.
-
-2010-07-21 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Track API
- changes.
-
-2010-07-18 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Track
- API changes.
-
-2010-07-15 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: fixed
- unit tests.
-
-2010-07-15 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Fixed
- 'Bug 621658 - Parameter hints disappear afterkeystroke'.
-
-2010-07-14 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml: Fix XML parser
- availability.
-
-2010-07-12 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml:
- * MonoDevelop.XmlEditor/XmlDocumentParser.cs: Track
- ProjectDomService/Parser API.
-
-2010-07-11 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs:
- * MonoDevelop.Xml.StateEngine/XmlNameState.cs:
- * MonoDevelop.Xml.StateEngine/XmlAttributeState.cs:
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs: Better
- errors.
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs:
- Newlines are valid in attributes,
-
-2010-07-02 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Track
- API changes.
-
-2010-05-21 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Clean up dialog
- placement.
-
-2010-05-21 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Fix
- failing test by making sure that OnParsedDocumentUpdated is
- called when the file is first loaded, and moving all the new
- parsed document logic handling there.
-
-2010-05-21 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanelWidget.cs:
- Fix translation error.
-
-2010-05-11 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/IXmlCompletionProvider.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/EmptyXmlCompletionProvider.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataCollection.cs:
- * MonoDevelop.XmlEditor.Completion/InferredXmlCompletionProvider.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Track API changes.
-
-2010-05-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Xml.Formatting/MonoXmlPolicy.xml: Added
- attribute to explicitly allow differential serialization for
- a policy (which is disabled by default).
-
-2010-04-30 Michael Hutchinson <mhutchinson@novell.com>
-
- * gtk-gui/gui.stetic:
- * MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs:
- * MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanelWidget.cs:
- * gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs:
- Added GUI for the 'auto insert punctuation' option.
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor/XmlEditorOptions.cs:
- * MonoDevelop.XmlEditor/XmlEditorAddInOptions.cs: Renamed
- file.
-
- * MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs: Spelling.
-
- * MonoDevelop.XmlEditor.addin.xml: Move panel from Style
- section to Behavior.
-
-2010-04-30 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs: Add
- settings to stop inserting snippets like ="" and />.
-
- * MonoDevelop.XmlEditor/XmlSchemaManager.cs:
- * MonoDevelop.XmlEditor/XmlFileExtensions.cs:
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs:
- * MonoDevelop.XmlEditor/XmlEditorAddInOptions.cs:
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs:
- Reorganized the XML editor settings.
-
-2010-04-28 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Track API changes.
-
-2010-04-21 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Free up
- wasted space between scrollbars and treeview contents.
-
-2010-04-13 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlFormatter.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatter.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Track
- API changes.
-
-2010-03-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * MonoDevelop.XmlEditor.addin.xml: Bumped MD version.
-
-2010-03-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * gtk-gui/gui.stetic:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor.addin.xml:
- * MonoDevelop.XmlEditor/XmlEditorService.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatter.cs:
- * MonoDevelop.Xml.Formatting/MonoXmlPolicy.xml:
- * MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs:
- * MonoDevelop.Xml.Formatting/XmlFormattingPolicy.cs:
- * MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanel.cs:
- * MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanelWidget.cs:
- * gtk-gui/MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.cs:
- New xml formatting policy.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * gtk-gui/gui.stetic:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor.addin.xml:
- * MonoDevelop.XmlEditor/Commands.cs:
- * MonoDevelop.XmlEditor/XmlFormatter.cs:
- * MonoDevelop.XmlEditor/XmlEditorView.cs:
- * MonoDevelop.XmlEditor/XmlEditorService.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatter.cs:
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs:
- * MonoDevelop.XmlEditor/XmlEditorCommandBase.cs:
- * MonoDevelop.XmlEditor/XmlEditorViewContent.cs:
- * MonoDevelop.XmlEditor/OpenStylesheetCommand.cs:
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.XPath/XPathQueryWidget.cs:
- * MonoDevelop.XmlEditor/XmlCompletionListWindow.cs:
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs:
- * MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/IXmlCompletionProvider.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/EmptyXmlCompletionProvider.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataCollection.cs:
- * MonoDevelop.XmlEditor.Completion/InferredXmlCompletionProvider.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionDataCollection.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Merged MD.Projects into MD.Core, and MD.Projects.Gui,
- MD.Core.Gui and MD.Components into MD.Ide.
-
-2010-03-05 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Don't local-copy project refs,
- as it duplicates assemblies and breaks running on .NET.
-
-2010-02-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Track api changes.
-
-2010-02-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: File
- extensions are now declared in the node metadata.
-
-2010-02-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.csproj: Add missing indirect
- reference.
-
-2010-01-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * gtk-gui/generated.cs:
- * gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs:
- * gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs:
- Flush.
-
-2010-01-27 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Track API changes.
-
-2010-01-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlFormatter.cs: Track api changes.
-
-2009-10-30 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * MonoDevelop.XmlEditor.addin.xml: Bump MD version.
-
-2009-10-29 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlEditorService.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- Fix warnings.
-
-2009-10-29 Lluis Sanchez Gual <lluis@novell.com>
-
- * gtk-gui/generated.cs:
- * gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs:
- * gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs:
- Flush.
-
-2009-10-27 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Fixed 'Bug
- 549703 - Customised XML file extensions are no longer
- syntax-highlighted'.
-
-2009-10-08 Ankit Jain <jankit@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Use \ instead of '/'
- in the Import.
-
-2009-10-08 Ankit Jain <jankit@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Add md.targets .
-
-2009-10-07 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * MonoDevelop.XmlEditor.addin.xml: Bump MD version.
-
-2009-10-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor.addin.xml:
- * MonoDevelop.XmlEditor/Commands.cs:
- * MonoDevelop.XmlEditor/XmlParser.cs:
- * MonoDevelop.XmlEditor/XmlNamespace.cs:
- * MonoDevelop.XmlEditor/QualifiedName.cs:
- * MonoDevelop.XmlEditor/XmlElementPath.cs:
- * MonoDevelop.XmlEditor/XmlEditorService.cs:
- * MonoDevelop.XmlEditor/XmlSchemaManager.cs:
- * MonoDevelop.XmlEditor/XmlFileExtensions.cs:
- * MonoDevelop.XmlEditor.XPath/XPathQueryPad.cs:
- * MonoDevelop.XmlEditor/EncodedStringWriter.cs:
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs:
- * MonoDevelop.XmlEditor.XPath/XPathNodeMatch.cs:
- * MonoDevelop.XmlEditor/XmlFileExtensionNode.cs:
- * MonoDevelop.XmlEditor/XmlSchemaAssociation.cs:
- * MonoDevelop.XmlEditor/DeclarationViewWindow.cs:
- * MonoDevelop.XmlEditor/XmlEditorAddInOptions.cs:
- * MonoDevelop.XmlEditor/OpenStylesheetCommand.cs:
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.XPath/XPathQueryWidget.cs:
- * MonoDevelop.XmlEditor.XPath/XPathHistoryList.cs:
- * MonoDevelop.XmlEditor/QualifiedNameCollection.cs:
- * MonoDevelop.XmlEditor/OpenXPathQueryPadCommand.cs:
- * MonoDevelop.XmlEditor.XPath/XPathNamespaceList.cs:
- * MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs:
- * MonoDevelop.XmlEditor.XPath/XPathNodeTextMarker.cs:
- * MonoDevelop.XmlEditor.XPath/XPathQueryPadOptions.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor/RemoveXPathHighlightingCommand.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataCollection.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionDataCollection.cs:
- Changed license to MIT/X11.
-
- * gtk-gui/gui.stetic: Flush.
-
-2009-10-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.Xml.Formatting/XmlChar.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs: Remove
- duplicate imported XmlChar file.
-
-2009-10-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Use
- ordinal comparer.
-
-2009-10-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am:
- * Icons/XPathQueryPad.png:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor.addin.xml: Remove icon of unknown
- provenance.
-
-2009-10-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Tweak
- API so classes can return completion lists instead of
- modifying one they're given.
-
-2009-09-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * MonoDevelop.Xml.Formatting:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.Xml.Formatting/XmlChar.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatter.cs:
- * MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs:
- * MonoDevelop.Xml.Formatting/XmlFormattingPolicy.cs: Added a
- more advanced xml formatter, which is not yet being used.
-
-2009-09-12 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Track API changes.
-
-2009-09-10 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlFormatter.cs: Track API changes.
-
-2009-09-09 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- Implemented 'Bug 537682 - It would be great if I could just
- type bar '/' to close any tag as <foo />...'.
-
-2009-08-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * gtk-gui/gui.stetic: Update gtk# dependency.
-
-2009-08-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Updated dependencies. We now
- depend on gtk# 2.12.8, Mono 2.4, and Mono.Addins 0.4.
-
-2009-08-11 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlEditorService.cs:
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Track api
- changes.
-
-2009-07-30 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlFormatter.cs: Don't crash when
- trying to format malformed xml.
-
-2009-06-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlFormatter.cs:
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Use the new
- DesktopService instead of PlatformService.
-
-2009-06-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor.addin.xml:
- * MonoDevelop.XmlEditor/XmlFormatter.cs: Implemented a simple
- XML formatter.
-
-2009-06-09 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs: Fix
- build.
-
-2009-06-09 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs:
- Newlines are technically valid in attribute values. Only
- emit a warning, not an error.
-
-2009-05-05 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs: Improve
- an error message.
-
-2009-05-01 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs: Break
- on newlines. Better error reporting.
-
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs: Better error
- reporting.
-
-2009-04-27 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/DeclarationViewWindow.cs: Updated
- declaration view from MonoDevelop.Projects.Gui
-
-2009-04-17 Mike Kestner <mkestner@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: don't require specific
- gtk-sharp version.
-
-2009-04-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * MonoDevelop.XmlEditor.addin.xml: Bump MD version.
-
-2009-03-17 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlDocumentParser.cs: Track API
- changes.
-
-2009-03-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Don't local-copy project refs.
-
-2009-03-13 Andrés G. Aragoneses <aaragoneses@novell.com>
-
- * XmlEditor.glade: Making some strings not translatable.
-
-2009-03-13 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Moved text editor to core
-
-2009-03-04 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs: Don't
- capture quotes.
-
-2009-03-04 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Track
- doctype parsing changes. Fix jumping to selections.
-
- * MonoDevelop.Xml.StateEngine/XDom.cs:
- * MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs: XDocType now
- captures root element, URI, FPI, and the internal
- declaration region. Fixes Bug 481897 - xml can't be parsed.
-
- * MonoDevelop.Xml.StateEngine/XmlParsedDocument.cs: Fold large
- DocTypes.
-
- * gtk-gui/gui.stetic: Flush.
-
-2009-02-27 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.csproj:
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/InferredXmlCompletionProvider.cs:
- Add support for very simplistic inferred XML completion when
- a schema isn't present.
-
-2009-02-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Make
- column headers translatable.
-
-2009-02-20 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs: Don't
- end attribute values on > character.
-
-2009-02-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs:
- * MonoDevelop.Xml.StateEngine/XmlAttributeState.cs:
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs:
- Improve error handling.
-
-2009-02-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlDocumentParser.cs: Fix logic error
- that caused NRE with empty documents.
-
-2009-02-11 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Use Pad
- font.
-
-2009-02-08 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Local-copy schemas.
-
-2009-02-08 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Nuke another project reference
- local copy.
-
-2009-02-08 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.csproj: Exorcise more unwanted local
- copy.
-
-2009-02-07 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- Fixed compiler warnings.
-
-2009-02-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.mds:
- * MonoDevelop.XmlEditor.mdp:
- * MonoDevelop.XmlEditor.csproj: Migrated to MSBuild file
- format.
-
-2009-02-03 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Fix
- duplicated ':' when completing incompletely parsed names
- for the path bar.
-
-2009-02-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * MonoDevelop.XmlEditor.addin.xml: Bump MD version.
-
-2009-02-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * gtk-gui/generated.cs:
- * MonoDevelop.XmlEditor.mdp:
- * gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs:
- *
- gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs:
- Flush.
-
-2009-02-02 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- Don't use an IActionCompletionData, just generate the
- completion text as needed and use | as a caret marker.
- Fixes Bug 471681 - xml tag completion not working.
-
-2009-01-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.mdp: Flush project format changes.
-
-2009-01-21 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Add closing tag
- completion to all XML docs.
-
-2009-01-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am: Don't define DEBUG, as heavy use of Debug.Assert was
- slowing down the XML text editor noticeably.
-
-2009-01-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mdp: Add missing reference.
-
-2008-12-29 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Fix cursor
- position after autocompleting end tags.
-
-2008-12-29 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml:
- * MonoDevelop.XmlEditor/XmlDocumentParser.cs: Added a parser for XML
- files. Enables folding and error underlining.
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mdp: Updated.
-
- * MonoDevelop.XmlEditor/SourceViewTextIterator.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataProvider.cs:
- * MonoDevelop.XmlEditor.Completion/ClosingBracketCompletionDataProvider.cs:
- Removed, no longer used.
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Port to subclass the
- BaseXmlEditorExtension instead of the custom XML parser. Improves
- completion and triggering, and adds outline and path bar support.
- There may be a few minor regressions in namespace resolution and the
- goto schema command, and performance needs work.
-
-2008-12-29 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Moved
- outline-building code from MoonlightEditorExtension to be the default
- implementation in BaseXmlEditorExtension, since it works with any
- XmlParsedDocument. Fix GetCompleteName so it handles prefixes, and
- expose it as protected. Add some simple entity completion support.
- Implement support for automatic closing tags via a protected flag.
-
-2008-12-12 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.mdp:
- * Tests/MonoDevelop.XmlEditor.Tests.mdp: All projects now require fx
- 3.5.
-
-2008-12-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.mdp: Don't require a specific version of
- Mono.Addins.
-
-2008-12-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Track api
- changes.
-
-2008-12-02 Michael Hutchinson <mhutchinson@novell.com>
-
- * AssemblyInfo.cs: Add AssemblyInfo.cs files that are autogenerated from
- the addin manifests.
-
-2008-11-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlFreeState.cs: Improve error reporting.
-
-2008-11-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs: Remove multiple root
- element validation from here because it's not easy to override.
-
-2008-11-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mdp: Add reference required for building.
-
-2008-11-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mdp: Add glib dep.
-
-2008-11-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Add
- AddMiscBeginTags member that adds begin tags for comments and CData.
-
-2008-11-17 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Log an error region instead of
- a line/col location when possible.
-
-2008-11-14 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Add overloads for logging with
- more accurate locations.
-
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs: Remove unused code.
-
-2008-11-14 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XDom.cs: Add a Value property to XDocType.
-
- * MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs: Copture the doctype
- string when in tree mode.
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Copture doctype
- from the ParsedDocument if it's an XmlParsedDocument. Add utility
- GetBufferText method.
-
-2008-11-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XDom.cs: Avoid possible NRE in
- ToUpper/ToLower.
-
-2008-11-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mdp: Updated.
-
- * MonoDevelop.Xml.StateEngine/XmlParsedDocument.cs: Moved
- MoonlightParsedDocument to XmlParsedDocument in the Xml addin.
-
-2008-11-12 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XDom.cs: Add ToUpper/ToLower methods on
- XName.
-
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs: Fixed bug that
- popped unmatched opening nodes when not in tree mode. Fixes exception
- in path bar when closing tags outnumber opening tags.
-
-2008-11-12 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Fix build.
-
-2008-11-12 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Show code
- templates for forced completion in free space. Fix accidental leak of
- attribute name triggering into free space.
-
-2008-11-11 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Track fix in text
- editor's completion line/col indexing. It's now 1-indexed, as it
- should be.
-
-2008-11-07 Eric Butler <eric@extremeboredom.net>
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Don't explode
- in Timeout callback if the BaseXmlEditorExtension was disposed.
-
-2008-11-07 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs:
- Add additional closing elements to the completion list for all parent
- elements, that also close all intermediate elements.
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-11-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am: Fix build dependencies.
-
-2008-11-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml: Bump MD version.
-
-2008-11-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Added new helper
- method.
-
-2008-10-24 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XDom.cs:
- * MonoDevelop.Xml.StateEngine/Parser.cs:
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs:
- * MonoDevelop.Xml.StateEngine/XmlCDataState.cs:
- * MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs:
- * MonoDevelop.Xml.StateEngine/XmlCommentState.cs:
- * MonoDevelop.Xml.StateEngine/XmlAttributeState.cs:
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs: Changed
- Xml StateEngine from offset-based positions to line/column positions.
-
-2008-10-23 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XDom.cs: Fix recursive enumerables. Fix
- bug that prevented tree being built.
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Make line, col accessible.
- Write out errors in debug string.
-
-2008-10-23 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs: Catch multiple root nodes.
-
- * MonoDevelop.Xml.StateEngine/XDom.cs: Add field to XDocument for root
- node. Add some element-enumerating methods to XElement. Rename
- RecursiveNodes to AllDescendentNodes.
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Track line/col so we can use
- the same error class as MonoDevelop.Projects.Dom.
-
-2008-10-21 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Don't try to create
- completion list when the array of source elements is null. Fixes
- exception in XML editor.
-
-2008-10-21 Ryan Bair <ryandbair@gmail.com>
-
- * MonoDevelop.XmlEditor.Completion/ClosingBracketCompletionDataProvider.cs:
- Capture full name of opening tag. Don't read back past an end bracket.
-
-2008-10-16 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Move updating of
- state engine so that subclasses don't have to do it.
-
-2008-10-16 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Implement
- attribute value completion and attribute completion.
-
-2008-10-15 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: Move more code
- here from the ASP.NET completion extension.
-
-2008-10-09 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs:
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataProvider.cs:
- * MonoDevelop.XmlEditor.Completion/ClosingBracketCompletionDataProvider.cs:
- Track APIs.
-
-2008-10-09 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataCollection.cs: Track
- CompletionData API.
-
-2008-10-08 Michael Hutchinson <mhutchinson@novell.com>
-
- * gtk-gui/gui.stetic: Add event and property for accessing errors.
-
-2008-10-07 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs:
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs: Track API.
-
-2008-10-03 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs: New base class
- containing common XML completion code from the
- AspNetEditorExtension.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
- * MonoDevelop.Xml.StateEngine/Parser2.cs: Remove unused parser.
-
-2008-09-29 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs,
- MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs:
- implemented IComparable <ICompletionData>
-
-2008-09-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml: Set an id to the xml editor
- extension.
-
-2008-09-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataProvider.cs,
- MonoDevelop.XmlEditor.Completion/ClosingBracketCompletionDataProvider.cs:
- Track api changes.
-
-2008-09-12 Lluis Sanchez Gual <lluis@novell.com>
-
- * Tests/MonoDevelop.XmlEditor.Tests.mdp, gtk-gui/generated.cs,
- gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs,
- gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs: Updated
- generated code.
-
-2008-08-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlChar.cs,
- MonoDevelop.Xml.StateEngine/XmlNameState.cs, Makefile.am,
- MonoDevelop.XmlEditor.mdp: Use Mono's System.Xml.XmlChar to check
- whether name chars are valid for XML.
-
-2008-08-20 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs: Replace C#3 automatic
- properties into C# 2 properties. Fixes build on Mono < 1.9. Thanks
- to Joshua Simmons for the patch.
-
-2008-08-01 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Break up
- attribute value states.
- * MonoDevelop.Xml.StateEngine/Parser.cs: Attach parser state to
- exceptions.
-
-2008-07-31 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Use a
- MalformedTagState for recovery.
- * MonoDevelop.Xml.StateEngine/XmlCommentState.cs,
- MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs,
- MonoDevelop.Xml.StateEngine/XmlCDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs:
- Insert nodes when state begins (instead of end) so that we can use
- them in paths.
- * MonoDevelop.Xml.StateEngine/Parser.cs: Track previous state.
- * MonoDevelop.Xml.StateEngine/XDom.cs: Add support for getting a
- "friendly" representation of the node for a user-visible path.
-
-2008-07-30 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlCommentState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlNameState.cs: Move towards making
- the MalformedTagState more replaceable, so that handling of
- unexpected '<' can be intercepted.
- * MonoDevelop.Xml.StateEngine/XmlCDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs:
- Tidying up.
-
-2008-07-30 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs,
- MonoDevelop.Xml.StateEngine/XmlNameState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs,
- MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/State.cs,
- MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs,
- MonoDevelop.Xml.StateEngine/XmlCDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlCommentState.cs: API change to allow
- more that one character of rollback.
-
-2008-07-30 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlParser.cs,
- MonoDevelop.Xml.StateEngine/Parser2.cs,
- MonoDevelop.Xml.StateEngine/XState.cs, MonoDevelop.XmlEditor.mdp:
- Yet another parser that may be easier to extend to handle comments
- and expressions in arbitrary locations. Builds the same DOM as the
- existing one. Incomplete, and disabled for now.
-
-2008-07-29 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Don't allow EndAll to close
- XDocument.
- * MonoDevelop.Xml.StateEngine/XmlFreeState.cs: Add a const for
- overriding nodes to know what StateTag values they can use.
- * MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Operate on any
- IAttributedXObject.
- * MonoDevelop.Xml.StateEngine/XDom.cs: Abstract out objects with
- attributes via IAttributedXObject interface.
-
-2008-07-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlFreeState.cs: Improve reset on <.
- Expose state tag consts for subclasses to use.
- * MonoDevelop.Xml.StateEngine/XDom.cs: Rename AttributeCollection to
- XAttributeCollection.
-
-2008-07-24 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs: Make sure that
- bad nodes are attached, ended and popped when we recover.
-
-2008-07-24 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Copy the stringbuilder when
- cloning the parser.
-
-2008-07-23 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs: Fix start locations.
- * MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XDom.cs: Make it possible to clone
- parser and switch it into tree mode. Some general cloning fixes.
-
-2008-07-23 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/State.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlCommentState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs,
- MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs,
- MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlCDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs,
- MonoDevelop.Xml.StateEngine/XmlNameState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs: New XML parser.
- Currently only used (in subclassed form) by ASP.NET code completion
- engine.
- * MonoDevelop.Xml.StateEngine/CDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlSpecialTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagNameState.cs: Removed/renamed.
- * MonoDevelop.Xml.StateEngine/XDom.cs: Minimalistic XML DOM used by new
- XML parser. Modelled after System.Xml.Linq
- * gtk-gui/objects.xml, Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-06-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Remove debug code.
- * MonoDevelop.Xml.StateEngine/XDom.cs: Implement a new lightweight XML
- DOM somewhat modelled after the LINQ-to-XML DOM, but designed to
- ignore all content. It's intended to mark the location, name and
- type of tags in a text buffer, and should be able to be extended to
- be used with HTML and ASP.NET.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-06-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs: Remove reference to work-in-
- progress code.
-
-2008-06-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/CDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlSpecialTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagNameState.cs,
- MonoDevelop.Xml.StateEngine/State.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs,
- MonoDevelop.Xml.StateEngine/XmlCommentState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Rework stack
- cloning and character rejection mechanisms in XML/ASP state engine.
-
-2008-06-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.mds: Don't build editor tests by default.
-
-2008-06-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml, MonoDevelop.XmlEditor.mds: Bump MD
- version.
-
-2008-06-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Use the OnDestroyed event
- instead of Dispose, since with the latest changes in gtk#, Dispose
- is not called anymore when a widget is destroyed.
-
-2008-06-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.mds: Some fixes in project files.
-
-2008-05-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Replaced
- ICompilerResult/DefaultCompilerResult/CompilerResults by a new
- BuildResult class, which has owner information at error level, so
- it is possible to know which project generated an error when
- building a solution. Updated Task and TaskService to use the new
- owner information.
-
-2008-05-21 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.mdp: New project model changes.
-
-2008-05-07 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlSpecialTagState.cs: Fix opening of
- CDATA tags.
-
-2008-04-30 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagNameState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Make sure more
- states have closing positions.
-
-2008-04-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/CDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlSpecialTagState.cs,
- MonoDevelop.Xml.StateEngine/State.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs,
- MonoDevelop.Xml.StateEngine/XmlCommentState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Change XML state
- engine API to allow cloning a single node (as an alternative to the
- whole stack).
- * MonoDevelop.Xml.StateEngine/XmlTagNameState.cs: Track API and fix
- name closing logic.
-
-2008-04-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlSpecialTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs: Add
- support for processing instructions.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-04-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Add convenience
- members.
- * MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-04-17 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Xml.StateEngine/Parser.cs,
- MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs,
- MonoDevelop.Xml.StateEngine/CDataState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlSpecialTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlTagNameState.cs,
- MonoDevelop.Xml.StateEngine/State.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs,
- MonoDevelop.Xml.StateEngine/XmlFreeState.cs,
- MonoDevelop.Xml.StateEngine/XmlCommentState.cs,
- MonoDevelop.Xml.StateEngine/XmlMalformedTagState.cs,
- MonoDevelop.Xml.StateEngine/XmlAttributeState.cs: Add new XML state
- engine for triggering autocompletion and indentation in XML-like
- languages.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-04-16 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Track API change.
- Remove char code translation hack.
-
-2008-04-11 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am: Depend on MonoDevelop.SourceEditor2.dll; its build number
- auto-increments, so whenever it changes, we need to rebuild this.
-
-2008-04-08 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs,
- MonoDevelop.XmlEditor.Completion/ClosingBracketCompletionDataProvider.cs:
- Split the completion data class into a separated file and
- generalised it a little.
- * MonoDevelop.XmlEditor.Completion/ILazilyLoadedProvider.cs,
- MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs: Rework
- lazy loading, with forced advance-loading via an interface.
- * MonoDevelop.XmlEditor.Completion/EmptyXmlCompletionProvider.cs:
- Implemented an empty completion provider.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-04-03 Marcos David Marín Amador <MarcosMarin@gmail.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Workaround bug in mono
- 1.2.4 where usings are ignored inside anonymous methods.
-
-2008-04-02 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Completion/ClosingBracketCompletionDataProvider.cs,
- MonoDevelop.XmlEditor/ClosingBracketCompletionDataProvider.cs:
- Moved and made the data object public.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-04-02 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.addin.xml: Bump version to 0.19 to match
- other addins. Fixes dependency resolution on Mono HEAD (but wasn't
- a problem on 1.9, not sure why).
-
-2008-04-01 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs, Makefile.am,
- MonoDevelop.XmlEditor.mdp: Updated.
- * MonoDevelop.XmlEditor/XmlSchemaManager.cs,
- MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Track namespace
- changes.
- * MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs,
- MonoDevelop.XmlEditor/XmlCompletionData.cs,
- MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs,
- MonoDevelop.XmlEditor/XmlCompletionDataCollection.cs,
- MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs: Moved to
- MonoDevelop.XmlEditor.Completion namespace.
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Track namespace changes.
- Improve validation verbosity. Reduce use of deprecated APIs.
- * MonoDevelop.XmlEditor/XmlEditorWindow.cs: No longer needed.
- * MonoDevelop.XmlEditor.Completion/IXmlCompletionProvider.cs,
- MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs:
- Factored out an interface so that XML completion doesn't explicitly
- depend on xsd schemas. Added some alternate (namespaceless) lookups
- that will be used for HTML completion in ASP.NET. Misc tidying.
- * MonoDevelop.XmlEditor.Completion/XmlCompletionDataProvider.cs,
- MonoDevelop.XmlEditor.Completion/XmlCompletionDataCollection.cs,
- MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionDataCollection.cs:
- Move and change namespace.
- * MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs: Tidied up.
-
-2008-03-28 Marcos David Marín Amador <MarcosMarin@gmail.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Workaround for bug in
- mono 1.2.4 where usings are ignored inside anonymous methods.
-
-2008-03-27 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Remove debug
- code.
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Re-enable syntax
- highlighting.
- * gtk-gui/gui.stetic, Makefile.am, MonoDevelop.XmlEditor.addin.xml,
- MonoDevelop.XmlEditor.mdp: Add SourceEditor2 dependency.
-
-2008-03-27 Atsushi Enomoto <atsushi@ximian.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs : quick build fix.
-
-2008-03-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: When using the
- Mono.TextEditor/SourceEditor2 editor, enable XML syntax
- highlighting for all user-registered XML filetypes.
- * MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs: Oops, fix
- null check that prevented access to full set of schemas.
-
-2008-03-24 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Remove redundant
- member. May fix some compilation errors.
-
-2008-03-21 Marcos David Marín Amador <MarcosMarin@gmail.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Workaround bug in mono
- 1.2.4 where usings are ignored inside anonymous methods.
-
-2008-03-21 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: When
- Document.FileName is null or empty, try using Document.Title.
- Enables XML extension on dynamically created documents.
- * MonoDevelop.XmlEditor.addin.xml: Add back a menu separator.
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Remove unused variable.
-
-2008-03-20 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Move dialog to
- XmlEditorService.
- * MonoDevelop.XmlEditor/RunXslTransformCommand.cs,
- MonoDevelop.XmlEditor/AssignStylesheetCommand.cs: Moved
- implementation into XmlEditorService and XmlTextEditorExtension.
- * MonoDevelop.XmlEditor/ClosingBracketCompletionDataProvider.cs: Fix
- previous character index.
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Implement commands,
- based on code from command classes.
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Move more command
- implementations to editor service and refactor heavily.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
- * MonoDevelop.XmlEditor.addin.xml: Enable most of the XML commands.
-
-2008-03-20 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlSchemaManager.cs: Actually use merged schema
- collection.
- * MonoDevelop.XmlEditor/XmlCompletionData.cs: Remove unnecessary
- reference to inherited interface.
- * MonoDevelop.XmlEditor/GoToSchemaDefinitionCommand.cs,
- MonoDevelop.XmlEditor/CreateSchemaCommand.cs,
- MonoDevelop.XmlEditor/FormatXmlCommand.cs,
- MonoDevelop.XmlEditor/ValidateXmlCommand.cs: Moved implementation
- into XmlEditorService and XmlTextEditorExtension.
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Implement XMl
- commands, based on code from command classes.
- * MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs: Add
- IEnumerable implementation to merged collection.
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Move much of command
- implementations to editor service and refactor heavily.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-03-19 Marcos David Marín Amador <MarcosMarin@gmail.com>
-
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: Workaround bug in mono
- 1.2.4 where usings are ignored inside anonymous methods.
-
-2008-03-19 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/ClosingBracketCompletionDataProvider.cs,
- MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Move bracket
- autocompletion into a completion provider, so that the user can
- escape bracket completion.
- * Makefile.am, MonoDevelop.XmlEditor.mdp: Updated.
-
-2008-03-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.mdp: Updated.
- * gtk-gui, gtk-gui/generated.cs,
- gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs,
- gtk-gui/gui.stetic,
- gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs,
- gtk-gui/objects.xml: Add stetic-generated files.
-
-2008-03-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs: Track API.
-
-2008-03-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * schemas/MonoDevelopAddIn.xsd, schemas/manifest.xsd,
- schemas/appconfig.xsd: Make XML valid, so the mime type is picked
- up correctly.
- * MonoDevelop.XmlEditor.addin.xml, Makefile.am,
- MonoDevelop.XmlEditor.mdp: Updated.
- * MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs,
- MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs: New UI for
- schema and filetype settings. Now allows overriding built-in
- schemas and defining additional handled filetypes.
- * MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs,
- MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanelWidget.cs: New UI
- using Stetic.
- * MonoDevelop.XmlEditor/SelectXmlSchemaDialog.cs,
- MonoDevelop.XmlEditor/XslOutputViewContent.cs,
- MonoDevelop.XmlEditor/XmlSchemasPanelWidget.cs,
- MonoDevelop.XmlEditor/XmlEditorListWindow.cs: No longer needed.
- * MonoDevelop.XmlEditor/XmlSchemasPanel.cs,
- MonoDevelop.XmlEditor/XmlEditorOptionsPanel.cs: Moved.
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Track API.
- * MonoDevelop.XmlEditor/XmlSchemaManager.cs: Support overriding of
- built-in schemas with user schemas.
- * MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs: Use
- generic collections. Separate completion functions into an
- interface and implement a "merge" collection.
- * MonoDevelop.XmlEditor/XmlSchemaAssociation.cs: Use LowerInvariant for
- extensions.
- * MonoDevelop.XmlEditor/XmlFileExtensions.cs: Use generics. Allow
- adding xml file extensions.
- * MonoDevelop.XmlEditor/XmlEditorOptionsPanelWidget.cs: Replaced by
- stetic version.
- * MonoDevelop.XmlEditor/XmlEditorAddInOptions.cs: Allow adding xml file
- extensions.
-
-2008-03-14 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am: fix install location of schemas.
-
-2008-03-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlSchemaManager.cs: Make class static. Change
- console messages to log messages.
- * MonoDevelop.XmlEditor/XmlCompletionData.cs: Port to use
- IEditableTextBuffer rather than XmlEditorView.
- * MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs: Track MD APIs.
- * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Port code completion
- functionality from XmlEditorView to a TextEditorExtension that will
- work with all editors.
- * MonoDevelop.XmlEditor/XmlDisplayBinding.cs: Unneeded.
- * MonoDevelop.XmlEditor/XmlEditorService.cs: Replace
- XmlEditorViewContent accessors with XmlTextEditorExtension
- accessors (which won't do anything until I commit a MonoDevelop.Ide
- patch). Also many cosmetic tweaks.
- * MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs: Remove some
- unnecessary instantiations.
- * MonoDevelop.XmlEditor/FormatXmlCommand.cs: Port to
- IEditableTextBuffer. Make it operate on the selection if there is
- one.
- * Makefile.am, MonoDevelop.XmlEditor.addin.xml,
- MonoDevelop.XmlEditor.mdp: Disable all of the files and extensions
- that are not yet ported. Remove the GtkSourceView and SourceEditor
- dependencies.
-
-2008-03-10 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am:
- * MonoDevelop.XmlEditor.mds:
- * MonoDevelop.XmlEditor.mdp: Fix MonoDevelop project.
-
-2008-03-07 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/XmlSchemasPanel.cs:
- * MonoDevelop.XmlEditor/XmlEditorOptionsPanel.cs:
- * MonoDevelop.XmlEditor.addin.xml: Track options panel API changes.
-
-2008-03-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor/Schemas: Move to schemas.
- * MonoDevelop.XmlEditor/schemas: Moved from Schemas.
-
- * Makefile.am: Fix build.
-
- * MonoDevelop.XmlEditor/RunXslTransformCommand.cs:
- * MonoDevelop.XmlEditor/XmlSchemasPanelWidget.cs:
- * MonoDevelop.XmlEditor/XmlEditorViewContent.cs:
- * MonoDevelop.XmlEditor/XmlEditorView.cs:
- * MonoDevelop.XmlEditor/CreateSchemaCommand.cs:
- * MonoDevelop.XmlEditor/XmlSchemasPanel.cs:
- * MonoDevelop.XmlEditor/XmlEditorService.cs:
- * MonoDevelop.XmlEditor/OpenStylesheetCommand.cs:
- * MonoDevelop.XmlEditor.addin.xml:
- Quick and dirty port to MD trunk and GtkSourceView 2, just to get
- it working before I port it to a TextEditorExtension.
-
-2008-03-06 Michael Hutchinson <mhutchinson@novell.com>
-
- * Makefile.am: Update for the trunk build system and file
- layout changes.
-
-2007-09-13 21:18 mrward
-
- * trunk/configure.in,
- trunk/src/MonoDevelop.XmlEditor.Tests/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorAddInOptions.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs: XML
- Editor now compiles and works with MonoDevelop 0.15
-
-2007-06-13 22:31 mrward
-
- * trunk/configure.in: Configure now checks the MonoDevelop version
- is 0.14
-
-2007-06-13 22:23 mrward
-
- * trunk/ChangeLog: Updated changelog ready for a snapshot release
- 0.4 that builds against MonoDevelop 0.14
-
-2007-06-10 10:50 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/CompletionData/XmlCompletionDataStringTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorWindow.cs:
- XmlCompletionData now implements the IActionCompletionData
- interface. All xml completion is now done via the InsertAction
- method.
-
-2007-06-09 17:51 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs: The
- completion list window now selects the matching namespace during
- namespace completion.
-
-2007-06-09 17:03 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs: The
- completion list window now selects the matching list item when
- the user types in a special xml character (e.g. colon).
-
-2007-06-09 15:34 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/GetSchemaFromFileNameTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor/GoToSchemaDefinitionCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/ICompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/ICompletionDataProvider.cs,
- trunk/src/MonoDevelop.XmlEditor/ICompletionWidget.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs: Removed the
- ICompletionData, ICompletionDataProvider and the
- ICompletionWidget files. The XML editor now uses these interfaces
- from MonoDevelop. The 0.14 MonoDevelop assemblies are now
- referenced in the addin xml file.
-
-2007-05-28 11:58 mrward
-
- * trunk/configure.in,
- trunk/src/MonoDevelop.XmlEditor.Tests/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/CreateSchemaCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/FormatXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/OpenXPathQueryPadCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensionCodon.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensionNode.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensions.cs: XML Editor
- can now be compiled against MonoDevelop revision 77999. Updated
- MonoDevelop.XmlEditor.addin.xml so it uses the new format and
- extension points. Fixed compilation errors due to namespace
- changes in MonoDevelop and its use of Mono.Addins.
-
-2007-04-08 19:04 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MimeTypeHandledTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs: The XML
- editor now supports the 'application/xml' mime type.
-
-2007-04-08 18:46 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs:
- XmlEditorViewContent now implements the new ITextFile's GetCharAt
- method.
-
-2007-02-23 18:21 mrward
-
- * trunk/ChangeLog: Updated changelog ready for a snapshot release
- 0.3 that builds against MonoDevelop 0.13
-
-2007-02-23 18:17 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/AssemblyInfo.cs: Updated Xml
- Editor addin assembly version to 0.3
-
-2007-02-23 18:15 mrward
-
- * trunk/configure.in: Updated configure to check for MonoDevelop
- 0.13. Xml Editor addin version set to 0.3.
-
-2007-02-23 17:43 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml:
- Renamed menu item to 'Go to Schema Definition' to be consistent
- with MonoDevelop which has 'Go to' as two separate words.
-
-2007-02-23 17:39 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml:
- Added missing addin dependencies to
- MonoDevelop.XmlEditor.addin.xml file.
-
-2007-02-19 18:35 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/Parser/QualifiedNameTestFixture.cs:
- Added unit test for QualifiedName.GetHashCode()
-
-2007-02-19 18:31 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml:
- Updated the version number of the MonoDevelop dependencies to
- 0.13.0
-
-2007-02-17 21:13 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.mds,
- trunk/src/MonoDevelop.XmlEditor/ICompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/ICompletionDataProvider.cs,
- trunk/src/MonoDevelop.XmlEditor/ICompletionWidget.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs: Copied the
- ICompletionData, ICompletionDataProvider and ICompletionWidget
- interfaces into the XML Editor project from MonoDevelop 0.12. Due
- to changes in the code completion infrastructure in the latest
- version of MonoDevelop the XML Editor would not compile. The old
- versions of the completion interfaces have been used as an
- interim fix before attempting to use the new infrastructure.
-
-2006-12-26 22:55 mrward
-
- * trunk/src, trunk/src/MonoDevelop.XmlEditor/schemas/nant.xsd,
- trunk/src/MonoDevelop.XmlEditor/schemas/readme.txt: Updated the
- NAnt 0.85 schema.
-
-2006-12-06 00:49 mrward
-
- * trunk/TODO,
- trunk/src/MonoDevelop.XmlEditor/CreateSchemaCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/FormatXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/RunXslTransformCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/ValidateXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs: Fixed
- compilation errors due to methods being renamed in MonoDevelop's
- TaskService class.
-
-2006-10-23 14:53 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs: Added
- workaround used in MonoDevelop.SourceEditor to fix a problem with
- the gtk treeview stealing focus. The workaround changes the focus
- back to the editor and scrolls to the cursor position again after
- a short timeout. Without this workaround the XML editor would
- fail to scroll to the correct line when opening a large xml file
- for the first time. For example, when selecting the Goto Schema
- Definition menu item, with the schema file not already open,
- would fail to scroll the editor so the correct line was
- displayed.
-
-2006-10-13 20:43 mrward
-
- * trunk/TODO,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/ActiveElementUnderCursorTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/AttributeNameTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/AttributeNameUnderCursorTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/AttributeValueUnderCursorTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/InsideAttributeValueTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/ParentElementPathTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ElementWithAttributeSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/GetSchemaFromFileNameTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/XmlSchemaNamespaceTests.cs,
- trunk/src/MonoDevelop.XmlEditor/Commands.cs,
- trunk/src/MonoDevelop.XmlEditor/GoToSchemaDefinitionCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlParser.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaManager.cs: Added Goto
- Schema Definition menu item. This allows the user to select an
- element, attribute or attribute value and jump to the
- corresponding schema definition.
-
-2006-10-13 18:14 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XPathQueryWidget.cs: When an
- XPath query is executed the notebook page showing the results is
- made the current page.
-
-2006-10-07 19:40 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/XPathQuery/XPathHistoryListTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/XPathQuery/XPathNamespaceListTests.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XPathHistoryList.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathNamespaceList.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryPad.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryPadOptions.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryWidget.cs: The XPath
- query window saves the xpath history and any namespaces entered
- and restores them on restarting MonoDevelop.
-
-2006-10-07 17:30 mrward
-
- * trunk, trunk/src, trunk/src/MonoDevelop.XmlEditor,
- trunk/src/MonoDevelop.XmlEditor.Tests,
- trunk/src/MonoDevelop.XmlEditor/Commands.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/RemoveXPathHighlightingCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryPad.cs: Added Remove
- XPath Highlighting menu item which will remove the xpath matches
- highlighted in the XML editor.
-
-2006-10-07 16:25 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XPathQueryWidget.cs: Pressing the
- return key inside the xpath ComboBoxEntry now executes the xpath
- query. Added basic pop-up auto-completion to the xpath
- ComboBoxEntry.
-
-2006-09-27 21:17 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/XPathQuery,
- trunk/src/MonoDevelop.XmlEditor.Tests/XPathQuery/RunXPathQueryTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/XPathQuery/XmlNamespaceTests.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/XPathQuery/XmlNamespaceToStringTests.cs,
- trunk/src/MonoDevelop.XmlEditor/Commands.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/OpenXPathQueryPadCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathNodeMatch.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathNodeTextMarker.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryPad.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryPad.png,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryPadOptions.cs,
- trunk/src/MonoDevelop.XmlEditor/XPathQueryWidget.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditor.glade,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlNamespace.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemasPanelWidget.cs: Added
- XPath Query pad. Allows the user to run XPath queries on the
- active XML document and highlights the results.
-
-2006-09-19 17:48 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/CreateSchemaCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/FormatXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs: The XML is
- checked to see if it is well formed before attempting to create a
- schema from it. Any errors are displayed in the output window and
- the task list.
-
-2006-09-19 16:54 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlParser.cs: Editing an XML file
- with a url dtd reference (e.g. a .glade file) whilst having no
- network connection would hang MonoDevelop. Fixed this by setting
- the XmlResolver to null when reading the xml into the
- XmlTextReader.
-
-2006-09-09 09:23 mrward
-
- * trunk/ChangeLog, trunk/configure.in,
- trunk/src/MonoDevelop.XmlEditor.Tests/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml:
- Updated version numbers for a snapshot release compatible with
- MonoDevelop 0.12.
-
-2006-08-22 12:53 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml:
- Stetic files (.stetic) are now opened in the XML editor.
-
-2006-08-22 10:27 mrward
-
- * trunk/configure.in,
- trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.mds,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlDisplayBinding.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensionCodon.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensions.cs: XML Editor
- now compiled with gmcs. Added DisplayName to XmlDisplayBinding.
- XmlFileExtensionCodon now has a FileExtension property instead of
- an Extension property which clashed with the AbstractCodon base
- class.
-
-2006-05-02 12:10 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AllElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs: XML
- completion now working for complex types defined inside an xs:all
- element.
-
-2006-04-17 14:12 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs: An
- XML schema is now only compiled the first time it is used in the
- XML editor. This improves the time taken to display the XML
- Schema options dialog for the first time by a factor of 4.
-
-2006-04-17 11:44 mrward
-
- * trunk/TODO,
- trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/InsideAttributeValueTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlParser.cs: XML completion
- window no longer displayed when typing in space characters inside
- the attribute value.
-
-2006-04-17 11:29 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/AttributeNameTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AllElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/XsdSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.mds,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs: XML
- element completion now working for xs:all child elements.
-
-2006-04-15 18:21 mrward
-
- * trunk/ChangeLog: Updated changelog ready for source code snapshot
- release for MonoDevelop 0.10
-
-2006-04-12 18:34 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml:
- Add-In configuration file changed to support MonoDevelop 0.10
-
-2006-03-19 13:25 mrward
-
- * trunk/TODO, trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs:
- Attribute value completion no longer triggered when pressing keys
- such as page up, page down and the cursor keys.
-
-2006-03-19 12:37 mrward
-
- * trunk/TODO, trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs:
- Comments no longer get autocompleted when typing in the greater
- than sign character.
-
-2006-03-19 12:28 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/MissingSchemaElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs: Fixed
- null reference exception that occurred when generated the
- completion data if the schema referenced an element that was not
- defined in the schema.
-
-2006-03-19 12:19 mrward
-
- * trunk/TODO,
- trunk/src/MonoDevelop.XmlEditor/AssignStylesheetCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/Commands.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/OpenStylesheetCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/RunXslTransformCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/XslOutputViewContent.cs: Added
- support for running XSL transforms. Changing the schema
- associated with a file extension now updates any xml files that
- are currently open.
-
-2006-03-09 16:34 mrward
-
- * trunk/TODO,
- trunk/src/MonoDevelop.XmlEditor/ValidateXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs: Can now indent
- multiple lines using the tab key.
-
-2006-03-09 14:54 mrward
-
- * trunk/TODO, trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/ValidateXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/schemas/MonoDevelopAddIn.xsd,
- trunk/src/MonoDevelop.XmlEditor/schemas/readme.txt: Validation of
- .xsd files is now done using the XmlSchema class which provides
- better error information. Added a schema for MonoDevelop add-in
- xml files.
-
-2006-03-08 16:55 mrward
-
- * trunk/TODO, trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs: The
- completion list now matches strings that contain punctuation
- characters, for those characters considered valid for xml element
- names, attribute values and namespaces.
-
-2006-03-08 15:38 mrward
-
- * trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs: Xml
- editor now uses the same font as the source editor.
-
-2006-03-06 18:10 mrward
-
- * trunk/TODO, trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/SourceViewTextIterator.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/postbuild.sh: Added support for
- search/replace and goto line.
-
-2006-03-03 15:29 mrward
-
- * trunk/src/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am: Xml Editor makefile
- no longer tries to build the code when running the uninstall
- target. Fixed incorrect src/Makefile that had been imported.
-
-2006-03-03 15:15 mrward
-
- * trunk/src/MonoDevelop.XmlEditor.Tests/bin: Removed test assembly
- binaries.
-
-2006-03-03 15:08 mrward
-
- * trunk, trunk/AUTHORS, trunk/COPYING, trunk/ChangeLog,
- trunk/INSTALL, trunk/Makefile.am, trunk/NEWS, trunk/README,
- trunk/TODO, trunk/autogen.sh, trunk/configure.in, trunk/src,
- trunk/src/Makefile.am, trunk/src/MonoDevelop.XmlEditor,
- trunk/src/MonoDevelop.XmlEditor.Tests,
- trunk/src/MonoDevelop.XmlEditor.Tests/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/CompletionData,
- trunk/src/MonoDevelop.XmlEditor.Tests/CompletionData/XmlCompletionDataImageTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/CompletionData/XmlCompletionDataStringTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/MonoDevelop.XmlEditor.Tests.mdp,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/ActiveElementStartPathTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/AttributeNameTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/NamespaceDeclarationTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/ParentElementPathTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Parser/QualifiedNameTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Paths,
- trunk/src/MonoDevelop.XmlEditor.Tests/Paths/NoElementPathTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Paths/SingleElementPathTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Paths/TwoElementPathTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Resources,
- trunk/src/MonoDevelop.XmlEditor.Tests/Resources/XMLSchema.xsd,
- trunk/src/MonoDevelop.XmlEditor.Tests/Resources/xhtml1-strict-modified.xsd,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema.Includes,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema.Uri,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema.Uri/GetUriTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AbstractElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AttributeAnnotationTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AttributeGroupRefTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AttributeRefTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/AttributeValueAnnotationTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ChildElementAttributesTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ChoiceTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ComplexContentExtensionTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/DuplicateElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ElementAnnotationTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ElementRefAnnotationTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ElementWithAttributeSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/EnumAttributeValueTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ExtensionElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/GroupRefCompositorTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/GroupRefTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/NamespaceCompletionTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/NestedAttributeGroupRefTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/NestedChoiceTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/NestedElementSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/NestedSequenceTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/ReferencedElementsTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/RestrictionElementTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/SchemaTestFixtureBase.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/SequencedChoiceTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/SimpleContentWithAttributeTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/SingleElementSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/TwoElementSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/XhtmlStrictSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Schema/XsdSchemaTestFixture.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Utils,
- trunk/src/MonoDevelop.XmlEditor.Tests/Utils/ResourceManager.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/Utils/SchemaIncludeTestFixtureHelper.cs,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin/Debug,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin/Debug/MonoDevelop.Projects.Gui.dll,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin/Debug/MonoDevelop.XmlEditor.Tests.dll,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin/Debug/MonoDevelop.XmlEditor.Tests.dll.mdb,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin/Debug/MonoDevelop.XmlEditor.dll,
- trunk/src/MonoDevelop.XmlEditor.Tests/bin/Debug/MonoDevelop.XmlEditor.dll.mdb,
- trunk/src/MonoDevelop.XmlEditor.mds,
- trunk/src/MonoDevelop.XmlEditor/AssemblyInfo.cs,
- trunk/src/MonoDevelop.XmlEditor/Commands.cs,
- trunk/src/MonoDevelop.XmlEditor/CreateSchemaCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/EncodedStringWriter.cs,
- trunk/src/MonoDevelop.XmlEditor/FormatXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/Makefile.am,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml,
- trunk/src/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.mdp,
- trunk/src/MonoDevelop.XmlEditor/QualifiedName.cs,
- trunk/src/MonoDevelop.XmlEditor/QualifiedNameCollection.cs,
- trunk/src/MonoDevelop.XmlEditor/SelectXmlSchemaDialog.cs,
- trunk/src/MonoDevelop.XmlEditor/ValidateXmlCommand.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionDataCollection.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionDataProvider.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlDisplayBinding.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditor.glade,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorAddInOptions.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorCommandBase.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorOptionsPanel.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorOptionsPanelWidget.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorService.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorView.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorViewContent.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlEditorWindow.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlElementPath.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensionCodon.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlFileExtensions.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlParser.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaAssociation.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionData.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemaManager.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemasPanel.cs,
- trunk/src/MonoDevelop.XmlEditor/XmlSchemasPanelWidget.cs,
- trunk/src/MonoDevelop.XmlEditor/postbuild.sh,
- trunk/src/MonoDevelop.XmlEditor/schemas,
- trunk/src/MonoDevelop.XmlEditor/schemas/W3C-License.html,
- trunk/src/MonoDevelop.XmlEditor/schemas/XMLSchema.xsd,
- trunk/src/MonoDevelop.XmlEditor/schemas/appconfig.xsd,
- trunk/src/MonoDevelop.XmlEditor/schemas/manifest.xsd,
- trunk/src/MonoDevelop.XmlEditor/schemas/nant.xsd,
- trunk/src/MonoDevelop.XmlEditor/schemas/readme.txt,
- trunk/src/MonoDevelop.XmlEditor/schemas/xslt.xsd: Initial import.
-
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XDom.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XDom.cs
deleted file mode 100644
index 11516aa478..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XDom.cs
+++ /dev/null
@@ -1,636 +0,0 @@
-//
-// XDom.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-//
-// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Diagnostics;
-using System.Collections.Generic;
-using System.Text;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory;
-
-namespace MonoDevelop.Xml.StateEngine
-{
- public abstract class XObject
- {
- DomRegion region;
-
- protected XObject (TextLocation start)
- {
- region = new DomRegion (start, TextLocation.Empty);
- }
-
- protected XObject (DomRegion region)
- {
- this.region = region;
- }
-
- public XObject Parent { get; internal protected set; }
-
- public IEnumerable<XNode> Parents {
- get {
- XNode next = Parent as XNode;
- while (next != null) {
- yield return next;
- next = next.Parent as XNode;
- }
- }
- }
-
- public DomRegion Region {
- get { return region; }
- }
-
- public void End (TextLocation endLocation)
- {
- region = new DomRegion (region.Begin, endLocation);
- }
-
- public bool IsEnded {
- get { return region.End > region.Begin; }
- }
-
- public virtual bool IsComplete {
- get { return region.End > region.Begin; }
- }
-
- public virtual void BuildTreeString (StringBuilder builder, int indentLevel)
- {
- builder.Append (' ', indentLevel * 2);
- builder.AppendFormat (ToString ());
- builder.AppendLine ();
- }
-
- public override string ToString ()
- {
- return string.Format ("[{0} Location='{1}']", GetType (), Region);
- }
-
- //creates a parallel tree -- should NOT retain references into old tree
- public XObject ShallowCopy ()
- {
- XObject copy = NewInstance ();
- copy.ShallowCopyFrom (this);
- return copy;
- }
-
- protected abstract XObject NewInstance ();
-
- protected virtual void ShallowCopyFrom (XObject copyFrom)
- {
- region = copyFrom.region; //immutable value type
- }
-
- protected XObject () {}
-
- public virtual string FriendlyPathRepresentation {
- get { return GetType ().ToString (); }
- }
- }
-
- public abstract class XNode : XObject
- {
- protected XNode (TextLocation start) : base (start) {}
- protected XNode (DomRegion region) : base (region) {}
- protected XNode () {}
-
- public XNode NextSibling { get; internal protected set; }
- }
-
- public struct XName : IEquatable<XName>
- {
- readonly string prefix;
- readonly string name;
-
- public XName (string prefix, string name)
- {
- this.prefix = prefix;
- this.name = name;
- }
-
- public XName (string name)
- {
- prefix = null;
- this.name = name;
- }
-
- public string Prefix { get { return prefix; } }
- public string Name { get { return name; } }
- public string FullName { get { return prefix == null? name : prefix + ':' + name; } }
-
- public bool IsValid { get { return !string.IsNullOrEmpty (name); } }
- public bool HasPrefix { get { return !string.IsNullOrEmpty (prefix); } }
-
- #region Equality
-
- public static bool operator == (XName x, XName y)
- {
- return x.Equals (y);
- }
-
- public static bool operator != (XName x, XName y)
- {
- return !x.Equals (y);
- }
-
- public bool Equals (XName other)
- {
- return prefix == other.prefix && name == other.name;
- }
-
- public override bool Equals (object obj)
- {
- if (!(obj is XName))
- return false;
- return Equals ((XName) obj);
- }
-
- public override int GetHashCode ()
- {
- int hash = 0;
- if (prefix != null) hash += prefix.GetHashCode ();
- if (name != null) hash += name.GetHashCode ();
- return hash;
- }
-
- #endregion
-
- public static bool Equals (XName a, XName b, bool ignoreCase)
- {
- StringComparison comp = ignoreCase? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
- return string.Equals (a.prefix, b.prefix, comp) && string.Equals (a.name, b.name, comp);
- }
- }
-
- public abstract class XContainer : XNode
- {
- protected XContainer (TextLocation start) : base (start) { }
-
- XNode firstNode;
- XNode lastChild;
- public XNode FirstChild { get { return firstNode; } }
- public XNode LastChild { get { return lastChild; } }
-
- public IEnumerable<XNode> Nodes {
- get {
- XNode next = firstNode;
- while (next != null) {
- yield return next;
- next = next.NextSibling;
- }
- }
- }
-
- public IEnumerable<XNode> AllDescendentNodes {
- get {
- foreach (XNode n in Nodes) {
- yield return n;
- XContainer c = n as XContainer;
- if (c != null)
- foreach (XNode n2 in c.AllDescendentNodes)
- yield return n2;
- }
- }
- }
-
- public virtual void AddChildNode (XNode newChild)
- {
- newChild.Parent = this;
- if (lastChild != null)
- lastChild.NextSibling = newChild;
- if (firstNode == null)
- firstNode = newChild;
- lastChild = newChild;
- }
-
- protected XContainer () {}
-
- public override void BuildTreeString (StringBuilder builder, int indentLevel)
- {
- base.BuildTreeString (builder, indentLevel);
- foreach (XNode child in Nodes)
- child.BuildTreeString (builder, indentLevel + 1);
- }
- }
-
- public class XElement : XContainer, IAttributedXObject
- {
- XNode closingTag;
- readonly XAttributeCollection attributes;
-
- public XElement (TextLocation start) : base (start)
- {
- attributes = new XAttributeCollection (this);
- }
-
- public XElement (TextLocation start, XName name) : this (start)
- {
- this.Name = name;
- }
-
- public XNode ClosingTag { get { return closingTag; } }
- public bool IsClosed { get { return closingTag != null; } }
- public bool IsSelfClosing { get { return closingTag == this; } }
-
- public void Close (XNode closingTag)
- {
- this.closingTag = closingTag;
- if (closingTag is XClosingTag)
- closingTag.Parent = this;
- }
-
- public XName Name { get; set; }
-
- public override bool IsComplete { get { return base.IsComplete && IsNamed; } }
- public bool IsNamed { get { return Name.IsValid; } }
-
- public XAttributeCollection Attributes {
- get { return attributes; }
- }
-
- protected XElement ()
- {
- attributes = new XAttributeCollection (this);
- }
-
- protected override XObject NewInstance () { return new XElement (); }
-
- protected override void ShallowCopyFrom (XObject copyFrom)
- {
- base.ShallowCopyFrom (copyFrom);
- XElement copyFromEl = (XElement) copyFrom;
- Name = copyFromEl.Name; //XName is immutable value type
- //include attributes
- foreach (var a in copyFromEl.Attributes)
- Attributes.AddAttribute ((XAttribute) a.ShallowCopy ());
- }
-
- public override string ToString ()
- {
- return string.Format ("[XElement Name='{0}' Location='{1}'", Name.FullName, Region);
- }
-
- public override void BuildTreeString (StringBuilder builder, int indentLevel)
- {
- builder.Append (' ', indentLevel * 2);
- builder.AppendFormat ("[XElement Name='{0}' Location='{1}' Children=", Name.FullName, Region);
- builder.AppendLine ();
-
- foreach (XNode child in Nodes)
- child.BuildTreeString (builder, indentLevel + 1);
-
- builder.Append (' ', indentLevel * 2);
- builder.Append ("Attributes=");
- builder.AppendLine ();
-
- foreach (XAttribute att in Attributes)
- att.BuildTreeString (builder, indentLevel + 1);
-
- if (closingTag is XClosingTag) {
- builder.AppendLine ("ClosingTag=");
- closingTag.BuildTreeString (builder, indentLevel + 1);
- } else if (closingTag == null)
- builder.AppendLine ("ClosingTag=(null)");
- else
- builder.AppendLine ("ClosingTag=(Self)");
-
- builder.Append (' ', indentLevel * 2);
- builder.AppendLine ("]");
- }
-
- public override string FriendlyPathRepresentation {
- get { return Name.FullName; }
- }
-
- public IEnumerable<XElement> Elements {
- get {
- XElement el;
- foreach (XNode node in Nodes) {
- el = node as XElement;
- if (el != null)
- yield return el;
- }
- }
- }
-
- public IEnumerable<XElement> AllDescendentElements {
- get {
- foreach (XElement el in Elements) {
- yield return el;
- foreach (XElement el2 in el.AllDescendentElements)
- yield return el2;
- }
- }
- }
-
- }
-
- public class XAttribute : XObject, INamedXObject
- {
-
- public XAttribute (TextLocation start, XName name, string value) : base (start)
- {
- this.Name = name;
- this.Value = value;
- }
-
- public XAttribute (TextLocation start) : base (start)
- {
- }
-
- public XName Name { get; set; }
-
- public override bool IsComplete { get { return base.IsComplete && IsNamed; } }
- public bool IsNamed { get { return Name.IsValid; } }
-
- public string Value { get; set; }
- public XAttribute NextSibling { get; internal protected set; }
-
- protected XAttribute () {}
- protected override XObject NewInstance () { return new XAttribute (); }
-
- protected override void ShallowCopyFrom (XObject copyFrom)
- {
- base.ShallowCopyFrom (copyFrom);
- XAttribute copyFromAtt = (XAttribute) copyFrom;
- //immutable types
- Name = copyFromAtt.Name;
- Value = copyFromAtt.Value;
- }
-
- public override string ToString ()
- {
- return string.Format (
- "[XAttribute Name='{0}' Location='{1}' Value='{2}']", Name.FullName, Region, Value);
- }
-
- public override string FriendlyPathRepresentation {
- get { return "@" + Name.FullName; }
- }
-
-
- }
-
- public class XAttributeCollection : IEnumerable<XAttribute>
- {
- readonly XObject parent;
- XAttribute firstChild;
- XAttribute lastChild;
-
- public XAttributeCollection (XObject parent)
- {
- this.parent = parent;
- }
-
- public Dictionary<XName, XAttribute> ToDictionary ()
- {
- Dictionary<XName, XAttribute> dict = new Dictionary<XName,XAttribute> ();
- XAttribute current = firstChild;
- while (current != null) {
- dict.Add (current.Name, current);
- current = current.NextSibling;
- }
- return dict;
- }
-
- public XAttribute this [XName name] {
- get {
- XAttribute current = firstChild;
- while (current != null) {
- if (current.Name == name)
- return current;
- current = current.NextSibling;
- }
- return null;
- }
- }
-
- public XAttribute this [int index] {
- get {
- XAttribute current = firstChild;
- while (current != null) {
- if (index == 0)
- return current;
- index--;
- current = current.NextSibling;
- }
- throw new IndexOutOfRangeException ();
- }
- }
-
- public XAttribute Get (XName name, bool ignoreCase)
- {
- XAttribute current = firstChild;
- while (current != null) {
- if (XName.Equals (current.Name, name, ignoreCase))
- return current;
- current = current.NextSibling;
- }
- return null;
- }
-
- public string GetValue (XName name, bool ignoreCase)
- {
- var att = Get (name, ignoreCase);
- return att != null? att.Value : null;
- }
-
- public void AddAttribute (XAttribute newChild)
- {
- newChild.Parent = parent;
- if (lastChild != null) {
- lastChild.NextSibling = newChild;
- }
- if (firstChild == null)
- firstChild = newChild;
- lastChild = newChild;
- }
-
- public IEnumerator<XAttribute> GetEnumerator ()
- {
- XAttribute current = firstChild;
- while (current != null) {
- yield return current;
- current = current.NextSibling;
- }
- }
-
- System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
- {
- IEnumerator<XAttribute> en = GetEnumerator ();
- return en;
- }
- }
-
- public class XCData : XNode
- {
- public XCData (TextLocation start) : base (start) {}
- public XCData (DomRegion region) : base (region) {}
-
- protected XCData () {}
- protected override XObject NewInstance () { return new XCData (); }
-
- public override string FriendlyPathRepresentation {
- get { return "<![CDATA[ ]]>"; }
- }
-
- }
-
- public class XComment : XNode
- {
- public XComment (TextLocation start) : base (start) {}
- public XComment (DomRegion region) : base (region) {}
-
- protected XComment () {}
- protected override XObject NewInstance () { return new XComment (); }
-
- public override string FriendlyPathRepresentation {
- get { return "<!-- -->"; }
- }
- }
-
- public class XProcessingInstruction : XNode
- {
- public XProcessingInstruction (TextLocation start) : base (start) {}
- public XProcessingInstruction (DomRegion region) : base (region) {}
-
- protected XProcessingInstruction () {}
- protected override XObject NewInstance () { return new XProcessingInstruction (); }
-
- public override string FriendlyPathRepresentation {
- get { return "<? ?>"; }
- }
- }
-
- public class XDocType : XNode, INamedXObject
- {
- public XDocType (TextLocation start) : base (start) {}
- public XDocType (DomRegion region) : base (region) {}
-
- protected XDocType () {}
- protected override XObject NewInstance () { return new XDocType (); }
-
- public XName RootElement { get; set; }
- public string PublicFpi { get; set; }
- public bool IsPublic { get { return PublicFpi != null; } }
- public DomRegion InternalDeclarationRegion { get; set; }
- public string Uri { get; set; }
-
- public override string FriendlyPathRepresentation {
- get { return "<!DOCTYPE>"; }
- }
-
- protected override void ShallowCopyFrom (XObject copyFrom)
- {
- base.ShallowCopyFrom (copyFrom);
- XDocType copyFromDT = (XDocType) copyFrom;
- //immutable types
- RootElement = copyFromDT.RootElement;
- PublicFpi = copyFromDT.PublicFpi;
- InternalDeclarationRegion = copyFromDT.InternalDeclarationRegion;
- Uri = copyFromDT.Uri;
- }
-
- XName INamedXObject.Name {
- get { return RootElement; }
- set { RootElement = value; }
- }
-
- bool INamedXObject.IsNamed {
- get { return RootElement.IsValid; }
- }
-
- public override string ToString ()
- {
- return string.Format("[DocType: RootElement='{0}', PublicFpi='{1}', InternalDeclarationRegion='{2}', Uri='{3}']",
- RootElement.FullName, PublicFpi, InternalDeclarationRegion, Uri);
- }
- }
-
- public class XClosingTag : XNode, INamedXObject
- {
-
- public XClosingTag (TextLocation start) : base (start) {}
-
- public XClosingTag (XName name, TextLocation start) : base (start)
- {
- this.Name = name;
- }
-
- public XName Name { get; set; }
-
- public override bool IsComplete { get { return base.IsComplete && IsNamed; } }
- public bool IsNamed { get { return Name.IsValid; } }
-
- protected XClosingTag () {}
- protected override XObject NewInstance () { return new XClosingTag (); }
-
- protected override void ShallowCopyFrom (XObject copyFrom)
- {
- base.ShallowCopyFrom (copyFrom);
- XClosingTag copyFromAtt = (XClosingTag) copyFrom;
- //immutable types
- Name = copyFromAtt.Name;
- }
-
- public override string FriendlyPathRepresentation {
- get { return "/" + Name.FullName; }
- }
-
- }
-
- public class XDocument : XContainer
- {
- public XElement RootElement { get; private set; }
-
- public XDocument () : base (new TextLocation (1, 1)) {}
- protected override XObject NewInstance () { return new XDocument (); }
-
- public override string FriendlyPathRepresentation {
- get { throw new InvalidOperationException ("Should not display document in path bar."); }
- }
-
- public override void AddChildNode (XNode newChild)
- {
- if (RootElement == null && newChild is XElement)
- RootElement = (XElement) newChild;
- base.AddChildNode (newChild);
- }
-
- }
-
- public interface INamedXObject
- {
- XName Name { get; set; }
- bool IsNamed { get; }
- }
-
- public interface IAttributedXObject : INamedXObject
- {
- XAttributeCollection Attributes { get; }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XState.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XState.cs
deleted file mode 100644
index e0f25f4a81..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XState.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// XState.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-//
-// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace MonoDevelop.Xml.StateEngine
-{
-
-
- public enum XState
- {
- /// <summary>Not within a tag definition or special section</summary>
- Free,
- Malformed,
-
- //--------------------parts of tag and attribute definitions---------
-
- /// <summary>A tag, the type of which has not been determined.</summary>
- OpeningBracket,
- /// <summary>An opening tag's declaration.</summary>
- Tag,
- /// <summary>A closing tag's declaration.</summary>
- ClosingTag,
- /// <summary>A self-closing tag , after the forward slash.</summary>
- SelfClosing,
- /// <summary>A tag's name.</summary>
- TagName,
- /// <summary>A closing tag's name.</summary>
- ClosingTagName,
- /// <summary>An attribute name.</summary>
- AttributeName,
- /// <summary>An attribute seeking an equals sign.</summary>
- AttributeNamed,
- /// <summary>A named attribute seeking a value.</summary>
- AttributeValue,
- /// <summary>A single-quoted attribute value.</summary>
- AttributeQuotes,
- /// <summary>An unquoted attribute value</summary>
- AttributeUnquoted,
- /// <summary>A double-quoted attribute value.</summary>
- AttributeDoubleQuotes,
-
- //-----------------special XML sections--------------------------------
-
- /// <summary>An XML/HTML comment.</summary>
- Comment,
- CommentOpening,
- CommentClosing,
- /// <summary>A CDATA section.</summary>
- CData,
- CDataOpening,
- CDataClosing,
- /// <summary>An XML/HTML character entity.</summary>
- Entity,
- /// <summary>An XML/HTML processing instruction.</summary>
- ProcessingInstruction,
- ProcessingInstructionClosing,
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParser.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParser.cs
deleted file mode 100644
index d920999f6d..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParser.cs
+++ /dev/null
@@ -1,299 +0,0 @@
-//
-// XmlParser.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-//
-// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Diagnostics;
-
-namespace MonoDevelop.Xml.StateEngine
-{
-
-
- public class XmlParser : Parser2
- {
- public XmlParser () : base (false) {}
- public XmlParser (bool buildTree) : base (buildTree) {}
-
- protected XState CurrentXState {
- get {
- Debug.Assert (CurrentState < StateOffset && CurrentState > -1);
- return (XState) CurrentState;
- }
- }
-
- protected virtual int StateOffset {
- get { return (int) XState.ProcessingInstructionClosing + 1; }
- }
-
- protected override int Dispatch (char c)
- {
- switch (CurrentXState) {
- case XState.Free:
- switch (c) {
- case '<': return (int)XState.OpeningBracket;
-// case '&': return (int) XState.Entity;
- default: return (int)XState.Free;
- }
-
- case XState.Malformed:
- if (StateLength == 0) {
- if (BuildTree)
- ConnectAll ();
- EndAll (true);
- }
- switch (c) {
- case '>': return (int)XState.Free;
- case '<': return (int)XState.OpeningBracket;
- default: return (int)XState.Malformed;
- }
-
- case XState.OpeningBracket:
- if (StateLength == 0) {
- switch (c) {
- case '!': return (int)XState.OpeningBracket;
- case '?':
- Nodes.Push (new XProcessingInstruction (this.Position - 2));
- return (int)XState.ProcessingInstruction;
-
- case '/':
- Nodes.Push (new XClosingTag (this.Position - 2));
- return (int)XState.ClosingTagName;
-
- if (char.IsLetter (c) || c == '_') {
- Nodes.Push (new XElement (this.Position - 2));
- KeywordBuilder.Append (c);
- return (int) XState.TagName;
- }
- }
-
- } else if (StateLength == 1) {
- switch (c) {
- case '-':
- return (int)XState.CommentOpening;
- case '[':
- return (int)XState.CDataOpening;
- }
- }
- LogError ("Malformed tag start.");
- if (c == '>') return (int)XState.Free;
- else if (c == '<') return (int)XState.OpeningBracket;
- else return (int)XState.Malformed;
-
- case XState.TagName:
-return (int)XState.TagName;
-/*
- if (char.IsLetterOrDigit (c) || c == '_') {
- KeywordBuilder.Append (c);
- return (int)XState.TagName;
- }
-
- if (c == ':') {
- XElement el = Nodes.Peek () as INamedXObject;
- if (namedObject.Name.Name != null || KeywordBuilder.Length == 0) {
- LogError ("Unexpected ':' in name.");
- return GetStateForCurrentObject ();
- } else {
- namedObject.Name = new XName (context.KeywordBuilder.ToString ());
- context.KeywordBuilder.Length = 0;
- }
- }
-
- else if (char.IsWhiteSpace (c)) return (int)XState.Tag;
- else if (c == '>') return (int)XState.Free;
- else if (c == '/') return (int)XState.SelfClosing;
- else break;
-
- case XState.Tag:
- if (char.IsWhiteSpace (c)) return (int)XState.Tag;
- else if (char.IsLetter (c)) return PushCurrent (XState.AttributeName);
- else if (c == '>') return (int)XState.Free;
- else if (c == '/') return (int)XState.SelfClosing;
- else break;
-
- case XState.SelfClosing:
- if (c == '>') return (int)XState.Free;
- else break;
-
- case XState.AttributeName:
- if (char.IsWhiteSpace (c))
- return (int)XState.AttributeNamed;
- else if (char.IsLetterOrDigit (c) | c == ':')
- return (int)XState.AttributeName;
- else if (c == '=')
- return (int)XState.AttributeValue;
- else return (int)XState.Malformed;
-
- case XState.AttributeNamed:
- if (c == '=') return (int)XState.AttributeValue;
- else if (char.IsWhiteSpace (c)) return (int)XState.AttributeNamed;
- else return (int)XState.Malformed;
-
- case XState.AttributeValue:
- if (c == '\'') return (int)XState.AttributeQuotes;
- else if (c == '"') return (int)XState.AttributeDoubleQuotes;
- else if (c == '<') break;
- else if (char.IsWhiteSpace (c)) return (int)XState.AttributeValue;
- else if (char.IsLetterOrDigit (c)) {
- LogWarning ("Unquoted attribute value.");
- return (int)XState.AttributeUnquoted;
- } else {
- LogWarning ("Incomplete attribute.");
- return PopState ();
- }
-
- case XState.AttributeQuotes:
- switch (c) {
- case '\'': return PopState ();
- case '<': return UnexpectedOpeningTag;
- case '&': return PushCurrent (XState.Entity);
- default: return (int)XState.AttributeQuotes;
- }
-
- case XState.AttributeDoubleQuotes:
- switch (c) {
- case '"': return PopState ();
- case '<': return UnexpectedOpeningTag;
- case '&': return PushCurrent (XState.Entity);
- default: return (int)XState.AttributeDoubleQuotes;
- }
-
- case XState.AttributeUnquoted:
- switch (c) {
- case '<': return UnexpectedOpeningTag;
- case '&': return PushCurrent (XState.Entity);
- case '.': case '_': case ':': case ';': return CurrentState;
- case '>': return (int)XState.Free;
- }
- if (char.IsLetterOrDigit (c)) return CurrentState;
- else if (char.IsWhiteSpace (c)) return PopState ();
- break;
-*/
- case XState.CData:
- return (int)((c == ']')? XState.CDataClosing: XState.CData);
-
- case XState.CDataOpening:
- if (StateLength < "CDATA[".Length) {
- if ("CDATA["[StateLength] == c) return (int)XState.CDataOpening;
- else break;
- } else {
- Nodes.Push (new XCData (Position - "<![CDATA[".Length));
- return (int)XState.CData;
- }
-
- case XState.CDataClosing:
- if ("]>"[StateLength] == c) {
- if (StateLength == 1) {
- XCData n = (XCData) Nodes.Pop ();
- n.End (Position);
- ((XContainer)Nodes.Peek ()).AddChildNode (n);
- return (int) XState.Free;
- } else {
- return (int)XState.CDataClosing;
- }
- } else return (int)XState.CData;
-/*
- case XState.Entity:
- if ((StateLength == 0 && c == '#') || char.IsLetterOrDigit (c))
- return (int)XState.Entity;
- else if (c == ';') return PopState ();
- else LogWarning ("Malformed entity");
- break;
-*/
- case XState.ProcessingInstruction:
- switch (c) {
- case '<': break;
- case '?': return (int)XState.ProcessingInstructionClosing;
- default: return (int)XState.ProcessingInstruction;
- }
- break;
-
- case XState.ProcessingInstructionClosing:
- switch (c) {
- case '<': break;
- case '?': return (int)XState.ProcessingInstructionClosing;
- case '>': {
- XProcessingInstruction n = (XProcessingInstruction) Nodes.Pop ();
- n.End (Position);
- if (BuildTree)
- ((XContainer)Nodes.Peek ()).AddChildNode (n);
- return (int) XState.Free; }
- default: return (int)XState.ProcessingInstruction;
- }
- break;
-
- case XState.CommentOpening:
- if (c == '-') {
- Nodes.Push (new XComment (Position - "<!--".Length));
- return (int)XState.Comment;
- }
- else break;
-
- case XState.Comment:
- if (c == '-') return (int)XState.CommentClosing;
- else return (int)XState.Comment;
-
- case XState.CommentClosing:
- if (StateLength == 0) {
- if (c == '-') return (int)XState.CommentClosing;
- else return (int)XState.Comment;
- } else if (StateLength > 0) {
- if (c == '>') {
- XComment n = (XComment) Nodes.Pop ();
- n.End (Position);
- if (BuildTree)
- ((XContainer)Nodes.Peek ()).AddChildNode (n);
- }
- else LogWarning ("The string '--' should not appear in comments.");
- if (c == '-') return (int)XState.CommentClosing;
- else return (int)XState.Comment;
- }
- else break;
- }
-
- if (c == '<')
- return UnexpectedOpeningTag;
- return (int)XState.Malformed;
- }
-
- protected override object CreateNew ()
- {
- return new XmlParser ();
- }
-
- protected virtual int UnexpectedOpeningTag {
- get {
- LogError ("Unexpected opening tag");
- return (int)XState.OpeningBracket;
- }
- }
-
- protected override XDocument CreateDocument ()
- {
- return new XDocument ();
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathHistoryList.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathHistoryList.cs
deleted file mode 100644
index 7cef27431f..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathHistoryList.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006-2007 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-/*
-using MonoDevelop.Core;
-using System;
-using System.Collections.Generic;
-using System.Xml;
-
-namespace MonoDevelop.XmlEditor
-{
- public class XPathHistoryList : ICustomXmlSerializer
- {
- const string xpathHistoryListElementName = "XPathHistoryList";
- const string xpathElementName = "XPath";
-
- List<string> xpaths = new List<string>();
-
- public XPathHistoryList()
- {
- }
-
- /// <summary>
- /// Adds a single xpath to the list.
- /// </summary>
- public void Add(string xpath)
- {
- xpaths.Add(xpath);
- }
-
- /// <summary>
- /// Gets the xpath strings.
- /// </summary>
- public string[] GetXPaths()
- {
- return xpaths.ToArray();
- }
-
- /// <summary>
- /// Creates an XPathHistoryList from the saved xml.
- /// </summary>
- public ICustomXmlSerializer ReadFrom(XmlReader reader)
- {
- XPathHistoryList list = new XPathHistoryList();
- bool finished = false;
- while (reader.Read() && !finished) {
- switch (reader.NodeType) {
- case XmlNodeType.Element:
- if (reader.Name == xpathElementName) {
- list.Add(reader.ReadElementString());
- }
- break;
- case XmlNodeType.EndElement:
- if (reader.Name != xpathElementName) {
- finished = true;
- }
- break;
- }
- }
- return list;
- }
-
- /// <summary>
- /// Creates an xml element from this XPathHistoryList.
- /// </summary>
- public void WriteTo(XmlWriter writer)
- {
- writer.WriteStartElement(xpathHistoryListElementName);
- foreach (string xpath in xpaths) {
- writer.WriteElementString(xpathElementName, xpath);
- }
- writer.WriteEndElement();
- }
- }
-}
- */ \ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNamespaceList.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNamespaceList.cs
deleted file mode 100644
index 5f9108c412..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNamespaceList.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006-2007 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using MonoDevelop.Core;
-using System;
-using System.Collections.Generic;
-using System.Xml;
-
-namespace MonoDevelop.XmlEditor
-{
- public class XPathNamespaceList : ICustomXmlSerializer
- {
- const string xpathNamespaceListElementName = "XPathNamespaceList";
- const string xpathNamespaceElementName = "Namespace";
-
- List<XmlNamespace> namespaces = new List<XmlNamespace>();
-
- public XPathNamespaceList()
- {
- }
-
- /// <summary>
- /// Adds a single namespace to the list.
- /// </summary>
- public void Add(string prefix, string uri)
- {
- namespaces.Add(new XmlNamespace(prefix, uri));
- }
-
- /// <summary>
- /// Gets the namespaces.
- /// </summary>
- public XmlNamespace[] GetNamespaces()
- {
- return namespaces.ToArray();
- }
-
- /// <summary>
- /// Creates an XPathNamespaceList from the saved xml.
- /// </summary>
- public ICustomXmlSerializer ReadFrom(XmlReader reader)
- {
- XPathNamespaceList list = new XPathNamespaceList();
- bool finished = false;
- while (reader.Read() && !finished) {
- switch (reader.NodeType) {
- case XmlNodeType.Element:
- if (reader.Name == xpathNamespaceElementName) {
- XmlNamespace ns = XmlNamespace.FromString(reader.ReadElementString());
- list.Add(ns.Prefix, ns.Uri);
- }
- break;
- case XmlNodeType.EndElement:
- if (reader.Name != xpathNamespaceElementName) {
- finished = true;
- }
- break;
- }
- }
- return list;
- }
-
- /// <summary>
- /// Creates an xml element from an XPathNamespaceList.
- /// </summary>
- public void WriteTo(XmlWriter writer)
- {
- writer.WriteStartElement(xpathNamespaceListElementName);
- foreach (XmlNamespace ns in namespaces) {
- writer.WriteElementString(xpathNamespaceElementName, ns.ToString());
- }
- writer.WriteEndElement();
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeMatch.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeMatch.cs
deleted file mode 100644
index 37698f446a..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeMatch.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using System;
-using System.Xml;
-using System.Xml.XPath;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// Stores an XmlNode and its associated line number and position after an
- /// XPath query has been evaluated.
- /// </summary>
- public class XPathNodeMatch : IXmlLineInfo
- {
- int? lineNumber;
- int linePosition;
- string value;
- string displayValue;
- XPathNodeType nodeType;
-
- /// <summary>
- /// Creates an XPathNodeMatch from the navigator which should be position on the
- /// node.
- /// </summary>
- /// <remarks>
- /// We deliberately use the OuterXml when we find a Namespace since the
- /// navigator location returned starts from the xmlns attribute.
- /// </remarks>
- public XPathNodeMatch(XPathNavigator currentNavigator)
- {
- SetLineNumbers(currentNavigator as IXmlLineInfo);
- nodeType = currentNavigator.NodeType;
- switch (nodeType) {
- case XPathNodeType.Text:
- SetTextValue(currentNavigator);
- break;
- case XPathNodeType.Comment:
- SetCommentValue(currentNavigator);
- break;
- case XPathNodeType.Namespace:
- SetNamespaceValue(currentNavigator);
- break;
- case XPathNodeType.Element:
- SetElementValue(currentNavigator);
- break;
- case XPathNodeType.ProcessingInstruction:
- SetProcessingInstructionValue(currentNavigator);
- break;
- case XPathNodeType.Attribute:
- SetAttributeValue(currentNavigator);
- break;
- default:
- value = currentNavigator.LocalName;
- displayValue = value;
- break;
- }
- }
-
- /// <summary>
- /// Line numbers are zero based.
- /// </summary>
- public int LineNumber {
- get {
- return lineNumber.GetValueOrDefault(0);
- }
- }
-
- /// <summary>
- /// Line positions are zero based.
- /// </summary>
- public int LinePosition {
- get {
- return linePosition;
- }
- }
-
- public bool HasLineInfo()
- {
- return lineNumber.HasValue;
- }
-
- /// <summary>
- /// Gets the text value of the node.
- /// </summary>
- public string Value {
- get {
- return value;
- }
- }
-
- /// <summary>
- /// Gets the node display value. This includes the angle brackets if it is
- /// an element, for example.
- /// </summary>
- public string DisplayValue {
- get {
- return displayValue;
- }
- }
-
- public XPathNodeType NodeType {
- get {
- return nodeType;
- }
- }
-
- void SetElementValue(XPathNavigator navigator)
- {
- value = navigator.Name;
- if (navigator.IsEmptyElement) {
- displayValue = String.Concat("<", value, "/>");
- } else {
- displayValue = String.Concat("<", value, ">");
- }
- }
-
- void SetTextValue(XPathNavigator navigator)
- {
- value = navigator.Value;
- displayValue = value;
- }
-
- void SetCommentValue(XPathNavigator navigator)
- {
- value = navigator.Value;
- displayValue = navigator.OuterXml;
- }
-
- void SetNamespaceValue(XPathNavigator navigator)
- {
- value = navigator.OuterXml;
- displayValue = value;
- }
-
- void SetProcessingInstructionValue(XPathNavigator navigator)
- {
- value = navigator.Name;
- displayValue = navigator.OuterXml;
- }
-
- void SetAttributeValue(XPathNavigator navigator)
- {
- value = navigator.Name;
- displayValue = String.Concat("@", value);
- }
-
- /// <summary>
- /// Takes one of the xml line number so the numbers are now zero
- /// based instead of one based.
- /// </summary>
- /// <remarks>A namespace query (e.g. //namespace::*) will return
- /// a line info of -1, -1 for the xml namespace. Which looks like
- /// a bug in the XPathDocument class.</remarks>
- void SetLineNumbers(IXmlLineInfo lineInfo)
- {
- if (lineInfo.HasLineInfo() && lineInfo.LineNumber > 0) {
- lineNumber = lineInfo.LineNumber - 1;
- linePosition = lineInfo.LinePosition - 1;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeTextMarker.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeTextMarker.cs
deleted file mode 100644
index d9e14a521a..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathNodeTextMarker.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-/*
-using Gtk;
-using GtkSourceView;
-using System;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// A text marker for an XPath query match.
- /// </summary>
- public class XPathNodeTextMarker
- {
- SourceBuffer buffer;
- TextTag xpathMatchTextTag;
-
- public XPathNodeTextMarker(SourceBuffer buffer)
- {
- this.buffer = buffer;
-
- xpathMatchTextTag = new TextTag("XPathMatch");
- xpathMatchTextTag.Background = "lightgrey";
- buffer.TagTable.Add(xpathMatchTextTag);
- }
-
- /// <summary>
- /// Adds markers for each XPathNodeMatch.
- /// </summary>
- public void AddMarkers(XPathNodeMatch[] nodes)
- {
- foreach (XPathNodeMatch node in nodes) {
- AddMarker(node);
- }
- }
-
- /// <summary>
- /// Adds a single marker for the XPathNodeMatch.
- /// </summary>
- public void AddMarker(XPathNodeMatch node)
- {
- if (node.HasLineInfo() && node.Value.Length > 0) {
- TextIter lineIter = buffer.GetIterAtLine(node.LineNumber);
- int offset = lineIter.Offset + node.LinePosition;
- TextIter startIter = buffer.GetIterAtOffset(offset);
- offset += node.Value.Length;
- TextIter endIter = buffer.GetIterAtOffset(offset);
- buffer.ApplyTag(xpathMatchTextTag, startIter, endIter);
- }
- }
-
- /// <summary>
- /// Removes all the XPathNodeMarkers.
- /// </summary>
- public void RemoveMarkers()
- {
- buffer.RemoveTag(xpathMatchTextTag, buffer.StartIter, buffer.EndIter);
- }
- }
-}
- */ \ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPad.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPad.cs
deleted file mode 100644
index 81881a70ab..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPad.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006-2007 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-/*
-using Gtk;
-using MonoDevelop.Core;
-using MonoDevelop.Ide.Gui;
-using System;
-
-namespace MonoDevelop.XmlEditor
-{
- public class XPathQueryPad : IPadContent, IXmlEditorViewContentProvider
- {
- XPathQueryWidget xpathQueryWidget;
- bool disposed;
-
- public XPathQueryPad()
- {
- xpathQueryWidget = new XPathQueryWidget(this);
- xpathQueryWidget.ShowAll();
-
- IdeApp.Workbench.ActiveDocumentChanged += ActiveDocumentChanged;
- LoadProperties();
- }
-
- public void JumpTo(string fileName, int line, int column)
- {
- IdeApp.Workbench.OpenDocument(fileName, Math.Max(1, line), Math.Max(1, column), true);
- }
-
- void IPadContent.Initialize(IPadWindow window)
- {
- window.Title = "XPath Query";
- window.Icon = "MonoDevelop.XmlEditor.XPathQueryPad";
- }
-
- public string Id {
- get {
- return "MonoDevelop.XmlEditor.XPathQueryPad";
- }
- }
-
- public string DefaultPlacement {
- get {
- return "Bottom";
- }
- }
-
- public void RedrawContent()
- {
- }
-
- public Widget Control {
- get {
- return xpathQueryWidget;
- }
- }
-
- public void Dispose()
- {
- if (!disposed) {
- disposed = true;
- IdeApp.Workbench.ActiveDocumentChanged -= ActiveDocumentChanged;
- SaveProperties();
- }
- }
-
- void ActiveDocumentChanged(object source, EventArgs e)
- {
- xpathQueryWidget.UpdateQueryButtonState();
- }
-
- /// <summary>
- /// Reads the xpath query pad properties and updates
- /// XPath Query widget.
- /// </summary>
- void LoadProperties()
- {
- xpathQueryWidget.Query = XPathQueryPadOptions.LastXPathQuery;
-
- foreach (string xpath in XPathQueryPadOptions.XPathHistory.GetXPaths()) {
- xpathQueryWidget.AddXPath(xpath);
- }
-
- foreach (XmlNamespace ns in XPathQueryPadOptions.Namespaces.GetNamespaces()) {
- xpathQueryWidget.AddNamespace(ns.Prefix, ns.Uri);
- }
- }
-
- /// <summary>
- /// Updates the xpath query pad properties from the
- /// XPath Query widget.
- void SaveProperties()
- {
- XPathQueryPadOptions.LastXPathQuery = xpathQueryWidget.Query;
-
- XPathHistoryList history = new XPathHistoryList();
- foreach (string xpath in xpathQueryWidget.GetXPathHistory()) {
- history.Add(xpath);
- }
- XPathQueryPadOptions.XPathHistory = history;
-
- XPathNamespaceList namespaces = new XPathNamespaceList();
- foreach (XmlNamespace ns in xpathQueryWidget.GetNamespaces()) {
- namespaces.Add(ns.Prefix, ns.Uri);
- }
- XPathQueryPadOptions.Namespaces = namespaces;
- }
- }
-}
-*/
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPadOptions.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPadOptions.cs
deleted file mode 100644
index ffe6fb70d8..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryPadOptions.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006-2007 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-/*
-
-using MonoDevelop.Core;
-using System;
-using System.Xml;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// The XPath Query Pad options.
- /// </summary>
- public class XPathQueryPadOptions
- {
- public const string OptionsProperty = "XPathQueryPad.Options";
- public const string NamespacesProperty = "Namespaces";
- public const string LastXPathQueryProperty = "LastXPathQuery";
- public const string XPathHistoryProperty = "XPathQueryHistory";
- static Properties properties;
-
- static XPathQueryPadOptions()
- {
- properties = PropertyService.Get(OptionsProperty, new Properties());
- }
-
- static Properties Properties {
- get {
- return properties;
- }
- }
-
- /// <summary>
- /// The last xpath query entered in the XPath Query Pad's
- /// combo box.
- /// </summary>
- public static string LastXPathQuery {
- get {
- return Properties.Get(LastXPathQueryProperty, String.Empty);
- }
- set {
- Properties.Set(LastXPathQueryProperty, value);
- }
- }
-
- /// <summary>
- /// Gets or sets the xpath history.
- /// </summary>
- public static XPathHistoryList XPathHistory {
- get {
- return (XPathHistoryList)Properties.Get(XPathHistoryProperty, new XPathHistoryList());
- }
- set {
- Properties.Set(XPathHistoryProperty, value);
- }
- }
-
- /// <summary>
- /// Gets or sets the xpath namespaces used.
- /// </summary>
- public static XPathNamespaceList Namespaces {
- get {
- return (XPathNamespaceList)Properties.Get(NamespacesProperty, new XPathNamespaceList());
- }
- set {
- Properties.Set(NamespacesProperty, value);
- }
- }
- }
-}
-
-*/
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryWidget.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryWidget.cs
deleted file mode 100644
index 4ccf166e1e..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.XPath/XPathQueryWidget.cs
+++ /dev/null
@@ -1,515 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006-2007 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-using Glade;
-using Gtk;
-using GtkSourceView;
-using MonoDevelop.Components;
-using MonoDevelop.Core;
-using MonoDevelop.Core.Gui.Components;
-using MonoDevelop.Core.Gui.Dialogs;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.Xml;
-using System.Xml.XPath;
-
-/*
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// The XPathQueryWidget uses this interface to
- /// access the currently active XmlEditorViewContent and
- /// jump to a particular file.
- /// </summary>
- public interface IXmlEditorViewContentProvider
- {
- XmlEditorViewContent View {get;}
-
- void JumpTo(string fileName, int line, int column);
- }
-
- public class XPathQueryWidget : GladeWidgetExtract
- {
- /// <summary>
- /// The filename that the last query was executed on.
- /// </summary>
- string fileName = String.Empty;
-
- /// <summary>
- /// The total number of xpath queries to remember.
- /// </summary>
- const int xpathQueryHistoryLimit = 20;
- int xpathHistoryListCount;
-
- /// <summary>
- /// The number of namespaces we have added to the
- /// grid.
- /// </summary>
- int namespaceCount;
-
- enum MoveCaret {
- ByJumping = 1,
- ByScrolling = 2
- }
-
- [Widget] TreeView resultsTreeView;
- [Widget] TreeView namespacesTreeView;
- [Widget] Button queryButton;
- [Widget] ComboBoxEntry xpathComboBoxEntry;
- [Widget] Notebook notebook;
-
- // Results List: xpath result, line number, XPathNodeMatch or Exception.
- const int xpathMatchColumnNumber = 0;
- const int xpathMatchLineColumnNumber = 1;
- const int xpathNodeMatchColumnNumber = 2;
- ListStore resultsList = new ListStore(typeof(string), typeof(string), typeof(object));
-
- // Namespace list: prefix, namespace.
- const int prefixColumnNumber = 0;
- const int namespaceColumnNumber = 1;
- ListStore namespacesList = new ListStore(typeof(string), typeof(string));
-
- // XPath query history: xpath query
- ListStore xpathHistoryList = new ListStore(typeof(string));
-
- IXmlEditorViewContentProvider viewProvider;
-
- public XPathQueryWidget(IXmlEditorViewContentProvider viewProvider)
- : base ("XmlEditor.glade", "XPathQueryPad")
- {
- this.viewProvider = viewProvider;
- InitResultsList();
- InitNamespaceList();
-
- queryButton.Clicked += QueryButtonClicked;
-
- EntryCompletion completion = new EntryCompletion();
- completion.Model = xpathHistoryList;
- completion.TextColumn = 0;
-
- xpathComboBoxEntry.Model = xpathHistoryList;
- xpathComboBoxEntry.TextColumn = 0;
- xpathComboBoxEntry.Entry.Completion = completion;
- xpathComboBoxEntry.Entry.Changed += XPathComboBoxEntryChanged;
- xpathComboBoxEntry.Entry.Activated += XPathComboBoxEntryActivated;
- }
-
- /// <summary>
- /// Adds a namespace to the namespace list.
- /// </summary>
- public void AddNamespace(string prefix, string uri)
- {
- TreeIter iter = namespacesList.Insert(namespaceCount);
- namespacesList.SetValue(iter, prefixColumnNumber, prefix);
- namespacesList.SetValue(iter, namespaceColumnNumber, uri);
- namespaceCount++;
- }
-
- /// <summary>
- /// Gets the list of namespaces in the namespace list.
- /// </summary>
- public ReadOnlyCollection<XmlNamespace> GetNamespaces()
- {
- List<XmlNamespace> namespaces = new List<XmlNamespace>();
- TreeIter iter;
- bool addNamespaces = namespacesList.GetIterFirst(out iter);
- while (addNamespaces) {
- string prefix = GetNamespacePrefix(iter);
- string uri = GetNamespaceUri(iter);
- if (prefix.Length == 0 && uri.Length == 0) {
- // Ignore.
- } else {
- namespaces.Add(new XmlNamespace(prefix, uri));
- }
- addNamespaces = namespacesList.IterNext(ref iter);
- }
- return new ReadOnlyCollection<XmlNamespace>(namespaces);
- }
-
- /// <summary>
- /// Gets the previously used XPath queries from the combo box drop down list.
- /// </summary>
- public string [] GetXPathHistory()
- {
- List<string> xpaths = new List<string>();
- TreeIter iter;
- bool add = xpathHistoryList.GetIterFirst(out iter);
- while (add) {
- string xpath = (string)xpathHistoryList.GetValue(iter, 0);
- xpaths.Add(xpath);
- add = xpathHistoryList.IterNext(ref iter);
- }
- return xpaths.ToArray();
- }
-
- /// <summary>
- /// Adds the xpath into the combo box drop down list.
- /// </summary>
- public void AddXPath(string xpath)
- {
- xpathHistoryList.AppendValues(xpath);
- }
-
- /// <summary>
- /// Gets or sets the active xpath query.
- /// </summary>
- public string Query {
- get {
- return xpathComboBoxEntry.Entry.Text;
- }
- set {
- xpathComboBoxEntry.Entry.Text = value;
- }
- }
-
- public void UpdateQueryButtonState()
- {
- queryButton.Sensitive = IsXPathQueryEntered && IsXmlEditorViewContentActive;
- }
-
- void InitResultsList()
- {
- resultsTreeView.Model = resultsList;
- resultsTreeView.Selection.Mode = SelectionMode.Single;
- resultsTreeView.RowActivated += ResultsTreeViewRowActivated;
- resultsTreeView.Selection.Changed += ResultsTreeViewSelectionChanged;
-
- // Match column.
- CellRendererText renderer = new CellRendererText();
- resultsTreeView.AppendColumn("Match", renderer, "text", xpathMatchColumnNumber);
-
- // Line number column.
- renderer = new CellRendererText();
- resultsTreeView.AppendColumn("Line", renderer, "text", xpathMatchLineColumnNumber);
- }
-
- void InitNamespaceList()
- {
- namespacesTreeView.Model = namespacesList;
- namespacesTreeView.Selection.Mode = SelectionMode.Single;
-
- // Prefix column.
- CellRendererText renderer = new CellRendererText();
- renderer.Edited += PrefixEdited;
- renderer.Editable = true;
- namespacesTreeView.AppendColumn("Prefix", renderer, "text", prefixColumnNumber);
-
- // Namespace column.
- renderer = new CellRendererText();
- renderer.Edited += NamespaceEdited;
- renderer.Editable = true;
- namespacesTreeView.AppendColumn("Namespace", renderer, "text", namespaceColumnNumber);
-
- // Add a few blank rows.
- for (int i = 0; i < 20; ++i) {
- namespacesList.Append();
- }
- }
-
- void PrefixEdited(object source, EditedArgs e)
- {
- ListItemEdited(e, namespacesList, prefixColumnNumber);
- }
-
- void NamespaceEdited(object source, EditedArgs e)
- {
- ListItemEdited(e, namespacesList, namespaceColumnNumber);
- }
-
- /// <summary>
- /// Updates the list store item's text that has been
- /// edited by the user.
- /// </summary>
- void ListItemEdited(EditedArgs e, ListStore list, int column)
- {
- TreePath path = new TreePath(e.Path);
- TreeIter iter;
- if (list.GetIter(out iter, path)) {
- list.SetValue(iter, column, e.NewText);
- }
- }
-
- void XPathComboBoxEntryChanged(object sender, EventArgs e)
- {
- UpdateQueryButtonState();
- }
-
- bool IsXPathQueryEntered {
- get {
- return xpathComboBoxEntry.Entry.Text.Length > 0;
- }
- }
-
- bool IsXmlEditorViewContentActive {
- get {
- return viewProvider.View != null;
- }
- }
-
- void QueryButtonClicked(object sender, EventArgs e)
- {
- RunXPathQuery();
- }
-
- void RunXPathQuery()
- {
- XmlEditorViewContent view = viewProvider.View;
- if (view == null) {
- return;
- }
-
- try {
- fileName = view.FileName;
- // Clear previous XPath results.
- ClearResults();
- view.Select(0, 0);
- XmlEditorView xmlEditor = view.XmlEditorView;
- xmlEditor.RemoveXPathMarkers();
-
- // Run XPath query.
- XPathNodeMatch[] nodes = xmlEditor.SelectNodes(Query, GetNamespaces());
- if (nodes.Length > 0) {
- AddXPathResults(nodes);
- xmlEditor.AddXPathMarkers(nodes);
- } else {
- AddNoXPathResult();
- }
- AddXPathToHistory();
- } catch (XPathException xpathEx) {
- AddErrorResult(xpathEx);
- } catch (XmlException xmlEx) {
- AddErrorResult(xmlEx);
- } finally {
- notebook.CurrentPage = 0;
- }
- }
-
- void ClearResults()
- {
- resultsList.Clear();
- }
-
- void AddXPathResults(XPathNodeMatch[] nodes)
- {
- foreach (XPathNodeMatch node in nodes) {
- string line = String.Empty;
- if (node.HasLineInfo()) {
- int lineNumber = node.LineNumber + 1;
- line = lineNumber.ToString();
- }
- resultsList.AppendValues(node.DisplayValue, line, node);
- }
- }
-
- void AddNoXPathResult()
- {
- resultsList.AppendValues("XPath query found 0 items.");
- }
-
- void AddErrorResult(XmlException ex)
- {
- resultsList.AppendValues(ex.Message, ex.LineNumber.ToString(), ex);
- }
-
- void AddErrorResult(XPathException ex)
- {
- resultsList.AppendValues(String.Concat("XPath: ", ex.Message), String.Empty, ex);
- }
-
- void ResultsTreeViewRowActivated(object sender, EventArgs e)
- {
- JumpToResultLocation();
- }
- /// <summary>
- /// Switches focus to the location of the XPath query result.
- /// </summary>
- void JumpToResultLocation()
- {
- MoveCaretToResultLocation(MoveCaret.ByJumping);
- }
-
- /// <summary>
- /// Scrolls the text editor so the location of the XPath query results is visible.
- /// </summary>
- void ScrollToResultLocation()
- {
- MoveCaretToResultLocation(MoveCaret.ByScrolling);
- }
-
- void MoveCaretToResultLocation(MoveCaret moveCaret)
- {
- TreeIter iter;
- if (resultsTreeView.Selection.GetSelected(out iter)) {
- object tag = resultsList.GetValue(iter, xpathNodeMatchColumnNumber);
- XPathNodeMatch xpathNodeMatch = tag as XPathNodeMatch;
- XPathException xpathException = tag as XPathException;
- XmlException xmlException = tag as XmlException;
- if (xpathNodeMatch != null) {
- MoveCaretToXPathNodeMatch(moveCaret, xpathNodeMatch);
- } else if (xmlException != null) {
- MoveCaretToXmlException(moveCaret, xmlException);
- } else if (xpathException != null && moveCaret == MoveCaret.ByJumping) { xpathComboBoxEntry.Entry.HasFocus = true;
- }
- }
- }
-
- void MoveCaretToXPathNodeMatch(MoveCaret moveCaret, XPathNodeMatch node)
- {
- if (moveCaret == MoveCaret.ByJumping) {
- viewProvider.JumpTo(fileName, node.LineNumber, node.LinePosition);
- } else {
- ScrollTo(fileName, node.LineNumber, node.LinePosition, node.Value.Length);
- }
- }
-
- void MoveCaretToXmlException(MoveCaret moveCaret, XmlException ex)
- {
- int line = ex.LineNumber - 1;
- int column = ex.LinePosition - 1;
- if (moveCaret == MoveCaret.ByJumping) {
- viewProvider.JumpTo(fileName, line, column);
- } else {
- ScrollTo(fileName, line, column);
- }
- }
-
- void ScrollTo(string fileName, int line, int column, int length)
- {
- XmlEditorViewContent view = viewProvider.View;
- if (view != null && IsFileNameMatch(view)) {
- view.SetCaretTo(line, column);
- SourceBuffer buffer = (SourceBuffer)view.XmlEditorView.Buffer;
- if (length > 0 && line < buffer.LineCount) {
- TextIter lineIter = buffer.GetIterAtLine(line);
- int startOffset = lineIter.Offset + column;
- int endOffset = startOffset + length;
- view.Select(startOffset, endOffset);
- }
- }
- }
-
- /// <summary>
- /// Tests whether the specified view matches the filename the XPath /// results were found in.
- /// </summary>
- bool IsFileNameMatch(XmlEditorViewContent view)
- {
- return fileName == view.FileName;
- }
-
- /// <summary>
- /// Adds the text in the combo box to the combo box drop down list.
- /// </summary>
- void AddXPathToHistory()
- {
- string newXPath = Query;
- if (!XPathHistoryListContains(newXPath)) {
- TreeIter iter = xpathHistoryList.Prepend();
- xpathHistoryList.SetValue(iter, 0, newXPath);
- xpathHistoryListCount++;
- if (xpathHistoryListCount > xpathQueryHistoryLimit) {
- iter = GetLastIter(xpathHistoryList);
- xpathHistoryList.Remove(ref iter);
- }
- }
- }
-
- /// <summary>
- /// Brute force approach to get last list item.
- /// </summary>
- TreeIter GetLastIter(ListStore list)
- {
- TreeIter iter = TreeIter.Zero;
- TreeIter lastIter = iter;
- bool success = list.GetIterFirst(out iter);
- while (success) {
- lastIter = iter;
- success = list.IterNext(ref iter);
- }
- return lastIter;
- }
-
- /// <summary>
- /// Returns true if the xpath already exists.
- /// </summary>
- bool XPathHistoryListContains(string xpath)
- {
- TreeIter iter;
- bool success = xpathHistoryList.GetIterFirst(out iter);
- while (success) {
- string existingXPath = (string)xpathHistoryList.GetValue(iter, 0);
- if (xpath.Equals(existingXPath, StringComparison.InvariantCultureIgnoreCase)) {
- return true;
- }
- success = xpathHistoryList.IterNext(ref iter);
- }
- return false;
- }
- void ResultsTreeViewSelectionChanged(object sender, EventArgs e)
- {
- ScrollToResultLocation();
- }
-
- /// <summary>
- /// Gets the namespace prefix from the specified
- /// list store row.
- /// </summary>
- string GetNamespacePrefix(TreeIter iter)
- {
- string prefix = (string)namespacesList.GetValue(iter, prefixColumnNumber);
- if (prefix != null) {
- return prefix;
- }
- return String.Empty;
- }
-
- /// <summary>
- /// Gets the namespace uri from the specified
- /// list store row.
- /// </summary>
- string GetNamespaceUri(TreeIter iter)
- {
- string uri = (string)namespacesList.GetValue(iter, namespaceColumnNumber);
- if (uri != null) {
- return uri;
- }
- return String.Empty;
- }
-
- void ScrollTo(string fileName, int line, int column)
- {
- ScrollTo(fileName, line, column, 0);
- }
-
- void XPathComboBoxEntryActivated(object source, EventArgs e)
- {
- RunXPathQuery();
- }
- }
-}
-
-*/ \ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/EncodedStringWriter.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/EncodedStringWriter.cs
deleted file mode 100755
index 587306f9fb..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/EncodedStringWriter.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2005 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.IO;
-using System.Text;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// A string writer that allows you to specify the text encoding to
- /// be used when generating the string.
- /// </summary>
- /// <remarks>
- /// This class is used when generating xml strings using a writer and
- /// the encoding in the xml processing instruction needs to be changed.
- /// The xml encoding string will be the encoding specified in the constructor
- /// of this class (i.e. UTF-8, UTF-16)</remarks>
- public class EncodedStringWriter : StringWriter
- {
- Encoding encoding = Encoding.UTF8;
-
- /// <summary>
- /// Creates a new string writer that will generate a string with the
- /// specified encoding.
- /// </summary>
- /// <remarks>The encoding will be used when generating the
- /// xml encoding header (i.e. UTF-8, UTF-16).</remarks>
- public EncodedStringWriter(Encoding encoding)
- {
- this.encoding = encoding;
- }
-
- /// <summary>
- /// Gets the text encoding that will be used when generating
- /// the string.
- /// </summary>
- public override Encoding Encoding {
- get {
- return encoding;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenStylesheetCommand.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenStylesheetCommand.cs
deleted file mode 100644
index f4d507ae8d..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenStylesheetCommand.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2005-2006 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Ide.Gui;
-using System;
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// Opens the stylesheet associated with the active XML document.
- /// </summary>
- public class OpenStylesheetCommand : CommandHandler
- {
- protected override void Run()
- {
- XmlEditorViewContent view = XmlEditorService.GetActiveView();
- if (view != null) {
- if (view.StylesheetFileName != null) {
- try {
- IdeApp.Workbench.OpenDocument(view.StylesheetFileName);
- } catch (Exception ex) {
- MonoDevelop.Core.LoggingService.LogError ("Could not open document.", ex);
- MonoDevelop.Ide.MessageService.ShowError ("Could not open document.", ex.ToString());
- }
- }
- }
- }
-
- protected override void Update(CommandInfo info)
- {
- XmlEditorViewContent view = XmlEditorService.GetActiveView();
- if (view != null && view.StylesheetFileName != null) {
- info.Enabled = true;
- } else {
- info.Enabled = false;
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedNameCollection.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedNameCollection.cs
deleted file mode 100755
index c7ab7df061..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedNameCollection.cs
+++ /dev/null
@@ -1,288 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2005 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Collections;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// A collection that stores <see cref='QualifiedName'/> objects.
- /// </summary>
- [Serializable()]
- public class QualifiedNameCollection : CollectionBase {
-
- /// <summary>
- /// Initializes a new instance of <see cref='QualifiedNameCollection'/>.
- /// </summary>
- public QualifiedNameCollection()
- {
- }
-
- /// <summary>
- /// Initializes a new instance of <see cref='QualifiedNameCollection'/> based on another <see cref='QualifiedNameCollection'/>.
- /// </summary>
- /// <param name='val'>
- /// A <see cref='QualifiedNameCollection'/> from which the contents are copied
- /// </param>
- public QualifiedNameCollection(QualifiedNameCollection val)
- {
- this.AddRange(val);
- }
-
- /// <summary>
- /// Initializes a new instance of <see cref='QualifiedNameCollection'/> containing any array of <see cref='QualifiedName'/> objects.
- /// </summary>
- /// <param name='val'>
- /// A array of <see cref='QualifiedName'/> objects with which to intialize the collection
- /// </param>
- public QualifiedNameCollection(QualifiedName[] val)
- {
- this.AddRange(val);
- }
-
- /// <summary>
- /// Represents the entry at the specified index of the <see cref='QualifiedName'/>.
- /// </summary>
- /// <param name='index'>The zero-based index of the entry to locate in the collection.</param>
- /// <value>The entry at the specified index of the collection.</value>
- /// <exception cref='ArgumentOutOfRangeException'><paramref name='index'/> is outside the valid range of indexes for the collection.</exception>
- public QualifiedName this[int index] {
- get {
- return ((QualifiedName)(List[index]));
- }
- set {
- List[index] = value;
- }
- }
-
- /// <summary>
- /// Adds a <see cref='QualifiedName'/> with the specified value to the
- /// <see cref='QualifiedNameCollection'/>.
- /// </summary>
- /// <param name='val'>The <see cref='QualifiedName'/> to add.</param>
- /// <returns>The index at which the new element was inserted.</returns>
- /// <seealso cref='QualifiedNameCollection.AddRange(QualifiedName[])'/>
- public int Add(QualifiedName val)
- {
- return List.Add(val);
- }
-
- /// <summary>
- /// Copies the elements of an array to the end of the <see cref='QualifiedNameCollection'/>.
- /// </summary>
- /// <param name='val'>
- /// An array of type <see cref='QualifiedName'/> containing the objects to add to the collection.
- /// </param>
- /// <seealso cref='QualifiedNameCollection.Add'/>
- public void AddRange(QualifiedName[] val)
- {
- for (int i = 0; i < val.Length; i++) {
- this.Add(val[i]);
- }
- }
-
- /// <summary>
- /// Adds the contents of another <see cref='QualifiedNameCollection'/> to the end of the collection.
- /// </summary>
- /// <param name='val'>
- /// A <see cref='QualifiedNameCollection'/> containing the objects to add to the collection.
- /// </param>
- /// <seealso cref='QualifiedNameCollection.Add'/>
- public void AddRange(QualifiedNameCollection val)
- {
- for (int i = 0; i < val.Count; i++)
- {
- this.Add(val[i]);
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether the
- /// <see cref='QualifiedNameCollection'/> contains the specified <see cref='QualifiedName'/>.
- /// </summary>
- /// <param name='val'>The <see cref='QualifiedName'/> to locate.</param>
- /// <returns>
- /// <see langword='true'/> if the <see cref='QualifiedName'/> is contained in the collection;
- /// otherwise, <see langword='false'/>.
- /// </returns>
- /// <seealso cref='QualifiedNameCollection.IndexOf'/>
- public bool Contains(QualifiedName val)
- {
- return List.Contains(val);
- }
-
- /// <summary>
- /// Copies the <see cref='QualifiedNameCollection'/> values to a one-dimensional <see cref='Array'/> instance at the
- /// specified index.
- /// </summary>
- /// <param name='array'>The one-dimensional <see cref='Array'/> that is the destination of the values copied from <see cref='QualifiedNameCollection'/>.</param>
- /// <param name='index'>The index in <paramref name='array'/> where copying begins.</param>
- /// <exception cref='ArgumentException'>
- /// <para><paramref name='array'/> is multidimensional.</para>
- /// <para>-or-</para>
- /// <para>The number of elements in the <see cref='QualifiedNameCollection'/> is greater than
- /// the available space between <paramref name='arrayIndex'/> and the end of
- /// <paramref name='array'/>.</para>
- /// </exception>
- /// <exception cref='ArgumentNullException'><paramref name='array'/> is <see langword='null'/>. </exception>
- /// <exception cref='ArgumentOutOfRangeException'><paramref name='arrayIndex'/> is less than <paramref name='array'/>'s lowbound. </exception>
- /// <seealso cref='Array'/>
- public void CopyTo(QualifiedName[] array, int index)
- {
- List.CopyTo(array, index);
- }
-
- /// <summary>
- /// Returns the index of a <see cref='QualifiedName'/> in
- /// the <see cref='QualifiedNameCollection'/>.
- /// </summary>
- /// <param name='val'>The <see cref='QualifiedName'/> to locate.</param>
- /// <returns>
- /// The index of the <see cref='QualifiedName'/> of <paramref name='val'/> in the
- /// <see cref='QualifiedNameCollection'/>, if found; otherwise, -1.
- /// </returns>
- /// <seealso cref='QualifiedNameCollection.Contains'/>
- public int IndexOf(QualifiedName val)
- {
- return List.IndexOf(val);
- }
-
- /// <summary>
- /// Inserts a <see cref='QualifiedName'/> into the <see cref='QualifiedNameCollection'/> at the specified index.
- /// </summary>
- /// <param name='index'>The zero-based index where <paramref name='val'/> should be inserted.</param>
- /// <param name='val'>The <see cref='QualifiedName'/> to insert.</param>
- /// <seealso cref='QualifiedNameCollection.Add'/>
- public void Insert(int index, QualifiedName val)
- {
- List.Insert(index, val);
- }
-
- /// <summary>
- /// Returns an enumerator that can iterate through the <see cref='QualifiedNameCollection'/>.
- /// </summary>
- /// <seealso cref='IEnumerator'/>
- public new QualifiedNameEnumerator GetEnumerator()
- {
- return new QualifiedNameEnumerator(this);
- }
-
- /// <summary>
- /// Removes a specific <see cref='QualifiedName'/> from the <see cref='QualifiedNameCollection'/>.
- /// </summary>
- /// <param name='val'>The <see cref='QualifiedName'/> to remove from the <see cref='QualifiedNameCollection'/>.</param>
- /// <exception cref='ArgumentException'><paramref name='val'/> is not found in the Collection.</exception>
- public void Remove(QualifiedName val)
- {
- List.Remove(val);
- }
-
- /// <summary>
- /// Removes the last item in this collection.
- /// </summary>
- public void RemoveLast()
- {
- if (Count > 0) {
- RemoveAt(Count - 1);
- }
- }
-
- /// <summary>
- /// Removes the first item in the collection.
- /// </summary>
- public void RemoveFirst()
- {
- if (Count > 0) {
- RemoveAt(0);
- }
- }
-
- /// <summary>
- /// Gets the namespace prefix of the last item.
- /// </summary>
- public string LastPrefix {
- get {
- string prefix = String.Empty;
-
- if (Count > 0) {
- QualifiedName name = this[Count - 1];
- prefix = name.Prefix;
- }
-
- return prefix;
- }
- }
-
- /// <summary>
- /// Enumerator that can iterate through a QualifiedNameCollection.
- /// </summary>
- /// <seealso cref='IEnumerator'/>
- /// <seealso cref='QualifiedNameCollection'/>
- /// <seealso cref='QualifiedName'/>
- public class QualifiedNameEnumerator : IEnumerator
- {
- IEnumerator baseEnumerator;
- IEnumerable temp;
-
- /// <summary>
- /// Initializes a new instance of <see cref='QualifiedNameEnumerator'/>.
- /// </summary>
- public QualifiedNameEnumerator(QualifiedNameCollection mappings)
- {
- this.temp = ((IEnumerable)(mappings));
- this.baseEnumerator = temp.GetEnumerator();
- }
-
- /// <summary>
- /// Gets the current <see cref='QualifiedName'/> in the <seealso cref='QualifiedNameCollection'/>.
- /// </summary>
- public QualifiedName Current {
- get {
- return ((QualifiedName)(baseEnumerator.Current));
- }
- }
-
- object IEnumerator.Current {
- get {
- return baseEnumerator.Current;
- }
- }
-
- /// <summary>
- /// Advances the enumerator to the next <see cref='QualifiedName'/> of the <see cref='QualifiedNameCollection'/>.
- /// </summary>
- public bool MoveNext()
- {
- return baseEnumerator.MoveNext();
- }
-
- /// <summary>
- /// Sets the enumerator to its initial position, which is before the first element in the <see cref='QualifiedNameCollection'/>.
- /// </summary>
- public void Reset()
- {
- baseEnumerator.Reset();
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs
deleted file mode 100644
index 524797b8f7..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlCompletionListWindow.cs
+++ /dev/null
@@ -1,417 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2004-2007 MonoDevelop Team
-//
-
-using System;
-using System.Collections;
-
-using Gtk;
-using MonoDevelop.Projects;
-using MonoDevelop.Core;
-using MonoDevelop.Ide.CodeCompletion;
-
-namespace MonoDevelop.XmlEditor
-{
- public class XmlCompletionListWindow : XmlEditorListWindow, IListDataProvider
- {
- ICompletionWidget completionWidget;
- ICodeCompletionContext completionContext;
- ICompletionData[] completionData;
- DeclarationViewWindow declarationviewwindow = new DeclarationViewWindow ();
- ICompletionData currentData;
- ICompletionDataProvider provider;
- IMutableCompletionDataProvider mutableProvider;
- Widget parsingMessage;
- char firstChar;
- CompletionDelegate closedDelegate;
-
- const int declarationWindowMargin = 3;
- static DataComparer dataComparer = new DataComparer ();
-
- public static event EventHandler WindowClosed;
-
- class DataComparer: IComparer
- {
- public int Compare (object x, object y)
- {
- ICompletionData d1 = x as ICompletionData;
- ICompletionData d2 = y as ICompletionData;
- return String.Compare (d1.Text[0], d2.Text[0], true);
- }
- }
-
- static XmlCompletionListWindow wnd;
-
- static XmlCompletionListWindow ()
- {
- wnd = new XmlCompletionListWindow ();
- }
-
- internal XmlCompletionListWindow ()
- {
- SizeAllocated += new SizeAllocatedHandler (ListSizeChanged);
- }
-
- public static void ShowWindow (char firstChar, ICompletionDataProvider provider, ICompletionWidget completionWidget, ICodeCompletionContext completionContext, CompletionDelegate closedDelegate)
- {
- try {
- if (!wnd.ShowListWindow (firstChar, provider, completionWidget, completionContext, closedDelegate)) {
- provider.Dispose ();
- return;
- }
-
- // makes control-space in midle of words to work
- string text = wnd.completionWidget.GetCompletionText (completionContext);
- if (text.Length == 0) {
- text = provider.DefaultCompletionString;
- if (text != null && text.Length > 0)
- wnd.SelectEntry (text);
- return;
- }
-
- wnd.PartialWord = text;
- //if there is only one matching result we take it by default
- if (wnd.IsUniqueMatch && !wnd.IsChanging)
- {
- wnd.UpdateWord ();
- wnd.Hide ();
- }
-
- } catch (Exception ex) {
- Console.WriteLine (ex);
- }
- }
-
- bool ShowListWindow (char firstChar, ICompletionDataProvider provider, ICompletionWidget completionWidget, ICodeCompletionContext completionContext, CompletionDelegate closedDelegate)
- {
- if (mutableProvider != null) {
- mutableProvider.CompletionDataChanging -= OnCompletionDataChanging;
- mutableProvider.CompletionDataChanged -= OnCompletionDataChanged;
- }
-
- this.provider = provider;
- this.completionContext = completionContext;
- this.closedDelegate = closedDelegate;
- mutableProvider = provider as IMutableCompletionDataProvider;
-
- if (mutableProvider != null) {
- mutableProvider.CompletionDataChanging += OnCompletionDataChanging;
- mutableProvider.CompletionDataChanged += OnCompletionDataChanged;
-
- if (mutableProvider.IsChanging)
- OnCompletionDataChanging (null, null);
- }
-
- this.completionWidget = completionWidget;
- this.firstChar = firstChar;
-
- return FillList ();
- }
-
- bool FillList ()
- {
- completionData = provider.GenerateCompletionData (completionWidget, firstChar);
- if ((completionData == null || completionData.Length == 0) && !IsChanging)
- return false;
-
- this.Style = completionWidget.GtkStyle;
-
- if (completionData == null)
- completionData = new ICompletionData [0];
- else
- Array.Sort (completionData, dataComparer);
-
- DataProvider = this;
-
- int x = completionContext.TriggerXCoord;
- int y = completionContext.TriggerYCoord;
-
- int w, h;
- GetSize (out w, out h);
-
- if ((x + w) > Screen.Width)
- x = Screen.Width - w;
-
- if ((y + h) > Screen.Height)
- {
- y = y - completionContext.TriggerTextHeight - h;
- }
-
- Move (x, y);
-
- Show ();
-
- // HACK - make window bigger for namespace completion.
- // This should probably be handled by the ListWidget/ListWindow
- // itself.
- if (firstChar == '=') {
- this.Resize(this.List.WidthRequest + 220, this.List.HeightRequest);
- }
- return true;
- }
-
- public static void HideWindow ()
- {
- wnd.Hide ();
- }
-
- /// <summary>
- /// Modified this method so that punctuation characters
- /// will not close the completion window.
- /// </summary>
- public static bool ProcessKeyEvent (Gdk.EventKey e)
- {
- if (!wnd.Visible) return false;
-
- XmlEditorListWindow.KeyAction ka = wnd.ProcessKey (e);
-
- if ((ka & XmlEditorListWindow.KeyAction.CloseWindow) != 0) {
- if (e.Key == Gdk.Key.Escape || e.Key == Gdk.Key.BackSpace || !System.Char.IsPunctuation((char)e.KeyValue)) {
- wnd.Hide ();
- }
- }
-
- if ((ka & XmlEditorListWindow.KeyAction.Complete) != 0) {
- switch (e.Key) {
- case Gdk.Key.Tab:
- case Gdk.Key.Return:
- case Gdk.Key.ISO_Enter:
- case Gdk.Key.Key_3270_Enter:
- case Gdk.Key.KP_Enter:
- wnd.Hide ();
- wnd.UpdateWord ();
- break;
- default:
- break;
- }
- }
-
- if ((ka & XmlEditorListWindow.KeyAction.Ignore) != 0)
- return true;
-
- if ((ka & XmlEditorListWindow.KeyAction.Process) != 0) {
- if (e.Key == Gdk.Key.Left) {
- if (wnd.declarationviewwindow.Multiple) {
- wnd.declarationviewwindow.OverloadLeft ();
- wnd.UpdateDeclarationView ();
- }
- return true;
- } else if (e.Key == Gdk.Key.Right) {
- if (wnd.declarationviewwindow.Multiple) {
- wnd.declarationviewwindow.OverloadRight ();
- wnd.UpdateDeclarationView ();
- }
- return true;
- }
- }
-
- return false;
- }
-
- /// <summary>
- /// HACK - Insert the completion string not the text displayed in the
- /// completion list and move the cursor between the attribute
- /// quotes when an attribute is inserted.
- /// This should really be done using methods in the
- /// ICompletionWidget class. Here I am cheating and using
- /// the XmlEditorView and XmlCompletionData directly (The
- /// XmlCompletionData.InsertAction is not used in MonoDevelop).
- /// </summary>
-// void UpdateWord ()
-// {
-// XmlCompletionData data = (XmlCompletionData)completionData[List.Selection];
-//
-// string completeWord = data.CompletionString;
-// completionWidget.SetCompletionText(completionContext, wnd.PartialWord, completeWord);
-// if (data.XmlCompletionDataType == XmlCompletionData.DataType.XmlAttribute) {
-// // Position cursor inside attribute value string.
-// XmlEditorView view = (XmlEditorView)completionWidget;
-// TextIter iter = view.Buffer.GetIterAtMark(view.Buffer.InsertMark);
-// iter.Offset--;
-// view.Buffer.PlaceCursor(iter);
-// }
-// //completionWidget.SetCompletionText(wnd.PartialWord, wnd.CompleteWord);
-// }
-
- void UpdateWord ()
- {
- string word = wnd.CompleteWord;
- if (word != null) {
- if (wnd.Selection != -1) {
- IActionCompletionData ac = completionData [wnd.Selection] as IActionCompletionData;
- if (ac != null) {
- ac.InsertAction (completionWidget, completionContext);
- return;
- }
- }
- completionWidget.SetCompletionText (completionContext, wnd.PartialWord, word);
- }
- }
-
- public new void Hide ()
- {
- base.Hide ();
- declarationviewwindow.HideAll ();
- if (provider != null) {
- provider.Dispose ();
- provider = null;
- }
- if (closedDelegate != null) {
- closedDelegate ();
- closedDelegate = null;
- }
- }
-
- protected override bool IsValidCompletionChar (char c)
- {
- return XmlParser.IsXmlNameChar(c);
- }
-
- void ListSizeChanged (object obj, SizeAllocatedArgs args)
- {
- UpdateDeclarationView ();
- }
-
- protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
- {
- bool ret = base.OnButtonPressEvent (evnt);
- if (evnt.Button == 1 && evnt.Type == Gdk.EventType.TwoButtonPress) {
- wnd.UpdateWord ();
- wnd.Hide ();
- }
- return ret;
- }
-
- protected override void OnSelectionChanged ()
- {
- base.OnSelectionChanged ();
- UpdateDeclarationView ();
- }
-
- void UpdateDeclarationView ()
- {
- if (completionData == null || List.Selection >= completionData.Length || List.Selection == -1)
- return;
-
- if (List.GdkWindow == null) return;
- Gdk.Rectangle rect = List.GetRowArea (List.Selection);
- int listpos_x = 0, listpos_y = 0;
- while (listpos_x == 0 || listpos_y == 0)
- GetPosition (out listpos_x, out listpos_y);
- int vert = listpos_y + rect.Y;
-
- int lvWidth = 0, lvHeight = 0;
- while (lvWidth == 0)
- this.GdkWindow.GetSize (out lvWidth, out lvHeight);
- if (vert >= listpos_y + lvHeight - 2) {
- vert = listpos_y + lvHeight - rect.Height;
- } else if (vert < listpos_y) {
- vert = listpos_y;
- }
-
- ICompletionData data = completionData[List.Selection];
- ICompletionDataWithMarkup datawMarkup = data as ICompletionDataWithMarkup;
- XmlCompletionData ccdata = (XmlCompletionData) data;
-
- string descMarkup = datawMarkup != null ? datawMarkup.DescriptionPango : data.Description;
-
- declarationviewwindow.Hide ();
-
- if (data != currentData) {
- declarationviewwindow.Clear ();
- declarationviewwindow.Realize ();
-
- declarationviewwindow.AddOverload (descMarkup);
-
- //foreach (CodeCompletionData odata in ccdata.GetOverloads ()) {
- // ICompletionDataWithMarkup odatawMarkup = odata as ICompletionDataWithMarkup;
- // declarationviewwindow.AddOverload (odatawMarkup == null ? odata.Description : odatawMarkup.DescriptionPango);
- //}
- }
-
- currentData = data;
-
- if (declarationviewwindow.DescriptionMarkup.Length == 0)
- return;
-
- int dvwWidth, dvwHeight;
-
- declarationviewwindow.Move (this.Screen.Width+1, vert);
-
- declarationviewwindow.SetFixedWidth (-1);
- declarationviewwindow.ReshowWithInitialSize ();
- declarationviewwindow.ShowAll ();
- //declarationviewwindow.Multiple = (ccdata.Overloads != 0);
-
- declarationviewwindow.GdkWindow.GetSize (out dvwWidth, out dvwHeight);
-
- int horiz = listpos_x + lvWidth + declarationWindowMargin;
- if (this.Screen.Width - horiz >= lvWidth) {
- if (this.Screen.Width - horiz < dvwWidth)
- declarationviewwindow.SetFixedWidth (this.Screen.Width - horiz);
- } else {
- if (listpos_x - dvwWidth - declarationWindowMargin < 0) {
- declarationviewwindow.SetFixedWidth (listpos_x - declarationWindowMargin);
- dvwWidth = declarationviewwindow.SizeRequest ().Width;
- }
- horiz = listpos_x - dvwWidth - declarationWindowMargin;
- }
-
- declarationviewwindow.Move (horiz, vert);
- }
-
- public int ItemCount
- {
- get { return completionData.Length; }
- }
-
- public string GetText (int n)
- {
- return completionData[n].Text[0];
- }
-
- public string GetCompletionText (int n)
- {
- return completionData[n].CompletionString;
- }
-
- public Gdk.Pixbuf GetIcon (int n)
- {
- return RenderIcon (completionData[n].Image, Gtk.IconSize.Menu, "");
- }
-
- internal bool IsChanging {
- get { return mutableProvider != null && mutableProvider.IsChanging; }
- }
-
- void OnCompletionDataChanging (object s, EventArgs args)
- {
- if (parsingMessage == null) {
- VBox box = new VBox ();
- box.PackStart (new Gtk.HSeparator (), false, false, 0);
- HBox hbox = new HBox ();
- hbox.BorderWidth = 3;
- hbox.PackStart (new Gtk.Image ("md-parser", Gtk.IconSize.Menu), false, false, 0);
- Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Gathering class information..."));
- lab.Xalign = 0;
- hbox.PackStart (lab, true, true, 3);
- hbox.ShowAll ();
- parsingMessage = hbox;
- }
- wnd.ShowFooter (parsingMessage);
- }
-
- void OnCompletionDataChanged (object s, EventArgs args)
- {
- wnd.HideFooter ();
- if (Visible) {
- Reset ();
- FillList ();
- }
- }
- }
-
- public delegate void CompletionDelegate ();
-} \ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorCommandBase.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorCommandBase.cs
deleted file mode 100644
index 31f2387f74..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorCommandBase.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Core;
-using MonoDevelop.Ide;
-using MonoDevelop.Ide.Gui;
-using MonoDevelop.Ide.Tasks;
-using System;
-
-namespace ICSharpCode.XmlEditor
-{
- public class XmlEditorCommandBase : CommandHandler
- {
-
-
-
-
-
-
-
-
-
-
- }
-} \ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorView.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorView.cs
deleted file mode 100644
index 1356c591af..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorView.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006-2007 Matthew Ward
-// Copyright (C) 2004-2007 MonoDevelop Team
-//
-
-using Gdk;
-using Gtk;
-using GtkSourceView;
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Ide.Commands;
-using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.Ide.Gui.Search;
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.SourceEditor;
-using MonoDevelop.SourceEditor.Gui.Dialogs;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Schema;
-using System.Xml.XPath;
-
-namespace MonoDevelop.XmlEditor
-{
- public class XmlEditorView : SourceView, ICompletionWidget, IClipboardHandler
- {
- XmlSchemaCompletionDataCollection schemaCompletionDataItems = new XmlSchemaCompletionDataCollection();
- XmlSchemaCompletionData defaultSchemaCompletionData = null;
- string defaultNamespacePrefix = String.Empty;
- bool autoCompleteElements = true;
- bool showSchemaAnnotation = true;
- SourceBuffer buffer;
- Gtk.Clipboard clipboard = Gtk.Clipboard.Get(Gdk.Atom.Intern("CLIPBOARD", false));
- XPathNodeTextMarker xpathNodeTextMarker;
- event EventHandler completionContextChanged;
- ICodeCompletionContext completionContext;
- XmlEditorViewContent viewContent;
-
- public XmlEditorView (XmlEditorViewContent viewContent)
- {
- this.viewContent = viewContent;
- InitSyntaxHighlighting();
- xpathNodeTextMarker = new XPathNodeTextMarker(buffer);
- Buffer.Changed += BufferChanged;
- }
-
- /// <summary>
- /// Gets the schemas that the xml editor will use.
- /// </summary>
- /// <remarks>
- /// Probably should NOT have a 'set' property, but allowing one
- /// allows us to share the completion data amongst multiple
- /// xml editor controls.
- /// </remarks>
- public XmlSchemaCompletionDataCollection SchemaCompletionDataItems {
- get {
- return schemaCompletionDataItems;
- }
- set {
- schemaCompletionDataItems = value;
- }
- }
-
-#region XPath stuff
-
- /// <summary>
- /// Finds the xml nodes that match the specified xpath.
- /// </summary>
- /// <returns>An array of XPathNodeMatch items. These include line number
- /// and line position information aswell as the node found.</returns>
- public static XPathNodeMatch[] SelectNodes(string xml, string xpath, ReadOnlyCollection<XmlNamespace> namespaces)
- {
- XmlTextReader xmlReader = new XmlTextReader(new StringReader(xml));
- xmlReader.XmlResolver = null;
- XPathDocument doc = new XPathDocument(xmlReader);
- XPathNavigator navigator = doc.CreateNavigator();
-
- // Add namespaces.
- XmlNamespaceManager namespaceManager = new XmlNamespaceManager(navigator.NameTable);
- foreach (XmlNamespace xmlNamespace in namespaces) {
- namespaceManager.AddNamespace(xmlNamespace.Prefix, xmlNamespace.Uri);
- }
-
- // Run the xpath query.
- XPathNodeIterator iterator = navigator.Select(xpath, namespaceManager);
-
- List<XPathNodeMatch> nodes = new List<XPathNodeMatch>();
- while (iterator.MoveNext()) {
- nodes.Add(new XPathNodeMatch(iterator.Current));
- }
- return nodes.ToArray();
- }
-
- /// <summary>
- /// Finds the xml nodes that match the specified xpath.
- /// </summary>
- /// <returns>An array of XPathNodeMatch items. These include line number
- /// and line position information aswell as the node found.</returns>
- public static XPathNodeMatch[] SelectNodes(string xml, string xpath)
- {
- List<XmlNamespace> list = new List<XmlNamespace>();
- return SelectNodes(xml, xpath, new ReadOnlyCollection<XmlNamespace>(list));
- }
-
- /// <summary>
- /// Finds the xml nodes in the current document that match the specified xpath.
- /// </summary>
- /// <returns>An array of XPathNodeMatch items. These include line number
- /// and line position information aswell as the node found.</returns>
- public XPathNodeMatch[] SelectNodes(string xpath, ReadOnlyCollection<XmlNamespace> namespaces)
- {
- return SelectNodes(Buffer.Text, xpath, namespaces);
- }
-
- /// <summary>
- /// Highlights the xpath matches in the xml.
- /// </summary>
- public void AddXPathMarkers(XPathNodeMatch[] nodes)
- {
- xpathNodeTextMarker.AddMarkers(nodes);
- }
-
- /// <summary>
- /// Removes the xpath match highlighting.
- /// </summary>
- public void RemoveXPathMarkers()
- {
- xpathNodeTextMarker.RemoveMarkers();
- }
-#endregion
-
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorViewContent.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorViewContent.cs
deleted file mode 100644
index 6b403f1920..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorViewContent.cs
+++ /dev/null
@@ -1,614 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2007 Matthew Ward
-// Copyright (C) 2004-2007 MonoDevelop Team
-//
-
-using Gnome.Vfs;
-using Gtk;
-using GtkSourceView;
-using MonoDevelop.Core;
-using MonoDevelop.Ide.Gui;
-using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.Ide.Gui.Search;
-using MonoDevelop.Projects.Text;
-using System;
-using System.IO;
-
-namespace MonoDevelop.XmlEditor
-{
- public class XmlEditorViewContent : AbstractViewContent, IEditableTextBuffer, IDocumentInformation, IClipboardHandler
- {
- XmlEditorWindow xmlEditorWindow;
- SourceBuffer buffer;
- XmlEditorView view;
- const string TextXmlMimeType = "text/xml";
- const string ApplicationXmlMimeType = "application/xml";
- string fileName = String.Empty;
- EventHandler<PropertyChangedEventArgs> propertyChangedHandler;
- string stylesheetFileName;
-
- public XmlEditorViewContent()
- {
- xmlEditorWindow = new XmlEditorWindow(this);
- view = xmlEditorWindow.View;
- buffer = (SourceBuffer)view.Buffer;
- buffer.Changed += BufferChanged;
-
- view.SchemaCompletionDataItems = XmlSchemaManager.SchemaCompletionDataItems;
- SetInitialValues();
-
- // Watch for changes to the source editor properties.
- propertyChangedHandler = (EventHandler<PropertyChangedEventArgs>)DispatchService.GuiDispatch(new EventHandler<PropertyChangedEventArgs>(SourceEditorPropertyChanged));
- TextEditorProperties.Properties.PropertyChanged += propertyChangedHandler;
-
- buffer.ModifiedChanged += new EventHandler (OnModifiedChanged);
- XmlEditorAddInOptions.PropertyChanged += new EventHandler<PropertyChangedEventArgs>(XmlEditorPropertyChanged);
-
- XmlSchemaManager.UserSchemaAdded += new EventHandler(UserSchemaAdded);
- XmlSchemaManager.UserSchemaRemoved += new EventHandler(UserSchemaRemoved);
-
- xmlEditorWindow.ShowAll();
- }
-
- public static bool IsMimeTypeHandled(string mimeType)
- {
- Console.WriteLine("mimeType: " + mimeType);
- if (mimeType != null) {
- if (mimeType == TextXmlMimeType || mimeType == ApplicationXmlMimeType) {
- return true;
- }
- }
- return false;
- }
-
- /// <summary>
- /// Determines whether the file can be displayed by
- /// the xml editor.
- /// </summary>
- public static bool IsFileNameHandled(string fileName)
- {
- if (fileName == null) {
- return false;
- }
-
- string vfsname = fileName;
- vfsname = vfsname.Replace ("%", "%25");
- vfsname = vfsname.Replace ("#", "%23");
- vfsname = vfsname.Replace ("?", "%3F");
- string mimeType = MimeType.GetMimeTypeForUri (vfsname);
- if (IsMimeTypeHandled(mimeType)) {
- return true;
- }
-
- return XmlFileExtensions.IsXmlFileExtension(Path.GetExtension(fileName));
- }
-
- public XmlEditorView XmlEditorView {
- get {
- return view;
- }
- }
-
- public override Gtk.Widget Control {
- get {
- return xmlEditorWindow;
- }
- }
-
- public override bool IsDirty {
- get {
- return base.IsDirty;
- }
- set {
- buffer.Modified = value;
- }
- }
-
- public override string UntitledName {
- get {
- return base.UntitledName;
- }
- set {
- base.UntitledName = value;
- fileName = value;
- if (value != null) {
- SetDefaultSchema(value);
- }
- }
- }
-
- public override string TabPageLabel {
- get {
- return "XML";
- }
- }
-
- public string FileName {
- get {
- return fileName;
- }
- }
-
- /// <summary>
- /// Gets or sets the stylesheet associated with this xml file.
- /// </summary>
- public string StylesheetFileName {
- get {
- return stylesheetFileName;
- }
- set {
- stylesheetFileName = value;
- }
- }
-
- public bool IsSchema {
- get {
- if (fileName != null) {
- string extension = Path.GetExtension(fileName);
- if (extension != null) {
- return String.Compare(extension, ".xsd", true) == 0;
- }
- }
- return false;
- }
- }
-
- public override void Load(string fileName)
- {
- using (StreamReader reader = System.IO.File.OpenText(fileName)) {
- LoadContent(reader.ReadToEnd());
- }
- ContentName = fileName;
- this.fileName = fileName;
- SetDefaultSchema(ContentName);
- }
-
- public void LoadContent(string content)
- {
- buffer.Text = content;
- buffer.Modified = false;
- }
-
- public override void Dispose()
- {
- XmlEditorAddInOptions.PropertyChanged -= new EventHandler<PropertyChangedEventArgs>(XmlEditorPropertyChanged);
- XmlSchemaManager.UserSchemaAdded -= new EventHandler(UserSchemaAdded);
- XmlSchemaManager.UserSchemaRemoved -= new EventHandler(UserSchemaRemoved);
- TextEditorProperties.Properties.PropertyChanged -= propertyChangedHandler;
- xmlEditorWindow.Dispose();
- }
-
- public override void Save(string fileName)
- {
- using (TextWriter s = new StreamWriter (fileName, true)) {
- }
-
- using (TextWriter s = new StreamWriter (fileName, false)) {
- s.Write (buffer.Text);
- }
- ContentName = fileName;
- xmlEditorWindow.View.Buffer.Modified = false;
- }
-
- /// <summary>
- /// Code taken from SourceEditorDisplayBinding.
- /// </summary>
- void SetInitialValues()
- {
- view.ShowSchemaAnnotation = XmlEditorAddInOptions.ShowSchemaAnnotation;
- view.AutoCompleteElements = XmlEditorAddInOptions.AutoCompleteElements;
-
- view.ModifyFont (TextEditorProperties.Font);
- view.ShowLineNumbers = TextEditorProperties.ShowLineNumbers;
- ((SourceBuffer)view.Buffer).HighlightMatchingBrackets = TextEditorProperties.ShowMatchingBracket;
- view.ShowRightMargin = TextEditorProperties.ShowVerticalRuler;
- view.InsertSpacesInsteadOfTabs = TextEditorProperties.ConvertTabsToSpaces;
- view.AutoIndent = (TextEditorProperties.IndentStyle == IndentStyle.Auto);
- view.HighlightCurrentLine = TextEditorProperties.HighlightCurrentLine;
- ((SourceBuffer)view.Buffer).HighlightSyntax = TextEditorProperties.SyntaxHighlight;
-
- if (TextEditorProperties.TabIndent > -1)
- view.TabWidth = (uint) TextEditorProperties.TabIndent;
- else
- view.TabWidth = (uint) 4;
-
- if (TextEditorProperties.VerticalRulerRow > -1)
- view.RightMarginPosition = (uint) TextEditorProperties.VerticalRulerRow;
- else
- view.RightMarginPosition = 80;
-
- UpdateStyleScheme ();
- }
-
- void OnModifiedChanged (object o, EventArgs e)
- {
- base.IsDirty = view.Buffer.Modified;
- }
-
- void UpdateStyleScheme ()
- {
- string id = TextEditorProperties.Properties.Get<string> ("GtkSourceViewStyleScheme", "classic");
- SourceStyleScheme scheme = GtkSourceView.SourceStyleSchemeManager.Default.GetScheme (id);
- if (scheme == null)
- MonoDevelop.Core.LoggingService.LogWarning ("GTKSourceView style scheme '" + id + "' is missing.");
- else
- ((SourceBuffer)view.Buffer).StyleScheme = scheme;
- }
-
- void XmlEditorPropertyChanged(object o, PropertyChangedEventArgs e)
- {
- switch (e.Key) {
- case "AutoCompleteElements":
- view.AutoCompleteElements = XmlEditorAddInOptions.AutoCompleteElements;
- break;
- case "ShowSchemaAnnotation":
- view.ShowSchemaAnnotation = XmlEditorAddInOptions.ShowSchemaAnnotation;
- break;
- default:
- string extension = Path.GetExtension(fileName).ToLower();
- if (e.Key == extension) {
- SetDefaultSchema(extension);
- } else {
- Console.WriteLine("XmlEditor: Unhandled property change: " + e.Key);
- }
- break;
- }
- }
-
- void SourceEditorPropertyChanged(object o, PropertyChangedEventArgs e)
- {
- switch (e.Key) {
- case "DefaultFont":
- view.ModifyFont(TextEditorProperties.Font);
- break;
- case "ShowLineNumbers":
- view.ShowLineNumbers = TextEditorProperties.ShowLineNumbers;
- break;
- case "ConvertTabsToSpaces":
- view.InsertSpacesInsteadOfTabs = TextEditorProperties.ConvertTabsToSpaces;
- break;
- case "ShowBracketHighlight":
- ((SourceBuffer)view.Buffer).HighlightMatchingBrackets = TextEditorProperties.ShowMatchingBracket;
- break;
- case "ShowVRuler":
- view.ShowRightMargin = TextEditorProperties.ShowVerticalRuler;
- break;
- case "VRulerRow":
- if (TextEditorProperties.VerticalRulerRow > -1)
- view.RightMarginPosition = (uint) TextEditorProperties.VerticalRulerRow;
- else
- view.RightMarginPosition = 80;
- break;
- case "TabIndent":
- if (TextEditorProperties.TabIndent > -1)
- view.TabWidth = (uint) TextEditorProperties.TabIndent;
- else
- view.TabWidth = (uint) 4;
- break;
- case "IndentStyle":
- view.AutoIndent = (TextEditorProperties.IndentStyle == IndentStyle.Auto);
- break;
- case "HighlightCurrentLine":
- view.HighlightCurrentLine = TextEditorProperties.HighlightCurrentLine;
- break;
- case "GtkSourceViewStyleScheme":
- UpdateStyleScheme ();
- break;
- default:
- MonoDevelop.Core.LoggingService.LogWarning ("XmlEditor: Unhandled source editor property change: " + e.Key);
- break;
- }
- }
-
- #region IClipboardHandler
- public bool EnableCut {
- get {
- return ((IClipboardHandler)view).EnableCut;
- }
- }
- public bool EnableCopy {
- get {
- return ((IClipboardHandler)view).EnableCopy;
- }
- }
- public bool EnablePaste {
- get {
- return ((IClipboardHandler)view).EnablePaste;
- }
- }
- public bool EnableDelete {
- get {
- return ((IClipboardHandler)view).EnableDelete;
- }
- }
- public bool EnableSelectAll {
- get {
- return ((IClipboardHandler)view).EnableSelectAll;
- }
- }
-
- public void Cut ()
- {
- ((IClipboardHandler)view).Cut ();
- }
-
- public void Copy ()
- {
- ((IClipboardHandler)view).Copy ();
- }
-
- public void Paste ()
- {
- ((IClipboardHandler)view).Paste ();
- }
-
- public void Delete ()
- {
- ((IClipboardHandler)view).Delete ();
- }
-
- public void SelectAll ()
- {
- ((IClipboardHandler)view).SelectAll ();
- }
- #endregion
-
- /// <summary>
- /// Sets the default schema and namespace prefix that the xml editor will use.
- /// </summary>
- void SetDefaultSchema(string fileName)
- {
- if (fileName == null) {
- return;
- }
- string extension = Path.GetExtension(fileName).ToLower();
- view.DefaultSchemaCompletionData = XmlSchemaManager.GetSchemaCompletionData(extension);
- view.DefaultNamespacePrefix = XmlSchemaManager.GetNamespacePrefix(extension);
- }
-
- /// <summary>
- /// Updates the default schema association since the schema
- /// may have been added.
- /// </summary>
- void UserSchemaAdded(object source, EventArgs e)
- {
- SetDefaultSchema(ContentName);
- }
-
- /// <summary>
- /// Updates the default schema association since the schema
- /// may have been removed.
- /// </summary>
- void UserSchemaRemoved(object source, EventArgs e)
- {
- SetDefaultSchema(ContentName);
- }
-
- #region IEditableTextBuffer
-
- public event EventHandler<TextChangedEventArgs> TextChanged;
-
- public void BeginAtomicUndo ()
- {
- //Buffer.BeginUserAction ();
- }
-
- public void EndAtomicUndo ()
- {
- //Buffer.EndUserAction ();
- }
-
- public string Name {
- get {
- return ContentName;
- }
- }
-
- public string Text {
- get {
-// if (needsUpdate) {
-// cachedText = se.Buffer.Text;
-// }
- return buffer.Text;
- }
- set {
- try {
- buffer.BeginUserAction();
- buffer.Text = value;
- } finally {
- buffer.EndUserAction();
- }
- }
- }
-
- public void Undo ()
- {
- view.UndoChange();
- }
-
- public bool EnableUndo {
- get { return buffer.CanUndo; }
- }
-
- public bool EnableRedo {
- get { return buffer.CanRedo; }
- }
-
- public void Redo ()
- {
- view.RedoChange();
- }
-
- public string SelectedText {
- get {
- return view.GetSelectedText();
- }
- set {
- int offset = view.GetLowerSelectionBounds ();
- ((IClipboardHandler)view).Delete ();
- TextIter iter = buffer.GetIterAtOffset (offset);
- buffer.Insert (ref iter, value);
- buffer.PlaceCursor(iter);
- view.ScrollMarkOnscreen (buffer.InsertMark);
- }
- }
-
- public int GetPositionFromLineColumn (int line, int column)
- {
- Console.WriteLine("GetPositionFromLineColumn");
- return -1;
- }
-
- public void InsertText (int position, string text)
- {
- Console.WriteLine("InsertText");
- }
-
- public void DeleteText (int pos, int length)
- {
- TextIter start = buffer.GetIterAtOffset (pos);
- TextIter end = buffer.GetIterAtOffset (pos + length);
- buffer.Delete (ref start, ref end);
- }
-
- public int CursorPosition {
- get {
- return buffer.GetIterAtMark(buffer.InsertMark).Offset;
- }
- set {
- buffer.MoveMark (buffer.InsertMark, buffer.GetIterAtOffset (value));
- }
- }
-
- public void GetLineColumnFromPosition (int position, out int line, out int column)
- {
- Console.WriteLine("GetLineColumnFromPosition");
- column = -1;
- line = -1;
- }
-
- public void ShowPosition (int position)
- {
- view.ScrollToIter (buffer.GetIterAtOffset (position), 0.3, false, 0, 0);
- }
-
- public char GetCharAt (int offset)
- {
- if (offset < 0)
- offset = 0;
- TextIter iter = buffer.GetIterAtOffset (offset);
- if (iter.Equals (TextIter.Zero))
- return ' ';
- if (iter.Char == null || iter.Char.Length == 0)
- return ' ';
- return iter.Char[0];
- }
-
- public string GetText (int startPosition, int endPosition)
- {
- return buffer.GetText (buffer.GetIterAtOffset (startPosition), buffer.GetIterAtOffset (endPosition), true);
- }
-
- int ITextFile.Length {
- get {
- Console.WriteLine("ITextFile.Length");
- return 0;
- }
- }
-
- public void Select (int startPosition, int endPosition)
- {
- buffer.MoveMark (buffer.InsertMark, buffer.GetIterAtOffset (startPosition));
- buffer.MoveMark (buffer.SelectionBound, buffer.GetIterAtOffset (endPosition));
- }
-
- public int SelectionStartPosition {
- get {
- TextIter p1 = buffer.GetIterAtMark (buffer.InsertMark);
- TextIter p2 = buffer.GetIterAtMark (buffer.SelectionBound);
- if (p1.Offset < p2.Offset) return p1.Offset;
- else return p2.Offset;
- }
- }
-
- public int SelectionEndPosition {
- get {
- TextIter p1 = buffer.GetIterAtMark (buffer.InsertMark);
- TextIter p2 = buffer.GetIterAtMark (buffer.SelectionBound);
- if (p1.Offset > p2.Offset) return p1.Offset;
- else return p2.Offset;
- }
- }
-
- #endregion
-
- #region IDocumentInformation
-
- string IDocumentInformation.FileName {
- get { return ContentName != null ? ContentName : UntitledName; }
- }
-
- public ITextIterator GetTextIterator ()
- {
- int startOffset = buffer.GetIterAtMark (buffer.InsertMark).Offset;
- return new SourceViewTextIterator (this, view, startOffset);
- }
-
- public string GetLineTextAtOffset (int offset)
- {
- TextIter resultIter = buffer.GetIterAtOffset (offset);
- TextIter start_line = resultIter, end_line = resultIter;
- start_line.LineOffset = 0;
- end_line.ForwardToLineEnd ();
- return view.GetText (start_line.Offset, end_line.Offset - start_line.Offset);
- }
-
- #endregion
-
- #region IPositionable
-
- public void SetCaretTo (int line, int column)
- {
- // NOTE: 1 based!
- TextIter itr = view.Buffer.GetIterAtLine (line - 1);
- itr.LineOffset = column - 1;
-
- view.Buffer.PlaceCursor (itr);
- view.ScrollToMark (view.Buffer.InsertMark, 0.3, false, 0, 0);
- GLib.Timeout.Add (20, new GLib.TimeoutHandler (changeFocus));
- }
-
- protected virtual void OnCaretPositionSet (EventArgs args)
- {
- if (CaretPositionSet != null)
- CaretPositionSet (this, args);
- }
- public event EventHandler CaretPositionSet;
-
- //This code exists to workaround a gtk+ 2.4 regression/bug
- //
- //The gtk+ 2.4 treeview steals focus with double clicked
- //row_activated.
- // http://bugzilla.gnome.org/show_bug.cgi?id=138458
- bool changeFocus ()
- {
- if (!view.IsRealized)
- return false;
- view.GrabFocus ();
- view.ScrollToMark (view.Buffer.InsertMark, 0.3, false, 0, 0);
- OnCaretPositionSet (EventArgs.Empty);
- return false;
- }
-
- #endregion
-
- void BufferChanged(object source, EventArgs e)
- {
- if (TextChanged != null) {
- TextChanged(this, new TextChangedEventArgs(0, 0));
- }
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlNamespace.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlNamespace.cs
deleted file mode 100644
index cc0023757e..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlNamespace.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2006 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// A namespace Uri and a prefix.
- /// </summary>
- public class XmlNamespace
- {
- string prefix = String.Empty;
- string uri = String.Empty;
-
- const string prefixToStringStart = "Prefix [";
- const string uriToStringMiddle = "] Uri [";
-
- public XmlNamespace(string prefix, string uri)
- {
- this.prefix = prefix;
- this.uri = uri;
- }
-
- public string Prefix {
- get {
- return prefix;
- }
- }
-
- public string Uri {
- get {
- return uri;
- }
- }
-
- public override string ToString()
- {
- return String.Concat(prefixToStringStart, prefix, uriToStringMiddle, uri, "]");
- }
-
- /// <summary>
- /// Creates an XmlNamespace instance from the given string that is in the
- /// format returned by ToString.
- /// </summary>
- public static XmlNamespace FromString(string s)
- {
- int prefixIndex = s.IndexOf(prefixToStringStart);
- if (prefixIndex >= 0) {
- prefixIndex += prefixToStringStart.Length;
- int uriIndex = s.IndexOf(uriToStringMiddle, prefixIndex);
- if (uriIndex >= 0) {
- string prefix = s.Substring(prefixIndex, uriIndex - prefixIndex);
- uriIndex += uriToStringMiddle.Length;
- string uri = s.Substring(uriIndex, s.Length - (uriIndex + 1));
- return new XmlNamespace(prefix, uri);
- }
- }
- return new XmlNamespace(String.Empty, String.Empty);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlParser.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlParser.cs
deleted file mode 100755
index d5081be66a..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlParser.cs
+++ /dev/null
@@ -1,704 +0,0 @@
-//
-// MonoDevelop XML Editor
-//
-// Copyright (C) 2005, 2006 Matthew Ward
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections;
-using System.IO;
-using System.Net;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Xml;
-
-namespace MonoDevelop.XmlEditor
-{
- /// <summary>
- /// Utility class that contains xml parsing routines used to determine
- /// the currently selected element so we can provide intellisense.
- /// </summary>
- /// <remarks>
- /// All of the routines return <see cref="XmlElementPath"/> objects
- /// since we are interested in the complete path or tree to the
- /// currently active element.
- /// </remarks>
- public class XmlParser
- {
- /// <summary>
- /// Helper class. Holds the namespace URI and the prefix currently
- /// in use for this namespace.
- /// </summary>
- class NamespaceURI
- {
- string namespaceURI = String.Empty;
- string prefix = String.Empty;
-
- public NamespaceURI()
- {
- }
-
- public NamespaceURI(string namespaceURI, string prefix)
- {
- this.namespaceURI = namespaceURI;
- this.prefix = prefix;
- }
-
- public string Namespace {
- get {
- return namespaceURI;
- }
- set {
- namespaceURI = value;
- }
- }
-
- public string Prefix {
- get {
- return prefix;
- }
- set {
- prefix = value;
- if (prefix == null) {
- prefix = String.Empty;
- }
- }
- }
- }
-
- XmlParser()
- {
- }
-
- /// <summary>
- /// Gets path of the xml element start tag that the specified
- /// <paramref name="index"/> is currently inside.
- /// </summary>
- /// <remarks>If the index outside the start tag then an empty path
- /// is returned.</remarks>
- public static XmlElementPath GetActiveElementStartPath(string xml, int index)
- {
- XmlElementPath path = new XmlElementPath();
-
- string elementText = GetActiveElementStartText(xml, index);
-
- if (elementText != null) {
- QualifiedName elementName = GetElementName(elementText);
- NamespaceURI elementNamespace = GetElementNamespace(elementText);
-
- path = GetParentElementPath(xml.Substring(0, index));
- if (elementNamespace.Namespace.Length == 0) {
- if (path.Elements.Count > 0) {
- QualifiedName parentName = path.Elements[path.Elements.Count - 1];
- elementNamespace.Namespace = parentName.Namespace;
- elementNamespace.Prefix = parentName.Prefix;
- }
- }
-
- path.Elements.Add(new QualifiedName(elementName.Name, elementNamespace.Namespace, elementNamespace.Prefix));
- path.Compact();
- }
-
- return path;
- }
-
- /// <summary>
- /// Gets path of the xml element start tag that the specified
- /// <paramref name="index"/> is currently located. This is different to the
- /// GetActiveElementStartPath method since the index can be inside the element
- /// name.
- /// </summary>
- /// <remarks>If the index outside the start tag then an empty path
- /// is returned.</remarks>
- public static XmlElementPath GetActiveElementStartPathAtIndex(string xml, int index)
- {
- // Find first non xml element name character to the right of the index.
- index = GetCorrectedIndex(xml.Length, index);
- int currentIndex = index;
- for (; currentIndex < xml.Length; ++currentIndex) {
- char ch = xml[currentIndex];
- if (!IsXmlNameChar(ch)) {
- break;
- }
- }
-
- string elementText = GetElementNameAtIndex(xml, currentIndex);
- if (elementText != null) {
- return GetActiveElementStartPath(xml, currentIndex, elementText);
- }
- return new XmlElementPath();
- }
-
- /// <summary>
- /// Gets the parent element path based on the index position.
- /// </summary>
- public static XmlElementPath GetParentElementPath(string xml)
- {
- XmlElementPath path = new XmlElementPath();
-
- try {
- StringReader reader = new StringReader(xml);
- XmlTextReader xmlReader = new XmlTextReader(reader);
- xmlReader.XmlResolver = null;
- while (xmlReader.Read()) {
- switch (xmlReader.NodeType) {
- case XmlNodeType.Element:
- if (!xmlReader.IsEmptyElement) {
- QualifiedName elementName = new QualifiedName(xmlReader.LocalName, xmlReader.NamespaceURI, xmlReader.Prefix);
- path.Elements.Add(elementName);
- }
- break;
- case XmlNodeType.EndElement:
- path.Elements.RemoveLast();
- break;
- }
- }
- } catch (XmlException) {
- // Do nothing.
- } catch (WebException) {
- // Do nothing.
- }
-
- path.Compact();
-
- return path;
- }
-
- /// <summary>
- /// Checks whether the attribute at the end of the string is a
- /// namespace declaration.
- /// </summary>
- public static bool IsNamespaceDeclaration(string xml, int index)
- {
- if (xml.Length == 0) {
- return false;
- }
-
- index = GetCorrectedIndex(xml.Length, index);
-
- // Move back one character if the last character is an '='
- if (xml[index] == '=') {
- xml = xml.Substring(0, xml.Length - 1);
- --index;
- }
-
- // From the end of the string work backwards until we have
- // picked out the last attribute and reached some whitespace.
- StringBuilder reversedAttributeName = new StringBuilder();
-
- bool ignoreWhitespace = true;
- int currentIndex = index;
- for (int i = 0; i < index; ++i) {
-
- char currentChar = xml[currentIndex];
-
- if (Char.IsWhiteSpace(currentChar)) {
- if (ignoreWhitespace == false) {
- // Reached the start of the attribute name.
- break;
- }
- } else if (Char.IsLetterOrDigit(currentChar) || (currentChar == ':')) {
- ignoreWhitespace = false;
- reversedAttributeName.Append(currentChar);
- } else {
- // Invalid string.
- break;
- }
-
- --currentIndex;
- }
-
- // Did we get a namespace?
-
- bool isNamespace = false;
-
- if ((reversedAttributeName.ToString() == "snlmx") || (reversedAttributeName.ToString().EndsWith(":snlmx"))) {
- isNamespace = true;
- }
-
- return isNamespace;
- }
-
- /// <summary>
- /// Gets the name of the attribute inside but before the specified
- /// index.
- /// </summary>
- public static string GetAttributeName(string xml, int index)
- {
- if (xml.Length == 0) {
- return String.Empty;
- }
-
- index = GetCorrectedIndex(xml.Length, index);
-
- return GetAttributeName(xml, index, true, true, true);
- }
-
- /// <summary>
- /// Gets the name of the attribute at the specified index. The index
- /// can be anywhere inside the attribute name or in the attribute value.
- /// </summary>
- public static string GetAttributeNameAtIndex(string xml, int index)
- {
- index = GetCorrectedIndex(xml.Length, index);
-
- bool ignoreWhitespace = true;
- bool ignoreEqualsSign = false;
- bool ignoreQuote = false;
-
- if (IsInsideAttributeValue(xml, index)) {
- // Find attribute name start.
- int elementStartIndex = GetActiveElementStartIndex(xml, index);
- if (elementStartIndex == -1) {
- return String.Empty;
- }
-
- // Find equals sign.
- for (int i = index; i > elementStartIndex; --i) {
- char ch = xml[i];
- if (ch == '=') {
- index = i;
- ignoreEqualsSign = true;
- break;
- }
- }
- } else {
- // Find end of attribute name.
- for (; index < xml.Length; ++index) {
- char ch = xml[index];
- if (!Char.IsLetterOrDigit(ch)) {
- if (ch == '\'' || ch == '\"') {
- ignoreQuote = true;
- ignoreEqualsSign = true;
- }
- break;
- }
- }
- --index;
- }
-
- return GetAttributeName(xml, index, ignoreWhitespace, ignoreQuote, ignoreEqualsSign);
- }
-
- /// <summary>
- /// Checks for valid xml attribute value character
- /// </summary>
- public static bool IsAttributeValueChar(char ch)
- {
- if (Char.IsLetterOrDigit(ch) ||
- (ch == ':') ||
- (ch == '/') ||
- (ch == '_') ||
- (ch == '.') ||
- (ch == '-') ||
- (ch == '#'))
- {
- return true;
- }
-
- return false;
- }
-
- /// <summary>
- /// Checks for valid xml element or attribute name character.
- /// </summary>
- public static bool IsXmlNameChar(char ch)
- {
- if (Char.IsLetterOrDigit(ch) ||
- (ch == ':') ||
- (ch == '/') ||
- (ch == '_') ||
- (ch == '.') ||
- (ch == '-'))
- {
- return true;
- }
-
- return false;
- }
-
- /// <summary>
- /// Determines whether the specified index is inside an attribute value.
- /// </summary>
- public static bool IsInsideAttributeValue(string xml, int index)
- {
- if (xml.Length == 0) {
- return false;
- }
-
- if (index > xml.Length) {
- index = xml.Length;
- }
-
- int elementStartIndex = GetActiveElementStartIndex(xml, index);
- if (elementStartIndex == -1) {
- return false;
- }
-
- // Count the number of double quotes and single quotes that exist
- // before the first equals sign encountered going backwards to
- // the start of the active element.
- bool foundEqualsSign = false;
- int doubleQuotesCount = 0;
- int singleQuotesCount = 0;
- char lastQuoteChar = ' ';
- for (int i = index - 1; i > elementStartIndex; --i) {
- char ch = xml[i];
- if (ch == '=') {
- foundEqualsSign = true;
- break;
- } else if (ch == '\"') {
- lastQuoteChar = ch;
- ++doubleQuotesCount;
- } else if (ch == '\'') {
- lastQuoteChar = ch;
- ++singleQuotesCount;
- }
- }
-
- bool isInside = false;
-
- if (foundEqualsSign) {
- // Odd number of quotes?
- if ((lastQuoteChar == '\"') && ((doubleQuotesCount % 2) > 0)) {
- isInside = true;
- } else if ((lastQuoteChar == '\'') && ((singleQuotesCount %2) > 0)) {
- isInside = true;
- }
- }
-
- return isInside;
- }
-
- /// <summary>
- /// Gets the attribute value at the specified index.
- /// </summary>
- /// <returns>An empty string if no attribute value can be found.</returns>
- public static string GetAttributeValueAtIndex(string xml, int index)
- {
- if (!IsInsideAttributeValue(xml, index)) {
- return String.Empty;
- }
-
- index = GetCorrectedIndex(xml.Length, index);
-
- int elementStartIndex = GetActiveElementStartIndex(xml, index);
- if (elementStartIndex == -1) {
- return String.Empty;
- }
-
- // Find equals sign.
- int equalsSignIndex = -1;
- for (int i = index; i > elementStartIndex; --i) {
- char ch = xml[i];
- if (ch == '=') {
- equalsSignIndex = i;
- break;
- }
- }
-
- if (equalsSignIndex == -1) {
- return String.Empty;
- }
-
- // Find attribute value.
- char quoteChar = ' ';
- bool foundQuoteChar = false;
- StringBuilder attributeValue = new StringBuilder();
- for (int i = equalsSignIndex; i < xml.Length; ++i) {
- char ch = xml[i];
- if (!foundQuoteChar) {
- if (ch == '\"' || ch == '\'') {
- quoteChar = ch;
- foundQuoteChar = true;
- }
- } else {
- if (ch == quoteChar) {
- // End of attribute value.
- return attributeValue.ToString();
- } else if (IsAttributeValueChar(ch) || (ch == '\"' || ch == '\'')) {
- attributeValue.Append(ch);
- } else {
- // Invalid character found.
- return String.Empty;
- }
- }
- }
-
- return String.Empty;
- }
-
- /// <summary>
- /// Gets the text of the xml element start tag that the index is
- /// currently inside.
- /// </summary>
- /// <returns>
- /// Returns the text up to and including the start tag &lt; character.
- /// </returns>
- static string GetActiveElementStartText(string xml, int index)
- {
- int elementStartIndex = GetActiveElementStartIndex(xml, index);
- if (elementStartIndex >= 0) {
- if (elementStartIndex < index) {
- int elementEndIndex = GetActiveElementEndIndex(xml, index);
- if (elementEndIndex >= index) {
- return xml.Substring(elementStartIndex, elementEndIndex - elementStartIndex);
- }
- }
- }
- return null;
- }
-
- /// <summary>
- /// Locates the index of the start tag &lt; character.
- /// </summary>
- /// <returns>
- /// Returns the index of the start tag character; otherwise
- /// -1 if no start tag character is found or a end tag
- /// &gt; character is found first.
- /// </returns>
- static int GetActiveElementStartIndex(string xml, int index)
- {
- int elementStartIndex = -1;
-
- int currentIndex = index - 1;
- for (int i = 0; i < index; ++i) {
-
- char currentChar = xml[currentIndex];
- if (currentChar == '<') {
- elementStartIndex = currentIndex;
- break;
- } else if (currentChar == '>') {
- break;
- }
-
- --currentIndex;
- }
-
- return elementStartIndex;
- }
-
- /// <summary>
- /// Locates the index of the end tag character.
- /// </summary>
- /// <returns>
- /// Returns the index of the end tag character; otherwise
- /// -1 if no end tag character is found or a start tag
- /// character is found first.
- /// </returns>
- static int GetActiveElementEndIndex(string xml, int index)
- {
- int elementEndIndex = index;
-
- for (int i = index; i < xml.Length; ++i) {
-
- char currentChar = xml[i];
- if (currentChar == '>') {
- elementEndIndex = i;
- break;
- } else if (currentChar == '<'){
- elementEndIndex = -1;
- break;
- }
- }
-
- return elementEndIndex;
- }
-
- /// <summary>
- /// Gets the element name from the element start tag string.
- /// </summary>
- /// <param name="xml">This string must start at the
- /// element we are interested in.</param>
- static QualifiedName GetElementName(string xml)
- {
- string name = String.Empty;
-
- // Find the end of the element name.
- xml = xml.Replace("\r\n", " ");
- int index = xml.IndexOf(' ');
- if (index > 0) {
- name = xml.Substring(1, index - 1);
- } else {
- name = xml.Substring(1);
- }
-
- QualifiedName qualifiedName = new QualifiedName();
-
- int prefixIndex = name.IndexOf(':');
- if (prefixIndex > 0) {
- qualifiedName.Prefix = name.Substring(0, prefixIndex);
- qualifiedName.Name = name.Substring(prefixIndex + 1);
- } else {
- qualifiedName.Name = name;
- }
-
- return qualifiedName;
- }
-
- /// <summary>
- /// Gets the element namespace from the element start tag
- /// string.
- /// </summary>
- /// <param name="xml">This string must start at the
- /// element we are interested in.</param>
- static NamespaceURI GetElementNamespace(string xml)
- {
- NamespaceURI namespaceURI = new NamespaceURI();
-
- Match match = Regex.Match(xml, ".*?(xmlns\\s*?|xmlns:.*?)=\\s*?['\\\"](.*?)['\\\"]");
- if (match.Success) {
- namespaceURI.Namespace = match.Groups[2].Value;
-
- string xmlns = match.Groups[1].Value.Trim();
- int prefixIndex = xmlns.IndexOf(':');
- if (prefixIndex > 0) {
- namespaceURI.Prefix = xmlns.Substring(prefixIndex + 1);
- }
- }
-
- return namespaceURI;
- }
-
- static string ReverseString(string text)
- {
- StringBuilder reversedString = new StringBuilder(text);
-
- int index = text.Length;
- foreach (char ch in text) {
- --index;
- reversedString[index] = ch;
- }
-
- return reversedString.ToString();
- }
-
- /// <summary>
- /// Ensures that the index is on the last character if it is
- /// too large.
- /// </summary>
- /// <param name="length">The length of the string.</param>
- /// <param name="index">The current index.</param>
- /// <returns>The index unchanged if the index is smaller than the
- /// length of the string; otherwise it returns length - 1.</returns>
- static int GetCorrectedIndex(int length, int index)
- {
- if (index >= length) {
- index = length - 1;
- }
- return index;
- }
-
- /// <summary>
- /// Gets the active element path given the element text.
- /// </summary>
- static XmlElementPath GetActiveElementStartPath(string xml, int index, string elementText)
- {
- QualifiedName elementName = GetElementName(elementText);
- NamespaceURI elementNamespace = GetElementNamespace(elementText);
-
- XmlElementPath path = GetParentElementPath(xml.Substring(0, index));
- if (elementNamespace.Namespace.Length == 0) {
- if (path.Elements.Count > 0) {
- QualifiedName parentName = path.Elements[path.Elements.Count - 1];
- elementNamespace.Namespace = parentName.Namespace;
- elementNamespace.Prefix = parentName.Prefix;
- }
- }
- path.Elements.Add(new QualifiedName(elementName.Name, elementNamespace.Namespace, elementNamespace.Prefix));
- path.Compact();
- return path;
- }
-
- static string GetAttributeName(string xml, int index, bool ignoreWhitespace, bool ignoreQuote, bool ignoreEqualsSign)
- {
- string name = String.Empty;
-
- // From the end of the string work backwards until we have
- // picked out the attribute name.
- StringBuilder reversedAttributeName = new StringBuilder();
-
- int currentIndex = index;
- bool invalidString = true;
-
- for (int i = 0; i <= index; ++i) {
-
- char currentChar = xml[currentIndex];
-
- if (Char.IsLetterOrDigit(currentChar)) {
- if (!ignoreEqualsSign) {
- ignoreWhitespace = false;
- reversedAttributeName.Append(currentChar);
- }
- } else if (Char.IsWhiteSpace(currentChar)) {
- if (ignoreWhitespace == false) {
- // Reached the start of the attribute name.
- invalidString = false;
- break;
- }
- } else if ((currentChar == '\'') || (currentChar == '\"')) {
- if (ignoreQuote) {
- ignoreQuote = false;
- } else {
- break;
- }
- } else if (currentChar == '='){
- if (ignoreEqualsSign) {
- ignoreEqualsSign = false;
- } else {
- break;
- }
- } else if (IsAttributeValueChar(currentChar)) {
- if (!ignoreQuote) {
- break;
- }
- } else {
- break;
- }
-
- --currentIndex;
- }
-
- if (!invalidString) {
- name = ReverseString(reversedAttributeName.ToString());
- }
-
- return name;
- }
-
- /// <summary>
- /// Gets the element name at the specified index.
- /// </summary>
- static string GetElementNameAtIndex(string xml, int index)
- {
- int elementStartIndex = GetActiveElementStartIndex(xml, index);
- if (elementStartIndex >= 0 && elementStartIndex < index) {
- int elementEndIndex = GetActiveElementEndIndex(xml, index);
- if (elementEndIndex == -1) {
- elementEndIndex = xml.IndexOf(' ', elementStartIndex);
- }
- if (elementEndIndex >= elementStartIndex) {
- return xml.Substring(elementStartIndex, elementEndIndex - elementStartIndex);
- }
- }
- return null;
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/README b/main/src/addins/MonoDevelop.XmlEditor/README
deleted file mode 100644
index 0cc9096f73..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/README
+++ /dev/null
@@ -1,79 +0,0 @@
-
-This is an XML Editor add-in for MonoDevelop. The code has
-been ported from the SharpDevelop XML Editor. Please see
-http://md-xed.sourceforge.net for more information.
-
-Requirement
------------
-
-MonoDevelop from the repository has been installed:
-
-http://svn.myrealbox.com/viewcvs/trunk/monodevelop/
-
-
-Compiling for users
--------------------
-
-./configure --prefix=/the/path/where/monodevelop/was/installed
-make
-make install
-
-
-Compiling for developers
-------------------------
-
-To compile run the following command:
-
-./autogen.sh --prefix=/the/path/where/monodevelop/was/installed
-make
-make install
-
-
-Compiling using MonoDevelop
----------------------------
-
-The source code includes a MonoDevelop project file src/MonoDevelop.XmlEditor.mds
-which can be used to build the code.
-
-If MonoDevelop was installed to /home/username then putting the source code from
-the repository into /home/username/src/md-xmleditor should mean the project
-will build without having to modify the project references.
-
-Example folder layout:
-
-/home/matt/lib/monodevelop/AddIns - (MonoDevelop addins folder)
-/home/matt/src/md-xmleditor - (MonoDevelop.XmlEditor source)
-
-The assemblies are built to the build folder, copy the XmlEditor folder and
-all its files and folders to lib/monodevelop/AddIns/XmlEditor.
-
-
-Dependencies
-------------
-MonoDevelop >= 1.0
-Mono >= 1.1.4
-Gtk# >= 2.3.90
-gecko-sharp >= 0.10
-gtksourceview-sharp >= 0.10
-
-
-Directory Roadmap
------------------
-
- build/AddIns/XmlEditor
- The Xml Editor assemblies are built to this folder.
-
- src/
- Source code.
-
- src/MonoDevelop.XmlEditor
- The Xml Editor add-in source code.
-
- src/MonoDevelop.XmlEditor/schemas
- Schemas that are installed with the Xml Editor add-in by default.
-
- src/MonoDevelop.XmlEditor.Tests
- Contains NUnit tests for the core code of the Xml Editor.
-
-
-
diff --git a/main/src/addins/MonoDevelop.XmlEditor/TODO b/main/src/addins/MonoDevelop.XmlEditor/TODO
deleted file mode 100644
index ed77622c2f..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/TODO
+++ /dev/null
@@ -1,64 +0,0 @@
-MonoDevelop XML Editor Issues and TODO list
--------------------------------------------
-
-This list should be moved to the SourceForge issues tracker.
-
-* Cannot create an XML file with any extension other than .xml. MonoDevelop problem.
-* XML Editor has a list of file extensions that it recognises as XML content. Really
- this should be using the mime type. The XML editor add-in should install extra
- types into the mime type database.
-* At the moment it only recognises the mime type "text/xml". XSL files, for example,
- have a mime type of "text/xsl". However, the XML editor checks the file extension
- as well so an XSL file will be opened in the XML editor.
-* 11 unit tests are currently not working. Atsushi Eno has been fixing issues as
- quick as I can report them, so a lot of these unit tests should work under the
- next release of Mono.
-* Autocompletion of elements, after typing in the greater than sign, is over zealous.
-* The autocompletion list requires an icon. I would prefer not to have one for
- XML completion, but at the moment it is using the stock forward icon.
-* When validating XML documents errors are added to the task list by creating a
- CompilerResult object. There is no other way to create an error task.
-* The XML menu option is displayed all the time. In SharpDevelop I used the
- activewindow property to show/hide the menu when the XML editor is being
- used/not used. Unable to get this working.
-* Mixed namespace handling is limited. The element completion list is based on the
- parent element at the current location. Really this should take into account any
- other available namespaces that are allowed at that location.
-* Commenting out regions of XML. SharpDevelop implements this, but there are a few
- bugs.
-* The "Show Schema Annotation" XML Editor option does nothing. Schema annotation
- is always displayed if available.
-* Goto Schema Definition does not scroll to the correct line the first time the
- schema is opened. The XmlEditorView.JumpTo method is called correctly, but
- for some reason it does not scroll.
-* Fix 7 obsolete methods/classes used warnings due to moving to .NET 2.0. The
- "Use XmlReader created by XmlReader.Create() method" is easy to fix. The
- "XmlSchema.Compile' is obsolete: `Use XmlSchemaSet.Compile() instead." might not
- be fixed since the XmlSchemaSet.Compile broke a lot of the unit tests when I
- tried the same thing with SharpDevelop.
-* Hold off switching to using XmlReader.Create. Doing this we hit an error in
- Mono (1.1.15):
-
- System.NullReferenceException: Object reference not set to an instance of an object
- in <0x0006d> Mono.Xml.Schema.XmlSchemaValidatingReader:get_Prefix ()
- in <0x0004f> System.Xml.XmlDocument:ReadAttributeNode (System.Xml.XmlReader reader)
- in <0x00253> System.Xml.XmlDocument:ReadNodeCore (System.Xml.XmlReader reader)
- in <0x000be> System.Xml.XmlDocument:ReadNode (System.Xml.XmlReader reader)
- in <0x00044> System.Xml.XmlDocument:Load (System.Xml.XmlReader xmlReader)
-
- Loading an xml schema using code:
-
- StringReader stringReader = new StringReader(xml);
- XmlTextReader xmlReader = new XmlTextReader(stringReader);
- xmlReader.XmlResolver = null;
- XmlReaderSettings settings = new XmlReaderSettings();
- settings.ValidationType = ValidationType.Schema;
- settings.ValidationFlags = XmlSchemaValidationFlags.None;
- settings.XmlResolver = null;
- settings.Schemas.Add(schema);
- XmlReader reader = XmlReader.Create(xmlReader, settings);
- XmlDocument doc = new XmlDocument();
- doc.Load(reader);
-
-
-
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/AssemblyInfo.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/AssemblyInfo.cs
deleted file mode 100644
index 8f12aff3ea..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/AssemblyInfo.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// 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("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 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("0.6")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/ChangeLog b/main/src/addins/MonoDevelop.XmlEditor/Tests/ChangeLog
deleted file mode 100644
index 43b56d48d7..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/ChangeLog
+++ /dev/null
@@ -1,86 +0,0 @@
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Schema/ChoiceTestFixture.cs:
- * Schema/GroupRefTestFixture.cs:
- * Schema/XsdSchemaTestFixture.cs:
- * Schema/SchemaTestFixtureBase.cs:
- * Schema.Uri/GetUriTestFixture.cs:
- * Schema/AllElementTestFixture.cs:
- * Schema/AttributeRefTestFixture.cs:
- * Schema/NestedChoiceTestFixture.cs:
- * Schema/NestedSequenceTestFixture.cs:
- * Schema/AbstractElementTestFixture.cs:
- * Schema/SequencedChoiceTestFixture.cs:
- * Schema/TwoElementSchemaTestFixture.cs:
- * Schema/DuplicateElementTestFixture.cs:
- * Schema/ExtensionElementTestFixture.cs:
- * Schema/XhtmlStrictSchemaTestFixture.cs:
- * Schema/AttributeGroupRefTestFixture.cs:
- * Schema/ElementAnnotationTestFixture.cs:
- * Schema/GroupRefCompositorTestFixture.cs:
- * Schema/RestrictionElementTestFixture.cs:
- * Schema/EnumAttributeValueTestFixture.cs:
- * Schema/ReferencedElementsTestFixture.cs:
- * Schema/NamespaceCompletionTestFixture.cs:
- * Schema/AttributeAnnotationTestFixture.cs:
- * Schema/SingleElementSchemaTestFixture.cs:
- * Schema/NestedElementSchemaTestFixture.cs:
- * Schema/MissingSchemaElementTestFixture.cs:
- * Schema/ElementRefAnnotationTestFixture.cs:
- * Schema/ChildElementAttributesTestFixture.cs:
- * Schema/NestedAttributeGroupRefTestFixture.cs:
- * Schema/ComplexContentExtensionTestFixture.cs:
- * Schema/AttributeValueAnnotationTestFixture.cs:
- * FindSchemaObject/ElementSelectedTestFixture.cs:
- * Schema/SimpleContentWithAttributeTestFixture.cs:
- * Schema/ElementWithAttributeSchemaTestFixture.cs:
- * FindSchemaObject/AttributeSelectedTestFixture.cs:
- * Schema/FindAttributeFromComplexTypeTestFixture.cs:
- * FindSchemaObject/ElementTypeSelectedTestFixture.cs:
- * CompletionData/XmlCompletionDataImageTestFixture.cs:
- * FindSchemaObject/AttributeTypeSelectedTestFixture.cs:
- * CompletionData/XmlCompletionDataStringTestFixture.cs:
- * FindSchemaObject/GroupReferenceSelectedTestFixture.cs:
- * Schema.Includes/TwoElementSchemaIncludeTestFixture.cs:
- * FindSchemaObject/ElementReferenceSelectedTestFixture.cs:
- * FindSchemaObject/AttributeReferenceSelectedTestFixture.cs:
- * FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs:
- * Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs:
- * FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs:
- * FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs:
- Merged MD.Projects into MD.Core, and MD.Projects.Gui,
- MD.Core.Gui and MD.Components into MD.Ide.
-
-2009-10-29 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Tests.csproj: Flush.
-
-2009-06-19 Mike Krüger <mkrueger@novell.com>
-
- * AssemblyInfo.cs: Commented out empty assembly key file
- attribute (Bug 513981 - Project template causes CS1726
- errors).
-
-2009-05-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Tests.csproj: Flush.
-
-2009-03-13 Mike Krüger <mkrueger@novell.com>
-
- * MonoDevelop.XmlEditor.Tests.csproj: Moved text editor to
- core
-
-2009-02-28 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.XmlEditor.Tests.csproj: Flush.
-
-2009-02-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Tests.csproj: Updated.
-
-2009-02-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.XmlEditor.Tests.mdp:
- * MonoDevelop.XmlEditor.Tests.csproj: Migrated to MSBuild file
- format.
-
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs
deleted file mode 100644
index e2dcb84e16..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-using MonoDevelop.XmlEditor.Completion;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:attributeGroup/@ref is located in the schema.
- /// </summary>
- [TestFixture]
- public class AttributeGroupReferenceSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaAttributeGroup schemaAttributeGroup;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- int index = xml.IndexOf("ref=\"coreattrs\"");
- index = xml.IndexOf("coreattrs", index);
- schemaAttributeGroup = (XmlSchemaAttributeGroup)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void AttributeGroupName()
- {
- Assert.AreEqual("coreattrs", schemaAttributeGroup.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.w3schools.com\" xmlns=\"http://www.w3schools.com\" elementFormDefault=\"qualified\">\r\n" +
- "<xs:attributeGroup name=\"coreattrs\">" +
- "\t<xs:attribute name=\"id\" type=\"xs:string\"/>" +
- "\t<xs:attribute name=\"style\" type=\"xs:string\"/>" +
- "\t<xs:attribute name=\"title\" type=\"xs:string\"/>" +
- "</xs:attributeGroup>" +
- "\t<xs:element name=\"note\">\r\n" +
- "\t\t<xs:complexType>\r\n" +
- "\t\t\t<xs:attributeGroup ref=\"coreattrs\"/>" +
- "\t\t\t<xs:attribute name=\"name\" type=\"xs:string\"/>\r\n" +
- "\t\t</xs:complexType>\r\n" +
- "\t</xs:element>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs
deleted file mode 100644
index 34c64b3c57..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Completion;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:attribute/@ref is located in the schema.
- /// </summary>
- [TestFixture]
- public class AttributeReferenceSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaAttribute schemaAttribute;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- int index = xml.IndexOf("ref=\"dir\"");
- index = xml.IndexOf("dir", index);
- schemaAttribute = (XmlSchemaAttribute)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void AttributeName()
- {
- Assert.AreEqual("dir", schemaAttribute.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema version=\"1.0\" xml:lang=\"en\"\r\n" +
- " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n" +
- " targetNamespace=\"http://foo/xhtml\"\r\n" +
- " xmlns=\"http://foo/xhtml\"\r\n" +
- " elementFormDefault=\"qualified\">\r\n" +
- " <xs:element name=\"html\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"head\"/>\r\n" +
- " <xs:element ref=\"body\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " <xs:attributeGroup ref=\"i18n\"/>\r\n" +
- " <xs:attribute name=\"id\" ref=\"dir\"/>\r\n" +
- " </xs:complexType>\r\n" +
- " </xs:element>\r\n" +
- "\r\n" +
- " <xs:element name=\"head\" type=\"xs:string\"/>\r\n" +
- " <xs:element name=\"body\" type=\"xs:string\"/>\r\n" +
- "\r\n" +
- " <xs:attribute name=\"dir\">\r\n" +
- " <xs:simpleType>\r\n" +
- " <xs:restriction base=\"xs:token\">\r\n" +
- " <xs:enumeration value=\"ltr\"/>\r\n" +
- " <xs:enumeration value=\"rtl\"/>\r\n" +
- " </xs:restriction>\r\n" +
- " </xs:simpleType>\r\n" +
- " </xs:attribute>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs
deleted file mode 100644
index 3b9228f5c0..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* [TestFixture]
- public class AttributeSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaAttribute schemaAttribute;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, SchemaCompletionData, String.Empty, null);
- string xml = "<note xmlns='http://www.w3schools.com' name=''></note>";
- schemaAttribute = (XmlSchemaAttribute)XmlEditorView.GetSchemaObjectSelected(xml, xml.IndexOf("name"), provider);
- }
-
- [Test]
- public void AttributeName()
- {
- Assert.AreEqual("name", schemaAttribute.QualifiedName.Name, "Attribute name is incorrect.");
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.w3schools.com\" xmlns=\"http://www.w3schools.com\" elementFormDefault=\"qualified\">\r\n" +
- " <xs:element name=\"note\">\r\n" +
- " <xs:complexType>\r\n" +
- "\t<xs:attribute name=\"name\" type=\"xs:string\"/>\r\n" +
- " </xs:complexType>\r\n" +
- " </xs:element>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs
deleted file mode 100644
index 9171517d66..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that a xs:attribute/@type can be located in the schema.
- /// </summary>
- [TestFixture]
- public class AttributeTypeSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaSimpleType schemaSimpleType;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- int index = xml.IndexOf("type=\"dir\"/>");
- index = xml.IndexOf("dir", index);
- schemaSimpleType = (XmlSchemaSimpleType)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void SimpleTypeName()
- {
- Assert.AreEqual("dir", schemaSimpleType.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema version=\"1.0\" xml:lang=\"en\"\r\n" +
- " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n" +
- " targetNamespace=\"http://foo/xhtml\"\r\n" +
- " xmlns=\"http://foo/xhtml\"\r\n" +
- " elementFormDefault=\"qualified\">\r\n" +
- " <xs:element name=\"html\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"head\"/>\r\n" +
- " <xs:element ref=\"body\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " <xs:attributeGroup ref=\"i18n\"/>\r\n" +
- " <xs:attribute name=\"id\" type=\"dir\"/>\r\n" +
- " </xs:complexType>\r\n" +
- " </xs:element>\r\n" +
- "\r\n" +
- " <xs:element name=\"head\" type=\"xs:string\"/>\r\n" +
- " <xs:element name=\"body\" type=\"xs:string\"/>\r\n" +
- "\r\n" +
- " <xs:simpleType name=\"dir\">\r\n" +
- " <xs:restriction base=\"xs:token\">\r\n" +
- " <xs:enumeration value=\"ltr\"/>\r\n" +
- " <xs:enumeration value=\"rtl\"/>\r\n" +
- " </xs:restriction>\r\n" +
- " </xs:simpleType>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs
deleted file mode 100644
index d97abae1fe..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:element/@ref is located in the schema.
- /// </summary>
- [TestFixture]
- public class ElementReferenceSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaAttribute schemaAttribute;
- XmlSchemaElement referencedSchemaElement;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- schemaAttribute = (XmlSchemaAttribute)XmlEditorView.GetSchemaObjectSelected(xml, xml.IndexOf("ref=\"name"), provider, SchemaCompletionData);
-
- int index = xml.IndexOf("ref=\"name");
- index = xml.IndexOf('n', index);
- referencedSchemaElement = (XmlSchemaElement)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void AttributeName()
- {
- Assert.AreEqual("ref", schemaAttribute.QualifiedName.Name);
- }
-
- [Test]
- public void ReferencedElementName()
- {
- Assert.AreEqual("name", referencedSchemaElement.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.w3schools.com\" xmlns=\"http://www.w3schools.com\">\r\n" +
- "\r\n" +
- "<!-- definition of simple elements -->\r\n" +
- "<xs:element name=\"name\" type=\"xs:string\"/>\r\n" +
- "<xs:element name=\"address\" type=\"xs:string\"/>\r\n" +
- "\r\n" +
- "<!-- definition of complex elements -->\r\n" +
- "<xs:element name=\"shipto\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"name\"/>\r\n" +
- " <xs:element ref=\"address\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " <xs:attribute name=\"address\"/>\r\n" +
- " </xs:complexType>\r\n" +
- "</xs:element>\r\n" +
- "\r\n" +
- "<xs:element name=\"shiporder\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"shipto\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " <xs:attribute name=\"id\"/>\r\n" +
- " </xs:complexType>\r\n" +
- "</xs:element>\r\n" +
- "\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs
deleted file mode 100644
index d7f103f4ce..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:element/@ref='prefix:name' is located in the schema.
- /// </summary>
- [TestFixture]
- public class ElementReferenceWithPrefixSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaElement referencedSchemaElement;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
-
- int index = xml.IndexOf("ref=\"xs:list");
- index = xml.IndexOf("xs", index);
- referencedSchemaElement = (XmlSchemaElement)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void ReferencedElementName()
- {
- Assert.AreEqual("list", referencedSchemaElement.QualifiedName.Name);
- }
-
- [Test]
- public void ReferencedElementNamespace()
- {
- Assert.AreEqual("http://www.w3.org/2001/XMLSchema", referencedSchemaElement.QualifiedName.Namespace);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.w3schools.com\" xmlns=\"http://www.w3schools.com\">\r\n" +
- "\r\n" +
- "<!-- definition of simple elements -->\r\n" +
- "<xs:element name=\"name\" type=\"xs:string\"/>\r\n" +
- "<xs:element name=\"address\" type=\"xs:string\"/>\r\n" +
- "\r\n" +
- "<!-- definition of complex elements -->\r\n" +
- "<xs:element name=\"shipto\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"name\"/>\r\n" +
- " <xs:element ref=\"xs:list\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " <xs:attribute name=\"address\"/>\r\n" +
- " </xs:complexType>\r\n" +
- "</xs:element>\r\n" +
- "\r\n" +
- "<xs:element name=\"shiporder\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"shipto\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " <xs:attribute name=\"id\"/>\r\n" +
- " </xs:complexType>\r\n" +
- "</xs:element>\r\n" +
- "\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs
deleted file mode 100644
index 6cd6dfd77d..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* [TestFixture]
- public class ElementSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaElement schemaElement;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, SchemaCompletionData, String.Empty, null);
- string xml = "<note xmlns='http://www.w3schools.com'></note>";
- schemaElement = (XmlSchemaElement)XmlEditorView.GetSchemaObjectSelected(xml, xml.IndexOf("note xmlns"), provider);
- }
-
- [Test]
- public void SchemaElementNamespace()
- {
- Assert.AreEqual("http://www.w3schools.com",
- schemaElement.QualifiedName.Namespace,
- "Unexpected namespace.");
- }
-
- [Test]
- public void SchemaElementName()
- {
- Assert.AreEqual("note", schemaElement.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<?xml version=\"1.0\"?>\r\n" +
- "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n" +
- "targetNamespace=\"http://www.w3schools.com\"\r\n" +
- "xmlns=\"http://www.w3schools.com\"\r\n" +
- "elementFormDefault=\"qualified\">\r\n" +
- "<xs:element name=\"note\">\r\n" +
- "</xs:element>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs
deleted file mode 100644
index 4977893544..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:element/@type is located in the schema.
- /// </summary>
- [TestFixture]
- public class ElementTypeSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaComplexType schemaComplexType;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- int index = xml.IndexOf("type=\"text-type\"");
- index = xml.IndexOf("text-type", index);
- schemaComplexType = (XmlSchemaComplexType)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void ComplexTypeName()
- {
- Assert.AreEqual("text-type", schemaComplexType.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.w3schools.com\" xmlns=\"http://www.w3schools.com\" elementFormDefault=\"qualified\">\r\n" +
- "\t<xs:element name=\"note\">\r\n" +
- "\t\t<xs:complexType> \r\n" +
- "\t\t\t<xs:sequence>\r\n" +
- "\t\t\t\t<xs:element name=\"text\" type=\"text-type\"/>\r\n" +
- "\t\t\t</xs:sequence>\r\n" +
- "\t\t</xs:complexType>\r\n" +
- "\t</xs:element>\r\n" +
- "\t<xs:complexType name=\"text-type\">\r\n" +
- "\t\t<xs:attribute name=\"foo\"/>\r\n" +
- "\t</xs:complexType>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs
deleted file mode 100644
index 1638c3001d..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:element/@type="prefix:name" is located in the schema.
- /// </summary>
- [TestFixture]
- public class ElementTypeWithPrefixSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaComplexType schemaComplexType;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- int index = xml.IndexOf("type=\"xs:complexType\"");
- index = xml.IndexOf("xs:complexType", index);
- schemaComplexType = (XmlSchemaComplexType)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void ComplexTypeName()
- {
- Assert.AreEqual("complexType", schemaComplexType.QualifiedName.Name);
- }
-
- [Test]
- public void ComplexTypeNamespace()
- {
- Assert.AreEqual("http://www.w3.org/2001/XMLSchema", schemaComplexType.QualifiedName.Namespace);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.w3schools.com\" xmlns=\"http://www.w3schools.com\" elementFormDefault=\"qualified\">\r\n" +
- "\t<xs:element name=\"note\">\r\n" +
- "\t\t<xs:complexType> \r\n" +
- "\t\t\t<xs:sequence>\r\n" +
- "\t\t\t\t<xs:element name=\"text\" type=\"xs:complexType\"/>\r\n" +
- "\t\t\t</xs:sequence>\r\n" +
- "\t\t</xs:complexType>\r\n" +
- "\t</xs:element>\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs
deleted file mode 100644
index cc0011a3cf..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using System;
-using System.Xml.Schema;
-using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
-{
-/* /// <summary>
- /// Tests that an xs:group/@ref is located in the schema.
- /// </summary>
- [TestFixture]
- public class GroupReferenceSelectedTestFixture : SchemaTestFixtureBase
- {
- XmlSchemaGroup schemaGroup;
-
- public override void FixtureInit()
- {
- XmlSchemaCompletionDataCollection schemas = new XmlSchemaCompletionDataCollection();
- schemas.Add(SchemaCompletionData);
- XmlSchemaCompletionData xsdSchemaCompletionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- schemas.Add(xsdSchemaCompletionData);
- XmlCompletionDataProvider provider = new XmlCompletionDataProvider(schemas, xsdSchemaCompletionData, String.Empty, null);
-
- string xml = GetSchema();
- int index = xml.IndexOf("ref=\"block\"");
- index = xml.IndexOf("block", index);
- schemaGroup = (XmlSchemaGroup)XmlEditorView.GetSchemaObjectSelected(xml, index, provider, SchemaCompletionData);
- }
-
- [Test]
- public void GroupName()
- {
- Assert.AreEqual("block", schemaGroup.QualifiedName.Name);
- }
-
- protected override string GetSchema()
- {
- return "<xs:schema version=\"1.0\" xml:lang=\"en\"\r\n" +
- " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\r\n" +
- " targetNamespace=\"http://foo/xhtml\"\r\n" +
- " xmlns=\"http://foo/xhtml\"\r\n" +
- " elementFormDefault=\"qualified\">\r\n" +
- "\r\n" +
- " <xs:element name=\"html\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:element ref=\"head\"/>\r\n" +
- " <xs:element ref=\"body\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " </xs:complexType>\r\n" +
- " </xs:element>\r\n" +
- "\r\n" +
- " <xs:element name=\"head\" type=\"xs:string\"/>\r\n" +
- " <xs:element name=\"body\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:sequence>\r\n" +
- " <xs:group ref=\"block\"/>\r\n" +
- " <xs:element name=\"form\"/>\r\n" +
- " </xs:sequence>\r\n" +
- " </xs:complexType>\r\n" +
- " </xs:element>\r\n" +
- "\r\n" +
- "\r\n" +
- " <xs:group name=\"block\">\r\n" +
- " <xs:choice>\r\n" +
- " <xs:element ref=\"p\"/>\r\n" +
- " <xs:group ref=\"heading\"/>\r\n" +
- " </xs:choice>\r\n" +
- " </xs:group>\r\n" +
- "\r\n" +
- " <xs:element name=\"p\">\r\n" +
- " <xs:complexType>\r\n" +
- " <xs:attribute name=\"id\"/>" +
- " </xs:complexType>\r\n" +
- " </xs:element>\r\n" +
- "\r\n" +
- " <xs:group name=\"heading\">\r\n" +
- " <xs:choice>\r\n" +
- " <xs:element name=\"test\"/>\r\n" +
- " <xs:element name=\"id\"/>\r\n" +
- " </xs:choice>\r\n" +
- " </xs:group>\r\n" +
- "\r\n" +
- "</xs:schema>";
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs
deleted file mode 100644
index dcf2f6a450..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests
-{
- /// <summary>
- /// Tests that the mime types "text/xml" and
- /// "application/xml" are handled by the
- /// XmlEditorViewContent.
- /// </summary>
-/* [TestFixture]
- public class MimeTypeHandledTests
- {
- [Test]
- public void IsTextXmlHandled()
- {
- Assert.IsTrue(XmlEditorViewContent.IsMimeTypeHandled("text/xml"));
- }
-
- [Test]
- public void IsApplicationXmlHandled()
- {
- Assert.IsTrue(XmlEditorViewContent.IsMimeTypeHandled("application/xml"));
- }
-
- [Test]
- public void NullMimeTypeIsNotHandled()
- {
- Assert.IsFalse(XmlEditorViewContent.IsMimeTypeHandled(null));
- }
-
- [Test]
- public void IsUnknownMimeTypeHandled()
- {
- Assert.IsFalse(XmlEditorViewContent.IsMimeTypeHandled("unknown/xml"));
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs
deleted file mode 100755
index 011f62602b..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- [TestFixture]
- public class ActiveElementStartPathTestFixture
- {
- XmlElementPath elementPath;
- XmlElementPath expectedElementPath;
- string namespaceURI = "http://foo.com/foo.xsd";
-
- [Test]
- public void PathTest1()
- {
- string text = "<foo xmlns='" + namespaceURI + "' ";
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest2()
- {
- string text = "<foo xmlns='" + namespaceURI + "' ><bar ";
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(expectedElementPath.Equals(elementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest3()
- {
- string text = "<f:foo xmlns:f='" + namespaceURI + "' ><f:bar ";
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI, "f"));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI, "f"));
- Assert.IsTrue(expectedElementPath.Equals(elementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest4()
- {
- string text = "<x:foo xmlns:x='" + namespaceURI + "' ";
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI, "x"));
- Assert.IsTrue(expectedElementPath.Equals(elementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest5()
- {
- string text = "<foo xmlns='" + namespaceURI + "'>\r\n"+
- "<y\r\n" +
- "Id = 'foo' ";
-
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("y", namespaceURI));
- Assert.IsTrue(expectedElementPath.Equals(elementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest6()
- {
- string text = "<bar xmlns='http://bar'>\r\n" +
- "<foo xmlns='" + namespaceURI + "' ";
-
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(expectedElementPath.Equals(elementPath),
- "Incorrect active element path.");
- }
-
- /// <summary>
- /// Tests that we get no path back if we are outside the start
- /// tag.
- /// </summary>
- [Test]
- public void OutOfStartTagPathTest1()
- {
- string text = "<foo xmlns='" + namespaceURI + "'> ";
-
- elementPath = XmlParser.GetActiveElementStartPath(text, text.Length);
- Assert.AreEqual(0, elementPath.Elements.Count, "Should have no path.");
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs
deleted file mode 100644
index 8ff9c5c966..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- /// <summary>
- /// Tests the XmlParser.GetActiveElementStartPathAtIndex which finds the element
- /// path where the index is at. The index may be in the middle or start of the element
- /// tag.
- /// </summary>
- [TestFixture]
- public class ActiveElementUnderCursorTests
- {
- XmlElementPath elementPath;
- XmlElementPath expectedElementPath;
- string namespaceURI = "http://foo.com/foo.xsd";
-
- [Test]
- public void PathTest1()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar ";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("bar "));
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest2()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("bar>"));
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest3()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("ar>"));
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest4()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.Length - 1);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest5()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar a='a'>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("='a'"));
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest6()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar a='a'";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.Length - 1);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest7()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar a='a'";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest8()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest9()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar ";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.Length);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest10()
- {
- string text = "<foo xmlns='" + namespaceURI + "'><bar Id=\r\n</foo>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, text.IndexOf("Id="));
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- expectedElementPath.Elements.Add(new QualifiedName("bar", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void PathTest11()
- {
- string text = "<foo xmlns='" + namespaceURI + "'>";
- elementPath = XmlParser.GetActiveElementStartPathAtIndex(text, 2);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs
deleted file mode 100755
index 3f18883dea..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- /// <summary>
- /// Tests that we can detect the attribute's name.
- /// </summary>
- [TestFixture]
- public class AttributeNameTestFixture
- {
- [Test]
- public void SuccessTest1()
- {
- string text = " foo='a";
- Assert.AreEqual("foo", XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void SuccessTest2()
- {
- string text = " foo='";
- Assert.AreEqual("foo", XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void SuccessTest3()
- {
- string text = " foo=";
- Assert.AreEqual("foo", XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void SuccessTest4()
- {
- string text = " foo=\"";
- Assert.AreEqual("foo", XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void SuccessTest5()
- {
- string text = " foo = \"";
- Assert.AreEqual("foo", XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void SuccessTest6()
- {
- string text = " foo = '#";
- Assert.AreEqual("foo", XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void FailureTest1()
- {
- string text = "foo=";
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void FailureTest2()
- {
- string text = "foo=<";
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeName(text, text.Length), "Should have retrieved the attribute name 'foo'");
- }
-
- [Test]
- public void FailureTest3()
- {
- string text = "a";
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeName(text, text.Length));
- }
-
- [Test]
- public void FailureTest4()
- {
- string text = " a";
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeName(text, text.Length));
- }
-
- [Test]
- public void EmptyString()
- {
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeName(String.Empty, 10));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs
deleted file mode 100644
index 8ac5ac6f4a..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- [TestFixture]
- public class AttributeNameUnderCursorTests
- {
- [Test]
- public void SuccessTest1()
- {
- string text = "<a foo";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, text.Length));
- }
-
- [Test]
- public void SuccessTest2()
- {
- string text = "<a foo";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, text.IndexOf("foo")));
- }
-
- [Test]
- public void SuccessTest3()
- {
- string text = "<a foo";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, text.IndexOf("oo")));
- }
-
- [Test]
- public void SuccessTest4()
- {
- string text = "<a foo";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, text.Length - 2));
- }
-
- [Test]
- public void SuccessTest5()
- {
- string text = "<a foo=";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, 3));
- }
-
- [Test]
- public void SuccessTest6()
- {
- string text = "<a foo=";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, text.Length));
- }
-
- [Test]
- public void SuccessTest7()
- {
- string text = "<a foo='";
- Assert.AreEqual("foo", XmlParser.GetAttributeNameAtIndex(text, text.Length));
- }
-
- [Test]
- public void SuccessTest8()
- {
- string text = "<a type='a";
- Assert.AreEqual("type", XmlParser.GetAttributeNameAtIndex(text, text.Length));
- }
-
- [Test]
- public void SuccessTest9()
- {
- string text = "<a type='a'";
- Assert.AreEqual("type", XmlParser.GetAttributeNameAtIndex(text, text.Length - 1));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeValueUnderCursorTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeValueUnderCursorTests.cs
deleted file mode 100644
index c186bc5a9a..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeValueUnderCursorTests.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- [TestFixture]
- public class AttributeValueUnderCursorTests
- {
- [Test]
- public void SuccessTest1()
- {
- string text = "<a foo='abc'";
- Assert.AreEqual("abc", XmlParser.GetAttributeValueAtIndex(text, text.Length - 1));
- }
-
- [Test]
- public void SuccessTest2()
- {
- string text = "<a foo=\"abc\"";
- Assert.AreEqual("abc", XmlParser.GetAttributeValueAtIndex(text, text.Length - 1));
- }
-
- [Test]
- public void SuccessTest3()
- {
- string text = "<a foo='abc'";
- Assert.AreEqual("abc", XmlParser.GetAttributeValueAtIndex(text, text.Length - 2));
- }
-
- [Test]
- public void SuccessTest4()
- {
- string text = "<a foo='abc'";
- Assert.AreEqual("abc", XmlParser.GetAttributeValueAtIndex(text, text.IndexOf("abc")));
- }
-
- [Test]
- public void SuccessTest5()
- {
- string text = "<a foo=''";
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeValueAtIndex(text, text.Length - 1));
- }
-
- [Test]
- public void SuccessTest6()
- {
- string text = "<a foo='a'";
- Assert.AreEqual("a", XmlParser.GetAttributeValueAtIndex(text, text.Length - 1));
- }
-
- [Test]
- public void SuccessTest7()
- {
- string text = "<a foo='a\"b\"c'";
- Assert.AreEqual("a\"b\"c", XmlParser.GetAttributeValueAtIndex(text, text.Length - 1));
- }
-
- [Test]
- public void FailureTest1()
- {
- string text = "<a foo='a";
- Assert.AreEqual(String.Empty, XmlParser.GetAttributeValueAtIndex(text, text.Length - 1));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs
deleted file mode 100755
index 36724daa04..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- [TestFixture]
- public class InsideAttributeValueTestFixture
- {
- [Test]
- public void InvalidString()
- {
- Assert.IsFalse(XmlParser.IsInsideAttributeValue(String.Empty, 10));
- }
-
- [Test]
- public void DoubleQuotesTest1()
- {
- string xml = "<foo a=\"";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void DoubleQuotesTest2()
- {
- string xml = "<foo a=\"\" ";
- Assert.IsFalse(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void DoubleQuotesTest3()
- {
- string xml = "<foo a=\"\"";
- Assert.IsFalse(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void DoubleQuotesTest4()
- {
- string xml = "<foo a=\" ";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void NoXmlElementStart()
- {
- string xml = "foo a=\"";
- Assert.IsFalse(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void DoubleQuotesTest5()
- {
- string xml = "<foo a=\"\"";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, 8));
- }
-
- [Test]
- public void EqualsSignTest()
- {
- string xml = "<foo a=";
- Assert.IsFalse(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void SingleQuoteTest1()
- {
- string xml = "<foo a='";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void MixedQuotesTest1()
- {
- string xml = "<foo a='\"";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void MixedQuotesTest2()
- {
- string xml = "<foo a=\"'";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void MixedQuotesTest3()
- {
- string xml = "<foo a=\"''";
- Assert.IsTrue(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
-
- [Test]
- public void MixedQuotesTest4()
- {
- string xml = "<foo a=\"''\"";
- Assert.IsFalse(XmlParser.IsInsideAttributeValue(xml, xml.Length));
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs
deleted file mode 100755
index 54beae0fdd..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- /// <summary>
- /// When the user hits the '=' key we need to produce intellisense
- /// if the attribute is of the form 'xmlns' or 'xmlns:foo'. This
- /// tests the parsing of the text before the cursor to see if the
- /// attribute is a namespace declaration.
- /// </summary>
- [TestFixture]
- public class NamespaceDeclarationTestFixture
- {
- [Test]
- public void SuccessTest1()
- {
- string text = "<foo xmlns=";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest2()
- {
- string text = "<foo xmlns =";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest3()
- {
- string text = "<foo \r\nxmlns\r\n=";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest4()
- {
- string text = "<foo xmlns:nant=";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest5()
- {
- string text = "<foo xmlns";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest6()
- {
- string text = "<foo xmlns:nant";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest7()
- {
- string text = " xmlns=";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest8()
- {
- string text = " xmlns";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void SuccessTest9()
- {
- string text = " xmlns:f";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsTrue(isNamespace, "Namespace should be recognised.");
- }
-
- [Test]
- public void FailureTest1()
- {
- string text = "<foo bar=";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsFalse(isNamespace, "Namespace should not be recognised.");
- }
-
- [Test]
- public void FailureTest2()
- {
- string text = "";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsFalse(isNamespace, "Namespace should not be recognised.");
- }
-
- [Test]
- public void FailureTest3()
- {
- string text = " ";
- bool isNamespace = XmlParser.IsNamespaceDeclaration(text, text.Length);
- Assert.IsFalse(isNamespace, "Namespace should not be recognised.");
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs
deleted file mode 100755
index dbe84d585b..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests.Parser
-{
- [TestFixture]
- public class ParentElementPathTestFixture
- {
- XmlElementPath elementPath;
- XmlElementPath expectedElementPath;
- string namespaceURI = "http://foo/foo.xsd";
-
- [Test]
- public void SuccessTest1()
- {
- string text = "<foo xmlns='" + namespaceURI + "' ><";
- elementPath = XmlParser.GetParentElementPath(text);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void SuccessTest2()
- {
- string text = "<foo xmlns='" + namespaceURI + "' ><bar></bar><";
- elementPath = XmlParser.GetParentElementPath(text);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void SuccessTest3()
- {
- string text = "<foo xmlns='" + namespaceURI + "' ><bar/><";
- elementPath = XmlParser.GetParentElementPath(text);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
-
- [Test]
- public void SuccessTest4()
- {
- string text = "<bar xmlns='http://test.com'><foo xmlns='" + namespaceURI + "' ><";
- elementPath = XmlParser.GetParentElementPath(text);
-
- expectedElementPath = new XmlElementPath();
- expectedElementPath.Elements.Add(new QualifiedName("foo", namespaceURI));
- Assert.IsTrue(elementPath.Equals(expectedElementPath),
- "Incorrect active element path.");
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs
deleted file mode 100644
index b3f5e6e204..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using MonoDevelop.XmlEditor.Completion;
-using NUnit.Framework;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.Schema
-{
-/* [TestFixture]
- public class GetSchemaFromFileNameTestFixture
- {
- XmlSchemaCompletionDataCollection schemas;
- string expectedNamespace;
- XmlCompletionDataProvider provider;
-
- [TestFixtureSetUp]
- public void SetUpFixture()
- {
- schemas = new XmlSchemaCompletionDataCollection();
- XmlSchemaCompletionData completionData = new XmlSchemaCompletionData(ResourceManager.GetXsdSchema());
- expectedNamespace = completionData.NamespaceUri;
- completionData.FileName = @"/home/Schemas/MySchema.xsd";
- schemas.Add(completionData);
-
- provider = new XmlCompletionDataProvider(schemas, completionData, String.Empty, null);
- }
-
- [Test]
- public void SameFileName()
- {
- XmlSchemaCompletionData foundSchema = schemas.GetSchemaFromFileName(@"/home/Schemas/MySchema.xsd");
- Assert.AreEqual(expectedNamespace, foundSchema.NamespaceUri);
- }
-
- [Test]
- public void SameFileNameFromProvider()
- {
- XmlSchemaCompletionData foundSchema = provider.FindSchemaFromFileName(@"/home/Schemas/MySchema.xsd");
- Assert.AreEqual(expectedNamespace, foundSchema.NamespaceUri);
- }
-
- [Test]
- public void MissingFileName()
- {
- Assert.IsNull(schemas.GetSchemaFromFileName(@"/Test/test.xsd"));
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs
deleted file mode 100644
index 540499749f..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Xml;
-using System.Xml.XPath;
-
-namespace MonoDevelop.XmlEditor.Tests.XPathQuery
-{
-/* [TestFixture]
- public class RunXPathQueryTests
- {
- [Test]
- public void OneElementNode()
- {
- string xml = "<root>\r\n" +
- "\t<foo/>\r\n" +
- "</root>";
-
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//foo");
- XPathNodeMatch node = nodes[0];
- IXmlLineInfo lineInfo = node as IXmlLineInfo;
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(1, node.LineNumber);
- Assert.AreEqual(2, node.LinePosition);
- Assert.AreEqual("foo", node.Value);
- Assert.AreEqual("<foo/>", node.DisplayValue);
- Assert.AreEqual(XPathNodeType.Element, node.NodeType);
- Assert.IsNotNull(lineInfo);
- }
-
- [Test]
- public void OneElementNodeWithNamespace()
- {
- string xml = "<root xmlns='http://foo.com'>\r\n" +
- "\t<foo></foo>\r\n" +
- "</root>";
- List<XmlNamespace> namespaces = new List<XmlNamespace>();
- namespaces.Add(new XmlNamespace("f", "http://foo.com"));
- ReadOnlyCollection<XmlNamespace> readOnlyNamespaces = new ReadOnlyCollection<XmlNamespace>(namespaces);
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//f:foo", readOnlyNamespaces);
- XPathNodeMatch node = nodes[0];
- IXmlLineInfo lineInfo = node as IXmlLineInfo;
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(1, node.LineNumber);
- Assert.AreEqual(2, node.LinePosition);
- Assert.AreEqual("foo", node.Value);
- Assert.AreEqual("<foo>", node.DisplayValue);
- Assert.AreEqual(XPathNodeType.Element, node.NodeType);
- Assert.IsNotNull(lineInfo);
- }
-
- [Test]
- public void ElementWithNamespacePrefix()
- {
- string xml = "<f:root xmlns:f='http://foo.com'>\r\n" +
- "\t<f:foo></f:foo>\r\n" +
- "</f:root>";
- List<XmlNamespace> namespaces = new List<XmlNamespace>();
- namespaces.Add(new XmlNamespace("fo", "http://foo.com"));
- ReadOnlyCollection<XmlNamespace> readOnlyNamespaces = new ReadOnlyCollection<XmlNamespace>(namespaces);
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//fo:foo", readOnlyNamespaces);
- XPathNodeMatch node = nodes[0];
- IXmlLineInfo lineInfo = node as IXmlLineInfo;
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(1, node.LineNumber);
- Assert.AreEqual(2, node.LinePosition);
- Assert.AreEqual("f:foo", node.Value);
- Assert.AreEqual("<f:foo>", node.DisplayValue);
- Assert.AreEqual(XPathNodeType.Element, node.NodeType);
- Assert.IsNotNull(lineInfo);
- }
-
- [Test]
- public void NoNodeFound()
- {
- string xml = "<root>\r\n" +
- "\t<foo/>\r\n" +
- "</root>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//bar");
- Assert.AreEqual(0, nodes.Length);
- }
-
- [Test]
- public void TextNode()
- {
- string xml = "<root>\r\n" +
- "\t<foo>test</foo>\r\n" +
- "</root>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//foo/text()");
- XPathNodeMatch node = nodes[0];
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(1, node.LineNumber);
- Assert.AreEqual(6, node.LinePosition);
- Assert.AreEqual("test", node.Value);
- Assert.AreEqual("test", node.DisplayValue);
- }
-
- [Test]
- public void CommentNode()
- {
- string xml = "<!-- Test --><root/>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//comment()");
- XPathNodeMatch node = nodes[0];
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(0, node.LineNumber);
- Assert.AreEqual(4, node.LinePosition);
- Assert.AreEqual(" Test ", node.Value);
- Assert.AreEqual("<!-- Test -->", node.DisplayValue);
- }
-
- [Test]
- public void EmptyCommentNode()
- {
- string xml = "<!----><root/>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//comment()");
- XPathNodeMatch node = nodes[0];
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(0, node.LineNumber);
- Assert.AreEqual(4, node.LinePosition);
- Assert.AreEqual(String.Empty, node.Value);
- Assert.AreEqual("<!---->", node.DisplayValue);
- }
-
- [Test]
- public void NamespaceNode()
- {
- string xml = "<root xmlns='http://foo.com'/>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//namespace::*");
- XPathNodeMatch node = nodes[0];
- XPathNodeMatch xmlNamespaceNode = nodes[1];
- Assert.AreEqual(2, nodes.Length);
- Assert.AreEqual(0, node.LineNumber);
- Assert.AreEqual(6, node.LinePosition);
- Assert.AreEqual("xmlns=\"http://foo.com\"", node.Value);
- Assert.AreEqual("xmlns=\"http://foo.com\"", node.DisplayValue);
- Assert.IsFalse(xmlNamespaceNode.HasLineInfo());
- Assert.AreEqual("xmlns:xml=\"http://www.w3.org/XML/1998/namespace\"", xmlNamespaceNode.Value);
- }
-
- [Test]
- public void ProcessingInstructionNode()
- {
- string xml = "<root><?test processinstruction='1.0'?></root>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//processing-instruction()");
- XPathNodeMatch node = nodes[0];
- Assert.AreEqual("test", node.Value);
- Assert.AreEqual("<?test processinstruction='1.0'?>", node.DisplayValue);
- Assert.AreEqual(0, node.LineNumber);
- Assert.AreEqual(8, node.LinePosition);
- }
-
- [Test]
- public void AttributeNode()
- {
- string xml = "<root>\r\n" +
- "\t<foo Id='ab'></foo>\r\n" +
- "</root>";
- XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//foo/@Id");
- XPathNodeMatch node = nodes[0];
- Assert.AreEqual(1, nodes.Length);
- Assert.AreEqual(1, node.LineNumber);
- Assert.AreEqual(6, node.LinePosition);
- Assert.AreEqual("Id", node.Value);
- Assert.AreEqual("@Id", node.DisplayValue);
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs
deleted file mode 100644
index def98dd6fe..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-using NUnit.Framework;
-using System.IO;
-using System.Text;
-using System.Xml;
-
-namespace MonoDevelop.XmlEditor.Tests.XPathQuery
-{
-/* [TestFixture]
- public class XPathHistoryListTests
- {
- StringBuilder xml;
- XmlWriter writer;
-
- [SetUp]
- public void Init()
- {
- xml = new StringBuilder();
- XmlWriterSettings settings = new XmlWriterSettings();
- settings.Indent = true;
- settings.OmitXmlDeclaration = true;
- settings.IndentChars = "\t";
- writer = XmlWriter.Create(xml, settings);
- }
-
- [Test]
- public void ToXmlNoItems()
- {
- XPathHistoryList list = new XPathHistoryList();
- list.WriteTo(writer);
-
- string expectedXml = "<XPathHistoryList />";
- Assert.AreEqual(expectedXml, xml.ToString());
- }
-
- [Test]
- public void ToXmlOneItem()
- {
- XPathHistoryList list = new XPathHistoryList();
- list.Add("//test");
- list.WriteTo(writer);
-
- string expectedXml = "<XPathHistoryList>\n" +
- "\t<XPath>//test</XPath>\n" +
- "</XPathHistoryList>";
- Assert.AreEqual(expectedXml, xml.ToString());
- }
-
- [Test]
- public void FromXmlNoItems()
- {
- XPathHistoryList list = new XPathHistoryList();
- list.WriteTo(writer);
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- list = new XPathHistoryList();
- list = (XPathHistoryList)list.ReadFrom(reader);
-
- Assert.AreEqual(0, list.GetXPaths().Length);
- }
-
- [Test]
- public void FromXmlOneItem()
- {
- XPathHistoryList list = new XPathHistoryList();
- list.Add("//test");
- list.WriteTo(writer);
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- list = new XPathHistoryList();
- list = (XPathHistoryList)list.ReadFrom(reader);
- string[] xpaths = list.GetXPaths();
-
- Assert.AreEqual(1, xpaths.Length);
- Assert.AreEqual("//test", xpaths[0]);
- }
-
- [Test]
- public void FromXmlTwoItems()
- {
- XPathHistoryList list = new XPathHistoryList();
- list.Add("//test");
- list.Add("//a");
- list.WriteTo(writer);
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- list = new XPathHistoryList();
- list = (XPathHistoryList)list.ReadFrom(reader);
-
- string[] xpaths = list.GetXPaths();
- Assert.AreEqual(2, xpaths.Length);
- Assert.AreEqual("//test", xpaths[0]);
- Assert.AreEqual("//a", xpaths[1]);
- }
-
- [Test]
- public void FromXmlContainingNoXPathHistoryList()
- {
- XPathHistoryList list = new XPathHistoryList();
- XmlTextReader reader = new XmlTextReader(new StringReader("<SerializedNode/>"));
- list = (XPathHistoryList)list.ReadFrom(reader);
- Assert.AreEqual(0, list.GetXPaths().Length);
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs
deleted file mode 100644
index 45ac127a17..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-
-using MonoDevelop.Core;
-using NUnit.Framework;
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-
-namespace MonoDevelop.XmlEditor.Tests.XPathQuery
-{
-/* [TestFixture]
- public class XPathNamespaceListTests
- {
- StringBuilder xml;
- XmlWriter writer;
-
- [SetUp]
- public void Init()
- {
- xml = new StringBuilder();
- XmlWriterSettings settings = new XmlWriterSettings();
- settings.Indent = true;
- settings.OmitXmlDeclaration = true;
- settings.IndentChars = "\t";
- writer = XmlWriter.Create(xml, settings);
- }
-
- [Test]
- public void ToXmlNoItems()
- {
- XPathNamespaceList list = new XPathNamespaceList();
- list.WriteTo(writer);
- string expectedXml = "<XPathNamespaceList />";
-
- Assert.AreEqual(expectedXml, xml.ToString());
- }
-
- [Test]
- public void ToXmlOneItem()
- {
- XPathNamespaceList list = new XPathNamespaceList();
- list.Add("n", "http://mono-project.com");
- list.WriteTo(writer);
- string expectedXml = "<XPathNamespaceList>\n" +
- "\t<Namespace>Prefix [n] Uri [http://mono-project.com]</Namespace>\n" +
- "</XPathNamespaceList>";
-
- Assert.AreEqual(expectedXml, xml.ToString());
- }
-
- [Test]
- public void FromXmlNoItems()
- {
- XPathNamespaceList list = new XPathNamespaceList();
- list.WriteTo(writer);
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- list = new XPathNamespaceList();
- list = (XPathNamespaceList)list.ReadFrom(reader);
-
- Assert.AreEqual(0, list.GetNamespaces().Length);
- }
-
- [Test]
- public void FromXmlOneItem()
- {
- XPathNamespaceList list = new XPathNamespaceList();
- list.Add("n", "http://mono-project.com");
- list.WriteTo(writer);
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- list = new XPathNamespaceList();
- list = (XPathNamespaceList)list.ReadFrom(reader);
-
- XmlNamespace[] namespaces = list.GetNamespaces();
- Assert.AreEqual(1, namespaces.Length);
- Assert.AreEqual("n", namespaces[0].Prefix);
- Assert.AreEqual("http://mono-project.com", namespaces[0].Uri);
- }
-
- [Test]
- public void FromXmlTwoItems()
- {
- XPathNamespaceList list = new XPathNamespaceList();
- list.Add("a", "Namespace-a");
- list.Add("b", "Namespace-b");
- list.WriteTo(writer);
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- list = new XPathNamespaceList();
- list = (XPathNamespaceList)list.ReadFrom(reader);
-
- XmlNamespace[] namespaces = list.GetNamespaces();
- Assert.AreEqual(2, namespaces.Length);
- Assert.AreEqual("Namespace-a", namespaces[0].Uri);
- Assert.AreEqual("Namespace-b", namespaces[1].Uri);
- }
-
- [Test]
- public void InvalidNamespace()
- {
- string xml = "<XPathNamespaceList>\n" +
- "\t<Namespace>Prefix [n] Uri [http://mono-project.com]</Namespace>\n" +
- "\t<Namespace></Namespace>\n" +
- "</XPathNamespaceList>";
-
- string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- XPathNamespaceList list = new XPathNamespaceList();
- list = (XPathNamespaceList)list.ReadFrom(reader);
-
- XmlNamespace[] namespaces = list.GetNamespaces();
- Assert.AreEqual(2, namespaces.Length);
- Assert.AreEqual("http://mono-project.com", namespaces[0].Uri);
- Assert.AreEqual(String.Empty, namespaces[1].Uri);
- }
-
- [Test]
- public void FromXmlContainingNoXPathNamespaceList()
- {
- XPathNamespaceList list = new XPathNamespaceList();
- XmlTextReader reader = new XmlTextReader(new StringReader("<SerializedNode/>"));
- list = (XPathNamespaceList)list.ReadFrom(reader);
- Assert.AreEqual(0, list.GetNamespaces().Length);
- }
- }*/
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs
deleted file mode 100644
index 069c100bc5..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-
-namespace MonoDevelop.XmlEditor.Tests.XPathQuery
-{
- [TestFixture]
- public class XmlNamespaceTests
- {
- [Test]
- public void SimpleNamespace()
- {
- XmlNamespace ns = new XmlNamespace("s", "http://sharpdevelop.com");
- Assert.AreEqual("s", ns.Prefix);
- Assert.AreEqual("http://sharpdevelop.com", ns.Uri);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceToStringTests.cs b/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceToStringTests.cs
deleted file mode 100644
index 55182fef25..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceToStringTests.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-
-namespace MonoDevelop.XmlEditor.Tests.XPathQuery
-{
- [TestFixture]
- public class XmlNamespaceToStringTests
- {
- [Test]
- public void PrefixAndNamespaceToString()
- {
- XmlNamespace ns = new XmlNamespace("f", "http://foo.com");
- Assert.AreEqual("Prefix [f] Uri [http://foo.com]", ns.ToString());
- }
-
- [Test]
- public void PrefixAndNamespaceFromString()
- {
- XmlNamespace ns = XmlNamespace.FromString("Prefix [f] Uri [http://foo.com]");
- Assert.AreEqual("f", ns.Prefix);
- Assert.AreEqual("http://foo.com", ns.Uri);
- }
-
- [Test]
- public void EmptyPrefixAndNamespaceFromString()
- {
- XmlNamespace ns = XmlNamespace.FromString("Prefix [] Uri [http://foo.com]");
- Assert.AreEqual(String.Empty, ns.Prefix);
- Assert.AreEqual("http://foo.com", ns.Uri);
- }
-
- [Test]
- public void PrefixAndEmptyNamespaceFromString()
- {
- XmlNamespace ns = XmlNamespace.FromString("Prefix [f] Uri []");
- Assert.AreEqual("f", ns.Prefix);
- Assert.AreEqual(String.Empty, ns.Uri);
- }
-
- [Test]
- public void FromEmptyString()
- {
- XmlNamespace ns = XmlNamespace.FromString(String.Empty);
- Assert.AreEqual(String.Empty, ns.Prefix);
- Assert.AreEqual(String.Empty, ns.Uri);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.cs b/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.cs
deleted file mode 100644
index 963729d207..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.cs
+++ /dev/null
@@ -1,159 +0,0 @@
-
-// This file has been generated by the GUI designer. Do not modify.
-namespace MonoDevelop.Xml.Formatting
-{
- internal partial class XmlFormattingPolicyPanelWidget
- {
- private global::Gtk.VBox vbox2;
- private global::Gtk.HBox hbox1;
- private global::Gtk.VBox boxScopes;
- private global::Gtk.ScrolledWindow GtkScrolledWindow;
- private global::Gtk.TreeView listView;
- private global::Gtk.HBox hbox2;
- private global::Gtk.Button buttonAdd;
- private global::Gtk.Button buttonRemove;
- private global::Gtk.VBox vbox4;
- private global::Gtk.Label labelScopes;
- private global::Gtk.Table tableScopes;
- private global::MonoDevelop.Components.PropertyGrid.PropertyGrid propertyGrid;
- private global::Gtk.HBox hbox3;
- private global::Gtk.Button buttonAdvanced;
-
- protected virtual void Build ()
- {
- global::Stetic.Gui.Initialize (this);
- // Widget MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget
- global::Stetic.BinContainer.Attach (this);
- this.Name = "MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget";
- // Container child MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.Gtk.Container+ContainerChild
- this.vbox2 = new global::Gtk.VBox ();
- this.vbox2.Name = "vbox2";
- this.vbox2.Spacing = 6;
- // Container child vbox2.Gtk.Box+BoxChild
- this.hbox1 = new global::Gtk.HBox ();
- this.hbox1.Name = "hbox1";
- this.hbox1.Spacing = 6;
- // Container child hbox1.Gtk.Box+BoxChild
- this.boxScopes = new global::Gtk.VBox ();
- this.boxScopes.Name = "boxScopes";
- this.boxScopes.Spacing = 6;
- // Container child boxScopes.Gtk.Box+BoxChild
- this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
- this.GtkScrolledWindow.Name = "GtkScrolledWindow";
- this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
- // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
- this.listView = new global::Gtk.TreeView ();
- this.listView.CanFocus = true;
- this.listView.Name = "listView";
- this.listView.HeadersVisible = false;
- this.GtkScrolledWindow.Add (this.listView);
- this.boxScopes.Add (this.GtkScrolledWindow);
- global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.boxScopes [this.GtkScrolledWindow]));
- w2.Position = 0;
- // Container child boxScopes.Gtk.Box+BoxChild
- this.hbox2 = new global::Gtk.HBox ();
- this.hbox2.Name = "hbox2";
- this.hbox2.Spacing = 6;
- // Container child hbox2.Gtk.Box+BoxChild
- this.buttonAdd = new global::Gtk.Button ();
- this.buttonAdd.CanFocus = true;
- this.buttonAdd.Name = "buttonAdd";
- this.buttonAdd.UseStock = true;
- this.buttonAdd.UseUnderline = true;
- this.buttonAdd.Label = "gtk-add";
- this.hbox2.Add (this.buttonAdd);
- global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.buttonAdd]));
- w3.Position = 0;
- w3.Expand = false;
- w3.Fill = false;
- // Container child hbox2.Gtk.Box+BoxChild
- this.buttonRemove = new global::Gtk.Button ();
- this.buttonRemove.CanFocus = true;
- this.buttonRemove.Name = "buttonRemove";
- this.buttonRemove.UseStock = true;
- this.buttonRemove.UseUnderline = true;
- this.buttonRemove.Label = "gtk-remove";
- this.hbox2.Add (this.buttonRemove);
- global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.buttonRemove]));
- w4.Position = 1;
- w4.Expand = false;
- w4.Fill = false;
- this.boxScopes.Add (this.hbox2);
- global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.boxScopes [this.hbox2]));
- w5.Position = 1;
- w5.Expand = false;
- w5.Fill = false;
- this.hbox1.Add (this.boxScopes);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.boxScopes]));
- w6.Position = 0;
- w6.Expand = false;
- w6.Fill = false;
- // Container child hbox1.Gtk.Box+BoxChild
- this.vbox4 = new global::Gtk.VBox ();
- this.vbox4.Name = "vbox4";
- this.vbox4.Spacing = 6;
- // Container child vbox4.Gtk.Box+BoxChild
- this.labelScopes = new global::Gtk.Label ();
- this.labelScopes.Name = "labelScopes";
- this.labelScopes.Xalign = 0F;
- this.labelScopes.LabelProp = global::Mono.Unix.Catalog.GetString ("Enter one or several xpath expressions to which this format applies:");
- this.vbox4.Add (this.labelScopes);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.labelScopes]));
- w7.Position = 0;
- w7.Expand = false;
- w7.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.tableScopes = new global::Gtk.Table (((uint)(3)), ((uint)(3)), false);
- this.tableScopes.Name = "tableScopes";
- this.tableScopes.RowSpacing = ((uint)(6));
- this.tableScopes.ColumnSpacing = ((uint)(6));
- this.vbox4.Add (this.tableScopes);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.tableScopes]));
- w8.Position = 1;
- w8.Expand = false;
- w8.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.propertyGrid = new global::MonoDevelop.Components.PropertyGrid.PropertyGrid ();
- this.propertyGrid.Name = "propertyGrid";
- this.propertyGrid.ShowToolbar = false;
- this.propertyGrid.ShowHelp = false;
- this.vbox4.Add (this.propertyGrid);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.propertyGrid]));
- w9.Position = 2;
- this.hbox1.Add (this.vbox4);
- global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
- w10.Position = 1;
- this.vbox2.Add (this.hbox1);
- global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
- w11.Position = 0;
- // Container child vbox2.Gtk.Box+BoxChild
- this.hbox3 = new global::Gtk.HBox ();
- this.hbox3.Name = "hbox3";
- this.hbox3.Spacing = 6;
- // Container child hbox3.Gtk.Box+BoxChild
- this.buttonAdvanced = new global::Gtk.Button ();
- this.buttonAdvanced.CanFocus = true;
- this.buttonAdvanced.Name = "buttonAdvanced";
- this.buttonAdvanced.UseUnderline = true;
- this.buttonAdvanced.Label = global::Mono.Unix.Catalog.GetString ("Advanced Settings");
- this.hbox3.Add (this.buttonAdvanced);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.buttonAdvanced]));
- w12.Position = 0;
- w12.Expand = false;
- w12.Fill = false;
- this.vbox2.Add (this.hbox3);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox3]));
- w13.Position = 1;
- w13.Expand = false;
- w13.Fill = false;
- this.Add (this.vbox2);
- if ((this.Child != null)) {
- this.Child.ShowAll ();
- }
- this.Hide ();
- this.buttonAdd.Clicked += new global::System.EventHandler (this.OnButtonAddClicked);
- this.buttonRemove.Clicked += new global::System.EventHandler (this.OnButtonRemoveClicked);
- this.buttonAdvanced.Clicked += new global::System.EventHandler (this.OnButtonAdvancedClicked);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs b/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs
deleted file mode 100644
index 3a284d598b..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-
-// This file has been generated by the GUI designer. Do not modify.
-namespace MonoDevelop.XmlEditor.Gui
-{
- public partial class XmlEditorOptionsPanelWidget
- {
- private global::Gtk.VBox vbox1;
- private global::Gtk.CheckButton autoCompleteElementsCheck;
- private global::Gtk.CheckButton autoAddPunctuationCheck;
- private global::Gtk.CheckButton showSchemaAnnotationCheck;
-
- protected virtual void Build ()
- {
- global::Stetic.Gui.Initialize (this);
- // Widget MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget
- global::Stetic.BinContainer.Attach (this);
- this.Name = "MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget";
- // Container child MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.Gtk.Container+ContainerChild
- this.vbox1 = new global::Gtk.VBox ();
- this.vbox1.Name = "vbox1";
- this.vbox1.Spacing = 6;
- // Container child vbox1.Gtk.Box+BoxChild
- this.autoCompleteElementsCheck = new global::Gtk.CheckButton ();
- this.autoCompleteElementsCheck.CanFocus = true;
- this.autoCompleteElementsCheck.Name = "autoCompleteElementsCheck";
- this.autoCompleteElementsCheck.Label = global::Mono.Unix.Catalog.GetString ("Automatically insert closing tags");
- this.autoCompleteElementsCheck.DrawIndicator = true;
- this.autoCompleteElementsCheck.UseUnderline = true;
- this.vbox1.Add (this.autoCompleteElementsCheck);
- global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.autoCompleteElementsCheck]));
- w1.Position = 0;
- w1.Expand = false;
- w1.Fill = false;
- // Container child vbox1.Gtk.Box+BoxChild
- this.autoAddPunctuationCheck = new global::Gtk.CheckButton ();
- this.autoAddPunctuationCheck.CanFocus = true;
- this.autoAddPunctuationCheck.Name = "autoAddPunctuationCheck";
- this.autoAddPunctuationCheck.Label = global::Mono.Unix.Catalog.GetString ("Automatically insert punctuation (=\"\", />, etc.)");
- this.autoAddPunctuationCheck.Active = true;
- this.autoAddPunctuationCheck.DrawIndicator = true;
- this.autoAddPunctuationCheck.UseUnderline = true;
- this.vbox1.Add (this.autoAddPunctuationCheck);
- global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.autoAddPunctuationCheck]));
- w2.Position = 1;
- w2.Expand = false;
- w2.Fill = false;
- // Container child vbox1.Gtk.Box+BoxChild
- this.showSchemaAnnotationCheck = new global::Gtk.CheckButton ();
- this.showSchemaAnnotationCheck.Sensitive = false;
- this.showSchemaAnnotationCheck.CanFocus = true;
- this.showSchemaAnnotationCheck.Name = "showSchemaAnnotationCheck";
- this.showSchemaAnnotationCheck.Label = global::Mono.Unix.Catalog.GetString ("Show schema annotation");
- this.showSchemaAnnotationCheck.DrawIndicator = true;
- this.showSchemaAnnotationCheck.UseUnderline = true;
- this.vbox1.Add (this.showSchemaAnnotationCheck);
- global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.showSchemaAnnotationCheck]));
- w3.Position = 2;
- w3.Expand = false;
- w3.Fill = false;
- this.Add (this.vbox1);
- if ((this.Child != null)) {
- this.Child.ShowAll ();
- }
- this.Show ();
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs b/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs
deleted file mode 100644
index 0434dc2ac7..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs
+++ /dev/null
@@ -1,179 +0,0 @@
-
-// This file has been generated by the GUI designer. Do not modify.
-namespace MonoDevelop.XmlEditor.Gui
-{
- public partial class XmlSchemasPanelWidget
- {
- private global::Gtk.VBox vbox1;
- private global::Gtk.Label label1;
- private global::Gtk.HBox hbox1;
- private global::Gtk.ScrolledWindow GtkScrolledWindow;
- private global::Gtk.TreeView registeredSchemasView;
- private global::Gtk.VBox vbox2;
- private global::Gtk.Button registeredSchemasAddButton;
- private global::Gtk.Button registeredSchemasRemoveButton;
- private global::Gtk.Label label3;
- private global::Gtk.Label label2;
- private global::Gtk.HBox hbox2;
- private global::Gtk.ScrolledWindow GtkScrolledWindow1;
- private global::Gtk.TreeView defaultAssociationsView;
- private global::Gtk.VBox vbox3;
- private global::Gtk.Button defaultAssociationsAddButton;
- private global::Gtk.Button defaultAssociationsRemoveButton;
-
- protected virtual void Build ()
- {
- global::Stetic.Gui.Initialize (this);
- // Widget MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget
- global::Stetic.BinContainer.Attach (this);
- this.Name = "MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget";
- // Container child MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.Gtk.Container+ContainerChild
- this.vbox1 = new global::Gtk.VBox ();
- this.vbox1.Name = "vbox1";
- this.vbox1.Spacing = 6;
- // Container child vbox1.Gtk.Box+BoxChild
- this.label1 = new global::Gtk.Label ();
- this.label1.Name = "label1";
- this.label1.Xalign = 0F;
- this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Registered Schemas</b>");
- this.label1.UseMarkup = true;
- this.vbox1.Add (this.label1);
- global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label1]));
- w1.Position = 0;
- w1.Expand = false;
- w1.Fill = false;
- // Container child vbox1.Gtk.Box+BoxChild
- this.hbox1 = new global::Gtk.HBox ();
- this.hbox1.Name = "hbox1";
- this.hbox1.Spacing = 6;
- // Container child hbox1.Gtk.Box+BoxChild
- this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
- this.GtkScrolledWindow.Name = "GtkScrolledWindow";
- this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
- // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
- this.registeredSchemasView = new global::Gtk.TreeView ();
- this.registeredSchemasView.CanFocus = true;
- this.registeredSchemasView.Name = "registeredSchemasView";
- this.GtkScrolledWindow.Add (this.registeredSchemasView);
- this.hbox1.Add (this.GtkScrolledWindow);
- global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow]));
- w3.Position = 0;
- // Container child hbox1.Gtk.Box+BoxChild
- this.vbox2 = new global::Gtk.VBox ();
- this.vbox2.Name = "vbox2";
- this.vbox2.Spacing = 6;
- // Container child vbox2.Gtk.Box+BoxChild
- this.registeredSchemasAddButton = new global::Gtk.Button ();
- this.registeredSchemasAddButton.CanFocus = true;
- this.registeredSchemasAddButton.Name = "registeredSchemasAddButton";
- this.registeredSchemasAddButton.UseStock = true;
- this.registeredSchemasAddButton.UseUnderline = true;
- this.registeredSchemasAddButton.Label = "gtk-add";
- this.vbox2.Add (this.registeredSchemasAddButton);
- global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.registeredSchemasAddButton]));
- w4.Position = 0;
- w4.Expand = false;
- w4.Fill = false;
- // Container child vbox2.Gtk.Box+BoxChild
- this.registeredSchemasRemoveButton = new global::Gtk.Button ();
- this.registeredSchemasRemoveButton.CanFocus = true;
- this.registeredSchemasRemoveButton.Name = "registeredSchemasRemoveButton";
- this.registeredSchemasRemoveButton.UseStock = true;
- this.registeredSchemasRemoveButton.UseUnderline = true;
- this.registeredSchemasRemoveButton.Label = "gtk-remove";
- this.vbox2.Add (this.registeredSchemasRemoveButton);
- global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.registeredSchemasRemoveButton]));
- w5.Position = 1;
- w5.Expand = false;
- w5.Fill = false;
- this.hbox1.Add (this.vbox2);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
- w6.Position = 1;
- w6.Expand = false;
- w6.Fill = false;
- this.vbox1.Add (this.hbox1);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
- w7.Position = 1;
- // Container child vbox1.Gtk.Box+BoxChild
- this.label3 = new global::Gtk.Label ();
- this.label3.Name = "label3";
- this.vbox1.Add (this.label3);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label3]));
- w8.Position = 2;
- w8.Expand = false;
- w8.Fill = false;
- // Container child vbox1.Gtk.Box+BoxChild
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.Xalign = 0F;
- this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Default File Associations</b>");
- this.label2.UseMarkup = true;
- this.vbox1.Add (this.label2);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.label2]));
- w9.Position = 3;
- w9.Expand = false;
- w9.Fill = false;
- // Container child vbox1.Gtk.Box+BoxChild
- this.hbox2 = new global::Gtk.HBox ();
- this.hbox2.Name = "hbox2";
- this.hbox2.Spacing = 6;
- // Container child hbox2.Gtk.Box+BoxChild
- this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
- this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
- this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
- // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
- this.defaultAssociationsView = new global::Gtk.TreeView ();
- this.defaultAssociationsView.CanFocus = true;
- this.defaultAssociationsView.Name = "defaultAssociationsView";
- this.GtkScrolledWindow1.Add (this.defaultAssociationsView);
- this.hbox2.Add (this.GtkScrolledWindow1);
- global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.GtkScrolledWindow1]));
- w11.Position = 0;
- // Container child hbox2.Gtk.Box+BoxChild
- this.vbox3 = new global::Gtk.VBox ();
- this.vbox3.Name = "vbox3";
- this.vbox3.Spacing = 6;
- // Container child vbox3.Gtk.Box+BoxChild
- this.defaultAssociationsAddButton = new global::Gtk.Button ();
- this.defaultAssociationsAddButton.CanFocus = true;
- this.defaultAssociationsAddButton.Name = "defaultAssociationsAddButton";
- this.defaultAssociationsAddButton.UseStock = true;
- this.defaultAssociationsAddButton.UseUnderline = true;
- this.defaultAssociationsAddButton.Label = "gtk-add";
- this.vbox3.Add (this.defaultAssociationsAddButton);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.defaultAssociationsAddButton]));
- w12.Position = 0;
- w12.Expand = false;
- w12.Fill = false;
- // Container child vbox3.Gtk.Box+BoxChild
- this.defaultAssociationsRemoveButton = new global::Gtk.Button ();
- this.defaultAssociationsRemoveButton.CanFocus = true;
- this.defaultAssociationsRemoveButton.Name = "defaultAssociationsRemoveButton";
- this.defaultAssociationsRemoveButton.UseStock = true;
- this.defaultAssociationsRemoveButton.UseUnderline = true;
- this.defaultAssociationsRemoveButton.Label = "gtk-remove";
- this.vbox3.Add (this.defaultAssociationsRemoveButton);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.defaultAssociationsRemoveButton]));
- w13.Position = 1;
- w13.Expand = false;
- w13.Fill = false;
- this.hbox2.Add (this.vbox3);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox3]));
- w14.Position = 1;
- w14.Expand = false;
- w14.Fill = false;
- this.vbox1.Add (this.hbox2);
- global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox2]));
- w15.Position = 4;
- this.Add (this.vbox1);
- if ((this.Child != null)) {
- this.Child.ShowAll ();
- }
- this.Show ();
- this.registeredSchemasAddButton.Clicked += new global::System.EventHandler (this.addRegisteredSchema);
- this.registeredSchemasRemoveButton.Clicked += new global::System.EventHandler (this.removeRegisteredSchema);
- this.defaultAssociationsAddButton.Clicked += new global::System.EventHandler (this.addFileAssociation);
- this.defaultAssociationsRemoveButton.Clicked += new global::System.EventHandler (this.removeFileAssocation);
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/generated.cs b/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/generated.cs
deleted file mode 100644
index 75935e2e55..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/generated.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-
-// This file has been generated by the GUI designer. Do not modify.
-namespace Stetic
-{
- internal class Gui
- {
- private static bool initialized;
-
- internal static void Initialize (Gtk.Widget iconRenderer)
- {
- if ((Stetic.Gui.initialized == false)) {
- Stetic.Gui.initialized = true;
- }
- }
- }
-
- internal class BinContainer
- {
- private Gtk.Widget child;
- private Gtk.UIManager uimanager;
-
- public static BinContainer Attach (Gtk.Bin bin)
- {
- BinContainer bc = new BinContainer ();
- bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested);
- bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated);
- bin.Added += new Gtk.AddedHandler (bc.OnAdded);
- return bc;
- }
-
- private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
- {
- if ((this.child != null)) {
- args.Requisition = this.child.SizeRequest ();
- }
- }
-
- private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
- {
- if ((this.child != null)) {
- this.child.Allocation = args.Allocation;
- }
- }
-
- private void OnAdded (object sender, Gtk.AddedArgs args)
- {
- this.child = args.Widget;
- }
-
- public void SetUiManager (Gtk.UIManager uim)
- {
- this.uimanager = uim;
- this.child.Realized += new System.EventHandler (this.OnRealized);
- }
-
- private void OnRealized (object sender, System.EventArgs args)
- {
- if ((this.uimanager != null)) {
- Gtk.Widget w;
- w = this.child.Toplevel;
- if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) {
- ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
- this.uimanager = null;
- }
- }
- }
- }
-
- internal class ActionGroups
- {
- public static Gtk.ActionGroup GetActionGroup (System.Type type)
- {
- return Stetic.ActionGroups.GetActionGroup (type.FullName);
- }
-
- public static Gtk.ActionGroup GetActionGroup (string name)
- {
- return null;
- }
- }
-}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/gui.stetic b/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/gui.stetic
deleted file mode 100644
index 0096e79cd6..0000000000
--- a/main/src/addins/MonoDevelop.XmlEditor/gtk-gui/gui.stetic
+++ /dev/null
@@ -1,491 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<stetic-interface>
- <configuration>
- <images-root-path>..</images-root-path>
- <target-gtk-version>2.12</target-gtk-version>
- </configuration>
- <import>
- <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
- <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
- <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
- <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
- <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
- <widget-library name="../../../../build/AddIns/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.dll" internal="true" />
- </import>
- <widget class="Gtk.Bin" id="MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget" design-size="367 300">
- <property name="MemberName" />
- <child>
- <widget class="Gtk.VBox" id="vbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.CheckButton" id="autoCompleteElementsCheck">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">Automatically insert closing tags</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.CheckButton" id="autoAddPunctuationCheck">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">Automatically insert punctuation (="", /&gt;, etc.)</property>
- <property name="Active">True</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.CheckButton" id="showSchemaAnnotationCheck">
- <property name="MemberName" />
- <property name="Sensitive">False</property>
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">Show schema annotation</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">2</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- </child>
- </widget>
- <widget class="Gtk.Bin" id="MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget" design-size="569 340">
- <property name="MemberName" />
- <child>
- <widget class="Gtk.VBox" id="vbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Label" id="label1">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="LabelProp" translatable="yes">&lt;b&gt;Registered Schemas&lt;/b&gt;</property>
- <property name="UseMarkup">True</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.TreeView" id="registeredSchemasView">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShowScrollbars">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.VBox" id="vbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Button" id="registeredSchemasAddButton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-add</property>
- <signal name="Clicked" handler="addRegisteredSchema" />
- <property name="label">gtk-add</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Button" id="registeredSchemasRemoveButton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-remove</property>
- <signal name="Clicked" handler="removeRegisteredSchema" />
- <property name="label">gtk-remove</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Label" id="label3">
- <property name="MemberName" />
- </widget>
- <packing>
- <property name="Position">2</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Label" id="label2">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="LabelProp" translatable="yes">&lt;b&gt;Default File Associations&lt;/b&gt;</property>
- <property name="UseMarkup">True</property>
- </widget>
- <packing>
- <property name="Position">3</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.TreeView" id="defaultAssociationsView">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShowScrollbars">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.VBox" id="vbox3">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Button" id="defaultAssociationsAddButton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-add</property>
- <signal name="Clicked" handler="addFileAssociation" />
- <property name="label">gtk-add</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Button" id="defaultAssociationsRemoveButton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-remove</property>
- <signal name="Clicked" handler="removeFileAssocation" />
- <property name="label">gtk-remove</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">4</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- </child>
- </widget>
- <widget class="Gtk.Bin" id="MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget" design-size="544 349">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <property name="GeneratePublic">False</property>
- <child>
- <widget class="Gtk.VBox" id="vbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.HBox" id="hbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.VBox" id="boxScopes">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.TreeView" id="listView">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShowScrollbars">True</property>
- <property name="HeadersVisible">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Button" id="buttonAdd">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-add</property>
- <signal name="Clicked" handler="OnButtonAddClicked" />
- <property name="label">gtk-add</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Button" id="buttonRemove">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-remove</property>
- <signal name="Clicked" handler="OnButtonRemoveClicked" />
- <property name="label">gtk-remove</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.VBox" id="vbox4">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Label" id="labelScopes">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="LabelProp" translatable="yes">Enter one or several xpath expressions to which this format applies:</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Table" id="tableScopes">
- <property name="MemberName" />
- <property name="NRows">3</property>
- <property name="NColumns">3</property>
- <property name="RowSpacing">6</property>
- <property name="ColumnSpacing">6</property>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="MonoDevelop.Components.PropertyGrid.PropertyGrid" id="propertyGrid">
- <property name="MemberName" />
- <property name="ShowToolbar">False</property>
- <property name="ShowHelp">False</property>
- </widget>
- <packing>
- <property name="Position">2</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox3">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Button" id="buttonAdvanced">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Type">TextOnly</property>
- <property name="Label" translatable="yes">Advanced Settings</property>
- <property name="UseUnderline">True</property>
- <signal name="Clicked" handler="OnButtonAdvancedClicked" />
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
-</stetic-interface> \ No newline at end of file
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs
index 6bd053bcd0..10aeaa9398 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlImplicitClosingTests.cs
@@ -23,27 +23,27 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
-using System.Linq;
-using MonoDevelop.AspNet.StateEngine;
+using MonoDevelop.AspNet.Html.Parser;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Tests.Parser;
using NUnit.Framework;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.AspNet.Tests.Html
{
[TestFixture]
public class HtmlImplicitClosingTests : ParsingTests
{
- public override XmlFreeState CreateRootState ()
+ public override XmlRootState CreateRootState ()
{
- return new XmlFreeState (new HtmlTagState (), new HtmlClosingTagState (true));
+ return new XmlRootState (new HtmlTagState (), new HtmlClosingTagState (true));
}
[Test]
public void TestHtmlImplicitClosing ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse(@"
<html>
<body>
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs
index f6617c7a16..7f6c78549a 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Html/HtmlParsingTests.cs
@@ -24,25 +24,26 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using NUnit.Framework;
using MonoDevelop.AspNet.Html.Parser;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Tests.Parser;
+using NUnit.Framework;
namespace MonoDevelop.AspNet.Tests.Html
{
[TestFixture]
class HtmlParsingTests : ParsingTests
{
- public override XmlFreeState CreateRootState ()
+ public override XmlRootState CreateRootState ()
{
- return new XmlFreeState (new HtmlTagState (), new HtmlClosingTagState (true));
+ return new XmlRootState (new HtmlTagState (), new HtmlClosingTagState (true));
}
[Test]
public void TestAutoClosing ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<html>
<body>
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj b/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj
index e6b36fa604..420f4e3bd2 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/MonoDevelop.AspNet.Tests.csproj
@@ -16,7 +16,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>..\..\..\..\..\build\tests</OutputPath>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -25,7 +25,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
- <OutputPath>..\..\..\..\..\build\tests</OutputPath>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
@@ -76,11 +76,6 @@
<Name>ICSharpCode.NRefactory</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj">
- <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
- <Name>MonoDevelop.XmlEditor</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj">
<Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project>
<Name>MonoDevelop.DesignerSupport</Name>
@@ -91,11 +86,6 @@
<Name>Mono.TextEditor</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.XmlEditor\Tests\MonoDevelop.XmlEditor.Tests.csproj">
- <Project>{8E47B77A-A649-494C-9BF2-B845E39CADE9}</Project>
- <Name>MonoDevelop.XmlEditor.Tests</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\..\tests\UnitTests\UnitTests.csproj">
<Project>{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}</Project>
<Name>UnitTests</Name>
@@ -105,6 +95,16 @@
<Project>{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}</Project>
<Name>MonoDevelop.AspNet</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\Xml\MonoDevelop.Xml.csproj">
+ <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
+ <Name>MonoDevelop.Xml</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Xml\Tests\MonoDevelop.Xml.Tests.csproj">
+ <Project>{8E47B77A-A649-494C-9BF2-B845E39CADE9}</Project>
+ <Name>MonoDevelop.Xml.Tests</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Razor\" />
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs
index dce2a01aab..2467c5769d 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCodeBlockParsingTests.cs
@@ -41,7 +41,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@{ }");
parser.AssertNodeIs<RazorCodeBlock> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -54,7 +54,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@{ }");
parser.AssertNodeIs<RazorCodeBlock> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs
index c77e2042a6..32adbde172 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorCommentParsingTests.cs
@@ -39,7 +39,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorCommentState> ();
parser.AssertPath ("//@* *@");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -51,7 +51,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorCommentState> ();
parser.AssertPath ("//@* *@");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -63,7 +63,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorCommentState> ();
parser.AssertPath ("//@* *@");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -90,7 +90,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorCommentState> ();
parser.AssertPath ("//@* *@");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs
index b88d5778b6..24fefb9d7f 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorDirectivesParsingTests.cs
@@ -39,7 +39,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@inherits");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -51,7 +51,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@model");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -63,7 +63,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@sessionstate");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -75,7 +75,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@layout");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -87,7 +87,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@using");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -99,7 +99,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@using");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -114,7 +114,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@using");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -126,7 +126,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@inherits");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -138,7 +138,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@inherits");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -150,7 +150,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@model");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -165,7 +165,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@functions");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -180,7 +180,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@section/p");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -195,7 +195,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@helper");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -210,7 +210,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorDirectiveState> ();
parser.AssertPath ("//@helper");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs
index 7e9c3d35d9..c37fb43d28 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorExplicitExpressionsParsingTests.cs
@@ -41,7 +41,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@( )");
parser.AssertNodeIs<RazorExplicitExpression> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -54,7 +54,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@( )");
parser.AssertNodeIs<RazorExplicitExpression> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -67,7 +67,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@( )");
parser.AssertNodeIs<RazorExplicitExpression> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs
index 84831751e5..15c9242564 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorImplicitExpressionsParsingTests.cs
@@ -79,7 +79,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
public void ImplicitExpressionTerminatesAtWhitespace ()
{
parser.Parse ("@Foo X", 'X', () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -92,7 +92,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertNodeIs<RazorImplicitExpression> ();
parser.AssertPath ("//@");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -101,7 +101,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
public void ImplicitExpressionTerminatesAtTag ()
{
parser.Parse ("@Foo<p>X", 'X', () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("//p");
});
}
@@ -110,7 +110,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
public void ImplicitExpressionTerminatesAtTransition ()
{
parser.Parse ("@Foo@X", 'X', () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -123,7 +123,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertNodeIs<RazorImplicitExpression> ();
parser.AssertPath ("//body/p/@");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -132,7 +132,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
public void EmailAddressNotRecognizedAsExpression ()
{
parser.Parse ("foo@barX.com", 'X', () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs
index f824b176da..505368c6c0 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorParsingTests.cs
@@ -24,25 +24,25 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
using NUnit.Framework;
using MonoDevelop.AspNet.Razor.Parser;
+using MonoDevelop.Xml.Tests.Parser;
namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
[TestFixture]
public abstract class RazorParsingTests
{
- protected TestParser parser;
+ protected TestXmlParser parser;
[SetUp]
public void Init ()
{
- parser = new TestParser (new RazorTestFreeState ());
+ parser = new TestXmlParser (new RazorTestFreeState ());
}
}
- class RazorTestFreeState : RazorFreeState
+ class RazorTestFreeState : RazorRootState
{
public RazorTestFreeState ()
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs
index 4dd3450bcf..0adde29d91 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/Razor/Dom/RazorStatementsParsingTests.cs
@@ -25,9 +25,9 @@
// THE SOFTWARE.
using NUnit.Framework;
-using MonoDevelop.Xml.StateEngine;
using MonoDevelop.AspNet.Razor.Parser;
using MonoDevelop.AspNet.Razor.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Tests.Razor.Dom
{
@@ -42,7 +42,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@for");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -55,7 +55,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@foreach");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -68,7 +68,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@switch");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -81,7 +81,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@while");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -94,7 +94,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@lock");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -107,7 +107,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@do");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -120,7 +120,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@using");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -147,7 +147,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@if");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -230,7 +230,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertPath ("//@try");
parser.AssertNodeIs<RazorStatement> ();
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
@@ -291,7 +291,7 @@ namespace MonoDevelop.AspNet.Tests.Razor.Dom
parser.AssertStateIs<RazorStatementState> ();
parser.AssertPath ("//@foreach");
}, () => {
- parser.AssertStateIs<RazorFreeState> ();
+ parser.AssertStateIs<RazorRootState> ();
parser.AssertPath ("/");
});
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs
index 47df715cfa..7ae783152b 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet.Tests/WebForms/WebFormsParsingTests.cs
@@ -25,26 +25,28 @@
// THE SOFTWARE.
using System.Linq;
+using MonoDevelop.AspNet.Tests.Html;
using MonoDevelop.AspNet.WebForms.Dom;
using MonoDevelop.AspNet.WebForms.Parser;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Tests.Parser;
using NUnit.Framework;
-using MonoDevelop.AspNet.Tests.Html;
namespace MonoDevelop.AspNet.Tests.WebForms
{
[TestFixture]
class WebFormsParsingTests : HtmlParsingTests
{
- public override XmlFreeState CreateRootState ()
+ public override XmlRootState CreateRootState ()
{
- return new WebFormsFreeState ();
+ return new WebFormsRootState ();
}
[Test]
public void Directives ()
{
- var parser = new TestParser (CreateRootState (), true);
+ var parser = new TestXmlParser (CreateRootState (), true);
parser.Parse (@"<%@ Page Language=""C#"" Inherits=""SomeGenericType<int>"" %>");
parser.AssertNoErrors ();
var doc = (XDocument) parser.Nodes.Peek ();
@@ -63,7 +65,7 @@ namespace MonoDevelop.AspNet.Tests.WebForms
[Test]
public void AttributeWithExpression ()
{
- var parser = new TestParser (CreateRootState (), true);
+ var parser = new TestXmlParser (CreateRootState (), true);
parser.Parse (@"<tag
foo='<%=5$%>'
bar=""<%$$5$%><%--$--%>""
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs
index 05f6e94e11..c9d4c56a21 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Commands/AddViewDialog.cs
@@ -27,7 +27,6 @@
using System;
using System.IO;
using System.Collections.Generic;
-using MonoDevelop.AspNet.WebForms.Parser;
using PP = System.IO.Path;
using MonoDevelop.Ide;
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs
index 1e2ab29454..b20a67c689 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/BaseHtmlEditorExtension.cs
@@ -32,14 +32,14 @@ using System.Collections.Generic;
using MonoDevelop.Core;
using MonoDevelop.Ide.CodeCompletion;
-
-using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.Html.Parser;
+using MonoDevelop.AspNet.Html.Parser;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Html
{
- public abstract class BaseHtmlEditorExtension : MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension
+ public abstract class BaseHtmlEditorExtension : MonoDevelop.Xml.Editor.BaseXmlEditorExtension
{
HtmlSchema schema;
bool resolvedDocType;
@@ -79,9 +79,9 @@ namespace MonoDevelop.AspNet.Html
#region Setup and teardown
- protected override RootState CreateRootState ()
+ protected override XmlRootState CreateRootState ()
{
- return new XmlFreeState (new HtmlTagState (), new HtmlClosingTagState (true));
+ return new XmlRootState (new HtmlTagState (), new HtmlClosingTagState (true));
}
public override void Initialize ()
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs
index edd3641310..c287c6f7f0 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlEditorExtension.cs
@@ -26,12 +26,9 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Collections.Generic;
-
-using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.Ide.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Html
{
@@ -42,7 +39,7 @@ namespace MonoDevelop.AspNet.Html
protected override void RefillOutlineStore (ParsedDocument doc, Gtk.TreeStore store)
{
- XDocument xdoc = ((XmlParsedDocument)doc).XDocument;
+ XDocument xdoc = ((MonoDevelop.Xml.Editor.XmlParsedDocument)doc).XDocument;
if (xdoc == null)
return;
// Gtk.TreeIter iter = outlineTreeStore.AppendValues (System.IO.Path.GetFileName (CU.Document.FilePath), p);
@@ -53,7 +50,7 @@ namespace MonoDevelop.AspNet.Html
{
outlineTree.TextRenderer.Xpad = 0;
outlineTree.TextRenderer.Ypad = 0;
- outlineTree.AppendColumn ("Node", outlineTree.TextRenderer, new Gtk.TreeCellDataFunc (outlineTreeDataFunc));
+ outlineTree.AppendColumn ("Node", outlineTree.TextRenderer, OutlineTreeDataFunc);
}
protected override void OutlineSelectionChanged (object selection)
@@ -76,7 +73,7 @@ namespace MonoDevelop.AspNet.Html
}
}
- void outlineTreeDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+ void OutlineTreeDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText txtRenderer = (Gtk.CellRendererText) cell;
XNode n = (XNode) model.GetValue (iter, 0);
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs
index f980249519..6938328c0c 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlParser.cs
@@ -27,13 +27,15 @@
//
using System;
-using System.IO;
using System.Collections.Generic;
+using System.IO;
-using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.Ide.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
+
+using MonoDevelop.Ide.TypeSystem;
using MonoDevelop.Projects;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Html.Parser;
namespace MonoDevelop.AspNet.Html
@@ -42,12 +44,12 @@ namespace MonoDevelop.AspNet.Html
{
public override ParsedDocument Parse (bool storeAst, string fileName, TextReader tr, Project project = null)
{
- var doc = new XmlParsedDocument (fileName);
+ var doc = new MonoDevelop.Xml.Editor.XmlParsedDocument (fileName);
doc.Flags = ParsedDocumentFlags.NonSerializable;
try {
- var xmlParser = new MonoDevelop.Xml.StateEngine.Parser (
- new XmlFreeState (new HtmlTagState (), new HtmlClosingTagState (true)),
+ var xmlParser = new XmlParser (
+ new XmlRootState (new HtmlTagState (), new HtmlClosingTagState (true)),
true);
xmlParser.Parse (tr);
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs
index 35e18d6cdb..3078c3d5bd 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchema.cs
@@ -29,7 +29,7 @@
using System;
using System.Xml;
using System.Collections.Generic;
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
namespace MonoDevelop.AspNet.Html
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs
index ee783c2a8f..4828a9f3d9 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/HtmlSchemaService.cs
@@ -32,7 +32,7 @@ using System.IO;
using MonoDevelop.Core;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
namespace MonoDevelop.AspNet.Html
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs
index 4316740a1f..3a65026555 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlClosingTagState.cs
@@ -27,14 +27,15 @@
//
using System;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Html.Parser
{
public class HtmlClosingTagState : XmlClosingTagState
{
- bool warnAutoClose;
+ readonly bool warnAutoClose;
public HtmlClosingTagState (bool warnAutoClose)
: this (warnAutoClose, new XmlNameState ())
@@ -47,13 +48,13 @@ namespace MonoDevelop.AspNet.Html.Parser
this.warnAutoClose = warnAutoClose;
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
//NOTE: This is (mostly) duplicated in HtmlTagState
//handle inline tags implicitly closed by block-level elements
if (context.CurrentStateLength == 1 && context.PreviousState is XmlNameState)
{
- XClosingTag ct = (XClosingTag) context.Nodes.Peek ();
+ var ct = (XClosingTag) context.Nodes.Peek ();
if (!ct.Name.HasPrefix && ct.Name.IsValid) {
//Note: the node stack will always be at least 1 deep due to the XDocument
var parent = context.Nodes.Peek (1) as XElement;
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs
index 859e0c0fea..39e4f9eefe 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlScriptBodyState.cs
@@ -23,21 +23,16 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-
-using System;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Html.Parser
{
- public class HtmlScriptBodyState : State
+ public class HtmlScriptBodyState : XmlParserState
{
const string CLOSE = "</script>";
-
- public HtmlScriptBodyState ()
- {
- }
-
- public override State PushChar (char c, IParseContext context, ref string rollback)
+
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 0)
context.StateTag = 0;
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs
index ba8566fd57..87b0dc6e1e 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Html/Parser/HtmlTagState.cs
@@ -27,15 +27,18 @@
//
using System;
-
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Html.Parser
{
public class HtmlTagState : XmlTagState
{
- HtmlScriptBodyState ScriptState;
- public HtmlTagState () : this (new XmlAttributeState ()) {}
+ readonly HtmlScriptBodyState scriptState;
+
+ public HtmlTagState () : this (new XmlAttributeState ())
+ {
+ }
public HtmlTagState (XmlAttributeState attributeState)
: this (attributeState, new XmlNameState ())
@@ -50,12 +53,12 @@ namespace MonoDevelop.AspNet.Html.Parser
public HtmlTagState (XmlAttributeState attributeState, XmlNameState nameState, HtmlScriptBodyState scriptState)
: base (attributeState, nameState)
{
- this.ScriptState = scriptState;
+ this.scriptState = scriptState;
- Adopt (this.ScriptState);
+ Adopt (this.scriptState);
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1 && context.PreviousState is HtmlScriptBodyState)
return Parent;
@@ -63,7 +66,7 @@ namespace MonoDevelop.AspNet.Html.Parser
//NOTE: This is (mostly) duplicated in HtmlClosingTagState
//handle "paragraph" tags implicitly closed by block-level elements
if (context.CurrentStateLength == 1 && context.PreviousState is XmlNameState) {
- XElement element = (XElement) context.Nodes.Peek ();
+ var element = (XElement) context.Nodes.Peek ();
if (!element.Name.HasPrefix && element.Name.IsValid) {
//Note: the node stack will always be at least 1 deep due to the XDocument
@@ -82,17 +85,17 @@ namespace MonoDevelop.AspNet.Html.Parser
}
}
- State ret = base.PushChar (c, context, ref rollback);
+ XmlParserState ret = base.PushChar (c, context, ref rollback);
if (ret == Parent && c == '>') {
var element = context.Nodes.Peek () as XElement;
if (element != null && !element.Name.HasPrefix && element.Name.IsValid) {
if (element.Name.Name.Equals ("script", StringComparison.OrdinalIgnoreCase)) {
- return ScriptState;
- } else if (ElementTypes.IsEmpty (element.Name.Name)) {
+ return scriptState;
+ }
+ if (ElementTypes.IsEmpty (element.Name.Name)) {
element.Close (element);
context.Nodes.Pop ();
-
}
}
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj b/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj
index 19450ca280..e0711c5ea6 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj
+++ b/main/src/addins/Web/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj
@@ -55,11 +55,6 @@
<Name>MonoDevelop.DesignerSupport</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj">
- <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
- <Name>MonoDevelop.XmlEditor</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj">
<Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project>
<Name>Mono.TextEditor</Name>
@@ -133,6 +128,11 @@
<Reference Include="System.Web.Mvc">
<HintPath>..\..\..\..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll</HintPath>
</Reference>
+ <ProjectReference Include="..\..\Xml\MonoDevelop.Xml.csproj">
+ <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
+ <Name>MonoDevelop.Xml</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
@@ -209,7 +209,6 @@
<Compile Include="Razor\Parser\RazorCommentState.cs" />
<Compile Include="Razor\Parser\RazorDirectiveState.cs" />
<Compile Include="Razor\Parser\RazorExpressionState.cs" />
- <Compile Include="Razor\Parser\RazorFreeState.cs" />
<Compile Include="Razor\Parser\RazorSpeculativeState.cs" />
<Compile Include="Razor\Parser\RazorState.cs" />
<Compile Include="Razor\Parser\RazorStatementState.cs" />
@@ -239,7 +238,6 @@
<Compile Include="WebForms\WebFormsCodeBehindTypeNameCache.cs" />
<Compile Include="WebForms\Parser\WebFormsAttributeValueState.cs" />
<Compile Include="WebForms\Parser\WebFormsServerCommentState.cs" />
- <Compile Include="WebForms\Parser\WebFormsFreeState.cs" />
<Compile Include="WebForms\Parser\WebFormsDirectiveState.cs" />
<Compile Include="WebForms\Parser\WebFormsDirectiveAttributeState.cs" />
<Compile Include="WebForms\Parser\WebFormsExpressionState.cs" />
@@ -291,6 +289,8 @@
<Compile Include="WebForms\WebFormsParsedDocument.cs" />
<Compile Include="WebForms\WebFormsPageInfo.cs" />
<Compile Include="WebForms\SuggestedHandlerCompletionData.cs" />
+ <Compile Include="Razor\Parser\RazorRootState.cs" />
+ <Compile Include="WebForms\Parser\WebFormsRootState.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs
index 4c50051688..59dd74f000 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Properties/AddinInfo.cs
@@ -1,7 +1,5 @@
-using System;
using Mono.Addins;
-using Mono.Addins.Description;
[assembly:Addin ("Web",
Namespace = "MonoDevelop",
@@ -14,5 +12,5 @@ using Mono.Addins.Description;
[assembly:AddinDependency ("Core", MonoDevelop.BuildInfo.Version)]
[assembly:AddinDependency ("Ide", MonoDevelop.BuildInfo.Version)]
[assembly:AddinDependency ("DesignerSupport", MonoDevelop.BuildInfo.Version)]
-[assembly:AddinDependency ("XmlEditor", MonoDevelop.BuildInfo.Version)]
+[assembly:AddinDependency ("Xml", MonoDevelop.BuildInfo.Version)]
[assembly:AddinDependency ("SourceEditor2", MonoDevelop.BuildInfo.Version)]
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs
index ea80a989ae..c6928acbfd 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeBlock.cs
@@ -24,8 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs
index 7328793922..19ff98708b 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorCodeFragment.cs
@@ -24,11 +24,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
+using System.Linq;
using ICSharpCode.NRefactory;
using Mono.TextEditor;
using MonoDevelop.Ide;
-using System.Linq;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs
index b09d087635..1cb572a9d6 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorComment.cs
@@ -24,9 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
-using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs
index b080069c18..7b1755d9a9 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorDirective.cs
@@ -24,8 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs
index 88f4bdbca5..15cbfc6637 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExplicitExpression.cs
@@ -24,9 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
-using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs
index bf3982f9a3..ef1ef4af95 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorExpression.cs
@@ -24,9 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs
index 9ccff34a09..f87a500d74 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorImplicitExpression.cs
@@ -24,9 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
-using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs
index 1a015b156d..7af1bbfccf 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Dom/RazorStatement.cs
@@ -24,8 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs
index fd56eab016..09b49725ce 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCSharpParser.cs
@@ -39,9 +39,12 @@ using System.Web.Razor.Parser.SyntaxTree;
using System.Web.Razor.Text;
using System.Web.WebPages.Razor;
using System.Web.WebPages.Razor.Configuration;
+
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
+
using Mono.TextEditor;
+
using MonoDevelop.Core;
using MonoDevelop.Ide;
using MonoDevelop.Ide.Gui;
@@ -268,7 +271,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
}
}
- Xml.StateEngine.XDocument htmlParsedDocument;
+ MonoDevelop.Xml.Dom.XDocument htmlParsedDocument;
IList<Comment> comments;
void ParseHtmlDocument (List<Error> errors)
@@ -307,7 +310,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
editorParser.CurrentParseTree.Accept (new CallbackVisitor (action));
- var parser = new Xml.StateEngine.Parser (new WebFormsFreeState (), true);
+ var parser = new MonoDevelop.Xml.Parser.XmlParser (new WebFormsRootState (), true);
try {
parser.Parse (new StringReader (sb.ToString ()));
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs
index 964bce31a1..24536720d2 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeBlockState.cs
@@ -25,14 +25,14 @@
// THE SOFTWARE.
using System.Linq;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Razor.Dom;
namespace MonoDevelop.AspNet.Razor.Parser
{
public class RazorCodeBlockState : RazorCodeFragmentState
{
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
bracketsBuilder.Clear ();
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs
index 8dd10717da..0130ce9037 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCodeFragmentState.cs
@@ -26,9 +26,10 @@
using System;
using System.Text;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Html.Parser;
using MonoDevelop.AspNet.Razor.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Parser
{
@@ -79,7 +80,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
bracketsBuilder = new StringBuilder ();
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
switch (context.StateTag) {
case SOLIDUS:
@@ -176,9 +177,9 @@ namespace MonoDevelop.AspNet.Razor.Parser
// The simplified version is used mostly for testing. In real environment finding matching brackets
// precisely is necessary for code completion.
- public virtual State ParseOpeningBracket (char c, IParseContext context)
+ public virtual XmlParserState ParseOpeningBracket (char c, IXmlParserContext context)
{
- var rootState = RootState as RazorFreeState;
+ var rootState = RootState as RazorRootState;
if (!rootState.UseSimplifiedBracketTracker && !CorrespondingBlock.FirstBracket.HasValue)
CorrespondingBlock.FindFirstBracket (context.Location);
else if (rootState.UseSimplifiedBracketTracker)
@@ -186,10 +187,10 @@ namespace MonoDevelop.AspNet.Razor.Parser
return null;
}
- public virtual State ParseClosingBracket<T> (char c, IParseContext context, State stateToReturn) where T : XNode
+ public virtual XmlParserState ParseClosingBracket<T> (char c, IXmlParserContext context, XmlParserState stateToReturn) where T : XNode
{
bool isEnding = false;
- var rootState = RootState as RazorFreeState;
+ var rootState = RootState as RazorRootState;
if (rootState.UseSimplifiedBracketTracker) {
if (bracketsBuilder.Length > 0)
bracketsBuilder.Remove (0, 1);
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs
index f2c02f644f..291f253f9e 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorCommentState.cs
@@ -24,7 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Razor.Dom;
namespace MonoDevelop.AspNet.Razor.Parser
@@ -34,7 +34,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
protected const int NOMATCH = 0;
protected const int STAR = 1;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
context.Nodes.Push (new RazorComment (context.LocationMinus (2)));
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs
index de0941eb90..e8447ef0b7 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorDirectiveState.cs
@@ -26,7 +26,7 @@
using System;
using System.Linq;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using System.Diagnostics;
using MonoDevelop.AspNet.Razor.Dom;
@@ -38,7 +38,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
get { return CorrespondingBlock as RazorDirective; }
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
bracketsBuilder.Clear ();
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs
index d4c8062c5e..956bdbda62 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorExpressionState.cs
@@ -26,7 +26,7 @@
using System;
using System.Linq;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Razor.Dom;
namespace MonoDevelop.AspNet.Razor.Parser
@@ -40,7 +40,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
static char[] allowedChars = { '.', '_', '[', ']', '"' };
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
switch (c) {
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs
index 789e1e5a10..2028da9383 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorOutlineNode.cs
@@ -26,7 +26,7 @@
using System.Web.Razor.Parser.SyntaxTree;
using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
using MonoDevelop.AspNet.WebForms.Dom;
namespace MonoDevelop.AspNet.Razor.Parser
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs
index 3fbe9d89ef..4deed33eaf 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorPageInfo.cs
@@ -29,6 +29,7 @@ using System.Web.Razor;
using System.Web.Razor.Parser.SyntaxTree;
using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.Razor.Parser
{
@@ -39,7 +40,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
public IEnumerable<Comment> Comments { get; set; }
public GeneratorResults GeneratorResults { get; set; }
public Block RazorRoot { get { return GeneratorResults.Document; } }
- public MonoDevelop.Xml.StateEngine.XDocument HtmlRoot { get; set; }
+ public XDocument HtmlRoot { get; set; }
public IEnumerable<Span> Spans { get; set; }
public string DocType { get; set; }
public RazorHostKind HostKind { get; set; }
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorFreeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorRootState.cs
index e7e701681b..c29274826e 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorFreeState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorRootState.cs
@@ -25,12 +25,12 @@
// THE SOFTWARE.
using System;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Html.Parser;
namespace MonoDevelop.AspNet.Razor.Parser
{
- public class RazorFreeState : XmlFreeState
+ public class RazorRootState : XmlRootState
{
protected const int TRANSITION = MAXCONST + 1;
@@ -42,7 +42,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
public bool UseSimplifiedBracketTracker { get; set; }
char previousChar;
- public RazorFreeState ()
+ public RazorRootState ()
: this (
new HtmlTagState (),
new HtmlClosingTagState (true),
@@ -56,7 +56,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
new RazorSpeculativeState ()
) { }
- public RazorFreeState (
+ public RazorRootState (
HtmlTagState tagState,
HtmlClosingTagState closingTagState,
XmlCommentState commentState,
@@ -83,7 +83,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
UseSimplifiedBracketTracker = false;
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (c == '@' && context.StateTag == FREE) {
context.StateTag = TRANSITION;
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs
index b27b51f627..1af502cfbd 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorSpeculativeState.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Razor.Parser;
using MonoDevelop.AspNet.Razor.Dom;
@@ -42,7 +42,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
RazorDirectiveState directiveState;
RazorStatementState statementState;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
string key;
@@ -94,7 +94,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
return null;
}
- State SwitchToDirective (IParseContext context, ref string rollback)
+ XmlParserState SwitchToDirective (IXmlParserContext context, ref string rollback)
{
string key = context.KeywordBuilder.ToString ();
string name = key.Trim ();
@@ -107,7 +107,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
return EnsureSetAndAdopted<RazorDirectiveState> (ref directiveState);
}
- State SwitchToStatement (IParseContext context, ref string rollback)
+ XmlParserState SwitchToStatement (IXmlParserContext context, ref string rollback)
{
string key = context.KeywordBuilder.ToString ();
var stm = new RazorStatement (context.LocationMinus (key.Length + 2)) { Name = key.Trim () };
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs
index 526e808857..8e6c9c0ef0 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorState.cs
@@ -24,18 +24,18 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
namespace MonoDevelop.AspNet.Razor.Parser
{
- public class RazorState : State
+ public class RazorState : XmlParserState
{
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
return null;
}
- public virtual State EnsureSetAndAdopted<T> (ref T state) where T : State, new ()
+ public virtual XmlParserState EnsureSetAndAdopted<T> (ref T state) where T : XmlParserState, new ()
{
if (state == null) {
state = new T ();
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs
index dc614a175c..5d705d71d5 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/RazorStatementState.cs
@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using System.Diagnostics;
using MonoDevelop.AspNet.Razor.Parser;
using MonoDevelop.AspNet.Razor.Dom;
@@ -46,7 +46,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
get { return CorrespondingBlock as RazorStatement; }
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
bracketsBuilder.Clear ();
@@ -111,7 +111,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
return base.PushChar (c, context, ref rollback);
}
- State SwitchToContinuationStatement (IParseContext context, string key)
+ XmlParserState SwitchToContinuationStatement (IXmlParserContext context, string key)
{
string name = key.Trim ();
int length = key.Length;
@@ -124,7 +124,7 @@ namespace MonoDevelop.AspNet.Razor.Parser
return EnsureSetAndAdopted<RazorStatementState> (ref statementState);
}
- public override State ParseClosingBracket<T> (char c, IParseContext context, State stateToReturn)
+ public override XmlParserState ParseClosingBracket<T> (char c, IXmlParserContext context, XmlParserState stateToReturn)
{
if (base.ParseClosingBracket<T> (c, context, stateToReturn) != null) {
if (RazorSymbols.CanBeContinued (CorrespondingBlock.Name)) {
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs
index 621299d714..92f0e8f315 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/Parser/StateEngineService.cs
@@ -24,21 +24,22 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
-using ICSharpCode.NRefactory;
using System.Diagnostics;
+using ICSharpCode.NRefactory;
using MonoDevelop.Core;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
namespace MonoDevelop.AspNet.Razor.Parser
{
public static class StateEngineService
{
- public static void EndCodeFragment<T> (IParseContext context, int minus = 0) where T : XNode
+ public static void EndCodeFragment<T> (IXmlParserContext context, int minus = 0) where T : XNode
{
EndCodeFragment<T> (context, context.LocationMinus (minus));
}
- public static void EndCodeFragment<T> (IParseContext context, TextLocation loc) where T : XNode
+ public static void EndCodeFragment<T> (IXmlParserContext context, TextLocation loc) where T : XNode
{
var top = context.Nodes.Pop ();
var node = top as T;
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs
index a5740e15bf..720f464756 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/Razor/RazorCSharpEditorExtension.cs
@@ -38,11 +38,12 @@ using MonoDevelop.Core;
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Html;
using MonoDevelop.AspNet.Mvc.Completion;
-using MonoDevelop.AspNet.Razor.Parser;
using MonoDevelop.AspNet.Razor.Dom;
+using MonoDevelop.AspNet.Razor.Parser;
namespace MonoDevelop.AspNet.Razor
{
@@ -68,9 +69,9 @@ namespace MonoDevelop.AspNet.Razor
get { return razorDocument.PageInfo; }
}
- protected override RootState CreateRootState ()
+ protected override XmlRootState CreateRootState ()
{
- return new RazorFreeState ();
+ return new RazorRootState ();
}
public override string CompletionLanguage {
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs
index 73050d2254..f7a4cc4d79 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/DocumentReferenceManager.cs
@@ -38,10 +38,9 @@ using ICSharpCode.NRefactory.TypeSystem;
using Mono.TextEditor;
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Ide.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
using MonoDevelop.AspNet.Projects;
-using MonoDevelop.AspNet.WebForms.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs
index 2fb88d9605..37c5893f40 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsBindingExpression.cs
@@ -26,7 +26,7 @@
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs
index f87f996b10..744e6480e6 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDirective.cs
@@ -27,7 +27,7 @@
using System.Diagnostics;
using System.Text;
using ICSharpCode.NRefactory;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs
index bc56ca702c..ce84fded9f 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsDomExtensions.cs
@@ -27,7 +27,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs
index 612f76e744..c67eff4f37 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsExpression.cs
@@ -25,9 +25,9 @@
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
-using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs
index 001e4fa448..f83c02287c 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsHtmlEncodedExpression.cs
@@ -24,9 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs
index 2b09245369..3c715302b6 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderBlock.cs
@@ -28,7 +28,7 @@
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs
index 49e918cfde..479ec8ba31 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsRenderExpression.cs
@@ -24,9 +24,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Xml.StateEngine;
using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs
index 3f719d5ea2..26038b655c 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsResourceExpression.cs
@@ -26,7 +26,8 @@
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs
index e81248fa16..675a854916 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Dom/WebFormsServerComment.cs
@@ -26,8 +26,8 @@
using ICSharpCode.NRefactory;
-using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Dom
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs
index ad52e8d8d3..ee82c9c80c 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/ILanguageCompletionBuilder.cs
@@ -26,12 +26,11 @@
using System;
using System.Collections.Generic;
-using S = MonoDevelop.Xml.StateEngine;
-using MonoDevelop.AspNet.WebForms.Parser;
-using Mono.TextEditor;
-using MonoDevelop.Ide.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
+using Mono.TextEditor;
using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Xml.Dom;
using MonoDevelop.AspNet.Projects;
using MonoDevelop.AspNet.WebForms.Dom;
@@ -134,20 +133,20 @@ namespace MonoDevelop.AspNet.WebForms
#region parsing for expression and runat="server" script tags
- public List<S.XNode> XExpressions { get; private set; }
- public List<S.XElement> XScriptBlocks { get; private set; }
+ public List<XNode> XExpressions { get; private set; }
+ public List<XElement> XScriptBlocks { get; private set; }
void BuildExpressionAndScriptsLists ()
{
- XExpressions = new List<S.XNode> ();
- XScriptBlocks = new List<S.XElement> ();
+ XExpressions = new List<XNode> ();
+ XScriptBlocks = new List<XElement> ();
- foreach (S.XNode node in AspNetDocument.XDocument.AllDescendentNodes) {
+ foreach (XNode node in AspNetDocument.XDocument.AllDescendentNodes) {
if (node is WebFormsRenderExpression || node is WebFormsHtmlEncodedExpression || node is WebFormsRenderBlock) {
XExpressions.Add (node);
continue;
}
- S.XElement el = node as S.XElement;
+ var el = node as XElement;
if (el == null) {
continue;
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs
index f484a868b9..474089d774 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsAttributeValueState.cs
@@ -27,7 +27,8 @@
//
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
namespace MonoDevelop.AspNet.WebForms.Parser
@@ -50,12 +51,12 @@ namespace MonoDevelop.AspNet.WebForms.Parser
protected new static readonly int TagMask = 15 << XmlAttributeValueState.TagShift;
protected new static readonly int TagShift = 4 + XmlAttributeValueState.TagShift;
- void SetTag (IParseContext context, AttState value)
+ void SetTag (IXmlParserContext context, AttState value)
{
context.StateTag = (context.StateTag & ~TagMask) | ((int)value << XmlAttributeValueState.TagShift);
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
var maskedTag = (AttState) ((context.StateTag & TagMask) >> XmlAttributeValueState.TagShift);
switch (maskedTag) {
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs
index f399058692..3257f7830b 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveAttributeState.cs
@@ -27,13 +27,13 @@
using System;
using System.Diagnostics;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
namespace MonoDevelop.AspNet.WebForms.Parser
{
public class WebFormsDirectiveAttributeState : XmlAttributeValueState
{
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
// allow < in values
if (context.StateTag != '\0' && context.CurrentStateLength > 1 && c == '<') {
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs
index 6a24098fae..adb91a3091 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsDirectiveState.cs
@@ -29,12 +29,13 @@
using System;
using System.Diagnostics;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Parser
{
- public class WebFormsDirectiveState : State
+ public class WebFormsDirectiveState : XmlParserState
{
readonly XmlAttributeState AttributeState;
readonly XmlNameState NameState;
@@ -58,7 +59,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
const int ENDING = 1;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
var directive = context.Nodes.Peek () as WebFormsDirective;
@@ -91,7 +92,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
} else {
directive.End (context.Location);
if (context.BuildTree) {
- XContainer container = (XContainer)context.Nodes.Peek ();
+ var container = (XContainer)context.Nodes.Peek ();
container.AddChildNode (directive);
}
}
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs
index b15c6427cf..8a6bfe2e9a 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsExpressionState.cs
@@ -28,18 +28,19 @@
using System.Diagnostics;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms.Parser
{
- public class WebFormsExpressionState : State
+ public class WebFormsExpressionState : XmlParserState
{
const int NONE = 0;
const int PERCENT = 1;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
AddExpressionNode (c, context);
@@ -68,7 +69,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
return null;
}
- internal static void AddExpressionNode (char c, IParseContext context)
+ internal static void AddExpressionNode (char c, IXmlParserContext context)
{
Debug.Assert (c != '@' && c!= '-', "AspNetExpressionState should not be passed a directive or comment");
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsFreeState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsRootState.cs
index 0ebef79065..a35e3eeb0d 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsFreeState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsRootState.cs
@@ -26,12 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Html.Parser;
namespace MonoDevelop.AspNet.WebForms.Parser
{
- public class WebFormsFreeState : XmlFreeState
+ public class WebFormsRootState : XmlRootState
{
protected const int BRACKET_PERCENT = MAXCONST + 1;
@@ -39,7 +39,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
readonly WebFormsDirectiveState directiveState;
readonly WebFormsServerCommentState serverCommentState;
- public WebFormsFreeState () : this (
+ public WebFormsRootState () : this (
new HtmlTagState (new XmlAttributeState (new XmlNameState (), new WebFormsAttributeValueState ())),
new HtmlClosingTagState (true),
new XmlCommentState (),
@@ -51,7 +51,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
new WebFormsServerCommentState ()
) { }
- public WebFormsFreeState (
+ public WebFormsRootState (
HtmlTagState tagState,
HtmlClosingTagState closingTagState,
XmlCommentState commentState,
@@ -85,7 +85,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
get { return serverCommentState; }
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (c == '%' && context.StateTag == BRACKET) {
context.StateTag = BRACKET_PERCENT;
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs
index f3e655fc51..ef008513ec 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/Parser/WebFormsServerCommentState.cs
@@ -28,7 +28,8 @@
using System;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
namespace MonoDevelop.AspNet.WebForms.Parser
@@ -41,7 +42,7 @@ namespace MonoDevelop.AspNet.WebForms.Parser
const int DOUBLE_DASH = 2;
const int PERCENT = 3;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
context.Nodes.Push (new WebFormsServerComment (context.LocationMinus (context.CurrentStateLength + "<%--".Length)));
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs
index 4598da3537..23aad6bf86 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsCodeBehind.cs
@@ -40,7 +40,6 @@ using MonoDevelop.DesignerSupport;
using MonoDevelop.Ide.TypeSystem;
using MonoDevelop.Projects;
using MonoDevelop.AspNet.Projects;
-using MonoDevelop.AspNet.WebForms.Parser;
namespace MonoDevelop.AspNet.WebForms
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs
index d3d41ab2e0..15234e8a25 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsEditorExtension.cs
@@ -44,8 +44,10 @@ using MonoDevelop.AspNet.Html;
using MonoDevelop.AspNet.Html.Parser;
using MonoDevelop.AspNet.Projects;
using MonoDevelop.AspNet.WebForms.Parser;
-using S = MonoDevelop.Xml.StateEngine;
+using S = MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
+using MonoDevelop.Xml.Parser;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms
{
@@ -68,9 +70,9 @@ namespace MonoDevelop.AspNet.WebForms
#region Setup and teardown
- protected override S.RootState CreateRootState ()
+ protected override XmlRootState CreateRootState ()
{
- return new WebFormsFreeState ();
+ return new WebFormsRootState ();
}
#endregion
@@ -137,7 +139,7 @@ namespace MonoDevelop.AspNet.WebForms
}
return null;
}
- if (Tracker.Engine.CurrentState is S.XmlNameState && Tracker.Engine.CurrentState.Parent is WebFormsDirectiveState) {
+ if (Tracker.Engine.CurrentState is XmlNameState && Tracker.Engine.CurrentState.Parent is WebFormsDirectiveState) {
var directive = Tracker.Engine.Nodes.Peek () as WebFormsDirective;
if (HasDoc && directive != null && directive.Region.BeginLine == completionContext.TriggerLine &&
directive.Region.BeginColumn + 4 == completionContext.TriggerLineOffset && char.IsLetter (currentChar))
@@ -151,7 +153,7 @@ namespace MonoDevelop.AspNet.WebForms
bool isAspExprState = Tracker.Engine.CurrentState is WebFormsExpressionState;
//non-xml tag completion
- if (currentChar == '<' && !(isAspExprState || Tracker.Engine.CurrentState is S.XmlFreeState)) {
+ if (currentChar == '<' && !(isAspExprState || Tracker.Engine.CurrentState is XmlRootState)) {
var list = new CompletionDataList ();
AddAspBeginExpressions (list);
return list;
@@ -161,14 +163,14 @@ namespace MonoDevelop.AspNet.WebForms
//FIXME: get doctype from master page
DocType = null;
} else {
- DocType = new MonoDevelop.Xml.StateEngine.XDocType (TextLocation.Empty);
+ DocType = new XDocType (TextLocation.Empty);
var matches = DocTypeRegex.Match (aspDoc.Info.DocType);
DocType.PublicFpi = matches.Groups["fpi"].Value;
DocType.Uri = matches.Groups["uri"].Value;
}
if (Tracker.Engine.CurrentState is HtmlScriptBodyState) {
- var el = Tracker.Engine.Nodes.Peek () as S.XElement;
+ var el = Tracker.Engine.Nodes.Peek () as XElement;
if (el != null) {
if (el.IsRunatServer ()) {
if (documentBuilder != null) {
@@ -193,7 +195,7 @@ namespace MonoDevelop.AspNet.WebForms
}
//case insensitive, no prefix
- static S.XAttribute GetHtmlAtt (S.XElement el, string name)
+ static XAttribute GetHtmlAtt (XElement el, string name)
{
return el.Attributes.FirstOrDefault (a => a.IsNamed && !a.Name.HasPrefix && a.Name.Name.Equals (name, StringComparison.OrdinalIgnoreCase));
}
@@ -348,7 +350,7 @@ namespace MonoDevelop.AspNet.WebForms
protected override void GetElementCompletions (CompletionDataList list)
{
- S.XName parentName = GetParentElementName (0);
+ XName parentName = GetParentElementName (0);
//fallback
if (!HasDoc) {
@@ -367,7 +369,7 @@ namespace MonoDevelop.AspNet.WebForms
if (parentName.HasPrefix) {
controlClass = refman.GetControlType (parentName.Prefix, parentName.Name);
} else {
- S.XName grandparentName = GetParentElementName (1);
+ XName grandparentName = GetParentElementName (1);
if (grandparentName.IsValid && grandparentName.HasPrefix)
controlClass = refman.GetControlType (grandparentName.Prefix, grandparentName.Name);
}
@@ -377,7 +379,7 @@ namespace MonoDevelop.AspNet.WebForms
//root element?
if (!parentName.IsValid) {
if (aspDoc.Info.Subtype == WebSubtype.WebControl) {
- AddHtmlTagCompletionData (list, Schema, new S.XName ("div"));
+ AddHtmlTagCompletionData (list, Schema, new XName ("div"));
AddAspBeginExpressions (list);
list.AddRange (refman.GetControlCompletionData ());
AddMiscBeginTags (list);
@@ -404,7 +406,7 @@ namespace MonoDevelop.AspNet.WebForms
list.AddRange (refman.GetControlCompletionData ());
AddMiscBeginTags (list);
//TODO: get correct parent for Content tags
- AddHtmlTagCompletionData (list, Schema, new S.XName ("body"));
+ AddHtmlTagCompletionData (list, Schema, new XName ("body"));
return;
}
@@ -439,7 +441,7 @@ namespace MonoDevelop.AspNet.WebForms
if (property.ReturnType.ToString () == "System.Web.UI.ITemplate") {
AddAspBeginExpressions (list);
AddMiscBeginTags (list);
- AddHtmlTagCompletionData (list, Schema, new S.XName ("body"));
+ AddHtmlTagCompletionData (list, Schema, new XName ("body"));
list.AddRange (refman.GetControlCompletionData ());
return;
}
@@ -479,11 +481,11 @@ namespace MonoDevelop.AspNet.WebForms
}
}
- protected override CompletionDataList GetAttributeCompletions (S.IAttributedXObject attributedOb,
+ protected override CompletionDataList GetAttributeCompletions (IAttributedXObject attributedOb,
Dictionary<string, string> existingAtts)
{
var list = base.GetAttributeCompletions (attributedOb, existingAtts) ?? new CompletionDataList ();
- if (attributedOb is S.XElement) {
+ if (attributedOb is XElement) {
if (!existingAtts.ContainsKey ("runat"))
list.Add ("runat=\"server\"", "md-literal",
@@ -511,10 +513,10 @@ namespace MonoDevelop.AspNet.WebForms
return list.Count > 0? list : null;
}
- protected override CompletionDataList GetAttributeValueCompletions (S.IAttributedXObject ob, S.XAttribute att)
+ protected override CompletionDataList GetAttributeValueCompletions (IAttributedXObject ob, XAttribute att)
{
var list = base.GetAttributeValueCompletions (ob, att) ?? new CompletionDataList ();
- if (ob is S.XElement) {
+ if (ob is XElement) {
if (ob.Name.HasPrefix) {
string id = ob.GetId ();
if (string.IsNullOrEmpty (id) || string.IsNullOrEmpty (id.Trim ()))
@@ -587,7 +589,7 @@ namespace MonoDevelop.AspNet.WebForms
}
}
- void AddAspAttributeCompletionData (CompletionDataList list, S.XName name, Dictionary<string, string> existingAtts)
+ void AddAspAttributeCompletionData (CompletionDataList list, XName name, Dictionary<string, string> existingAtts)
{
Debug.Assert (name.IsValid);
Debug.Assert (name.HasPrefix);
@@ -628,7 +630,7 @@ namespace MonoDevelop.AspNet.WebForms
}
}
- void AddAspAttributeValueCompletionData (CompletionDataList list, S.XName tagName, S.XName attName, string id)
+ void AddAspAttributeValueCompletionData (CompletionDataList list, XName tagName, XName attName, string id)
{
Debug.Assert (tagName.IsValid && tagName.HasPrefix);
Debug.Assert (attName.IsValid && !attName.HasPrefix);
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs
index f2cb166c88..56ddc1157b 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsMemberListBuilder.cs
@@ -38,10 +38,9 @@ using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Core;
-using MonoDevelop.Xml.StateEngine;
using MonoDevelop.AspNet.WebForms;
-using MonoDevelop.AspNet.WebForms.Parser;
using MonoDevelop.AspNet.WebForms.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs
index cad19601bf..48fcf3138e 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsPageInfo.cs
@@ -30,10 +30,9 @@ using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.AspNet.WebForms.Parser;
-using MonoDevelop.Xml.StateEngine;
using MonoDevelop.AspNet.Projects;
using MonoDevelop.AspNet.WebForms.Dom;
+using MonoDevelop.Xml.Dom;
namespace MonoDevelop.AspNet.WebForms
{
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs
index d767a40716..0089aea70e 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParsedDocument.cs
@@ -31,14 +31,13 @@ using System.Collections.Generic;
using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Ide.TypeSystem;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
using MonoDevelop.AspNet.Projects;
using MonoDevelop.AspNet.WebForms.Dom;
-using MonoDevelop.AspNet.WebForms.Parser;
namespace MonoDevelop.AspNet.WebForms
{
- public class WebFormsParsedDocument : XmlParsedDocument
+ public class WebFormsParsedDocument : MonoDevelop.Xml.Editor.XmlParsedDocument
{
// Constructor used for testing the XDOM
public WebFormsParsedDocument (string fileName, WebSubtype type, WebFormsPageInfo info, XDocument xDoc) :
diff --git a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs
index 94633356ae..03f19b91be 100644
--- a/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs
+++ b/main/src/addins/Web/MonoDevelop.AspNet/WebForms/WebFormsParser.cs
@@ -34,7 +34,8 @@ using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Core;
using MonoDevelop.Ide.TypeSystem;
using MonoDevelop.Projects;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
using MonoDevelop.AspNet.Projects;
using MonoDevelop.AspNet.WebForms.Parser;
@@ -47,8 +48,8 @@ namespace MonoDevelop.AspNet.WebForms
var info = new WebFormsPageInfo ();
var errors = new List<Error> ();
- Xml.StateEngine.Parser parser = new Xml.StateEngine.Parser (
- new WebFormsFreeState (),
+ var parser = new XmlParser (
+ new WebFormsRootState (),
true
);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/EmptyXmlCompletionProvider.cs b/main/src/addins/Xml/Completion/EmptyXmlCompletionProvider.cs
index 6a6ac12b52..8c6adceec0 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/EmptyXmlCompletionProvider.cs
+++ b/main/src/addins/Xml/Completion/EmptyXmlCompletionProvider.cs
@@ -26,13 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using MonoDevelop.Ide.CodeCompletion;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
-
-
public class EmptyXmlCompletionProvider : IXmlCompletionProvider
{
public CompletionDataList GetElementCompletionData ()
@@ -45,17 +42,17 @@ namespace MonoDevelop.XmlEditor.Completion
return new CompletionDataList ();
}
- public CompletionDataList GetChildElementCompletionData (MonoDevelop.XmlEditor.XmlElementPath path)
+ public CompletionDataList GetChildElementCompletionData (XmlElementPath path)
{
return new CompletionDataList ();
}
- public CompletionDataList GetAttributeCompletionData (MonoDevelop.XmlEditor.XmlElementPath path)
+ public CompletionDataList GetAttributeCompletionData (XmlElementPath path)
{
return new CompletionDataList ();
}
- public CompletionDataList GetAttributeValueCompletionData (MonoDevelop.XmlEditor.XmlElementPath path, string name)
+ public CompletionDataList GetAttributeValueCompletionData (XmlElementPath path, string name)
{
return new CompletionDataList ();
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/ILazilyLoadedProvider.cs b/main/src/addins/Xml/Completion/ILazilyLoadedProvider.cs
index a8f4df9a05..8d6c8e6aee 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/ILazilyLoadedProvider.cs
+++ b/main/src/addins/Xml/Completion/ILazilyLoadedProvider.cs
@@ -28,7 +28,7 @@
using System;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
public interface ILazilyLoadedProvider
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/IXmlCompletionProvider.cs b/main/src/addins/Xml/Completion/IXmlCompletionProvider.cs
index 97b4a9ec29..95251d5b73 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/IXmlCompletionProvider.cs
+++ b/main/src/addins/Xml/Completion/IXmlCompletionProvider.cs
@@ -28,8 +28,9 @@
using System;
using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Xml.Editor;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
public interface IXmlCompletionProvider
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/InferredXmlCompletionProvider.cs b/main/src/addins/Xml/Completion/InferredXmlCompletionProvider.cs
index daea4da569..e1c361f76b 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/InferredXmlCompletionProvider.cs
+++ b/main/src/addins/Xml/Completion/InferredXmlCompletionProvider.cs
@@ -27,12 +27,10 @@
using System;
using System.Collections.Generic;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
-
-
public class InferredXmlCompletionProvider : IXmlCompletionProvider
{
Dictionary<string,HashSet<string>> elementCompletions = new Dictionary<string,HashSet<string>> ();
@@ -40,11 +38,7 @@ namespace MonoDevelop.XmlEditor.Completion
public DateTime TimeStampUtc { get; set; }
public int ErrorCount { get; set; }
-
- public InferredXmlCompletionProvider ()
- {
- }
-
+
//TODO: respect namespaces
public void Populate (XDocument doc)
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/LocalOnlyXmlResolver.cs b/main/src/addins/Xml/Completion/LocalOnlyXmlResolver.cs
index 5df457f498..f5ddb3e5de 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/LocalOnlyXmlResolver.cs
+++ b/main/src/addins/Xml/Completion/LocalOnlyXmlResolver.cs
@@ -26,7 +26,7 @@
using System;
using System.Xml;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
public class LocalOnlyXmlResolver : XmlUrlResolver
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedName.cs b/main/src/addins/Xml/Completion/QualifiedName.cs
index 5d59729f1c..58bbfcd3a9 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/QualifiedName.cs
+++ b/main/src/addins/Xml/Completion/QualifiedName.cs
@@ -24,7 +24,7 @@
using System;
using System.Xml;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Completion
{
/// <summary>
/// An <see cref="XmlQualifiedName"/> with the namespace prefix.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs b/main/src/addins/Xml/Completion/XmlCompletionData.cs
index f7d3dff4d3..c3c77f6e94 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlCompletionData.cs
+++ b/main/src/addins/Xml/Completion/XmlCompletionData.cs
@@ -22,19 +22,17 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-using Gdk;
-using Gtk;
-using MonoDevelop.Ide.Gui;
-using MonoDevelop.Ide.CodeCompletion;
-using System;
-using MonoDevelop.XmlEditor;
-using MonoDevelop.Core;
+using System;
+using Gdk;
using Mono.TextEditor;
-using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.Core;
using MonoDevelop.Ide;
+using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Ide.Commands;
+using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.Xml.Editor;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
/// <summary>
/// Holds the text for namespace, child element or attribute
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlCompletionDataList.cs b/main/src/addins/Xml/Completion/XmlCompletionDataList.cs
index 0cbd8fa3d3..4cbf341bd3 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlCompletionDataList.cs
+++ b/main/src/addins/Xml/Completion/XmlCompletionDataList.cs
@@ -31,7 +31,7 @@ using System.Text;
using System.Xml.Schema;
using System.Xml;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
public class XmlCompletionDataList: CompletionDataList
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlElementPath.cs b/main/src/addins/Xml/Completion/XmlElementPath.cs
index 50ca7a3163..61050fff3b 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlElementPath.cs
+++ b/main/src/addins/Xml/Completion/XmlElementPath.cs
@@ -21,10 +21,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
-using MonoDevelop.XmlEditor.Completion;
+using System.Collections.Generic;
+using System.Text;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Completion
{
/// <summary>
/// Represents the path to an xml element starting from the root of the
@@ -32,20 +34,49 @@ namespace MonoDevelop.XmlEditor
/// </summary>
public class XmlElementPath
{
- QualifiedNameCollection elements = new QualifiedNameCollection();
+ readonly List<QualifiedName> elements;
XmlNamespacePrefixMap nsMap = new XmlNamespacePrefixMap ();
public XmlNamespacePrefixMap Namespaces { get { return nsMap; } }
-
- public XmlElementPath()
+
+ public XmlElementPath (params QualifiedName[] elements)
{
+ this.elements = new List<QualifiedName> (elements);
+ }
+
+ public static XmlElementPath Resolve (IList<XObject> path, string defaultNamespace = null, string defaultPrefix = null)
+ {
+ var elementPath = new XmlElementPath ();
+
+ if (!string.IsNullOrEmpty (defaultNamespace))
+ elementPath.Namespaces.AddPrefix (defaultNamespace, defaultPrefix);
+
+ foreach (var obj in path) {
+ var el = obj as XElement;
+ if (el == null)
+ continue;
+ foreach (var att in el.Attributes) {
+ if (!string.IsNullOrEmpty (att.Value)) {
+ if (att.Name.HasPrefix) {
+ if (att.Name.Prefix == "xmlns")
+ elementPath.Namespaces.AddPrefix (att.Value, att.Name.Name);
+ } else if (att.Name.Name == "xmlns") {
+ elementPath.Namespaces.AddPrefix (att.Value, "");
+ }
+ }
+ }
+ string ns = elementPath.Namespaces.GetNamespace (el.Name.HasPrefix? el.Name.Prefix : "");
+ var qn = new QualifiedName (el.Name.Name, ns, el.Name.Prefix ?? "");
+ elementPath.Elements.Add (qn);
+ }
+ return elementPath;
}
/// <summary>
/// Gets the elements specifying the path.
/// </summary>
/// <remarks>The order of the elements determines the path.</remarks>
- public QualifiedNameCollection Elements {
+ public List<QualifiedName> Elements {
get {
return elements;
}
@@ -77,10 +108,12 @@ namespace MonoDevelop.XmlEditor
/// </summary>
public override bool Equals(object obj) {
- if (!(obj is XmlElementPath)) return false;
- if (this == obj) return true;
-
- XmlElementPath rhs = (XmlElementPath)obj;
+ var rhs = obj as XmlElementPath;
+ if (rhs == null)
+ return false;
+ if (this == obj)
+ return true;
+
if (elements.Count == rhs.elements.Count) {
for (int i = 0; i < elements.Count; ++i) {
@@ -105,7 +138,8 @@ namespace MonoDevelop.XmlEditor
{
while (index >= 0) {
--index;
- elements.RemoveFirst();
+ if (elements.Count > 0)
+ elements.RemoveAt (0);
}
}
@@ -129,5 +163,14 @@ namespace MonoDevelop.XmlEditor
}
return index;
}
+
+ public override string ToString ()
+ {
+ var sb = new StringBuilder ();
+ foreach (var el in elements) {
+ sb.AppendFormat ("/{0}[{1}]", el.Name, el.Namespace);
+ }
+ return sb.ToString ();
+ }
}
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs b/main/src/addins/Xml/Completion/XmlMultipleClosingTagCompletionData.cs
index b3aafd8821..2397d663e4 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlMultipleClosingTagCompletionData.cs
+++ b/main/src/addins/Xml/Completion/XmlMultipleClosingTagCompletionData.cs
@@ -26,23 +26,19 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Text;
using MonoDevelop.Core;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.Xml.StateEngine;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
-
-
public class XmlMultipleClosingTagCompletionData : CompletionData
{
string name, description;
- XElement finalEl;
- XElement[] intEls;
+ readonly XElement finalEl;
+ readonly XElement[] intEls;
public XmlMultipleClosingTagCompletionData (XElement finalEl, XElement[] intermediateElements)
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlNamespacePrefixMap.cs b/main/src/addins/Xml/Completion/XmlNamespacePrefixMap.cs
index fe71e384e9..1dc5e08606 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlNamespacePrefixMap.cs
+++ b/main/src/addins/Xml/Completion/XmlNamespacePrefixMap.cs
@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
public class XmlNamespacePrefixMap
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs b/main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs
index 2f77e6d39c..6a52d9ffc3 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionData.cs
+++ b/main/src/addins/Xml/Completion/XmlSchemaCompletionData.cs
@@ -21,15 +21,15 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Ide.CodeCompletion;
using System;
-using System.Collections;
using System.IO;
-using System.Text;
+using System.Linq;
using System.Xml;
using System.Xml.Schema;
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Xml.Editor;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
/// <summary>
/// Holds the completion (intellisense) data for an xml schema.
@@ -262,8 +262,10 @@ namespace MonoDevelop.XmlEditor.Completion
var data = new XmlCompletionDataList (path.Namespaces);
var element = FindElement (path);
- if (element != null)
- GetChildElementCompletionData (data, element, path.Elements.LastPrefix);
+ if (element != null) {
+ var last = path.Elements.LastOrDefault ();
+ GetChildElementCompletionData (data, element, last != null ? last.Prefix : "");
+ }
return data;
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionDataCollection.cs b/main/src/addins/Xml/Completion/XmlSchemaCompletionDataCollection.cs
index 1035529793..5df7aa6a9f 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlSchemaCompletionDataCollection.cs
+++ b/main/src/addins/Xml/Completion/XmlSchemaCompletionDataCollection.cs
@@ -25,7 +25,7 @@ using MonoDevelop.Ide.CodeCompletion;
using System;
using System.Collections.Generic;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
public interface IXmlSchemaCompletionDataCollection: IEnumerable<XmlSchemaCompletionData>
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs b/main/src/addins/Xml/Completion/XmlTagCompletionData.cs
index a19782d6b4..befc32f068 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Completion/XmlTagCompletionData.cs
+++ b/main/src/addins/Xml/Completion/XmlTagCompletionData.cs
@@ -32,7 +32,7 @@ using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Ide.Gui.Content;
using MonoDevelop.Core;
-namespace MonoDevelop.XmlEditor.Completion
+namespace MonoDevelop.Xml.Completion
{
diff --git a/main/src/addins/Xml/Dom/IAttributedXObject.cs b/main/src/addins/Xml/Dom/IAttributedXObject.cs
new file mode 100644
index 0000000000..342c5da81f
--- /dev/null
+++ b/main/src/addins/Xml/Dom/IAttributedXObject.cs
@@ -0,0 +1,35 @@
+//
+// XDom.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace MonoDevelop.Xml.Dom
+{
+ public interface IAttributedXObject : INamedXObject
+ {
+ XAttributeCollection Attributes { get; }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/INamedXObject.cs b/main/src/addins/Xml/Dom/INamedXObject.cs
new file mode 100644
index 0000000000..14792c5a92
--- /dev/null
+++ b/main/src/addins/Xml/Dom/INamedXObject.cs
@@ -0,0 +1,34 @@
+//
+// INamedXObject.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace MonoDevelop.Xml.Dom
+{
+ public interface INamedXObject
+ {
+ XName Name { get; set; }
+ bool IsNamed { get; }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XAttribute.cs b/main/src/addins/Xml/Dom/XAttribute.cs
new file mode 100644
index 0000000000..f34f456727
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XAttribute.cs
@@ -0,0 +1,74 @@
+//
+// XAttribute.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XAttribute : XObject, INamedXObject
+ {
+
+ public XAttribute (TextLocation start, XName name, string value) : base (start)
+ {
+ this.Name = name;
+ this.Value = value;
+ }
+
+ public XAttribute (TextLocation start) : base (start)
+ {
+ }
+
+ public XName Name { get; set; }
+
+ public override bool IsComplete { get { return base.IsComplete && IsNamed; } }
+ public bool IsNamed { get { return Name.IsValid; } }
+
+ public string Value { get; set; }
+ public XAttribute NextSibling { get; internal protected set; }
+
+ protected XAttribute () {}
+ protected override XObject NewInstance () { return new XAttribute (); }
+
+ protected override void ShallowCopyFrom (XObject copyFrom)
+ {
+ base.ShallowCopyFrom (copyFrom);
+ var copyFromAtt = (XAttribute) copyFrom;
+ //immutable types
+ Name = copyFromAtt.Name;
+ Value = copyFromAtt.Value;
+ }
+
+ public override string ToString ()
+ {
+ return string.Format (
+ "[XAttribute Name='{0}' Location='{1}' Value='{2}']", Name.FullName, Region, Value);
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "@" + Name.FullName; }
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XAttributeCollection.cs b/main/src/addins/Xml/Dom/XAttributeCollection.cs
new file mode 100644
index 0000000000..0a906f0ec9
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XAttributeCollection.cs
@@ -0,0 +1,122 @@
+//
+// XAttributeCollection.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XAttributeCollection : IEnumerable<XAttribute>
+ {
+ readonly XObject parent;
+ XAttribute firstChild;
+ XAttribute lastChild;
+
+ public XAttributeCollection (XObject parent)
+ {
+ this.parent = parent;
+ }
+
+ public Dictionary<XName, XAttribute> ToDictionary ()
+ {
+ var dict = new Dictionary<XName,XAttribute> ();
+ XAttribute current = firstChild;
+ while (current != null) {
+ dict.Add (current.Name, current);
+ current = current.NextSibling;
+ }
+ return dict;
+ }
+
+ public XAttribute this [XName name] {
+ get {
+ XAttribute current = firstChild;
+ while (current != null) {
+ if (current.Name == name)
+ return current;
+ current = current.NextSibling;
+ }
+ return null;
+ }
+ }
+
+ public XAttribute this [int index] {
+ get {
+ XAttribute current = firstChild;
+ while (current != null) {
+ if (index == 0)
+ return current;
+ index--;
+ current = current.NextSibling;
+ }
+ throw new IndexOutOfRangeException ();
+ }
+ }
+
+ public XAttribute Get (XName name, bool ignoreCase)
+ {
+ XAttribute current = firstChild;
+ while (current != null) {
+ if (XName.Equals (current.Name, name, ignoreCase))
+ return current;
+ current = current.NextSibling;
+ }
+ return null;
+ }
+
+ public string GetValue (XName name, bool ignoreCase)
+ {
+ var att = Get (name, ignoreCase);
+ return att != null? att.Value : null;
+ }
+
+ public void AddAttribute (XAttribute newChild)
+ {
+ newChild.Parent = parent;
+ if (lastChild != null) {
+ lastChild.NextSibling = newChild;
+ }
+ if (firstChild == null)
+ firstChild = newChild;
+ lastChild = newChild;
+ }
+
+ public IEnumerator<XAttribute> GetEnumerator ()
+ {
+ XAttribute current = firstChild;
+ while (current != null) {
+ yield return current;
+ current = current.NextSibling;
+ }
+ }
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
+ {
+ IEnumerator<XAttribute> en = GetEnumerator ();
+ return en;
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XCData.cs b/main/src/addins/Xml/Dom/XCData.cs
new file mode 100644
index 0000000000..001f80521b
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XCData.cs
@@ -0,0 +1,44 @@
+//
+// XCData.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XCData : XNode
+ {
+ public XCData (TextLocation start) : base (start) {}
+ public XCData (DomRegion region) : base (region) {}
+
+ protected XCData () {}
+ protected override XObject NewInstance () { return new XCData (); }
+
+ public override string FriendlyPathRepresentation {
+ get { return "<![CDATA[ ]]>"; }
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XClosingTag.cs b/main/src/addins/Xml/Dom/XClosingTag.cs
new file mode 100644
index 0000000000..c134dea6a4
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XClosingTag.cs
@@ -0,0 +1,60 @@
+//
+// XClosingTag.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XClosingTag : XNode, INamedXObject
+ {
+ public XClosingTag (TextLocation start) : base (start) {}
+
+ public XClosingTag (XName name, TextLocation start) : base (start)
+ {
+ this.Name = name;
+ }
+
+ public XName Name { get; set; }
+
+ public override bool IsComplete { get { return base.IsComplete && IsNamed; } }
+ public bool IsNamed { get { return Name.IsValid; } }
+
+ protected XClosingTag () {}
+ protected override XObject NewInstance () { return new XClosingTag (); }
+
+ protected override void ShallowCopyFrom (XObject copyFrom)
+ {
+ base.ShallowCopyFrom (copyFrom);
+ var copyFromAtt = (XClosingTag) copyFrom;
+ //immutable types
+ Name = copyFromAtt.Name;
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return "/" + Name.FullName; }
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XComment.cs b/main/src/addins/Xml/Dom/XComment.cs
new file mode 100644
index 0000000000..57231b974f
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XComment.cs
@@ -0,0 +1,44 @@
+//
+// XComment.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XComment : XNode
+ {
+ public XComment (TextLocation start) : base (start) {}
+ public XComment (DomRegion region) : base (region) {}
+
+ protected XComment () {}
+ protected override XObject NewInstance () { return new XComment (); }
+
+ public override string FriendlyPathRepresentation {
+ get { return "<!-- -->"; }
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XContainer.cs b/main/src/addins/Xml/Dom/XContainer.cs
new file mode 100644
index 0000000000..997def1ad0
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XContainer.cs
@@ -0,0 +1,83 @@
+//
+// XContainer.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public abstract class XContainer : XNode
+ {
+ protected XContainer (TextLocation start) : base (start) { }
+
+ XNode firstNode;
+ XNode lastChild;
+ public XNode FirstChild { get { return firstNode; } }
+ public XNode LastChild { get { return lastChild; } }
+
+ public IEnumerable<XNode> Nodes {
+ get {
+ XNode next = firstNode;
+ while (next != null) {
+ yield return next;
+ next = next.NextSibling;
+ }
+ }
+ }
+
+ public IEnumerable<XNode> AllDescendentNodes {
+ get {
+ foreach (XNode n in Nodes) {
+ yield return n;
+ XContainer c = n as XContainer;
+ if (c != null)
+ foreach (XNode n2 in c.AllDescendentNodes)
+ yield return n2;
+ }
+ }
+ }
+
+ public virtual void AddChildNode (XNode newChild)
+ {
+ newChild.Parent = this;
+ if (lastChild != null)
+ lastChild.NextSibling = newChild;
+ if (firstNode == null)
+ firstNode = newChild;
+ lastChild = newChild;
+ }
+
+ protected XContainer () {}
+
+ public override void BuildTreeString (StringBuilder builder, int indentLevel)
+ {
+ base.BuildTreeString (builder, indentLevel);
+ foreach (XNode child in Nodes)
+ child.BuildTreeString (builder, indentLevel + 1);
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XDocType.cs b/main/src/addins/Xml/Dom/XDocType.cs
new file mode 100644
index 0000000000..ff29a31322
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XDocType.cs
@@ -0,0 +1,76 @@
+//
+// XDocType.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XDocType : XNode, INamedXObject
+ {
+ public XDocType (TextLocation start) : base (start) {}
+ public XDocType (DomRegion region) : base (region) {}
+
+ protected XDocType () {}
+ protected override XObject NewInstance () { return new XDocType (); }
+
+ public XName RootElement { get; set; }
+ public string PublicFpi { get; set; }
+ public bool IsPublic { get { return PublicFpi != null; } }
+ public DomRegion InternalDeclarationRegion { get; set; }
+ public string Uri { get; set; }
+
+ public override string FriendlyPathRepresentation {
+ get { return "<!DOCTYPE>"; }
+ }
+
+ protected override void ShallowCopyFrom (XObject copyFrom)
+ {
+ base.ShallowCopyFrom (copyFrom);
+ XDocType copyFromDT = (XDocType) copyFrom;
+ //immutable types
+ RootElement = copyFromDT.RootElement;
+ PublicFpi = copyFromDT.PublicFpi;
+ InternalDeclarationRegion = copyFromDT.InternalDeclarationRegion;
+ Uri = copyFromDT.Uri;
+ }
+
+ XName INamedXObject.Name {
+ get { return RootElement; }
+ set { RootElement = value; }
+ }
+
+ bool INamedXObject.IsNamed {
+ get { return RootElement.IsValid; }
+ }
+
+ public override string ToString ()
+ {
+ return string.Format("[DocType: RootElement='{0}', PublicFpi='{1}', InternalDeclarationRegion='{2}', Uri='{3}']",
+ RootElement.FullName, PublicFpi, InternalDeclarationRegion, Uri);
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenXPathQueryPadCommand.cs b/main/src/addins/Xml/Dom/XDocument.cs
index 899ce14545..dc6cfafccc 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/OpenXPathQueryPadCommand.cs
+++ b/main/src/addins/Xml/Dom/XDocument.cs
@@ -1,7 +1,10 @@
//
-// MonoDevelop XML Editor
+// XDocument.cs
//
-// Copyright (C) 2006-2007 Matthew Ward
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -9,52 +12,40 @@
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
+// THE SOFTWARE.
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Core;
-using MonoDevelop.Ide.Gui;
using System;
+using ICSharpCode.NRefactory;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Dom
{
- public class OpenXPathQueryPadCommand : CommandHandler
+ public class XDocument : XContainer
{
- static Pad pad;
-
- protected override void Run()
- {
- if (pad == null) {
- GetXPathQueryPad();
- }
- if (pad != null) {
- pad.BringToFront();
- }
- }
-
- protected override void Update(CommandInfo info)
- {
- info.Enabled = XmlEditorService.IsXmlEditorViewContentActive;
+ public XElement RootElement { get; private set; }
+
+ public XDocument () : base (new TextLocation (1, 1)) {}
+ protected override XObject NewInstance () { return new XDocument (); }
+
+ public override string FriendlyPathRepresentation {
+ get { throw new InvalidOperationException ("Should not display document in path bar."); }
}
-
- void GetXPathQueryPad()
+
+ public override void AddChildNode (XNode newChild)
{
- foreach (Pad currentPad in IdeApp.Workbench.Pads) {
- if (currentPad.Id == "MonoDevelop.XmlEditor.XPathQueryPad") {
- pad = currentPad;
- break;
- }
- }
+ if (RootElement == null && newChild is XElement)
+ RootElement = (XElement) newChild;
+ base.AddChildNode (newChild);
}
+
}
}
diff --git a/main/src/addins/Xml/Dom/XElement.cs b/main/src/addins/Xml/Dom/XElement.cs
new file mode 100644
index 0000000000..a49a2b81d4
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XElement.cs
@@ -0,0 +1,144 @@
+//
+// XElement.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XElement : XContainer, IAttributedXObject
+ {
+ XNode closingTag;
+ readonly XAttributeCollection attributes;
+
+ public XElement (TextLocation start) : base (start)
+ {
+ attributes = new XAttributeCollection (this);
+ }
+
+ public XElement (TextLocation start, XName name) : this (start)
+ {
+ this.Name = name;
+ }
+
+ public XNode ClosingTag { get { return closingTag; } }
+ public bool IsClosed { get { return closingTag != null; } }
+ public bool IsSelfClosing { get { return closingTag == this; } }
+
+ public void Close (XNode closingTag)
+ {
+ this.closingTag = closingTag;
+ if (closingTag is XClosingTag)
+ closingTag.Parent = this;
+ }
+
+ public XName Name { get; set; }
+
+ public override bool IsComplete { get { return base.IsComplete && IsNamed; } }
+ public bool IsNamed { get { return Name.IsValid; } }
+
+ public XAttributeCollection Attributes {
+ get { return attributes; }
+ }
+
+ protected XElement ()
+ {
+ attributes = new XAttributeCollection (this);
+ }
+
+ protected override XObject NewInstance () { return new XElement (); }
+
+ protected override void ShallowCopyFrom (XObject copyFrom)
+ {
+ base.ShallowCopyFrom (copyFrom);
+ var copyFromEl = (XElement) copyFrom;
+ Name = copyFromEl.Name; //XName is immutable value type
+ //include attributes
+ foreach (var a in copyFromEl.Attributes)
+ Attributes.AddAttribute ((XAttribute) a.ShallowCopy ());
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[XElement Name='{0}' Location='{1}'", Name.FullName, Region);
+ }
+
+ public override void BuildTreeString (StringBuilder builder, int indentLevel)
+ {
+ builder.Append (' ', indentLevel * 2);
+ builder.AppendFormat ("[XElement Name='{0}' Location='{1}' Children=", Name.FullName, Region);
+ builder.AppendLine ();
+
+ foreach (XNode child in Nodes)
+ child.BuildTreeString (builder, indentLevel + 1);
+
+ builder.Append (' ', indentLevel * 2);
+ builder.Append ("Attributes=");
+ builder.AppendLine ();
+
+ foreach (XAttribute att in Attributes)
+ att.BuildTreeString (builder, indentLevel + 1);
+
+ if (closingTag is XClosingTag) {
+ builder.AppendLine ("ClosingTag=");
+ closingTag.BuildTreeString (builder, indentLevel + 1);
+ } else if (closingTag == null)
+ builder.AppendLine ("ClosingTag=(null)");
+ else
+ builder.AppendLine ("ClosingTag=(Self)");
+
+ builder.Append (' ', indentLevel * 2);
+ builder.AppendLine ("]");
+ }
+
+ public override string FriendlyPathRepresentation {
+ get { return Name.FullName; }
+ }
+
+ public IEnumerable<XElement> Elements {
+ get {
+ XElement el;
+ foreach (XNode node in Nodes) {
+ el = node as XElement;
+ if (el != null)
+ yield return el;
+ }
+ }
+ }
+
+ public IEnumerable<XElement> AllDescendentElements {
+ get {
+ foreach (XElement el in Elements) {
+ yield return el;
+ foreach (XElement el2 in el.AllDescendentElements)
+ yield return el2;
+ }
+ }
+ }
+
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XName.cs b/main/src/addins/Xml/Dom/XName.cs
new file mode 100644
index 0000000000..0fb09cc8f1
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XName.cs
@@ -0,0 +1,103 @@
+//
+// XName.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+
+namespace MonoDevelop.Xml.Dom
+{
+
+ public struct XName : IEquatable<XName>
+ {
+ readonly string prefix;
+ readonly string name;
+
+ public XName (string prefix, string name)
+ {
+ this.prefix = prefix;
+ this.name = name;
+ }
+
+ public XName (string name)
+ {
+ prefix = null;
+ this.name = name;
+ }
+
+ public string Prefix { get { return prefix; } }
+ public string Name { get { return name; } }
+ public string FullName { get { return prefix == null? name : prefix + ':' + name; } }
+
+ public bool IsValid { get { return !string.IsNullOrEmpty (name); } }
+ public bool HasPrefix { get { return !string.IsNullOrEmpty (prefix); } }
+
+ #region Equality
+
+ public static bool operator == (XName x, XName y)
+ {
+ return x.Equals (y);
+ }
+
+ public static bool operator != (XName x, XName y)
+ {
+ return !x.Equals (y);
+ }
+
+ public bool Equals (XName other)
+ {
+ return prefix == other.prefix && name == other.name;
+ }
+
+ public override bool Equals (object obj)
+ {
+ if (!(obj is XName))
+ return false;
+ return Equals ((XName) obj);
+ }
+
+ public override int GetHashCode ()
+ {
+ int hash = 0;
+ if (prefix != null) hash += prefix.GetHashCode ();
+ if (name != null) hash += name.GetHashCode ();
+ return hash;
+ }
+
+ #endregion
+
+ public static bool Equals (XName a, XName b, bool ignoreCase)
+ {
+ var comp = ignoreCase? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
+ return string.Equals (a.prefix, b.prefix, comp) && string.Equals (a.name, b.name, comp);
+ }
+
+ public override string ToString ()
+ {
+ if (!HasPrefix)
+ return name;
+ return prefix + ":" + name;
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/RemoveXPathHighlightingCommand.cs b/main/src/addins/Xml/Dom/XNode.cs
index 239f57f0cf..d98b02b761 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/RemoveXPathHighlightingCommand.cs
+++ b/main/src/addins/Xml/Dom/XNode.cs
@@ -1,7 +1,10 @@
//
-// MonoDevelop XML Editor
+// XNode.cs
//
-// Copyright (C) 2006 Matthew Ward
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -9,37 +12,29 @@
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
+// THE SOFTWARE.
-using MonoDevelop.Components.Commands;
-using System;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Dom
{
- public class RemoveXPathHighlightingCommand : CommandHandler
+ public abstract class XNode : XObject
{
- protected override void Run()
- {
- // Find active Xml View.
- XmlEditorViewContent view = XmlEditorService.GetActiveView();
- if (view != null) {
- view.XmlEditorView.RemoveXPathMarkers();
- }
- }
-
- protected override void Update(CommandInfo info)
- {
- info.Enabled = XmlEditorService.IsXmlEditorViewContentActive;
- }
+ protected XNode (TextLocation start) : base (start) {}
+ protected XNode (DomRegion region) : base (region) {}
+ protected XNode () {}
+
+ public XNode NextSibling { get; internal protected set; }
}
}
diff --git a/main/src/addins/Xml/Dom/XObject.cs b/main/src/addins/Xml/Dom/XObject.cs
new file mode 100644
index 0000000000..f999256eea
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XObject.cs
@@ -0,0 +1,110 @@
+//
+// XObject.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public abstract class XObject
+ {
+ DomRegion region;
+
+ protected XObject (TextLocation start)
+ {
+ region = new DomRegion (start, TextLocation.Empty);
+ }
+
+ protected XObject (DomRegion region)
+ {
+ this.region = region;
+ }
+
+ public XObject Parent { get; internal protected set; }
+
+ public IEnumerable<XNode> Parents {
+ get {
+ XNode next = Parent as XNode;
+ while (next != null) {
+ yield return next;
+ next = next.Parent as XNode;
+ }
+ }
+ }
+
+ public DomRegion Region {
+ get { return region; }
+ }
+
+ public void End (TextLocation endLocation)
+ {
+ region = new DomRegion (region.Begin, endLocation);
+ }
+
+ public bool IsEnded {
+ get { return region.End > region.Begin; }
+ }
+
+ public virtual bool IsComplete {
+ get { return region.End > region.Begin; }
+ }
+
+ public virtual void BuildTreeString (StringBuilder builder, int indentLevel)
+ {
+ builder.Append (' ', indentLevel * 2);
+ builder.AppendFormat (ToString ());
+ builder.AppendLine ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[{0} Location='{1}']", GetType (), Region);
+ }
+
+ //creates a parallel tree -- should NOT retain references into old tree
+ public XObject ShallowCopy ()
+ {
+ XObject copy = NewInstance ();
+ copy.ShallowCopyFrom (this);
+ return copy;
+ }
+
+ protected abstract XObject NewInstance ();
+
+ protected virtual void ShallowCopyFrom (XObject copyFrom)
+ {
+ region = copyFrom.region; //immutable value type
+ }
+
+ protected XObject () {}
+
+ public virtual string FriendlyPathRepresentation {
+ get { return GetType ().ToString (); }
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Dom/XProcessingInstruction.cs b/main/src/addins/Xml/Dom/XProcessingInstruction.cs
new file mode 100644
index 0000000000..9089897116
--- /dev/null
+++ b/main/src/addins/Xml/Dom/XProcessingInstruction.cs
@@ -0,0 +1,44 @@
+//
+// XProcessingInstruction.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson@novell.com>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory;
+
+namespace MonoDevelop.Xml.Dom
+{
+ public class XProcessingInstruction : XNode
+ {
+ public XProcessingInstruction (TextLocation start) : base (start) {}
+ public XProcessingInstruction (DomRegion region) : base (region) {}
+
+ protected XProcessingInstruction () {}
+ protected override XObject NewInstance () { return new XProcessingInstruction (); }
+
+ public override string FriendlyPathRepresentation {
+ get { return "<? ?>"; }
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs b/main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs
index c3db708a2c..25acac3ff2 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs
+++ b/main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs
@@ -30,35 +30,37 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
+
+using Gtk;
+
+using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using Mono.TextEditor;
+using MonoDevelop.Components;
using MonoDevelop.Core;
using MonoDevelop.DesignerSupport;
-using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.XmlEditor.Completion;
using MonoDevelop.Ide;
-using MonoDevelop.Components;
-using Gtk;
-using System.Linq;
-using System.Text;
-using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Ide.Gui.Content;
using MonoDevelop.Ide.TypeSystem;
-using ICSharpCode.NRefactory;
-using Mono.TextEditor;
using MonoDevelop.Projects;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
-namespace MonoDevelop.XmlEditor.Gui
+namespace MonoDevelop.Xml.Editor
{
public abstract class BaseXmlEditorExtension : CompletionTextEditorExtension, IPathedDocument, IOutlinedDocument
{
- DocumentStateTracker<Parser> tracker;
+ DocumentStateTracker<XmlParser> tracker;
ParsedDocument lastCU;
XDocType docType;
MonoDevelop.Ide.Gui.Components.PadTreeView outlineTreeView;
- Gtk.TreeStore outlineTreeStore;
+ TreeStore outlineTreeStore;
List<DotNetProject> ownerProjects;
#region Setup and teardown
@@ -69,17 +71,17 @@ namespace MonoDevelop.XmlEditor.Gui
return doc.GetContent<BaseXmlEditorExtension> () == null;
}
- protected virtual RootState CreateRootState ()
+ protected virtual XmlRootState CreateRootState ()
{
- return new XmlFreeState ();
+ return new XmlRootState ();
}
public override void Initialize ()
{
base.Initialize ();
UpdateOwnerProjects ();
- Parser parser = new Parser (CreateRootState (), false);
- tracker = new DocumentStateTracker<Parser> (parser, Editor);
+ var parser = new XmlParser (CreateRootState (), false);
+ tracker = new DocumentStateTracker<XmlParser> (parser, Editor);
Document.DocumentParsed += delegate {
lastCU = Document.ParsedDocument;
OnParsedDocumentUpdated ();
@@ -182,19 +184,18 @@ namespace MonoDevelop.XmlEditor.Gui
}
}
- protected DocumentStateTracker<Parser> Tracker {
+ protected DocumentStateTracker<XmlParser> Tracker {
get { return tracker; }
}
protected string GetBufferText (DomRegion region)
{
- MonoDevelop.Ide.Gui.Content.ITextBuffer buf = Buffer;
+ ITextBuffer buf = Buffer;
int start = buf.GetPositionFromLineColumn (region.BeginLine, region.BeginColumn);
int end = buf.GetPositionFromLineColumn (region.EndLine, region.EndColumn);
if (end > start && start >= 0)
return buf.GetText (start, end);
- else
- return null;
+ return null;
}
#endregion
@@ -270,10 +271,10 @@ namespace MonoDevelop.XmlEditor.Gui
protected virtual ICompletionDataList HandleCodeCompletion (
CodeCompletionContext completionContext, bool forced, ref int triggerWordLength)
{
- IEditableTextBuffer buf = this.EditableBuffer;
+ IEditableTextBuffer buf = EditableBuffer;
// completionChar may be a space even if the current char isn't, when ctrl-space is fired t
- TextLocation currentLocation = new TextLocation (completionContext.TriggerLine, completionContext.TriggerLineOffset);
+ var currentLocation = new TextLocation (completionContext.TriggerLine, completionContext.TriggerLineOffset);
char currentChar = completionContext.TriggerOffset < 1? ' ' : buf.GetCharAt (completionContext.TriggerOffset - 1);
char previousChar = completionContext.TriggerOffset < 2? ' ' : buf.GetCharAt (completionContext.TriggerOffset - 2);
@@ -282,7 +283,7 @@ namespace MonoDevelop.XmlEditor.Gui
tracker.Engine.CurrentStateLength, previousChar, currentChar, forced);
//closing tag completion
- if (tracker.Engine.CurrentState is XmlFreeState && currentChar == '>')
+ if (tracker.Engine.CurrentState is XmlRootState && currentChar == '>')
return ClosingTagCompletion (buf, currentLocation);
// Auto insert '>' when '/' is typed inside tag state (for quick tag closing)
@@ -293,10 +294,10 @@ namespace MonoDevelop.XmlEditor.Gui
}
//entity completion
- if (currentChar == '&' && (tracker.Engine.CurrentState is XmlFreeState ||
+ if (currentChar == '&' && (tracker.Engine.CurrentState is XmlRootState ||
tracker.Engine.CurrentState is XmlAttributeValueState))
{
- CompletionDataList list = new CompletionDataList ();
+ var list = new CompletionDataList ();
//TODO: need to tweak semicolon insertion
list.Add ("apos").Description = "'";
@@ -377,22 +378,22 @@ namespace MonoDevelop.XmlEditor.Gui
}
}
-// if (Tracker.Engine.CurrentState is XmlFreeState) {
+// if (Tracker.Engine.CurrentState is XmlRootState) {
// if (line < 3) {
// cp.Add ("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
// }
//element completion
- if (currentChar == '<' && tracker.Engine.CurrentState is XmlFreeState ||
+ if (currentChar == '<' && tracker.Engine.CurrentState is XmlRootState ||
(tracker.Engine.CurrentState is XmlNameState && forced)) {
- CompletionDataList list = new CompletionDataList ();
+ var list = new CompletionDataList ();
GetElementCompletions (list);
AddCloseTag (list, Tracker.Engine.Nodes);
return list.Count > 0? list : null;
}
- if (forced && Tracker.Engine.CurrentState is XmlFreeState) {
- CompletionDataList list = new CompletionDataList ();
+ if (forced && Tracker.Engine.CurrentState is XmlRootState) {
+ var list = new CompletionDataList ();
MonoDevelop.Ide.CodeTemplates.CodeTemplateService.AddCompletionDataForFileName (Document.Name, list);
return list.Count > 0? list : null;
}
@@ -403,7 +404,7 @@ namespace MonoDevelop.XmlEditor.Gui
protected virtual ICompletionDataList ClosingTagCompletion (IEditableTextBuffer buf, TextLocation currentLocation)
{
//get name of current node in document that's being ended
- XElement el = tracker.Engine.Nodes.Peek () as XElement;
+ var el = tracker.Engine.Nodes.Peek () as XElement;
if (el != null && el.Region.End >= currentLocation && !el.IsClosed && el.IsNamed) {
string tag = String.Concat ("</", el.Name.FullName, ">");
if (XmlEditorOptions.AutoCompleteElements) {
@@ -424,7 +425,7 @@ namespace MonoDevelop.XmlEditor.Gui
return null;
} else {
- CompletionDataList cp = new CompletionDataList ();
+ var cp = new CompletionDataList ();
cp.Add (new XmlTagCompletionData (tag, 0, true));
return cp;
}
@@ -501,7 +502,7 @@ namespace MonoDevelop.XmlEditor.Gui
skip--;
continue;
}
- XElement el = obj as XElement;
+ var el = obj as XElement;
if (el == null || !el.IsNamed)
yield break;
yield return el.Name;
@@ -515,7 +516,7 @@ namespace MonoDevelop.XmlEditor.Gui
skip--;
continue;
}
- XElement el = obj as XElement;
+ var el = obj as XElement;
return el != null? el.Name : new XName ();
}
return new XName ();
@@ -536,9 +537,9 @@ namespace MonoDevelop.XmlEditor.Gui
protected static void AddCloseTag (CompletionDataList completionList, NodeStack stack)
{
//FIXME: search forward to see if tag's closed already
- List<XElement> elements = new List<XElement> ();
+ var elements = new List<XElement> ();
foreach (XObject ob in stack) {
- XElement el = ob as XElement;
+ var el = ob as XElement;
if (el == null)
continue;
if (!el.IsNamed || el.IsClosed)
@@ -573,7 +574,7 @@ namespace MonoDevelop.XmlEditor.Gui
#region IPathedDocument
PathEntry[] currentPath;
- bool pathUpdateQueued = false;
+ bool pathUpdateQueued;
public override void CursorPositionChanged ()
{
@@ -601,14 +602,14 @@ namespace MonoDevelop.XmlEditor.Gui
void SelectPath (int depth, bool contents)
{
//clone the parser and put it in tree mode
- Parser treeParser = this.tracker.Engine.GetTreeParser ();
+ XmlParser treeParser = tracker.Engine.GetTreeParser ();
//locate the node
- List<XObject> path = new List<XObject> (treeParser.Nodes);
+ var path = new List<XObject> (treeParser.Nodes);
//note: list is backwards, and we want ignore the root XDocument
XObject ob = path [path.Count - (depth + 2)];
- XNode node = ob as XNode;
- XElement el = node as XElement;
+ var node = ob as XNode;
+ var el = node as XElement;
//hoist this as it may not be cheap to evaluate (P/Invoke), but won't be changing during the loop
int textLen = Editor.Length;
@@ -633,22 +634,21 @@ namespace MonoDevelop.XmlEditor.Gui
}
if (el == null) {
- MonoDevelop.Core.LoggingService.LogDebug ("Selecting {0}", ob.Region);
+ LoggingService.LogDebug ("Selecting {0}", ob.Region);
EditorSelect (ob.Region);
}
else if (el.IsClosed) {
- MonoDevelop.Core.LoggingService.LogDebug ("Selecting {0}-{1}",
+ LoggingService.LogDebug ("Selecting {0}-{1}",
el.Region.Begin, el.ClosingTag.Region.End);
- if (el.IsSelfClosing)
- contents = false;
+ contents &= !el.IsSelfClosing;
//pick out the locations, with some offsets to account for the parsing model
var s = contents? el.Region.End : el.Region.Begin;
var e = contents? el.ClosingTag.Region.Begin : el.ClosingTag.Region.End;
EditorSelect (new DomRegion (s, e));
} else {
- MonoDevelop.Core.LoggingService.LogDebug ("No end tag found for selection");
+ LoggingService.LogDebug ("No end tag found for selection");
}
}
@@ -664,7 +664,7 @@ namespace MonoDevelop.XmlEditor.Gui
public event EventHandler<DocumentPathChangedEventArgs> PathChanged;
- public Gtk.Widget CreatePathWidget (int index)
+ public Widget CreatePathWidget (int index)
{
if (ownerProjects.Count > 1 && index == 0) {
var window = new DropDownBoxListWindow (new DataProvider (this));
@@ -675,8 +675,8 @@ namespace MonoDevelop.XmlEditor.Gui
} else {
if (ownerProjects.Count > 1)
index--;
- Menu menu = new Menu ();
- MenuItem mi = new MenuItem (GettextCatalog.GetString ("Select"));
+ var menu = new Menu ();
+ var mi = new MenuItem (GettextCatalog.GetString ("Select"));
mi.Activated += delegate {
SelectPath (index);
};
@@ -747,10 +747,10 @@ namespace MonoDevelop.XmlEditor.Gui
protected XName GetCompleteName ()
{
- Debug.Assert (this.tracker.Engine.CurrentState is XmlNameState);
+ Debug.Assert (tracker.Engine.CurrentState is XmlNameState);
- int end = this.tracker.Engine.Position;
- int start = end - this.tracker.Engine.CurrentStateLength;
+ int end = tracker.Engine.Position;
+ int start = end - tracker.Engine.CurrentStateLength;
int mid = -1;
int limit = Math.Min (Editor.Length, end + 35);
@@ -770,9 +770,8 @@ namespace MonoDevelop.XmlEditor.Gui
if (mid > 0 && end > mid + 1) {
return new XName (Editor.GetTextBetween (start, mid), Editor.GetTextBetween (mid + 1, end));
- } else {
- return new XName (Editor.GetTextBetween (start, end));
}
+ return new XName (Editor.GetTextBetween (start, end));
}
/*
@@ -796,18 +795,18 @@ namespace MonoDevelop.XmlEditor.Gui
protected List<XObject> GetCurrentPath ()
{
- if (this.tracker == null)
+ if (tracker == null)
return null;
- this.tracker.UpdateEngine ();
- List<XObject> path = new List<XObject> (this.tracker.Engine.Nodes);
+ tracker.UpdateEngine ();
+ var path = new List<XObject> (tracker.Engine.Nodes);
//remove the root XDocument
path.RemoveAt (path.Count - 1);
//complete incomplete XName if present
- if (this.tracker.Engine.CurrentState is XmlNameState && path[0] is INamedXObject) {
- path[0] = (XObject) path[0].ShallowCopy ();
+ if (tracker.Engine.CurrentState is XmlNameState && path[0] is INamedXObject) {
+ path [0] = path [0].ShallowCopy ();
XName completeName = GetCompleteName ();
((INamedXObject)path[0]).Name = completeName;
}
@@ -845,17 +844,17 @@ namespace MonoDevelop.XmlEditor.Gui
#region IOutlinedDocument
- bool refreshingOutline = false;
+ bool refreshingOutline;
- Gtk.Widget IOutlinedDocument.GetOutlineWidget ()
+ Widget IOutlinedDocument.GetOutlineWidget ()
{
if (outlineTreeView != null)
return outlineTreeView;
- outlineTreeStore = new Gtk.TreeStore (typeof (object));
+ outlineTreeStore = new TreeStore (typeof (object));
outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);
- System.Reflection.PropertyInfo prop = typeof (Gtk.TreeView).GetProperty ("EnableTreeLines");
+ System.Reflection.PropertyInfo prop = typeof (TreeView).GetProperty ("EnableTreeLines");
if (prop != null)
prop.SetValue (outlineTreeView, true, null);
@@ -866,7 +865,7 @@ namespace MonoDevelop.XmlEditor.Gui
outlineTreeView.HeadersVisible = false;
outlineTreeView.Selection.Changed += delegate {
- Gtk.TreeIter iter;
+ TreeIter iter;
if (!outlineTreeView.Selection.GetSelected (out iter))
return;
OutlineSelectionChanged (outlineTreeStore.GetValue (iter, 0));
@@ -874,13 +873,13 @@ namespace MonoDevelop.XmlEditor.Gui
refillOutlineStore ();
- var sw = new MonoDevelop.Components.CompactScrolledWindow ();
+ var sw = new CompactScrolledWindow ();
sw.Add (outlineTreeView);
sw.ShowAll ();
return sw;
}
- IEnumerable<Gtk.Widget> IOutlinedDocument.GetToolbarWidgets ()
+ IEnumerable<Widget> IOutlinedDocument.GetToolbarWidgets ()
{
return null;
}
@@ -889,7 +888,7 @@ namespace MonoDevelop.XmlEditor.Gui
{
outlineTree.TextRenderer.Xpad = 0;
outlineTree.TextRenderer.Ypad = 0;
- outlineTree.AppendColumn ("Node", outlineTree.TextRenderer, new Gtk.TreeCellDataFunc (outlineTreeDataFunc));
+ outlineTree.AppendColumn ("Node", outlineTree.TextRenderer, new TreeCellDataFunc (outlineTreeDataFunc));
}
protected virtual void OutlineSelectionChanged (object selection)
@@ -912,12 +911,12 @@ namespace MonoDevelop.XmlEditor.Gui
return false;
}
- protected virtual void RefillOutlineStore (ParsedDocument doc, Gtk.TreeStore store)
+ protected virtual void RefillOutlineStore (ParsedDocument doc, TreeStore store)
{
XDocument xdoc = ((XmlParsedDocument)doc).XDocument;
if (xdoc == null)
return;
- BuildTreeChildren (store, Gtk.TreeIter.Zero, xdoc);
+ BuildTreeChildren (store, TreeIter.Zero, xdoc);
}
void refillOutlineStore ()
@@ -945,7 +944,7 @@ namespace MonoDevelop.XmlEditor.Gui
if (outlineTreeView == null)
return;
- Gtk.ScrolledWindow w = (Gtk.ScrolledWindow) outlineTreeView.Parent;
+ var w = (ScrolledWindow) outlineTreeView.Parent;
w.Destroy ();
outlineTreeView.Destroy ();
outlineTreeStore.Dispose ();
@@ -953,25 +952,25 @@ namespace MonoDevelop.XmlEditor.Gui
outlineTreeView = null;
}
- static void BuildTreeChildren (Gtk.TreeStore store, Gtk.TreeIter parent, XContainer p)
+ static void BuildTreeChildren (TreeStore store, TreeIter parent, XContainer p)
{
foreach (XNode n in p.Nodes) {
- Gtk.TreeIter childIter;
- if (!parent.Equals (Gtk.TreeIter.Zero))
+ TreeIter childIter;
+ if (!parent.Equals (TreeIter.Zero))
childIter = store.AppendValues (parent, n);
else
childIter = store.AppendValues (n);
- XContainer c = n as XContainer;
+ var c = n as XContainer;
if (c != null && c.FirstChild != null)
BuildTreeChildren (store, childIter, c);
}
}
- void outlineTreeDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+ void outlineTreeDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
{
- Gtk.CellRendererText txtRenderer = (Gtk.CellRendererText) cell;
- XNode n = (XNode) model.GetValue (iter, 0);
+ var txtRenderer = (CellRendererText) cell;
+ var n = (XNode) model.GetValue (iter, 0);
txtRenderer.Text = n.FriendlyPathRepresentation;
}
@@ -979,7 +978,7 @@ namespace MonoDevelop.XmlEditor.Gui
{
var region = n.Region;
- XElement el = n as XElement;
+ var el = n as XElement;
if (el != null && el.IsClosed && el.ClosingTag.Region.End > region.End) {
region = new DomRegion (region.Begin, el.ClosingTag.Region.End);
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/Commands.cs b/main/src/addins/Xml/Editor/XmlCommands.cs
index 55b48218b9..15ec848d8f 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/Commands.cs
+++ b/main/src/addins/Xml/Editor/XmlCommands.cs
@@ -21,22 +21,15 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Ide.Gui;
-using System;
-
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
- public enum Commands
+ public enum XmlCommands
{
CreateSchema,
Validate,
AssignStylesheet,
OpenStylesheet,
RunXslTransform,
- OpenXPathQueryPad,
- RemoveXPathHighlighting,
- GoToSchemaDefinition,
- ContextualMainMenu
+ GoToSchemaDefinition
}
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlDocumentParser.cs b/main/src/addins/Xml/Editor/XmlDocumentParser.cs
index a18a2b57f9..5f17fead35 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlDocumentParser.cs
+++ b/main/src/addins/Xml/Editor/XmlDocumentParser.cs
@@ -27,24 +27,21 @@
//
using System;
-using System.Collections.Generic;
using System.IO;
-using System.Linq;
-using System.Xml;
-using MonoDevelop.Xml.StateEngine;
using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Xml.Parser;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
- public class XmlDocumentParser : TypeSystemParser
+ class XmlDocumentParser : TypeSystemParser
{
public override ParsedDocument Parse (bool storeAst, string fileName, TextReader content, MonoDevelop.Projects.Project project = null)
{
- XmlParsedDocument doc = new XmlParsedDocument (fileName);
+ var doc = new XmlParsedDocument (fileName);
doc.Flags |= ParsedDocumentFlags.NonSerializable;
try {
- Parser xmlParser = new Parser (new XmlFreeState (), true);
+ var xmlParser = new XmlParser (new XmlRootState (), true);
xmlParser.Parse (content);
doc.XDocument = xmlParser.Nodes.GetRoot ();
doc.Add (xmlParser.Errors);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorOptions.cs b/main/src/addins/Xml/Editor/XmlEditorOptions.cs
index 5f82bda54f..cf914ad809 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorOptions.cs
+++ b/main/src/addins/Xml/Editor/XmlEditorOptions.cs
@@ -21,48 +21,47 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Core;
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-using System.IO;
-using System.Reflection;
-using System.Xml;
-namespace MonoDevelop.XmlEditor
+using MonoDevelop.Core;
+
+namespace MonoDevelop.Xml.Editor
{
/// <summary>
/// The Xml Editor options.
/// </summary>
public static class XmlEditorOptions
{
- internal static readonly string OptionsProperty = "XmlEditor.AddIn.Options";
- internal static readonly string ShowSchemaAnnotationPropertyName = "ShowSchemaAnnotation";
- internal static readonly string AutoCompleteElementsPropertyName = "AutoCompleteElements";
- internal static readonly string AutoInsertFragmentsPropertyName = "AutoInsertFragment";
- internal static readonly string AssociationPrefix = "Association";
+ static readonly string OptionsProperty = "XmlEditor.AddIn.Options";
+ static readonly string ShowSchemaAnnotationPropertyName = "ShowSchemaAnnotation";
+ static readonly string AutoCompleteElementsPropertyName = "AutoCompleteElements";
+ static readonly string AutoInsertFragmentsPropertyName = "AutoInsertFragment";
+ static readonly string AssociationPrefix = "Association";
- static Properties properties;
+ static readonly Properties properties;
+ static bool showSchemaAnnotation, autoCompleteElements, autoInsertFragments;
static XmlEditorOptions ()
{
properties = PropertyService.Get (OptionsProperty, new Properties());
Properties.PropertyChanged += HandlePropertiesPropertyChanged;
- ShowSchemaAnnotation = properties.Get<bool> (ShowSchemaAnnotationPropertyName, false);
- AutoCompleteElements = properties.Get<bool> (AutoCompleteElementsPropertyName, false);
- AutoInsertFragments = properties.Get<bool> (AutoInsertFragmentsPropertyName, false);
+ showSchemaAnnotation = properties.Get<bool> (ShowSchemaAnnotationPropertyName, false);
+ autoCompleteElements = properties.Get<bool> (AutoCompleteElementsPropertyName, false);
+ autoInsertFragments = properties.Get<bool> (AutoInsertFragmentsPropertyName, false);
}
static void HandlePropertiesPropertyChanged (object sender, PropertyChangedEventArgs e)
{
if (e.Key == ShowSchemaAnnotationPropertyName) {
- ShowSchemaAnnotation = (bool)e.NewValue;
+ showSchemaAnnotation = (bool)e.NewValue;
} else if (e.Key == AutoCompleteElementsPropertyName) {
- AutoCompleteElements = (bool)e.NewValue;
+ autoCompleteElements = (bool)e.NewValue;
} else if (e.Key == AutoInsertFragmentsPropertyName) {
- AutoInsertFragments = (bool)e.NewValue;
- } else if (XmlFileAssociationChanged != null && e.Key.StartsWith (AssociationPrefix)) {
+ autoInsertFragments = (bool)e.NewValue;
+ } else if (XmlFileAssociationChanged != null && e.Key.StartsWith (AssociationPrefix, StringComparison.Ordinal)) {
var ext = e.Key.Substring (AssociationPrefix.Length);
var assoc = e.NewValue as XmlFileAssociation;
XmlFileAssociationChanged (null, new XmlFileAssociationChangedEventArgs (ext, assoc));
@@ -101,7 +100,7 @@ namespace MonoDevelop.XmlEditor
//for some reason we get an out of sync error unless we copy the list
var keys = new List<string> (Properties.Keys);
foreach (string key in keys)
- if (key.StartsWith (AssociationPrefix))
+ if (key.StartsWith (AssociationPrefix, StringComparison.Ordinal))
yield return key.Substring (AssociationPrefix.Length);
}
@@ -109,7 +108,7 @@ namespace MonoDevelop.XmlEditor
{
var keys = new List<string> (Properties.Keys);
foreach (string key in keys) {
- if (key.StartsWith (AssociationPrefix)) {
+ if (key.StartsWith (AssociationPrefix, StringComparison.Ordinal)) {
var assoc = Properties.Get<XmlFileAssociation> (key);
//ignore bad data in properties
if (assoc != null)
@@ -118,14 +117,45 @@ namespace MonoDevelop.XmlEditor
}
}
- public static bool ShowSchemaAnnotation { get; private set; }
- public static bool AutoCompleteElements { get; private set; }
+ public static bool ShowSchemaAnnotation {
+ get {
+ return showSchemaAnnotation;
+ }
+ set {
+ if (showSchemaAnnotation == value)
+ return;
+ showSchemaAnnotation = value;
+ properties.Set (ShowSchemaAnnotationPropertyName, value);
+ }
+ }
+
+ public static bool AutoCompleteElements {
+ get {
+ return autoCompleteElements;
+ }
+ set {
+ if (autoCompleteElements == value)
+ return;
+ autoCompleteElements = value;
+ properties.Set (AutoCompleteElementsPropertyName, value);
+ }
+ }
/// <summary>
/// Automatically insert fragments such as ="" when committing an attribute and > when pressing / in a tag.
/// Off by default since it forces the user to alter typing behaviour.
/// </summary>
- public static bool AutoInsertFragments { get; private set; }
+ public static bool AutoInsertFragments {
+ get {
+ return autoInsertFragments;
+ }
+ set {
+ if (autoInsertFragments == value)
+ return;
+ autoInsertFragments = value;
+ properties.Set (AutoInsertFragmentsPropertyName, value);
+ }
+ }
#endregion
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs b/main/src/addins/Xml/Editor/XmlEditorOptionsPanel.cs
index a187eed129..e9e6cc337a 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanel.cs
+++ b/main/src/addins/Xml/Editor/XmlEditorOptionsPanel.cs
@@ -27,12 +27,12 @@ using Gtk;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Core;
-namespace MonoDevelop.XmlEditor.Gui
+namespace MonoDevelop.Xml.Editor
{
/// <summary>
/// Configuration settings for the xml editor.
/// </summary>
- public class XmlEditorOptionsPanel : OptionsPanel
+ class XmlEditorOptionsPanel : OptionsPanel
{
XmlEditorOptionsPanelWidget widget;
@@ -47,9 +47,9 @@ namespace MonoDevelop.XmlEditor.Gui
public override void ApplyChanges ()
{
- XmlEditorOptions.Properties.Set (XmlEditorOptions.AutoCompleteElementsPropertyName, widget.AutoCompleteElements);
- XmlEditorOptions.Properties.Set (XmlEditorOptions.AutoInsertFragmentsPropertyName, widget.AutoInsertFragments);
- XmlEditorOptions.Properties.Set (XmlEditorOptions.ShowSchemaAnnotationPropertyName, widget.ShowSchemaAnnotation);
+ XmlEditorOptions.AutoCompleteElements = widget.AutoCompleteElements;
+ XmlEditorOptions.AutoInsertFragments = widget.AutoInsertFragments;
+ XmlEditorOptions.ShowSchemaAnnotation = widget.ShowSchemaAnnotation;
}
}
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanelWidget.cs b/main/src/addins/Xml/Editor/XmlEditorOptionsPanelWidget.cs
index f0d17d2a33..d36e113c14 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlEditorOptionsPanelWidget.cs
+++ b/main/src/addins/Xml/Editor/XmlEditorOptionsPanelWidget.cs
@@ -26,18 +26,29 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
+using Gtk;
+using MonoDevelop.Core;
-namespace MonoDevelop.XmlEditor.Gui
+namespace MonoDevelop.Xml.Editor
{
-
-
- public partial class XmlEditorOptionsPanelWidget : Gtk.Bin
+ class XmlEditorOptionsPanelWidget : VBox
{
-
- public XmlEditorOptionsPanelWidget()
+ readonly CheckButton autoCompleteElementsCheck, autoAddPunctuationCheck, showSchemaAnnotationCheck;
+
+ public XmlEditorOptionsPanelWidget ()
{
- this.Build();
+ Spacing = 6;
+
+ autoCompleteElementsCheck = new CheckButton (GettextCatalog.GetString ("Automatically insert closing tags"));
+ autoAddPunctuationCheck = new CheckButton (GettextCatalog.GetString ("Automatically insert punctuation (=\"\", />, etc.)"));
+ showSchemaAnnotationCheck = new CheckButton (GettextCatalog.GetString ("Show schema annotation"));
+
+ PackStart (autoCompleteElementsCheck, false, false, 0);
+ PackStart (autoAddPunctuationCheck, false, false, 0);
+
+ //PackStart (showSchemaAnnotationCheck, false, false, 0);
+
+ ShowAll ();
}
public bool AutoCompleteElements {
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs b/main/src/addins/Xml/Editor/XmlEditorService.cs
index 71311ee95e..513b2e7458 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs
+++ b/main/src/addins/Xml/Editor/XmlEditorService.cs
@@ -21,29 +21,25 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Core;
-using MonoDevelop.Ide;
-using MonoDevelop.Ide.Gui;
-using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.Ide.Tasks;
-using MonoDevelop.XmlEditor.Completion;
-using MonoDevelop.Projects;
-
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
-using System.Text;
+using System.Text;
using System.Xml;
using System.Xml.Schema;
-using System.Xml.XPath;
-using System.Xml.Xsl;
-using MonoDevelop.Components;
-using Gtk;
+using System.Xml.XPath;
+using System.Xml.Xsl;
+
+using MonoDevelop.Components;
using MonoDevelop.Components.Extensions;
+using MonoDevelop.Core;
+using MonoDevelop.Ide;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Ide.Tasks;
+using MonoDevelop.Projects;
+using MonoDevelop.Xml.Completion;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
static class XmlEditorService
{
@@ -118,7 +114,7 @@ namespace MonoDevelop.XmlEditor
public static XmlTextWriter CreateXmlTextWriter (Document doc, TextWriter textWriter)
{
XmlTextWriter xmlWriter = new XmlTextWriter(textWriter);
- xmlWriter.Formatting = Formatting.Indented;
+ xmlWriter.Formatting = System.Xml.Formatting.Indented;
if (doc.Editor.TabsToSpaces) {
xmlWriter.Indentation = doc.Editor.Options.TabSize;
xmlWriter.IndentChar = ' ';
@@ -131,7 +127,7 @@ namespace MonoDevelop.XmlEditor
public static XmlTextWriter CreateXmlTextWriter (Document doc)
{
- return CreateXmlTextWriter (doc, new EncodedStringWriter (System.Text.Encoding.UTF8));
+ return CreateXmlTextWriter (doc, new EncodedStringWriter (Encoding.UTF8));
}
#endregion
@@ -424,6 +420,22 @@ namespace MonoDevelop.XmlEditor
return null;
}
- #endregion
+ #endregion
+
+ class EncodedStringWriter : StringWriter
+ {
+ readonly Encoding encoding;
+
+ public EncodedStringWriter(Encoding encoding)
+ {
+ this.encoding = encoding;
+ }
+
+ public override Encoding Encoding {
+ get {
+ return encoding;
+ }
+ }
+ }
}
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs b/main/src/addins/Xml/Editor/XmlFileAssociation.cs
index 5230becb67..92b9745974 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs
+++ b/main/src/addins/Xml/Editor/XmlFileAssociation.cs
@@ -24,7 +24,7 @@
using MonoDevelop.Core;
using System.Xml;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
/// <summary>Represents an file extension that can be handled by the editor.</summary>
public class XmlFileAssociation : ICustomXmlSerializer
@@ -34,7 +34,7 @@ namespace MonoDevelop.XmlEditor
static readonly string namespaceAttributeName = "namespace";
static readonly string prefixAttributeName = "prefix";
- //deseriialization ctor
+ //deserialization ctor
public XmlFileAssociation ()
{
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociationManager.cs b/main/src/addins/Xml/Editor/XmlFileAssociationManager.cs
index e491d024ca..646f3f1935 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociationManager.cs
+++ b/main/src/addins/Xml/Editor/XmlFileAssociationManager.cs
@@ -22,11 +22,10 @@
// THE SOFTWARE.
using Mono.Addins;
-using MonoDevelop.Core;
using System;
using System.Collections.Generic;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
static class XmlFileAssociationManager
{
@@ -36,7 +35,7 @@ namespace MonoDevelop.XmlEditor
{
map = new Dictionary<string,XmlFileAssociation> (StringComparer.OrdinalIgnoreCase);
- foreach (XmlFileAssociationNode node in AddinManager.GetExtensionNodes ("/MonoDevelop/XmlEditor/XmlFileAssociations")) {
+ foreach (XmlFileAssociationNode node in AddinManager.GetExtensionNodes ("/MonoDevelop/Xml/Editor/XmlFileAssociations")) {
var assoc = node.GetAssociation ();
map[assoc.Extension] = assoc;
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociationNode.cs b/main/src/addins/Xml/Editor/XmlFileAssociationNode.cs
index ecd82bafca..d24737d79f 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociationNode.cs
+++ b/main/src/addins/Xml/Editor/XmlFileAssociationNode.cs
@@ -24,7 +24,7 @@
using System;
using Mono.Addins;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
class XmlFileAssociationNode : ExtensionNode
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParsedDocument.cs b/main/src/addins/Xml/Editor/XmlParsedDocument.cs
index a818998f2c..bd6bc32cbf 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlParsedDocument.cs
+++ b/main/src/addins/Xml/Editor/XmlParsedDocument.cs
@@ -30,8 +30,9 @@ using System;
using System.Collections.Generic;
using MonoDevelop.Ide.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Editor
{
public class XmlParsedDocument : DefaultParsedDocument
{
@@ -39,7 +40,7 @@ namespace MonoDevelop.Xml.StateEngine
{
}
- public MonoDevelop.Xml.StateEngine.XDocument XDocument { get; set; }
+ public XDocument XDocument { get; set; }
public override IEnumerable<FoldingRegion> Foldings {
get {
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaManager.cs b/main/src/addins/Xml/Editor/XmlSchemaManager.cs
index 550735b760..279737ccf9 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaManager.cs
+++ b/main/src/addins/Xml/Editor/XmlSchemaManager.cs
@@ -21,15 +21,13 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using MonoDevelop.Core;
using System;
+using System.Collections.Generic;
using System.IO;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Xml;
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Core;
+using MonoDevelop.Xml.Completion;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
// Keeps track of all the schemas that the Xml Editor is aware of.
public static class XmlSchemaManager
@@ -67,7 +65,7 @@ namespace MonoDevelop.XmlEditor
get {
if (builtinSchemas == null) {
builtinSchemas = new XmlSchemaCompletionDataCollection ();
- var nodes = Mono.Addins.AddinManager.GetExtensionNodes ("/MonoDevelop/XmlEditor/XmlSchemas");
+ var nodes = Mono.Addins.AddinManager.GetExtensionNodes ("/MonoDevelop/Xml/Editor/XmlSchemas");
foreach (XmlSchemaNode node in nodes)
LoadSchema (builtinSchemas, node.File, true);
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaNode.cs b/main/src/addins/Xml/Editor/XmlSchemaNode.cs
index 0e3dfe47d8..dd2d4c26b8 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaNode.cs
+++ b/main/src/addins/Xml/Editor/XmlSchemaNode.cs
@@ -28,7 +28,7 @@ using System;
using Mono.Addins;
using MonoDevelop.Core;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
class XmlSchemaNode : ExtensionNode
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs b/main/src/addins/Xml/Editor/XmlSchemasPanel.cs
index 9d4cbbbe42..5adda7a6b0 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlSchemasPanel.cs
+++ b/main/src/addins/Xml/Editor/XmlSchemasPanel.cs
@@ -23,13 +23,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
-using System.Collections.Generic;
using Gtk;
using MonoDevelop.Ide.Gui.Dialogs;
-using MonoDevelop.XmlEditor;
-namespace MonoDevelop.XmlEditor.Gui
+namespace MonoDevelop.Xml.Editor
{
/// <summary>
/// Shows the xml schemas that MonoDevelop knows about.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs b/main/src/addins/Xml/Editor/XmlSchemasPanelWidget.cs
index 6808152048..f7d2824baf 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/XmlSchemasPanelWidget.cs
+++ b/main/src/addins/Xml/Editor/XmlSchemasPanelWidget.cs
@@ -34,14 +34,11 @@ using System.Collections.Generic;
using Gtk;
using MonoDevelop.Core;
using MonoDevelop.Ide;
-using MonoDevelop.XmlEditor;
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
-namespace MonoDevelop.XmlEditor.Gui
+namespace MonoDevelop.Xml.Editor
{
-
-
- public partial class XmlSchemasPanelWidget : Bin
+ class XmlSchemasPanelWidget : VBox
{
ListStore registeredSchemasStore;
ListStore defaultAssociationsStore;
@@ -49,10 +46,14 @@ namespace MonoDevelop.XmlEditor.Gui
List<XmlSchemaCompletionData> addedSchemas = new List<XmlSchemaCompletionData> ();
List<XmlSchemaCompletionData> removedSchemas = new List<XmlSchemaCompletionData> ();
List<string> removedExtensions = new List<string> ();
+
+ TreeView registeredSchemasView, defaultAssociationsView;
+ Button registeredSchemasAddButton, registeredSchemasRemoveButton;
+ Button defaultAssociationsAddButton, defaultAssociationsRemoveButton;
public XmlSchemasPanelWidget ()
{
- this.Build ();
+ Build ();
//set up tree view for default schemas
var textRenderer = new CellRendererText ();
@@ -73,7 +74,7 @@ namespace MonoDevelop.XmlEditor.Gui
});
registeredSchemasStore.SetSortFunc (0,
- (model, a, b) => string.Compare (GetSchema (a).NamespaceUri, GetSchema (b).NamespaceUri));
+ (model, a, b) => string.Compare (GetSchema (a).NamespaceUri, GetSchema (b).NamespaceUri, StringComparison.Ordinal));
registeredSchemasStore.SetSortColumnId (0, SortType.Ascending);
@@ -120,9 +121,7 @@ namespace MonoDevelop.XmlEditor.Gui
//editing handlers
extensionTextRenderer.Edited += handleExtensionSet;
- comboEditor.Edited += delegate (object sender, EditedArgs args) {
- setAssocValAndMarkChanged (args.Path, COL_NS, args.NewText ?? "");
- };
+ comboEditor.Edited += (sender, args) => setAssocValAndMarkChanged (args.Path, COL_NS, args.NewText ?? "");
prefixTextRenderer.Edited += delegate (object sender, EditedArgs args) {
foreach (char c in args.NewText)
if (!char.IsLetterOrDigit (c))
@@ -139,6 +138,48 @@ namespace MonoDevelop.XmlEditor.Gui
};
defaultAssociationsRemoveButton.Sensitive = false;
}
+
+ void Build ()
+ {
+ Spacing = 6;
+
+ registeredSchemasView = new TreeView ();
+ defaultAssociationsView = new TreeView ();
+
+ registeredSchemasAddButton = new Button (Stock.Add);
+ registeredSchemasRemoveButton = new Button (Stock.Remove);
+ defaultAssociationsAddButton = new Button (Stock.Add);
+ defaultAssociationsRemoveButton = new Button (Stock.Remove);
+
+ registeredSchemasAddButton.Clicked += addRegisteredSchema;
+ registeredSchemasRemoveButton.Clicked += removeRegisteredSchema;
+ defaultAssociationsAddButton.Clicked += addFileAssociation;
+ defaultAssociationsRemoveButton.Clicked += removeFileAssocation;
+
+ PackStart (new Label { Markup = GettextCatalog.GetString ("<b>Registered Schema</b>"), Xalign = 0 }, false, false, 0);
+ var schemasBox = new HBox (false, 6);
+ var schemaScroll = new ScrolledWindow { Child = registeredSchemasView, ShadowType = ShadowType.In };
+ schemasBox.PackStart (schemaScroll, true, true, 0);
+ var schemasButtonBox = new VBox (false, 6);
+ schemasButtonBox.PackStart (registeredSchemasAddButton, false, false, 0);
+ schemasButtonBox.PackStart (registeredSchemasRemoveButton, false, false, 0);
+ schemasBox.PackStart (schemasButtonBox, false, false, 0);
+ PackStart (schemasBox, true, true, 0);
+
+ PackStart (new Label (" "), false, false, 0);
+
+ PackStart (new Label { Markup = GettextCatalog.GetString ("<b>Default File Associations</b>"), Xalign = 0 }, false, false, 0);
+ var assocBox = new HBox (false, 6);
+ var assocScroll = new ScrolledWindow { Child = defaultAssociationsView, ShadowType = ShadowType.In };
+ assocBox.PackStart (assocScroll, true, true, 0);
+ var assocButtonBox = new VBox (false, 6);
+ assocButtonBox.PackStart (defaultAssociationsAddButton, false, false, 0);
+ assocButtonBox.PackStart (defaultAssociationsRemoveButton, false, false, 0);
+ assocBox.PackStart (assocButtonBox, false, false, 0);
+ PackStart (assocBox, true, true, 0);
+
+ ShowAll ();
+ }
XmlSchemaCompletionData GetSchema (TreeIter iter)
{
@@ -280,7 +321,7 @@ namespace MonoDevelop.XmlEditor.Gui
}
}
- protected virtual void addFileAssociation (object sender, System.EventArgs e)
+ protected virtual void addFileAssociation (object sender, EventArgs e)
{
bool foundExisting = false;
TreeIter newIter = TreeIter.Zero;
@@ -299,7 +340,7 @@ namespace MonoDevelop.XmlEditor.Gui
true);
}
- protected virtual void removeFileAssocation (object sender, System.EventArgs e)
+ protected virtual void removeFileAssocation (object sender, EventArgs e)
{
TreeIter iter;
if (!defaultAssociationsView.Selection.GetSelected (out iter))
@@ -356,7 +397,7 @@ namespace MonoDevelop.XmlEditor.Gui
}
}
- protected virtual void removeRegisteredSchema (object sender, System.EventArgs e)
+ protected virtual void removeRegisteredSchema (object sender, EventArgs e)
{
XmlSchemaCompletionData schema = GetSelectedSchema ();
if (schema == null)
@@ -365,7 +406,7 @@ namespace MonoDevelop.XmlEditor.Gui
RemoveRegisteredSchema (schema);
}
- protected virtual void addRegisteredSchema (object sender, System.EventArgs args)
+ protected virtual void addRegisteredSchema (object sender, EventArgs args)
{
string fileName = XmlEditorService.BrowseForSchemaFile ();
if (string.IsNullOrEmpty (fileName))
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs b/main/src/addins/Xml/Editor/XmlTextEditorExtension.cs
index 51317c5625..a9dcf1d6b3 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
+++ b/main/src/addins/Xml/Editor/XmlTextEditorExtension.cs
@@ -28,25 +28,25 @@
// THE SOFTWARE.
using System;
-using System.Linq;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Schema;
-using MonoDevelop.Core;
+using Mono.TextEditor;
+
using MonoDevelop.Components.Commands;
+using MonoDevelop.Core;
+using MonoDevelop.Ide;
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.XmlEditor.Completion;
-using MonoDevelop.Xml.StateEngine;
using MonoDevelop.Ide.Tasks;
-using MonoDevelop.Ide;
-using MonoDevelop.Ide.CodeFormatting;
-using Mono.TextEditor;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
-namespace MonoDevelop.XmlEditor
+namespace MonoDevelop.Xml.Editor
{
- public class XmlTextEditorExtension : MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension
+ public class XmlTextEditorExtension : BaseXmlEditorExtension
{
const string TextXmlMimeType = "text/xml";
const string ApplicationXmlMimeType = "application/xml";
@@ -99,35 +99,11 @@ namespace MonoDevelop.XmlEditor
XmlElementPath GetElementPath ()
{
- return ConvertPath (GetCurrentPath ());
- }
-
- XmlElementPath ConvertPath (IList<XObject> path)
- {
- var elementPath = new XmlElementPath ();
-
- if (defaultSchemaCompletionData != null && !string.IsNullOrEmpty (defaultSchemaCompletionData.NamespaceUri))
- elementPath.Namespaces.AddPrefix (defaultSchemaCompletionData.NamespaceUri, defaultNamespacePrefix ?? "");
-
- foreach (var obj in path) {
- var el = obj as XElement;
- if (el == null)
- continue;
- foreach (var att in el.Attributes) {
- if (!string.IsNullOrEmpty (att.Value)) {
- if (att.Name.HasPrefix) {
- if (att.Name.Prefix == "xmlns")
- elementPath.Namespaces.AddPrefix (att.Value, att.Name.Name);
- } else if (att.Name.Name == "xmlns") {
- elementPath.Namespaces.AddPrefix (att.Value, "");
- }
- }
- }
- string ns = elementPath.Namespaces.GetNamespace (el.Name.HasPrefix? el.Name.Prefix : "");
- QualifiedName qn = new QualifiedName (el.Name.Name, ns, el.Name.Prefix ?? String.Empty);
- elementPath.Elements.Add (qn);
- }
- return elementPath;
+ return XmlElementPath.Resolve (
+ GetCurrentPath (),
+ defaultSchemaCompletionData != null? defaultSchemaCompletionData.NamespaceUri : null,
+ defaultNamespacePrefix ?? ""
+ );
}
protected override void GetElementCompletions (CompletionDataList list)
@@ -521,7 +497,7 @@ namespace MonoDevelop.XmlEditor
//FIXME: implement
}
- [CommandHandler (Commands.CreateSchema)]
+ [CommandHandler (XmlCommands.CreateSchema)]
public void CreateSchemaCommand ()
{
try {
@@ -548,26 +524,26 @@ namespace MonoDevelop.XmlEditor
}
}
- [CommandHandler (Commands.OpenStylesheet)]
+ [CommandHandler (XmlCommands.OpenStylesheet)]
public void OpenStylesheetCommand ()
{
if (!string.IsNullOrEmpty (stylesheetFileName)) {
try {
- IdeApp.Workbench.OpenDocument (stylesheetFileName);
+ IdeApp.Workbench.OpenDocument (stylesheetFileName, Document.Project);
} catch (Exception ex) {
- MonoDevelop.Core.LoggingService.LogError ("Could not open document.", ex);
+ LoggingService.LogError ("Could not open document.", ex);
MessageService.ShowException (ex, "Could not open document.");
}
}
}
- [CommandUpdateHandler (Commands.OpenStylesheet)]
+ [CommandUpdateHandler (XmlCommands.OpenStylesheet)]
public void UpdateOpenStylesheetCommand (CommandInfo info)
{
info.Enabled = !string.IsNullOrEmpty (stylesheetFileName);
}
- [CommandHandler (Commands.GoToSchemaDefinition)]
+ [CommandHandler (XmlCommands.GoToSchemaDefinition)]
public void GoToSchemaDefinitionCommand ()
{
try {
@@ -580,6 +556,7 @@ namespace MonoDevelop.XmlEditor
string schemaFileName = schemaObject.SourceUri.Replace ("file:/", String.Empty);
IdeApp.Workbench.OpenDocument (
schemaFileName,
+ Document.Project,
Math.Max (1, schemaObject.LineNumber),
Math.Max (1, schemaObject.LinePosition));
}
@@ -589,7 +566,7 @@ namespace MonoDevelop.XmlEditor
}
}
- [CommandHandler (Commands.Validate)]
+ [CommandHandler (XmlCommands.Validate)]
public void ValidateCommand ()
{
TaskService.Errors.Clear ();
@@ -601,7 +578,7 @@ namespace MonoDevelop.XmlEditor
}
}
- [CommandHandler (Commands.AssignStylesheet)]
+ [CommandHandler (XmlCommands.AssignStylesheet)]
public void AssignStylesheetCommand ()
{
// Prompt user for filename.
@@ -610,7 +587,7 @@ namespace MonoDevelop.XmlEditor
stylesheetFileName = fileName;
}
- [CommandHandler (Commands.RunXslTransform)]
+ [CommandHandler (XmlCommands.RunXslTransform)]
public void RunXslTransformCommand ()
{
if (string.IsNullOrEmpty (stylesheetFileName)) {
@@ -667,10 +644,10 @@ namespace MonoDevelop.XmlEditor
}
#endregion
-
+
void QueueInference ()
{
- XmlParsedDocument doc = this.CU as XmlParsedDocument;
+ var doc = CU as XmlParsedDocument;
if (defaultSchemaCompletionData != null || doc == null || doc.XDocument == null || inferenceQueued)
return;
if (inferredCompletionData == null
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/MonoXmlPolicy.xml b/main/src/addins/Xml/Formatting/MonoXmlPolicy.xml
index c85c95249f..c85c95249f 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/MonoXmlPolicy.xml
+++ b/main/src/addins/Xml/Formatting/MonoXmlPolicy.xml
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatter.cs b/main/src/addins/Xml/Formatting/XmlFormatter.cs
index 04dec619c5..04dec619c5 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatter.cs
+++ b/main/src/addins/Xml/Formatting/XmlFormatter.cs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs b/main/src/addins/Xml/Formatting/XmlFormatterWriter.cs
index 99e35d33d5..270747ae03 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatterWriter.cs
+++ b/main/src/addins/Xml/Formatting/XmlFormatterWriter.cs
@@ -35,8 +35,8 @@ using System.IO;
using System.Text;
using System.Xml;
-using MonoDevelop.Xml.StateEngine; // for XmlChar
using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.Xml.Parser;
namespace MonoDevelop.Xml.Formatting
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicy.cs b/main/src/addins/Xml/Formatting/XmlFormattingPolicy.cs
index 0ffc56dea7..0ffc56dea7 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicy.cs
+++ b/main/src/addins/Xml/Formatting/XmlFormattingPolicy.cs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanel.cs b/main/src/addins/Xml/Formatting/XmlFormattingPolicyPanel.cs
index 93405e5ac1..93405e5ac1 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanel.cs
+++ b/main/src/addins/Xml/Formatting/XmlFormattingPolicyPanel.cs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanelWidget.cs b/main/src/addins/Xml/Formatting/XmlFormattingPolicyPanelWidget.cs
index c995471f1f..b637b0d3d2 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormattingPolicyPanelWidget.cs
+++ b/main/src/addins/Xml/Formatting/XmlFormattingPolicyPanelWidget.cs
@@ -31,15 +31,14 @@ using MonoDevelop.Ide;
namespace MonoDevelop.Xml.Formatting
{
- [System.ComponentModel.ToolboxItem(true)]
- partial class XmlFormattingPolicyPanelWidget : Gtk.Bin
+ class XmlFormattingPolicyPanelWidget : VBox
{
XmlFormattingPolicy policy;
ListStore store;
public XmlFormattingPolicyPanelWidget ()
{
- this.Build ();
+ Build ();
store = new ListStore (typeof(string), typeof (XmlFormattingSettings));
listView.Model = store;
@@ -50,7 +49,81 @@ namespace MonoDevelop.Xml.Formatting
// propertyGrid.PropertySort = MonoDevelop.Components.PropertyGrid.PropertySort.NoSort;
propertyGrid.ShadowType = ShadowType.In;
}
-
+
+ VBox boxScopes;
+ ScrolledWindow scrolledWindow;
+ TreeView listView;
+ Button buttonAdd;
+ Button buttonRemove;
+ Label labelScopes;
+ Table tableScopes;
+ MonoDevelop.Components.PropertyGrid.PropertyGrid propertyGrid;
+ Button buttonAdvanced;
+
+ void Build ()
+ {
+ Spacing = 6;
+
+ listView = new TreeView {
+ CanFocus = true,
+ HeadersVisible = false
+ };
+
+ scrolledWindow = new ScrolledWindow { ShadowType = ShadowType.In, Child = listView };
+ buttonAdd = new Button (Stock.Add);
+ buttonRemove = new Button (Stock.Remove);
+
+ labelScopes = new Label {
+ Xalign = 0F,
+ Text = GettextCatalog.GetString ("Enter one or several xpath expressions to which this format applies:")
+ };
+
+ tableScopes = new Table (3, 3, false) {
+ RowSpacing = 6,
+ ColumnSpacing = 6
+ };
+
+ propertyGrid = new MonoDevelop.Components.PropertyGrid.PropertyGrid {
+ ShowToolbar = false,
+ ShowHelp = false
+ };
+
+ buttonAdvanced = new Button {
+ Label = GettextCatalog.GetString ("Advanced Settings"),
+ CanFocus = true,
+ UseUnderline = true
+ };
+
+ var buttonBox = new HBox (false, 6);
+ buttonBox.PackStart (buttonAdd, false, false, 0);
+ buttonBox.PackStart (buttonRemove, false, false, 0);
+
+ boxScopes = new VBox (false, 6);
+ boxScopes.PackStart (scrolledWindow, true, true, 0);
+ boxScopes.PackStart (buttonBox, false, false, 0);
+
+ var rightVBox = new VBox (false, 6);
+ rightVBox.PackStart (labelScopes, false, false, 0);
+ rightVBox.PackStart (tableScopes, false, false, 0);
+ rightVBox.PackStart (propertyGrid, true, true, 0);
+
+ var mainBox = new HBox (false, 6);
+ mainBox.PackStart (boxScopes, false, false, 0);
+ mainBox.PackStart (rightVBox, true, true, 0);
+
+ var abbBox = new HBox (false, 6);
+ abbBox.PackStart (buttonAdvanced, false, false, 0);
+
+ PackStart (mainBox, true, true, 0);
+ PackStart (abbBox, false, false, 0);
+
+ ShowAll ();
+
+ buttonAdd.Clicked += OnButtonAddClicked;
+ buttonRemove.Clicked += OnButtonRemoveClicked;
+ buttonAdvanced.Clicked += OnButtonAdvancedClicked;
+ }
+
public void CommitPendingChanges ()
{
propertyGrid.CommitPendingChanges ();
@@ -142,10 +215,10 @@ namespace MonoDevelop.Xml.Formatting
}
for (uint n=0; n<currentFormat.ScopeXPath.Count; n++) {
int capn = (int) n;
- Label la = new Label (GettextCatalog.GetString ("XPath scope:"));
+ var la = new Label (GettextCatalog.GetString ("XPath scope:"));
la.Xalign = 0;
tableScopes.Attach (la, 0, 1, n, n + 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
- Entry en = new Entry ();
+ var en = new Entry ();
en.Text = currentFormat.ScopeXPath[capn];
tableScopes.Attach (en, 1, 2, n, n + 1, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Shrink, 0, 0);
en.Changed += delegate {
@@ -154,7 +227,7 @@ namespace MonoDevelop.Xml.Formatting
};
uint c = 2;
if (currentFormat.ScopeXPath.Count != 1) {
- Button butRem = new Button (ImageService.GetImage (Gtk.Stock.Remove, IconSize.Menu));
+ var butRem = new Button (ImageService.GetImage (Stock.Remove, IconSize.Menu));
tableScopes.Attach (butRem, 2, 3, n, n + 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
butRem.Clicked += delegate {
currentFormat.ScopeXPath.RemoveAt (capn);
@@ -164,7 +237,7 @@ namespace MonoDevelop.Xml.Formatting
c++;
}
if (n == currentFormat.ScopeXPath.Count - 1) {
- Button butAdd = new Button (ImageService.GetImage (Gtk.Stock.Add, IconSize.Menu));
+ var butAdd = new Button (ImageService.GetImage (Stock.Add, IconSize.Menu));
tableScopes.Attach (butAdd, c, c + 1, n, n + 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
butAdd.Clicked += delegate {
currentFormat.ScopeXPath.Add ("");
@@ -177,7 +250,7 @@ namespace MonoDevelop.Xml.Formatting
tableScopes.ShowAll ();
}
- protected virtual void OnButtonAddClicked (object sender, System.EventArgs e)
+ protected virtual void OnButtonAddClicked (object sender, EventArgs e)
{
var format = new XmlFormattingSettings ();
policy.Formats.Add (format);
@@ -185,7 +258,7 @@ namespace MonoDevelop.Xml.Formatting
listView.Selection.SelectIter (it);
}
- protected virtual void OnButtonRemoveClicked (object sender, System.EventArgs e)
+ protected virtual void OnButtonRemoveClicked (object sender, EventArgs e)
{
TreeIter it;
if (listView.Selection.GetSelected (out it)) {
@@ -225,7 +298,7 @@ namespace MonoDevelop.Xml.Formatting
}
}
- protected virtual void OnButtonAdvancedClicked (object sender, System.EventArgs e)
+ protected virtual void OnButtonAdvancedClicked (object sender, EventArgs e)
{
boxScopes.Show ();
buttonAdvanced.Hide ();
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildDocumentParser.cs b/main/src/addins/Xml/MSBuild/MSBuildDocumentParser.cs
index 19cd5e3e74..8f0f457d78 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildDocumentParser.cs
+++ b/main/src/addins/Xml/MSBuild/MSBuildDocumentParser.cs
@@ -27,7 +27,9 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace MonoDevelop.XmlEditor.MSBuild
+using MonoDevelop.Xml.Editor;
+
+namespace MonoDevelop.Xml.MSBuild
{
class MSBuildDocumentParser : XmlDocumentParser
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildElement.cs b/main/src/addins/Xml/MSBuild/MSBuildElement.cs
index 158358b554..5501e2fcd2 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildElement.cs
+++ b/main/src/addins/Xml/MSBuild/MSBuildElement.cs
@@ -28,7 +28,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace MonoDevelop.XmlEditor.MSBuild
+namespace MonoDevelop.Xml.MSBuild
{
class MSBuildElement
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildResolveContext.cs b/main/src/addins/Xml/MSBuild/MSBuildResolveContext.cs
index eb65485584..bb01db9027 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildResolveContext.cs
+++ b/main/src/addins/Xml/MSBuild/MSBuildResolveContext.cs
@@ -26,10 +26,11 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using MonoDevelop.Xml.StateEngine;
+using System.Linq;
+using MonoDevelop.Xml.Editor;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.XmlEditor.MSBuild
+namespace MonoDevelop.Xml.MSBuild
{
class MSBuildResolveContext
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildTextEditorExtension.cs b/main/src/addins/Xml/MSBuild/MSBuildTextEditorExtension.cs
index fce41735c7..b0cbcf3288 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.MSBuild/MSBuildTextEditorExtension.cs
+++ b/main/src/addins/Xml/MSBuild/MSBuildTextEditorExtension.cs
@@ -27,15 +27,16 @@
using System;
using System.Collections.Generic;
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.Xml.StateEngine;
-using MonoDevelop.XmlEditor.Completion;
-using MonoDevelop.Core;
using System.Threading;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Editor;
-namespace MonoDevelop.XmlEditor.MSBuild
+namespace MonoDevelop.Xml.MSBuild
{
- class MSBuildTextEditorExtension : MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension
+ class MSBuildTextEditorExtension : BaseXmlEditorExtension
{
public static readonly string MSBuildMimeType = "application/x-msbuild";
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Makefile.am b/main/src/addins/Xml/Makefile.am
index c9cc87438f..c9cc87438f 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Makefile.am
+++ b/main/src/addins/Xml/Makefile.am
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj b/main/src/addins/Xml/MonoDevelop.Xml.csproj
index c9fb3eda17..78c04d0f75 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj
+++ b/main/src/addins/Xml/MonoDevelop.Xml.csproj
@@ -7,14 +7,14 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</ProjectGuid>
<OutputType>Library</OutputType>
- <AssemblyName>MonoDevelop.XmlEditor</AssemblyName>
- <RootNamespace>MonoDevelop.XmlEditor</RootNamespace>
+ <AssemblyName>MonoDevelop.Xml</AssemblyName>
+ <RootNamespace>MonoDevelop.Xml</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>..\..\..\build\AddIns\MonoDevelop.XmlEditor</OutputPath>
+ <OutputPath>..\..\..\build\AddIns\Xml</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExecuteAfterBuild>postbuild.sh</ExecuteAfterBuild>
@@ -24,12 +24,12 @@
</Execution>
<DefineConstants>DEBUG</DefineConstants>
<NoWarn>1591;1573</NoWarn>
- <DocumentationFile>..\..\..\build\AddIns\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.xml</DocumentationFile>
+ <DocumentationFile>..\..\..\build\AddIns\Xml\MonoDevelop.Xml.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
- <OutputPath>..\..\..\build\AddIns\MonoDevelop.XmlEditor</OutputPath>
+ <OutputPath>..\..\..\build\AddIns\Xml</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExecuteAfterBuild>postbuild.sh</ExecuteAfterBuild>
@@ -39,7 +39,7 @@
</Execution>
<DebugSymbols>true</DebugSymbols>
<NoWarn>1591;1573</NoWarn>
- <DocumentationFile>..\..\..\build\AddIns\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.xml</DocumentationFile>
+ <DocumentationFile>..\..\..\build\AddIns\Xml\MonoDevelop.Xml.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -131,97 +131,86 @@
<EmbeddedResource Include="icons\light\prefs-xml-schemas-16%402x.png">
<LogicalName>prefs-xml-schemas-light-16@2x.png</LogicalName>
</EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="MonoDevelop.XmlEditor\Commands.cs" />
- <Compile Include="MonoDevelop.XmlEditor\EncodedStringWriter.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlNamespace.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlParser.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlSchemaManager.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlEditorService.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlTextEditorExtension.cs" />
- <Compile Include="gtk-gui\generated.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Gui\XmlEditorOptionsPanelWidget.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Gui\XmlEditorOptionsPanel.cs" />
- <Compile Include="gtk-gui\MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Gui\XmlSchemasPanelWidget.cs" />
- <Compile Include="gtk-gui\MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Gui\XmlSchemasPanel.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlSchemaCompletionData.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlSchemaCompletionDataCollection.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlCompletionData.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\IXmlCompletionProvider.cs" />
- <Compile Include="MonoDevelop.XmlEditor\QualifiedName.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlElementPath.cs" />
- <Compile Include="MonoDevelop.XmlEditor\QualifiedNameCollection.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\ILazilyLoadedProvider.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlTagCompletionData.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\Parser.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\State.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlCDataState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlAttributeState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlAttributeValueState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlClosingTagState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlCommentState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlFreeState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlNameState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlTagState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlProcessingInstructionState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XDom.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlDocTypeState.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlChar.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Gui\BaseXmlEditorExtension.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlMultipleClosingTagCompletionData.cs" />
- <Compile Include="MonoDevelop.Xml.StateEngine\XmlParsedDocument.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlDocumentParser.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\InferredXmlCompletionProvider.cs" />
- <Compile Include="MonoDevelop.Xml.Formatting\XmlFormatterWriter.cs" />
- <Compile Include="MonoDevelop.Xml.Formatting\XmlFormattingPolicy.cs" />
- <Compile Include="MonoDevelop.Xml.Formatting\XmlFormatter.cs" />
- <Compile Include="MonoDevelop.Xml.Formatting\XmlFormattingPolicyPanel.cs" />
- <Compile Include="MonoDevelop.Xml.Formatting\XmlFormattingPolicyPanelWidget.cs" />
- <Compile Include="gtk-gui\MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlEditorOptions.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlFileAssociationNode.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlFileAssociation.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlFileAssociationManager.cs" />
- <Compile Include="MonoDevelop.XmlEditor\XmlSchemaNode.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\LocalOnlyXmlResolver.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlCompletionDataList.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\EmptyXmlCompletionProvider.cs" />
- <Compile Include="MonoDevelop.XmlEditor.Completion\XmlNamespacePrefixMap.cs" />
- <Compile Include="AddinInfo.cs" />
- <Compile Include="MonoDevelop.XmlEditor.MSBuild\MSBuildDocumentParser.cs" />
- <Compile Include="MonoDevelop.XmlEditor.MSBuild\MSBuildResolveContext.cs" />
- <Compile Include="MonoDevelop.XmlEditor.MSBuild\MSBuildTextEditorExtension.cs" />
- <Compile Include="MonoDevelop.XmlEditor.MSBuild\MSBuildElement.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="MonoDevelop.XmlEditor.addin.xml">
- <LogicalName>MonoDevelop.XmlEditor.addin.xml</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="gtk-gui\gui.stetic">
- <LogicalName>gui.stetic</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="MonoDevelop.Xml.Formatting\MonoXmlPolicy.xml">
+ <EmbeddedResource Include="Formatting\MonoXmlPolicy.xml">
<LogicalName>MonoXmlPolicy.xml</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="Properties\MonoDevelop.XmlEditor.addin.xml">
+ <LogicalName>MonoDevelop.XmlEditor.addin.xml</LogicalName>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Parser\XmlParser.cs" />
+ <Compile Include="Parser\XmlParserState.cs" />
+ <Compile Include="Parser\XmlCDataState.cs" />
+ <Compile Include="Parser\XmlAttributeState.cs" />
+ <Compile Include="Parser\XmlAttributeValueState.cs" />
+ <Compile Include="Parser\XmlClosingTagState.cs" />
+ <Compile Include="Parser\XmlCommentState.cs" />
+ <Compile Include="Parser\XmlNameState.cs" />
+ <Compile Include="Parser\XmlTagState.cs" />
+ <Compile Include="Parser\XmlProcessingInstructionState.cs" />
+ <Compile Include="Parser\XmlDocTypeState.cs" />
+ <Compile Include="Parser\XmlChar.cs" />
+ <Compile Include="Dom\IAttributedXObject.cs" />
+ <Compile Include="Dom\XObject.cs" />
+ <Compile Include="Dom\XNode.cs" />
+ <Compile Include="Dom\XName.cs" />
+ <Compile Include="Dom\XContainer.cs" />
+ <Compile Include="Dom\XElement.cs" />
+ <Compile Include="Dom\XAttribute.cs" />
+ <Compile Include="Dom\XAttributeCollection.cs" />
+ <Compile Include="Dom\XCData.cs" />
+ <Compile Include="Dom\XComment.cs" />
+ <Compile Include="Dom\XProcessingInstruction.cs" />
+ <Compile Include="Dom\XDocType.cs" />
+ <Compile Include="Dom\XClosingTag.cs" />
+ <Compile Include="Dom\XDocument.cs" />
+ <Compile Include="Dom\INamedXObject.cs" />
+ <Compile Include="MSBuild\MSBuildDocumentParser.cs" />
+ <Compile Include="MSBuild\MSBuildResolveContext.cs" />
+ <Compile Include="MSBuild\MSBuildTextEditorExtension.cs" />
+ <Compile Include="MSBuild\MSBuildElement.cs" />
+ <Compile Include="Completion\XmlSchemaCompletionData.cs" />
+ <Compile Include="Completion\XmlSchemaCompletionDataCollection.cs" />
+ <Compile Include="Completion\XmlCompletionData.cs" />
+ <Compile Include="Completion\IXmlCompletionProvider.cs" />
+ <Compile Include="Completion\ILazilyLoadedProvider.cs" />
+ <Compile Include="Completion\XmlTagCompletionData.cs" />
+ <Compile Include="Completion\XmlMultipleClosingTagCompletionData.cs" />
+ <Compile Include="Completion\InferredXmlCompletionProvider.cs" />
+ <Compile Include="Completion\LocalOnlyXmlResolver.cs" />
+ <Compile Include="Completion\XmlCompletionDataList.cs" />
+ <Compile Include="Completion\EmptyXmlCompletionProvider.cs" />
+ <Compile Include="Completion\XmlNamespacePrefixMap.cs" />
+ <Compile Include="Formatting\XmlFormatterWriter.cs" />
+ <Compile Include="Formatting\XmlFormattingPolicy.cs" />
+ <Compile Include="Formatting\XmlFormatter.cs" />
+ <Compile Include="Formatting\XmlFormattingPolicyPanel.cs" />
+ <Compile Include="Formatting\XmlFormattingPolicyPanelWidget.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\AddinInfo.cs" />
+ <Compile Include="Parser\XmlRootState.cs" />
+ <Compile Include="Editor\XmlDocumentParser.cs" />
+ <Compile Include="Editor\XmlParsedDocument.cs" />
+ <Compile Include="Editor\XmlEditorOptions.cs" />
+ <Compile Include="Editor\XmlTextEditorExtension.cs" />
+ <Compile Include="Editor\BaseXmlEditorExtension.cs" />
+ <Compile Include="Editor\XmlFileAssociation.cs" />
+ <Compile Include="Editor\XmlEditorService.cs" />
+ <Compile Include="Editor\XmlSchemaManager.cs" />
+ <Compile Include="Editor\XmlFileAssociationNode.cs" />
+ <Compile Include="Editor\XmlFileAssociationManager.cs" />
+ <Compile Include="Editor\XmlSchemaNode.cs" />
+ <Compile Include="Editor\XmlEditorOptionsPanel.cs" />
+ <Compile Include="Editor\XmlEditorOptionsPanelWidget.cs" />
+ <Compile Include="Editor\XmlSchemasPanel.cs" />
+ <Compile Include="Editor\XmlSchemasPanelWidget.cs" />
+ <Compile Include="Completion\QualifiedName.cs" />
+ <Compile Include="Completion\XmlElementPath.cs" />
+ <Compile Include="Editor\XmlCommands.cs" />
</ItemGroup>
<ItemGroup>
- <None Include="MonoDevelop.XmlEditor\OpenStylesheetCommand.cs" />
- <None Include="MonoDevelop.XmlEditor\OpenXPathQueryPadCommand.cs" />
- <None Include="MonoDevelop.XmlEditor\RemoveXPathHighlightingCommand.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathHistoryList.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathNamespaceList.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathNodeMatch.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathNodeTextMarker.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathQueryPad.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathQueryPadOptions.cs" />
- <None Include="MonoDevelop.XmlEditor.XPath\XPathQueryWidget.cs" />
<None Include="Makefile.am" />
- <None Include="MonoDevelop.Xml.StateEngine\XmlParser.cs" />
- <None Include="MonoDevelop.Xml.StateEngine\XState.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="schemas\appconfig.xsd">
@@ -252,6 +241,18 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup />
<ItemGroup>
- <Folder Include="MonoDevelop.XmlEditor.MSBuild\" />
+ <Folder Include="Dom\" />
+ <Folder Include="MSBuild\" />
+ <Folder Include="Properties\" />
+ <Folder Include="Editor\" />
</ItemGroup>
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <Policies>
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileName" />
+ </Policies>
+ </Properties>
+ </MonoDevelop>
+ </ProjectExtensions>
</Project>
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlAttributeState.cs b/main/src/addins/Xml/Parser/XmlAttributeState.cs
index 6456219d58..3025771d3e 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlAttributeState.cs
+++ b/main/src/addins/Xml/Parser/XmlAttributeState.cs
@@ -26,18 +26,15 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Text;
using System.Diagnostics;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
-
-
- public class XmlAttributeState : State
+ public class XmlAttributeState : XmlParserState
{
- XmlNameState XmlNameState;
- XmlAttributeValueState AttributeValueState;
+ readonly XmlNameState XmlNameState;
+ readonly XmlAttributeValueState AttributeValueState;
const int NAMING = 0;
const int GETTINGEQ = 1;
@@ -59,9 +56,9 @@ namespace MonoDevelop.Xml.StateEngine
Adopt (this.AttributeValueState);
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
- XAttribute att = context.Nodes.Peek () as XAttribute;
+ var att = context.Nodes.Peek () as XAttribute;
//state has just been entered
if (context.CurrentStateLength == 1) {
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs b/main/src/addins/Xml/Parser/XmlAttributeValueState.cs
index 99b6e03bce..eea5acee05 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlAttributeValueState.cs
+++ b/main/src/addins/Xml/Parser/XmlAttributeValueState.cs
@@ -25,10 +25,11 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlAttributeValueState : State
+ public class XmlAttributeValueState : XmlParserState
{
protected const int FREE = 0;
protected const int UNQUOTED = 1;
@@ -39,7 +40,7 @@ namespace MonoDevelop.Xml.StateEngine
protected const int TagMask = 3;
protected const int TagShift = 2;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
System.Diagnostics.Debug.Assert (((XAttribute) context.Nodes.Peek ()).Value == null);
@@ -78,7 +79,7 @@ namespace MonoDevelop.Xml.StateEngine
return null;
}
- State BuildUnquotedValue (char c, IParseContext context, ref string rollback)
+ XmlParserState BuildUnquotedValue (char c, IXmlParserContext context, ref string rollback)
{
if (char.IsLetterOrDigit (c) || c == '_' || c == '.') {
context.KeywordBuilder.Append (c);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlCDataState.cs b/main/src/addins/Xml/Parser/XmlCDataState.cs
index c352efaa0b..cc72b04f5b 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlCDataState.cs
+++ b/main/src/addins/Xml/Parser/XmlCDataState.cs
@@ -26,19 +26,17 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Collections.Generic;
-using System.Text;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlCDataState : State
+ public class XmlCDataState : XmlParserState
{
const int NOMATCH = 0;
const int SINGLE_BRACKET = 1;
const int DOUBLE_BRACKET = 2;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
context.Nodes.Push (new XCData (context.LocationMinus ("<![CDATA[".Length + 1)));
@@ -54,7 +52,7 @@ namespace MonoDevelop.Xml.StateEngine
} else if (c == '>' && context.StateTag == DOUBLE_BRACKET) {
// if the ']]' is followed by a '>', the state has ended
// so attach a node to the DOM and end the state
- XCData cdata = (XCData) context.Nodes.Pop ();
+ var cdata = (XCData) context.Nodes.Pop ();
if (context.BuildTree) {
cdata.End (context.Location);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlChar.cs b/main/src/addins/Xml/Parser/XmlChar.cs
index 4dc4b6e754..8fbeaf1032 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlChar.cs
+++ b/main/src/addins/Xml/Parser/XmlChar.cs
@@ -31,7 +31,7 @@
using System;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
public class XmlChar
{
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs b/main/src/addins/Xml/Parser/XmlClosingTagState.cs
index 7893d54365..9510f77a6b 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlClosingTagState.cs
+++ b/main/src/addins/Xml/Parser/XmlClosingTagState.cs
@@ -26,15 +26,14 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlClosingTagState : State
+ public class XmlClosingTagState : XmlParserState
{
- XmlNameState NameState;
+ readonly XmlNameState NameState;
public XmlClosingTagState ()
: this (new XmlNameState ())
@@ -47,9 +46,9 @@ namespace MonoDevelop.Xml.StateEngine
Adopt (NameState);
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
- XClosingTag ct = context.Nodes.Peek () as XClosingTag;
+ var ct = context.Nodes.Peek () as XClosingTag;
if (ct == null) {
Debug.Assert (context.CurrentStateLength == 1,
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlCommentState.cs b/main/src/addins/Xml/Parser/XmlCommentState.cs
index fee3a8f3a0..c4ff6fb2e7 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlCommentState.cs
+++ b/main/src/addins/Xml/Parser/XmlCommentState.cs
@@ -26,19 +26,17 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Collections.Generic;
-using System.Text;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlCommentState : State
+ public class XmlCommentState : XmlParserState
{
const int NOMATCH = 0;
const int SINGLE_DASH = 1;
const int DOUBLE_DASH = 2;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
context.Nodes.Push (new XComment (context.LocationMinus ("<!--".Length + 1)));
@@ -55,7 +53,7 @@ namespace MonoDevelop.Xml.StateEngine
if (c == '>') {
// if the '--' is followed by a '>', the state has ended
// so attach a node to the DOM and end the state
- XComment comment = (XComment) context.Nodes.Pop ();
+ var comment = (XComment) context.Nodes.Pop ();
if (context.BuildTree) {
comment.End (context.Location);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs b/main/src/addins/Xml/Parser/XmlDocTypeState.cs
index eda4ec27c9..fc8103e8fd 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlDocTypeState.cs
+++ b/main/src/addins/Xml/Parser/XmlDocTypeState.cs
@@ -27,25 +27,24 @@
//
using System;
-using System.Collections.Generic;
-using System.Text;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlDocTypeState : State
+ public class XmlDocTypeState : XmlParserState
{
- XmlNameState nameState = new XmlNameState ();
+ readonly XmlNameState nameState = new XmlNameState ();
public XmlDocTypeState ()
{
Adopt (nameState);
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
- XDocType doc = context.Nodes.Peek () as XDocType;
+ var doc = context.Nodes.Peek () as XDocType;
if (doc == null) {
doc = new XDocType (context.LocationMinus ("<!DOCTYPE".Length + 1));
context.Nodes.Push (doc);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlNameState.cs b/main/src/addins/Xml/Parser/XmlNameState.cs
index 04891fd217..5833c54d98 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlNameState.cs
+++ b/main/src/addins/Xml/Parser/XmlNameState.cs
@@ -27,19 +27,17 @@
//
using System;
-using System.Text;
using System.Diagnostics;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
-
-
- public class XmlNameState : State
+ public class XmlNameState : XmlParserState
{
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
- INamedXObject namedObject = context.Nodes.Peek () as INamedXObject;
+ var namedObject = context.Nodes.Peek () as INamedXObject;
if (namedObject == null || namedObject.Name.Prefix != null)
throw new InvalidOperationException ("Invalid state");
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/Parser.cs b/main/src/addins/Xml/Parser/XmlParser.cs
index 973040371e..de40145786 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/Parser.cs
+++ b/main/src/addins/Xml/Parser/XmlParser.cs
@@ -30,17 +30,18 @@ using System;
using System.Collections.Generic;
using System.Text;
-using MonoDevelop.Ide.Gui.Content;
+using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory;
+using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class Parser : IDocumentStateEngine, IParseContext
+ public class XmlParser : IDocumentStateEngine, IXmlParserContext
{
- RootState rootState;
- State currentState;
- State previousState;
+ XmlRootState rootState;
+ XmlParserState currentState;
+ XmlParserState previousState;
bool buildTree;
int position;
@@ -52,7 +53,7 @@ namespace MonoDevelop.Xml.StateEngine
NodeStack nodes;
List<Error> errors;
- public Parser (RootState rootState, bool buildTree)
+ public XmlParser (XmlRootState rootState, bool buildTree)
{
this.rootState = rootState;
this.currentState = rootState;
@@ -61,7 +62,7 @@ namespace MonoDevelop.Xml.StateEngine
Reset ();
}
- Parser (Parser copyFrom)
+ XmlParser (XmlParser copyFrom)
{
buildTree = false;
@@ -77,7 +78,7 @@ namespace MonoDevelop.Xml.StateEngine
currentStateLength = copyFrom.currentStateLength;
//clone the node stack
- List<XObject> l = new List<XObject> (CopyXObjects (copyFrom.nodes));
+ var l = new List<XObject> (CopyXObjects (copyFrom.nodes));
l.Reverse ();
nodes = new NodeStack (l);
}
@@ -88,7 +89,7 @@ namespace MonoDevelop.Xml.StateEngine
yield return o.ShallowCopy ();
}
- public RootState RootState { get { return rootState; } }
+ public XmlRootState RootState { get { return rootState; } }
#region IDocumentStateEngine
@@ -141,7 +142,7 @@ namespace MonoDevelop.Xml.StateEngine
string rollback = null;
if (currentState == null)
return;
- State nextState = currentState.PushChar (c, this, ref rollback);
+ XmlParserState nextState = currentState.PushChar (c, this, ref rollback);
// no state change
if (nextState == currentState || nextState == null)
@@ -193,21 +194,21 @@ namespace MonoDevelop.Xml.StateEngine
{
if (buildTree)
throw new InvalidOperationException ("Parser can only be cloned when in stack mode");
- return new Parser (this);
+ return new XmlParser (this);
}
#endregion
- public Parser GetTreeParser ()
+ public XmlParser GetTreeParser ()
{
if (buildTree)
throw new InvalidOperationException ("Parser can only be cloned when in stack mode");
- Parser p = new Parser (this);
+ XmlParser p = new XmlParser (this);
p.buildTree = true;
//reconnect the node tree
- ((IParseContext)p).ConnectAll ();
+ ((IXmlParserContext)p).ConnectAll ();
p.errors = new List<Error> ();
@@ -233,7 +234,7 @@ namespace MonoDevelop.Xml.StateEngine
builder.Append (' ', 2);
builder.AppendLine ("States=");
- State s = currentState;
+ XmlParserState s = currentState;
while (s != null) {
builder.Append (' ', 4);
builder.Append (s.ToString ());
@@ -263,12 +264,12 @@ namespace MonoDevelop.Xml.StateEngine
#region IParseContext
- int IParseContext.StateTag {
+ int IXmlParserContext.StateTag {
get { return stateTag; }
set { stateTag = value; }
}
- TextLocation IParseContext.LocationMinus (int colOffset)
+ TextLocation IXmlParserContext.LocationMinus (int colOffset)
{
int col = Location.Column - colOffset;
int line = Location.Line;
@@ -281,11 +282,11 @@ namespace MonoDevelop.Xml.StateEngine
return new TextLocation (line, col);
}
- StringBuilder IParseContext.KeywordBuilder {
+ StringBuilder IXmlParserContext.KeywordBuilder {
get { return keywordBuilder; }
}
- State IParseContext.PreviousState {
+ XmlParserState IXmlParserContext.PreviousState {
get { return previousState; }
}
@@ -294,37 +295,37 @@ namespace MonoDevelop.Xml.StateEngine
public bool BuildTree { get { return buildTree; } }
- void IParseContext.LogError (string message)
+ void IXmlParserContext.LogError (string message)
{
if (errors != null || ErrorLogged != null)
InternalLogError (new Error (ErrorType.Error, message, Location));
}
- void IParseContext.LogWarning (string message)
+ void IXmlParserContext.LogWarning (string message)
{
if (errors != null || ErrorLogged != null)
- InternalLogError (new Error (ErrorType.Warning, message, ((IParseContext)this).LocationMinus (1)));
+ InternalLogError (new Error (ErrorType.Warning, message, ((IXmlParserContext)this).LocationMinus (1)));
}
- void IParseContext.LogError (string message, TextLocation location)
+ void IXmlParserContext.LogError (string message, TextLocation location)
{
if (errors != null || ErrorLogged != null)
- InternalLogError (new Error (ErrorType.Error, message, ((IParseContext)this).LocationMinus (1)));
+ InternalLogError (new Error (ErrorType.Error, message, ((IXmlParserContext)this).LocationMinus (1)));
}
- void IParseContext.LogWarning (string message, TextLocation location)
+ void IXmlParserContext.LogWarning (string message, TextLocation location)
{
if (errors != null || ErrorLogged != null)
InternalLogError (new Error (ErrorType.Warning, message, location));
}
- void IParseContext.LogError (string message, DomRegion region)
+ void IXmlParserContext.LogError (string message, DomRegion region)
{
if (errors != null || ErrorLogged != null)
InternalLogError (new Error (ErrorType.Error, message, region));
}
- void IParseContext.LogWarning (string message, DomRegion region)
+ void IXmlParserContext.LogWarning (string message, DomRegion region)
{
if (errors != null || ErrorLogged != null)
InternalLogError (new Error (ErrorType.Warning, message, region));
@@ -338,7 +339,7 @@ namespace MonoDevelop.Xml.StateEngine
ErrorLogged (err);
}
- void IParseContext.ConnectAll ()
+ void IXmlParserContext.ConnectAll ()
{
XNode prev = null;
foreach (XObject o in Nodes) {
@@ -351,7 +352,7 @@ namespace MonoDevelop.Xml.StateEngine
}
}
- void IParseContext.EndAll (bool pop)
+ void IXmlParserContext.EndAll (bool pop)
{
int popCount = 0;
foreach (XObject ob in Nodes) {
@@ -369,21 +370,21 @@ namespace MonoDevelop.Xml.StateEngine
#endregion
- public State CurrentState { get { return currentState; } }
+ public XmlParserState CurrentState { get { return currentState; } }
public IList<Error> Errors { get { return errors; } }
public event Action<Error> ErrorLogged;
}
- public interface IParseContext
+ public interface IXmlParserContext
{
int StateTag { get; set; }
StringBuilder KeywordBuilder { get; }
int CurrentStateLength { get; }
TextLocation Location { get; }
TextLocation LocationMinus (int colOffset);
- State PreviousState { get; }
+ XmlParserState PreviousState { get; }
NodeStack Nodes { get; }
bool BuildTree { get; }
void LogError (string message);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/State.cs b/main/src/addins/Xml/Parser/XmlParserState.cs
index c0edcfdc0a..742802ef74 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/State.cs
+++ b/main/src/addins/Xml/Parser/XmlParserState.cs
@@ -26,48 +26,42 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Diagnostics;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public abstract class State
+ public abstract class XmlParserState
{
- State parent;
+ XmlParserState parent;
/// <summary>
/// When the <see cref="Parser"/> advances by one character, it calls this method
- /// on the currently active <see cref="State"/> to determine the next state.
+ /// on the currently active <see cref="XmlParserState"/> to determine the next state.
/// </summary>
/// <param name="c">The current character.</param>
+ /// <param name = "context">The parser context.</param>
/// <param name="rollback"> If set non-null, the parser will be rolled back that number
/// of characters (empty string means replay current char to the next state.
/// Note that this will not change the DOM state.</param>
/// <returns>
- /// The next state. A new or parent <see cref="State"/> will change the parser state;
+ /// The next state. A new or parent <see cref="XmlParserState"/> will change the parser state;
/// the current state or null will not.
/// </returns>
- public abstract State PushChar (char c, IParseContext context, ref string rollback);
+ public abstract XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback);
- public State Parent { get { return parent; } }
+ public XmlParserState Parent { get { return parent; } }
- protected void Adopt (State child)
+ protected void Adopt (XmlParserState child)
{
Debug.Assert (child.parent == null);
child.parent = this;
}
- public RootState RootState {
+ public XmlRootState RootState {
get {
- return (this as RootState) ?? parent.RootState;
+ return (this as XmlRootState) ?? parent.RootState;
}
}
}
- public abstract class RootState : State
- {
- public abstract XDocument CreateDocument ();
- }
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs b/main/src/addins/Xml/Parser/XmlProcessingInstructionState.cs
index e6fb76fae2..cf440b16bb 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlProcessingInstructionState.cs
+++ b/main/src/addins/Xml/Parser/XmlProcessingInstructionState.cs
@@ -26,18 +26,16 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
-
-
- public class XmlProcessingInstructionState : State
+ public class XmlProcessingInstructionState : XmlParserState
{
const int NOMATCH = 0;
const int QUESTION = 1;
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (context.CurrentStateLength == 1) {
context.Nodes.Push (new XProcessingInstruction (context.LocationMinus ("<?".Length)));
@@ -51,7 +49,7 @@ namespace MonoDevelop.Xml.StateEngine
} else if (c == '>' && context.StateTag == QUESTION) {
// if the '?' is followed by a '>', the state has ended
// so attach a node to the DOM and end the state
- XProcessingInstruction xpi = (XProcessingInstruction) context.Nodes.Pop ();
+ var xpi = (XProcessingInstruction) context.Nodes.Pop ();
if (context.BuildTree) {
xpi.End (context.Location);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlFreeState.cs b/main/src/addins/Xml/Parser/XmlRootState.cs
index c2de498872..d77d7e787b 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlFreeState.cs
+++ b/main/src/addins/Xml/Parser/XmlRootState.cs
@@ -26,14 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.Collections.Generic;
-using System.Text;
-using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlFreeState : RootState
+ public class XmlRootState : XmlParserState
{
protected const int FREE = 0;
protected const int BRACKET = FREE + 1;
@@ -50,13 +48,13 @@ namespace MonoDevelop.Xml.StateEngine
XmlDocTypeState docTypeState;
XmlProcessingInstructionState processingInstructionState;
- public XmlFreeState () : this (new XmlTagState (), new XmlClosingTagState ()) {}
+ public XmlRootState () : this (new XmlTagState (), new XmlClosingTagState ()) {}
- public XmlFreeState (XmlTagState tagState, XmlClosingTagState closingTagState)
+ public XmlRootState (XmlTagState tagState, XmlClosingTagState closingTagState)
: this (tagState, closingTagState, new XmlCommentState (), new XmlCDataState (),
new XmlDocTypeState (), new XmlProcessingInstructionState ()) {}
- public XmlFreeState (
+ public XmlRootState (
XmlTagState tagState,
XmlClosingTagState closingTagState,
XmlCommentState commentState,
@@ -103,7 +101,7 @@ namespace MonoDevelop.Xml.StateEngine
get { return processingInstructionState; }
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
if (c == '<') {
if (context.StateTag != FREE)
@@ -159,11 +157,9 @@ namespace MonoDevelop.Xml.StateEngine
context.KeywordBuilder.Append (c);
if (context.KeywordBuilder.Length < cdataStr.Length)
return null;
- else
- return CDataState;
- } else {
- context.KeywordBuilder.Length = 0;
+ return CDataState;
}
+ context.KeywordBuilder.Length = 0;
break;
case DOCTYPE:
@@ -172,8 +168,7 @@ namespace MonoDevelop.Xml.StateEngine
context.KeywordBuilder.Append (c);
if (context.KeywordBuilder.Length < docTypeStr.Length)
return null;
- else
- return DocTypeState;
+ return DocTypeState;
} else {
context.KeywordBuilder.Length = 0;
}
@@ -189,7 +184,7 @@ namespace MonoDevelop.Xml.StateEngine
return null;
}
- static int LengthFromOpenBracket (IParseContext context)
+ static int LengthFromOpenBracket (IXmlParserContext context)
{
switch (context.StateTag) {
case BRACKET:
@@ -206,7 +201,7 @@ namespace MonoDevelop.Xml.StateEngine
}
}
- public override XDocument CreateDocument ()
+ public virtual XDocument CreateDocument ()
{
return new XDocument ();
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlTagState.cs b/main/src/addins/Xml/Parser/XmlTagState.cs
index 642766916d..a3c4b27fdb 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.StateEngine/XmlTagState.cs
+++ b/main/src/addins/Xml/Parser/XmlTagState.cs
@@ -28,13 +28,14 @@
using System;
using System.Diagnostics;
-using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory;
+using MonoDevelop.Xml.Dom;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Parser
{
- public class XmlTagState : State
+ public class XmlTagState : XmlParserState
{
const int ATTEMPT_RECOVERY = 1;
const int RECOVERY_FOUND_WHITESPACE = 2;
@@ -58,7 +59,7 @@ namespace MonoDevelop.Xml.StateEngine
Adopt (this.NameState);
}
- public override State PushChar (char c, IParseContext context, ref string rollback)
+ public override XmlParserState PushChar (char c, IXmlParserContext context, ref string rollback)
{
XElement element = context.Nodes.Peek () as XElement;
@@ -141,7 +142,7 @@ namespace MonoDevelop.Xml.StateEngine
return null;
}
- protected virtual void Close (XElement element, IParseContext context, TextLocation location)
+ protected virtual void Close (XElement element, IXmlParserContext context, TextLocation location)
{
//have already checked that element is not null, i.e. top of stack is our element
if (element.IsClosed)
diff --git a/main/src/addins/MonoDevelop.XmlEditor/AddinInfo.cs b/main/src/addins/Xml/Properties/AddinInfo.cs
index eb38989c4c..1878cdf5ab 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/AddinInfo.cs
+++ b/main/src/addins/Xml/Properties/AddinInfo.cs
@@ -1,9 +1,6 @@
-
-using System;
using Mono.Addins;
-using Mono.Addins.Description;
-[assembly:Addin ("XmlEditor",
+[assembly:Addin ("Xml",
Namespace = "MonoDevelop",
Version = MonoDevelop.BuildInfo.Version,
Category = "IDE extensions")]
diff --git a/main/src/addins/MonoDevelop.XmlEditor/AssemblyInfo.cs b/main/src/addins/Xml/Properties/AssemblyInfo.cs
index f6d69570a1..f6d69570a1 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/AssemblyInfo.cs
+++ b/main/src/addins/Xml/Properties/AssemblyInfo.cs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml b/main/src/addins/Xml/Properties/MonoDevelop.XmlEditor.addin.xml
index 73e7d2ba05..0a12f87d2c 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml
+++ b/main/src/addins/Xml/Properties/MonoDevelop.XmlEditor.addin.xml
@@ -1,7 +1,6 @@
<ExtensionModel>
<Runtime>
- <Import assembly="MonoDevelop.XmlEditor.dll" />
<Import file="schemas/appconfig.xsd" />
<Import file="schemas/MonoDevelopAddIn.xsd" />
<Import file="schemas/readme.txt" />
@@ -12,16 +11,16 @@
<Import file="schemas/nant.xsd" />
</Runtime>
- <ExtensionPoint path = "/MonoDevelop/XmlEditor/XmlFileAssociations">
- <ExtensionNode name = "Association" type = "MonoDevelop.XmlEditor.XmlFileAssociationNode"/>
+ <ExtensionPoint path = "/MonoDevelop/Xml/Editor/XmlFileAssociations">
+ <ExtensionNode name = "Association" type = "MonoDevelop.Xml.Editor.XmlFileAssociationNode"/>
</ExtensionPoint>
- <ExtensionPoint path = "/MonoDevelop/XmlEditor/XmlSchemas">
- <ExtensionNode name = "Schema" type = "MonoDevelop.XmlEditor.XmlSchemaNode" />
+ <ExtensionPoint path = "/MonoDevelop/Xml/Editor/XmlSchemas">
+ <ExtensionNode name = "Schema" type = "MonoDevelop.Xml.Editor.XmlSchemaNode" />
</ExtensionPoint>
<!-- Additional file extensions that will be opened in the XML editor -->
- <Extension path = "/MonoDevelop/XmlEditor/XmlFileAssociations">
+ <Extension path = "/MonoDevelop/Xml/Editor/XmlFileAssociations">
<Association extension = ".build" namespaceUri="http://nant.sf.net/release/0.85-rc3/nant.xsd" />
<Association extension = ".config" namespaceUri="urn:app-config" />
<Association extension = ".xsd" namespaceUri="http://www.w3.org/2001/XMLSchema" namespacePrefix="xs" />
@@ -30,7 +29,7 @@
<Association extension = ".stetic" />
</Extension>
- <Extension path = "/MonoDevelop/XmlEditor/XmlSchemas">
+ <Extension path = "/MonoDevelop/Xml/Editor/XmlSchemas">
<Schema file="schemas/appconfig.xsd" />
<Schema file="schemas/MonoDevelopAddIn.xsd" />
<Schema file="schemas/XMLSchema.xsd" />
@@ -40,38 +39,30 @@
</Extension>
<Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
- <Class id="MSBuildTextEditorExtension" mimeTypes="application/x-msbuild" class = "MonoDevelop.XmlEditor.MSBuild.MSBuildTextEditorExtension" />
- <Class id="MonoDevelop.XmlEditor.XmlTextEditorExtension" class = "MonoDevelop.XmlEditor.XmlTextEditorExtension" />
+ <Class id="MSBuildTextEditorExtension" mimeTypes="application/x-msbuild" class = "MonoDevelop.Xml.MSBuild.MSBuildTextEditorExtension" />
+ <Class id="XmlTextEditorExtension" class = "MonoDevelop.Xml.Editor.XmlTextEditorExtension" />
</Extension>
<!-- Commands -->
<Extension path = "/MonoDevelop/Ide/Commands">
- <Category _name = "XmlEditor" id="XmlEditor">
- <Command id = "MonoDevelop.XmlEditor.Commands.CreateSchema"
+ <Category _name = "Xml Editor" id="XmlEditor">
+ <Command id = "MonoDevelop.Xml.Editor.XmlCommands.CreateSchema"
_label = "Create _Schema"
description = "Creates a schema from XML"/>
- <Command id = "MonoDevelop.XmlEditor.Commands.Validate"
+ <Command id = "MonoDevelop.Xml.Editor.XmlCommands.Validate"
_label = "_Validate"
- description = "Validates the XML against a schema"/><!--
- <Command id = "MonoDevelop.XmlEditor.Commands.OpenXPathQueryPad"
- defaultHandler = "MonoDevelop.XmlEditor.OpenXPathQueryPadCommand"
- _label = "_XPath Query..."
- description = "Opens XPath Query window"/>
- <Command id = "MonoDevelop.XmlEditor.Commands.RemoveXPathHighlighting"
- defaultHandler = "MonoDevelop.XmlEditor.RemoveXPathHighlightingCommand"
- _label = "Remove XPath _Highlighting"
- description = "Removes the highlighted XPath matches."/>-->
- <Command id = "MonoDevelop.XmlEditor.Commands.AssignStylesheet"
+ description = "Validates the XML against a schema"/>
+ <Command id = "MonoDevelop.Xml.Editor.XmlCommands.AssignStylesheet"
_label = "_Assign XSLT..."
description = "Assigns a stylesheet to the current xml document"/>
- <Command id = "MonoDevelop.XmlEditor.Commands.OpenStylesheet"
+ <Command id = "MonoDevelop.Xml.Editor.XmlCommands.OpenStylesheet"
_label = "_Open XSLT"
description = "Opens the assigned stylesheet"/>
- <Command id = "MonoDevelop.XmlEditor.Commands.RunXslTransform"
+ <Command id = "MonoDevelop.Xml.Editor.XmlCommands.RunXslTransform"
_label = "Run XSL_T"
shortcut = "Alt|Control|T"
description = "Runs an XSL transform"/>
- <Command id = "MonoDevelop.XmlEditor.Commands.GoToSchemaDefinition"
+ <Command id = "MonoDevelop.Xml.Editor.XmlCommands.GoToSchemaDefinition"
_label = "_Go to Schema Definition"
description = "Jumps to the schema definition"/>
</Category>
@@ -80,46 +71,26 @@
<!-- XML menu -->
<Extension path = "/MonoDevelop/Ide/MainMenu/Tools">
<ItemSet id = "XmlMenu" insertafter = "AddinManagerSeparator" _label = "_XML" >
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.CreateSchema" />
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.GoToSchemaDefinition" />
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.Validate" /><!--
- <SeparatorItem id = "XPathCommandsSeparator"/>
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.OpenXPathQueryPad" />
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.RemoveXPathHighlighting" />
- <SeparatorItem id = "StylesheetCommandsSeparator"/>-->
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.AssignStylesheet"/>
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.OpenStylesheet"/>
- <CommandItem id = "MonoDevelop.XmlEditor.Commands.RunXslTransform"/>
+ <CommandItem id = "MonoDevelop.Xml.Editor.XmlCommands.CreateSchema" />
+ <CommandItem id = "MonoDevelop.Xml.Editor.XmlCommands.GoToSchemaDefinition" />
+ <CommandItem id = "MonoDevelop.Xml.Editor.XmlCommands.Validate" />
+ <CommandItem id = "MonoDevelop.Xml.Editor.XmlCommands.AssignStylesheet"/>
+ <CommandItem id = "MonoDevelop.Xml.Editor.XmlCommands.OpenStylesheet"/>
+ <CommandItem id = "MonoDevelop.Xml.Editor.XmlCommands.RunXslTransform"/>
<SeparatorItem/>
</ItemSet>
</Extension>
<Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor/Behavior">
- <Section id="XmlFormattingOptions" insertbefore="Formatting" _label="XML" fill="true" class="MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanel" icon="md-prefs-xml" />
+ <Section id="XmlFormattingOptions" insertbefore="Formatting" _label="XML" fill="true" class="MonoDevelop.Xml.Editor.XmlEditorOptionsPanel" icon="md-prefs-xml" />
</Extension>
<Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor">
- <Section id="XmlSchemas" _label="XML Schemas" fill="true" class="MonoDevelop.XmlEditor.Gui.XmlSchemasPanel" icon="md-prefs-xml-schemas" />
+ <Section id="XmlSchemas" _label="XML Schemas" fill="true" class="MonoDevelop.Xml.Editor.XmlSchemasPanel" icon="md-prefs-xml-schemas" />
</Extension>
- <!-- XPath Query pad -->
- <!-- Bug in the DockFrame (gitem is null but code calls SetVisible
- when visible is false) prevents us from using setting the XPathQueryPad
- to be a pad
- <Extension path = "/MonoDevelop/Ide/Pads">
- <Pad id = "MonoDevelop.XmlEditor.XPathQueryPad"
- class = "MonoDevelop.XmlEditor.XPathQueryPad"
- defaultPlacement = "Bottom"
- _label = "XPath Query"/>
- </Extension>-->
-
- <!-- Put the XPath Query pad in the View menu -->
- <!--<Extension path = "/SharpDevelop/Workbench/Contexts/Edit">
- <ContextPad id = "MonoDevelop.XmlEditor.XPathQueryPad"/>
- </Extension>-->
-
<Extension path = "/MonoDevelop/TypeSystem/Parser">
- <Parser class = "MonoDevelop.XmlEditor.MSBuild.MSBuildDocumentParser" mimeType = "application/x-msbuild" id = "XmlParser"/>
- <Parser class = "MonoDevelop.XmlEditor.XmlDocumentParser" mimeType = "application/xml" id = "XmlParser"/>
+ <Parser class = "MonoDevelop.Xml.MSBuild.MSBuildDocumentParser" mimeType = "application/x-msbuild" id = "XmlParser"/>
+ <Parser class = "MonoDevelop.Xml.Editor.XmlDocumentParser" mimeType = "application/xml" id = "XmlParser"/>
</Extension>
<Extension path = "/MonoDevelop/Ide/CodeFormatters">
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs b/main/src/addins/Xml/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs
index fd43f3251c..4af206082f 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs
+++ b/main/src/addins/Xml/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs
@@ -1,7 +1,7 @@
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.CompletionData
+namespace MonoDevelop.Xml.Tests.CompletionData
{
[TestFixture]
public class XmlCompletionDataIconTestFixture
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs b/main/src/addins/Xml/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs
index d674e7481a..83787fa469 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs
+++ b/main/src/addins/Xml/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs
@@ -1,7 +1,7 @@
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.CompletionData
+namespace MonoDevelop.Xml.Tests.CompletionData
{
[TestFixture]
public class XmlCompletionDataStringTestFixture
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj b/main/src/addins/Xml/Tests/MonoDevelop.Xml.Tests.csproj
index d98baa7b76..b49673fdf0 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj
+++ b/main/src/addins/Xml/Tests/MonoDevelop.Xml.Tests.csproj
@@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8E47B77A-A649-494C-9BF2-B845E39CADE9}</ProjectGuid>
<OutputType>Library</OutputType>
- <AssemblyName>MonoDevelop.XmlEditor.Tests</AssemblyName>
- <RootNamespace>MonoDevelop.XmlEditor.Tests</RootNamespace>
+ <AssemblyName>MonoDevelop.Xml.Tests</AssemblyName>
+ <RootNamespace>MonoDevelop.Xml.Tests</RootNamespace>
<TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand>
<TestRunnerArgs>run-md-tests</TestRunnerArgs>
</PropertyGroup>
@@ -40,11 +40,6 @@
<NoWarn>1591;1573</NoWarn>
</PropertyGroup>
<ItemGroup>
- <ProjectReference Include="..\MonoDevelop.XmlEditor.csproj">
- <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
- <Name>MonoDevelop.XmlEditor</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
<Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project>
<Name>MonoDevelop.Core</Name>
@@ -63,13 +58,17 @@
<Project>{E13A0A7B-4DE6-43ED-A139-41052D065A9B}</Project>
<Name>GuiUnit_NET_4_0</Name>
</ProjectReference>
+ <ProjectReference Include="..\MonoDevelop.Xml.csproj">
+ <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
+ <Name>MonoDevelop.Xml</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="AssemblyInfo.cs" />
<Compile Include="Parser\ActiveElementStartPathTestFixture.cs" />
<Compile Include="Parser\AttributeNameTestFixture.cs" />
<Compile Include="Parser\NamespaceDeclarationTestFixture.cs" />
@@ -108,9 +107,6 @@
<Compile Include="Schema\TwoElementSchemaTestFixture.cs" />
<Compile Include="Schema\XhtmlStrictSchemaTestFixture.cs" />
<Compile Include="Schema\XsdSchemaTestFixture.cs" />
- <Compile Include="Schema.Includes\AttributeGroupRefSchemaIncludeTestFixture.cs" />
- <Compile Include="Schema.Includes\TwoElementSchemaIncludeTestFixture.cs" />
- <Compile Include="Schema.Uri\GetUriTestFixture.cs" />
<Compile Include="Utils\ResourceManager.cs" />
<Compile Include="Utils\SchemaIncludeTestFixtureHelper.cs" />
<Compile Include="CompletionData\XmlCompletionDataImageTestFixture.cs" />
@@ -118,43 +114,24 @@
<Compile Include="Schema\MissingSchemaElementTestFixture.cs" />
<Compile Include="Schema\AllElementTestFixture.cs" />
<Compile Include="Parser\InsideAttributeValueTestFixture.cs" />
- <Compile Include="XPathQuery\XmlNamespaceTests.cs" />
- <Compile Include="XPathQuery\XmlNamespaceToStringTests.cs" />
- <Compile Include="XPathQuery\RunXPathQueryTests.cs" />
- <Compile Include="XPathQuery\XPathHistoryListTests.cs" />
- <Compile Include="XPathQuery\XPathNamespaceListTests.cs" />
<Compile Include="Schema\XmlSchemaNamespaceTests.cs" />
<Compile Include="Schema\FindAttributeFromComplexTypeTestFixture.cs" />
- <Compile Include="Schema\GetSchemaFromFileNameTestFixture.cs" />
- <Compile Include="FindSchemaObject\AttributeGroupReferenceSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\AttributeReferenceSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\AttributeSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\AttributeTypeSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\ElementReferenceSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\ElementReferenceWithPrefixSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\ElementSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\ElementTypeSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\ElementTypeWithPrefixSelectedTestFixture.cs" />
- <Compile Include="FindSchemaObject\GroupReferenceSelectedTestFixture.cs" />
<Compile Include="Parser\ActiveElementUnderCursorTests.cs" />
<Compile Include="Parser\AttributeNameUnderCursorTests.cs" />
<Compile Include="Parser\AttributeValueUnderCursorTests.cs" />
- <Compile Include="MimeTypeHandledTests.cs" />
<Compile Include="Schema\SchemaAssociationTests.cs" />
- <Compile Include="StateEngine\ParsingTests.cs" />
- <Compile Include="StateEngine\TestParser.cs" />
+ <Compile Include="Parser\TestXmlParser.cs" />
+ <Compile Include="Parser\ParsingTests.cs" />
+ <Compile Include="Schema\Uri\GetUriTestFixture.cs" />
+ <Compile Include="Schema\Includes\AttributeGroupRefSchemaIncludeTestFixture.cs" />
+ <Compile Include="Schema\Includes\TwoElementSchemaIncludeTestFixture.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Parser\" />
<Folder Include="Paths\" />
<Folder Include="Schema\" />
- <Folder Include="Schema.Includes\" />
- <Folder Include="Schema.Uri\" />
<Folder Include="Utils\" />
<Folder Include="CompletionData\" />
- <Folder Include="XPathQuery\" />
- <Folder Include="FindSchemaObject\" />
- <Folder Include="StateEngine\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\xhtml1-strict-modified.xsd">
@@ -165,4 +142,13 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <Policies>
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileName" />
+ </Policies>
+ </Properties>
+ </MonoDevelop>
+ </ProjectExtensions>
</Project>
diff --git a/main/src/addins/Xml/Tests/Parser/ActiveElementStartPathTestFixture.cs b/main/src/addins/Xml/Tests/Parser/ActiveElementStartPathTestFixture.cs
new file mode 100644
index 0000000000..9a9b299c5b
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/ActiveElementStartPathTestFixture.cs
@@ -0,0 +1,95 @@
+using System;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Parser;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ [TestFixture]
+ public class ActiveElementStartPathTestFixture
+ {
+ const string namespaceURI = "http://foo.com/foo.xsd";
+
+ [Test]
+ public void PathTest1()
+ {
+ AssertElementPath (
+ "<foo xmlns='" + namespaceURI + "' $",
+ new QualifiedName("foo", namespaceURI)
+ );
+ }
+
+ [Test]
+ public void PathTest2()
+ {
+ AssertElementPath (
+ "<foo xmlns='" + namespaceURI + "' ><bar $",
+ new QualifiedName("foo", namespaceURI),
+ new QualifiedName("bar", namespaceURI)
+ );
+ }
+
+ [Test]
+ public void PathTest3()
+ {
+ AssertElementPath (
+ "<f:foo xmlns:f='" + namespaceURI + "' ><f:bar $",
+ new QualifiedName ("foo", namespaceURI, "f"),
+ new QualifiedName ("bar", namespaceURI, "f")
+ );
+ }
+
+ [Test]
+ public void PathTest4()
+ {
+ AssertElementPath (
+ "<x:foo xmlns:x='" + namespaceURI + "' $",
+ new QualifiedName("foo", namespaceURI, "x")
+ );
+ }
+
+ [Test]
+ public void PathTest5()
+ {
+ AssertElementPath (
+ "<foo xmlns='" + namespaceURI + "'>\r\n<y\r\n" + "Id = 'foo' $",
+ new QualifiedName ("foo", namespaceURI),
+ new QualifiedName ("y", namespaceURI)
+ );
+ }
+
+ [Test]
+ public void PathTest6()
+ {
+ AssertElementPath (
+ "<bar xmlns='http://bar'/>\r\n<foo xmlns='" + namespaceURI + "' $",
+ new QualifiedName ("foo", namespaceURI)
+ );
+ }
+
+ /// <summary>
+ /// Tests that we get no path back if we are outside the start
+ /// tag.
+ /// </summary>
+ [Test]
+ public void OutOfStartTagPathTest1()
+ {
+ TestXmlParser.AssertState (
+ "<foo xmlns='" + namespaceURI + "'> $",
+ p => p.AssertStateIs<XmlRootState> ()
+ );
+ }
+
+ static void AssertElementPath (string text, params QualifiedName[] qualifiedNames)
+ {
+ TestXmlParser.AssertState (text, p => {
+ var arr = p.Nodes.ToArray ();
+ Array.Reverse (arr);
+ Assert.AreEqual (
+ new XmlElementPath (qualifiedNames),
+ XmlElementPath.Resolve (arr)
+ );
+ });
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/ActiveElementUnderCursorTests.cs b/main/src/addins/Xml/Tests/Parser/ActiveElementUnderCursorTests.cs
new file mode 100644
index 0000000000..916e2873e0
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/ActiveElementUnderCursorTests.cs
@@ -0,0 +1,157 @@
+using MonoDevelop.Xml.Completion;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ /// <summary>
+ /// Tests the XmlParser.GetActiveElementStartPathAtIndex which finds the element
+ /// path where the index is at. The index may be in the middle or start of the element
+ /// tag.
+ /// </summary>
+ [TestFixture]
+ public class ActiveElementUnderCursorTests
+ {
+ const string namespaceURI = "http://foo.com/foo.xsd";
+
+ [Test]
+ public void PathTest1()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'$><bar>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName("foo", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest2()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><$bar>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName("foo", namespaceURI),
+ new QualifiedName("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest3()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><b$ar>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName("foo", namespaceURI),
+ new QualifiedName("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest4()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar$>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName ("foo", namespaceURI),
+ new QualifiedName ("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest5()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar a$='a'>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName ("foo", namespaceURI),
+ new QualifiedName ("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest6()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar a='a$'>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName ("foo", namespaceURI),
+ new QualifiedName ("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest7()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar a='a' $>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName("foo", namespaceURI),
+ new QualifiedName("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest8()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar>$",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName("foo", namespaceURI),
+ new QualifiedName("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest9()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar \n\n hi='$'>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName ("foo", namespaceURI),
+ new QualifiedName ("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest10()
+ {
+ TestXmlParser.AssertTree (
+ "<foo xmlns='" + namespaceURI + "'><bar $Id=\r\n</foo>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName ("foo", namespaceURI),
+ new QualifiedName ("bar", namespaceURI)
+ )
+ );
+ }
+
+ [Test]
+ public void PathTest11()
+ {
+ TestXmlParser.AssertTree (
+ "<fo$o xmlns='" + namespaceURI + "'>",
+ n => TestXmlParser.AssertPath (
+ n,
+ new QualifiedName ("foo", namespaceURI)
+ )
+ );
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/AttributeNameTestFixture.cs b/main/src/addins/Xml/Tests/Parser/AttributeNameTestFixture.cs
new file mode 100644
index 0000000000..d63b3f630f
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/AttributeNameTestFixture.cs
@@ -0,0 +1,98 @@
+using System.Linq;
+using MonoDevelop.Xml.Dom;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ /// <summary>
+ /// Tests that we can detect the attribute's name.
+ /// </summary>
+ [TestFixture]
+ public class AttributeNameTestFixture
+ {
+ [Test]
+ public void SuccessTest1()
+ {
+ AssertAttributeName ("<a foo='a$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest2()
+ {
+ AssertAttributeName ("<a foo='$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest3()
+ {
+ AssertAttributeName ("<a foo=$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest4()
+ {
+ AssertAttributeName ("<a foo=\"$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest5()
+ {
+ AssertAttributeName ("<a foo = \"$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest6()
+ {
+ AssertAttributeName ("<a foo = '#$", "foo");
+ }
+
+ [Test]
+ public void FailureTest1()
+ {
+ NotAttribute ("foo=$");
+ }
+
+ [Test]
+ public void FailureTest2()
+ {
+ NotAttribute ("foo=<$");
+ }
+
+ [Test]
+ public void FailureTest3()
+ {
+ NotAttribute ("a$");
+ }
+
+ [Test]
+ public void FailureTest4()
+ {
+ NotAttribute ("< a$");
+ }
+
+ [Test]
+ public void EmptyString()
+ {
+ NotAttribute ("$");
+ }
+
+ static void AssertAttributeName (string doc, string name)
+ {
+ TestXmlParser.AssertState (doc, p => {
+ var att = p.Nodes.FirstOrDefault () as XAttribute;
+ Assert.NotNull (att);
+ Assert.NotNull (att.Name);
+ Assert.IsNull (att.Name.Prefix);
+ Assert.AreEqual (att.Name.Name, name);
+ });
+ }
+
+ static void NotAttribute (string doc)
+ {
+ TestXmlParser.AssertState (doc, p => {
+ var att = p.Nodes.FirstOrDefault () as XAttribute;
+ Assert.IsNull (att);
+ });
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/AttributeNameUnderCursorTests.cs b/main/src/addins/Xml/Tests/Parser/AttributeNameUnderCursorTests.cs
new file mode 100644
index 0000000000..f50cf21330
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/AttributeNameUnderCursorTests.cs
@@ -0,0 +1,56 @@
+using System.Linq;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ [TestFixture]
+ public class AttributeNameUnderCursorTests
+ {
+ [Test]
+ public void SuccessTest1()
+ {
+ AssertAttributeName ("<a foo$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest2()
+ {
+ AssertAttributeName ("<a foo=$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest3()
+ {
+ AssertAttributeName ("<a foo='$", "foo");
+ }
+
+ [Test]
+ public void SuccessTest4()
+ {
+ AssertAttributeName ("<a type='a$", "type");
+ }
+
+ public void AssertAttributeName (string doc, string name)
+ {
+ TestXmlParser.AssertState (doc, p => {
+ var att = p.Nodes.First () as XAttribute;
+ Assert.NotNull (att);
+ Assert.AreEqual (name, GetName (p));
+ });
+ }
+
+ static string GetName (XmlParser parser)
+ {
+ var namedObject = parser.Nodes.First () as INamedXObject;
+ Assert.NotNull (namedObject);
+ if (namedObject.IsNamed)
+ return namedObject.Name.ToString ();
+
+ var state = parser.CurrentState as XmlNameState;
+ Assert.NotNull (state);
+ return ((IXmlParserContext)parser).KeywordBuilder.ToString ();
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/AttributeValueUnderCursorTests.cs b/main/src/addins/Xml/Tests/Parser/AttributeValueUnderCursorTests.cs
new file mode 100644
index 0000000000..07e6c01f41
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/AttributeValueUnderCursorTests.cs
@@ -0,0 +1,68 @@
+
+using System.Linq;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ [TestFixture]
+ public class AttributeValueUnderCursorTests
+ {
+ [Test]
+ public void SuccessTest1()
+ {
+ AssertAttributeValue ("<a foo='abc$'", "abc");
+ }
+
+ [Test]
+ public void SuccessTest2()
+ {
+ AssertAttributeValue ("<a foo=\"abc$\"", "abc");
+ }
+
+ [Test]
+ public void SuccessTest3()
+ {
+ AssertAttributeValue ("<a foo='abc$'", "abc");
+ }
+
+ [Test]
+ public void SuccessTest4()
+ {
+ AssertAttributeValue ("<a foo='$abc'", "");
+ }
+
+ [Test]
+ public void SuccessTest5()
+ {
+ AssertAttributeValue ("<a foo='$a", "");
+ }
+
+ [Test]
+ public void SuccessTest6()
+ {
+ AssertAttributeValue ("<a foo='a$'", "a");
+ }
+
+ [Test]
+ public void SuccessTest7()
+ {
+ AssertAttributeValue ("<a foo='a\"b\"c$'", "a\"b\"c");
+ }
+
+ [Test]
+ public void FailureTest1()
+ {
+ TestXmlParser.AssertState ("<a foo=''$", p => Assert.IsNull (p.Nodes.LastOrDefault () as XAttribute));
+ }
+
+ public void AssertAttributeValue (string doc, string val)
+ {
+ TestXmlParser.AssertState (doc, p => {
+ p.AssertStateIs<XmlAttributeValueState> ();
+ Assert.AreEqual (val, ((IXmlParserContext)p).KeywordBuilder.ToString ());
+ });
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/InsideAttributeValueTestFixture.cs b/main/src/addins/Xml/Tests/Parser/InsideAttributeValueTestFixture.cs
new file mode 100644
index 0000000000..ae659f2d91
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/InsideAttributeValueTestFixture.cs
@@ -0,0 +1,109 @@
+using NUnit.Framework;
+using MonoDevelop.Xml.Parser;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ [TestFixture]
+ public class InsideAttributeValueTestFixture
+ {
+ [Test]
+ public void InvalidString()
+ {
+ AssertNotInsideAttributeValue ("$");
+ }
+
+ [Test]
+ public void DoubleQuotesTest1()
+ {
+ string xml = "<foo a=\"$";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void DoubleQuotesTest2()
+ {
+ string xml = "<foo a=\"\" $";
+ AssertNotInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void DoubleQuotesTest3()
+ {
+ string xml = "<foo a=\"\"$";
+ AssertNotInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void DoubleQuotesTest4()
+ {
+ string xml = "<foo a=\" $";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void NoXmlElementStart()
+ {
+ string xml = "foo a=\"$";
+ AssertNotInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void DoubleQuotesTest5()
+ {
+ string xml = "<foo a=\"$\"";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void EqualsSignTest()
+ {
+ string xml = "<foo a=$";
+ AssertNotInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void SingleQuoteTest1()
+ {
+ string xml = "<foo a='$";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void MixedQuotesTest1()
+ {
+ string xml = "<foo a='\"$";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void MixedQuotesTest2()
+ {
+ string xml = "<foo a=\"'$";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void MixedQuotesTest3()
+ {
+ string xml = "<foo a=\"''$";
+ AssertInsideAttributeValue (xml);
+ }
+
+ [Test]
+ public void MixedQuotesTest4()
+ {
+ string xml = "<foo a=\"''\"$";
+ AssertNotInsideAttributeValue (xml);
+ }
+
+ public void AssertInsideAttributeValue (string doc)
+ {
+ TestXmlParser.AssertState (doc, p => p.AssertStateIs<XmlAttributeValueState> ());
+ }
+
+ public void AssertNotInsideAttributeValue (string doc)
+ {
+ TestXmlParser.AssertState (doc, p => p.AssertStateIsNot<XmlAttributeValueState> ());
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/NamespaceDeclarationTestFixture.cs b/main/src/addins/Xml/Tests/Parser/NamespaceDeclarationTestFixture.cs
new file mode 100644
index 0000000000..49549fe583
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/NamespaceDeclarationTestFixture.cs
@@ -0,0 +1,109 @@
+
+using System.Linq;
+using MonoDevelop.Xml.Dom;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ /// <summary>
+ /// When the user hits the '=' key we need to produce intellisense
+ /// if the attribute is of the form 'xmlns' or 'xmlns:foo'. This
+ /// tests the parsing of the text before the cursor to see if the
+ /// attribute is a namespace declaration.
+ /// </summary>
+ [TestFixture]
+ public class NamespaceDeclarationTestFixture
+ {
+ [Test]
+ public void SuccessTest1()
+ {
+ AssertIsNamespaceDeclaration("<foo xmlns=$");
+ }
+
+ [Test]
+ public void SuccessTest2()
+ {
+ AssertIsNamespaceDeclaration("<foo xmlns =$");
+ }
+
+ [Test]
+ public void SuccessTest3()
+ {
+ AssertIsNamespaceDeclaration("<foo \r\nxmlns\r\n=$");
+ }
+
+ [Test]
+ public void SuccessTest4()
+ {
+ AssertIsNamespaceDeclaration("<foo xmlns:nant=$");
+ }
+
+ [Test]
+ public void FailureTest1()
+ {
+ AssertNotNamespaceDeclaration("<foo xmlns$");
+ }
+
+ [Test]
+ public void FailureTest2()
+ {
+ AssertNotNamespaceDeclaration("<foo xmlns:nant$");
+ }
+
+ [Test]
+ public void FailureTest3()
+ {
+ AssertNotNamespaceDeclaration(" xmlns=$");
+ }
+
+ [Test]
+ public void FailureTest4()
+ {
+ AssertNotNamespaceDeclaration(" xmlns$");
+ }
+
+ [Test]
+ public void FailureTest5()
+ {
+ AssertNotNamespaceDeclaration(" xmlns:f$");
+ }
+
+ [Test]
+ public void FailureTest6()
+ {
+ AssertNotNamespaceDeclaration("<foo bar=$");
+ }
+
+ [Test]
+ public void FailureTest7()
+ {
+ AssertNotNamespaceDeclaration("$");
+ }
+
+ public void AssertIsNamespaceDeclaration (string doc)
+ {
+ TestXmlParser.AssertState (doc, p => {
+ var node = p.Nodes.FirstOrDefault () as XAttribute;
+ Assert.NotNull (node);
+ Assert.IsTrue (node.IsNamed);
+ if (node.Name.HasPrefix)
+ Assert.AreEqual ("xmlns", node.Name.Prefix);
+ else
+ Assert.AreEqual ("xmlns", node.Name.Name);
+ });
+ }
+
+ public void AssertNotNamespaceDeclaration (string doc)
+ {
+ TestXmlParser.AssertState (doc, p => {
+ var node = p.Nodes.FirstOrDefault () as XAttribute;
+ if (node != null && node.IsNamed) {
+ if (node.Name.HasPrefix)
+ Assert.AreNotEqual ("xmlns", node.Name.Prefix);
+ else
+ Assert.AreNotEqual ("xmlns", node.Name.Name);
+ }
+ });
+ }
+ }
+}
diff --git a/main/src/addins/Xml/Tests/Parser/ParentElementPathTestFixture.cs b/main/src/addins/Xml/Tests/Parser/ParentElementPathTestFixture.cs
new file mode 100644
index 0000000000..7f73762161
--- /dev/null
+++ b/main/src/addins/Xml/Tests/Parser/ParentElementPathTestFixture.cs
@@ -0,0 +1,57 @@
+using MonoDevelop.Xml.Completion;
+using NUnit.Framework;
+
+namespace MonoDevelop.Xml.Tests.Parser
+{
+ [TestFixture]
+ public class ParentElementPathTestFixture
+ {
+ const string namespaceURI = "http://foo/foo.xsd";
+
+ [Test]
+ public void SuccessTest1()
+ {
+ AssertParentPath (
+ "<foo xmlns='" + namespaceURI + "' >$<",
+ new QualifiedName ("foo", namespaceURI)
+ );
+ }
+
+ [Test]
+ public void SuccessTest2()
+ {
+ AssertParentPath (
+ "<foo xmlns='" + namespaceURI + "' ><bar></bar><$",
+ new QualifiedName ("foo", namespaceURI)
+ );
+ }
+
+ [Test]
+ public void SuccessTest3()
+ {
+ AssertParentPath (
+ "<foo xmlns='" + namespaceURI + "' ><bar/><$",
+ new QualifiedName ("foo", namespaceURI)
+ );
+ }
+
+ [Test]
+ public void SuccessTest4()
+ {
+ AssertParentPath (
+ "<bar xmlns='http://test.com'/><foo xmlns='" + namespaceURI + "' ><$",
+ new QualifiedName ("foo", namespaceURI)
+ );
+ }
+
+ public void AssertParentPath (string doc, params QualifiedName[] qualifiedNames)
+ {
+ TestXmlParser.AssertState (doc, p =>
+ Assert.AreEqual (
+ new XmlElementPath (qualifiedNames),
+ XmlElementPath.Resolve (p.Nodes.ToArray ())
+ )
+ );;
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/ParsingTests.cs b/main/src/addins/Xml/Tests/Parser/ParsingTests.cs
index 3d09ae4610..ad84140b7a 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/ParsingTests.cs
+++ b/main/src/addins/Xml/Tests/Parser/ParsingTests.cs
@@ -28,26 +28,27 @@
using System.Linq;
-using NUnit.Framework;
using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
+using NUnit.Framework;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Tests.Parser
{
[TestFixture]
public class ParsingTests
{
-
- public virtual XmlFreeState CreateRootState ()
+ public virtual XmlRootState CreateRootState ()
{
- return new XmlFreeState ();
+ return new XmlRootState ();
}
[Test]
public void AttributeName ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<doc>
<tag.a>
@@ -67,7 +68,7 @@ namespace MonoDevelop.Xml.StateEngine
[Test]
public void Attributes ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<doc>
<tag.a name=""foo"" arg=5 wibble = 6 bar.baz = 'y.ff7]' $ />
@@ -85,7 +86,7 @@ namespace MonoDevelop.Xml.StateEngine
[Test]
public void AttributeRecovery ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<doc>
<tag.a>
@@ -107,7 +108,7 @@ namespace MonoDevelop.Xml.StateEngine
[Test]
public void IncompleteTags ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<doc>
<tag.a att1 >
@@ -132,11 +133,11 @@ namespace MonoDevelop.Xml.StateEngine
parser.AssertEmpty ();
parser.AssertErrorCount (5, x => x.ErrorType == ErrorType.Error);
}
-
+
[Test]
public void Unclosed ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<doc>
<tag.a>
@@ -145,12 +146,12 @@ namespace MonoDevelop.Xml.StateEngine
</doc>
",
delegate {
- parser.AssertStateIs<XmlFreeState> ();
+ parser.AssertStateIs<XmlRootState> ();
parser.AssertNodeDepth (5);
parser.AssertPath ("//doc/tag.a/tag.b/tag.b");
},
delegate {
- parser.AssertStateIs<XmlFreeState> ();
+ parser.AssertStateIs<XmlRootState> ();
parser.AssertNodeDepth (2);
parser.AssertPath ("//doc");
}
@@ -162,7 +163,7 @@ namespace MonoDevelop.Xml.StateEngine
[Test]
public void Misc ()
{
- TestParser parser = new TestParser (CreateRootState ());
+ var parser = new TestXmlParser (CreateRootState ());
parser.Parse (@"
<doc>
<!DOCTYPE $ >
@@ -189,11 +190,11 @@ namespace MonoDevelop.Xml.StateEngine
parser.AssertEmpty ();
parser.AssertErrorCount (0);
}
-
+
[Test]
public void DocTypeCapture ()
{
- TestParser parser = new TestParser (CreateRootState (), true);
+ var parser = new TestXmlParser (CreateRootState (), true);
parser.Parse (@"
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""
""DTD/xhtml1-strict.dtd""
@@ -217,7 +218,7 @@ namespace MonoDevelop.Xml.StateEngine
[Test]
public void NamespacedAttributes ()
{
- var parser = new TestParser (CreateRootState (), true);
+ var parser = new TestXmlParser (CreateRootState (), true);
parser.Parse (@"<tag foo:bar='1' foo:bar:baz='2' foo='3' />");
parser.AssertEmpty ();
var doc = (XDocument) parser.Nodes.Peek ();
@@ -238,7 +239,7 @@ namespace MonoDevelop.Xml.StateEngine
[Test]
public void SimpleTree ()
{
- var parser = new TestParser (CreateRootState (), true);
+ var parser = new TestXmlParser (CreateRootState (), true);
parser.Parse (@"
<doc>
<a>
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs b/main/src/addins/Xml/Tests/Parser/QualifiedNameTestFixture.cs
index 3abbb9286b..4960bc7ee8 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Parser/QualifiedNameTestFixture.cs
@@ -1,9 +1,9 @@
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
using System.Xml;
-namespace MonoDevelop.XmlEditor.Tests.Parser
+namespace MonoDevelop.Xml.Tests.Parser
{
/// <summary>
/// Tests the comparison of <see cref="QualifiedName"/> items.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/TestParser.cs b/main/src/addins/Xml/Tests/Parser/TestXmlParser.cs
index 5ec3eacb26..74afe274ff 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/StateEngine/TestParser.cs
+++ b/main/src/addins/Xml/Tests/Parser/TestXmlParser.cs
@@ -27,30 +27,54 @@
//
using System;
-using System.Linq;
using System.Collections.Generic;
-using MonoDevelop.Ide.Gui.Content;
+using System.Linq;
-using NUnit.Framework;
+using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Dom;
+using MonoDevelop.Xml.Parser;
+using NUnit.Framework;
-namespace MonoDevelop.Xml.StateEngine
+namespace MonoDevelop.Xml.Tests.Parser
{
- public class TestParser : Parser
+ public class TestXmlParser : XmlParser
{
readonly List<Error> errors = new List<Error> ();
- public TestParser (RootState rootState) : this (rootState, false)
+ public TestXmlParser (XmlRootState rootState) : this (rootState, false)
{
}
- public TestParser (RootState rootState, bool buildTree) : base (rootState, buildTree)
+ public TestXmlParser (XmlRootState rootState, bool buildTree) : base (rootState, buildTree)
{
- base.ErrorLogged += delegate (Error err) { errors.Add (err); };
+ ErrorLogged += errors.Add;
}
public new List<Error> Errors { get { return errors; } }
-
+
+ public static void AssertState (string doc, params Action<TestXmlParser>[] asserts)
+ {
+ var p = new TestXmlParser (new XmlRootState ());
+ p.Parse (doc, Array.ConvertAll (asserts, a => (Action)(() => a (p))));
+ }
+
+ public static void AssertTree (string txt, params Action<XNode>[] asserts)
+ {
+ var p = new TestXmlParser (new XmlRootState (), true);
+
+ //parse and capture line/col info
+ var list = new List<TextLocation> ();
+ p.Parse (txt, Array.ConvertAll (asserts, a => (Action)(() => list.Add (p.Location))));
+
+ var doc = (XDocument) p.Nodes.Last ();
+
+ for (int i = 0; i < asserts.Length; i++) {
+ asserts [i] (doc.AllDescendentNodes.FirstOrDefault (n => n.Region.IsInside (list[i])));
+ }
+ }
+
public void Parse (string doc, params Action[] asserts)
{
Parse (doc, '$', asserts);
@@ -74,6 +98,7 @@ namespace MonoDevelop.Xml.StateEngine
Push (c);
}
}
+ Assert.AreEqual (asserts.Length, assertNo);
}
public string GetPath ()
@@ -102,10 +127,15 @@ namespace MonoDevelop.Xml.StateEngine
};
}
- public void AssertStateIs<T> () where T : State
+ public void AssertStateIs<T> () where T : XmlParserState
{
Assert.IsTrue (CurrentState is T, "Current state is {0} not {1}", CurrentState.GetType ().Name, typeof (T).Name);
}
+
+ public void AssertStateIsNot<T> () where T : XmlParserState
+ {
+ Assert.IsFalse (CurrentState is T, "Current state is {0}", typeof (T).Name);
+ }
public void AssertNodeDepth (int depth)
{
@@ -188,5 +218,20 @@ namespace MonoDevelop.Xml.StateEngine
Assert.IsTrue (node is INamedXObject);
Assert.AreEqual (name, ((INamedXObject)node).Name.FullName);
}
+
+ public static void AssertPath (XNode node, params QualifiedName[] qualifiedNames)
+ {
+ var path = new List<XNode> ();
+ while (node != null) {
+ path.Add (node);
+ node = node.Parent as XNode;
+ }
+ path.Reverse ();
+
+ Assert.AreEqual (
+ new XmlElementPath (qualifiedNames),
+ XmlElementPath.Resolve (path.ToArray ())
+ );
+ }
}
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs b/main/src/addins/Xml/Tests/Paths/NoElementPathTestFixture.cs
index 4df417d889..ff95d40e0c 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Paths/NoElementPathTestFixture.cs
@@ -1,8 +1,8 @@
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Paths
+namespace MonoDevelop.Xml.Tests.Paths
{
[TestFixture]
public class NoElementPathTestFixture
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs b/main/src/addins/Xml/Tests/Paths/SingleElementPathTestFixture.cs
index a9a376ba89..6087294c90 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Paths/SingleElementPathTestFixture.cs
@@ -1,8 +1,8 @@
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Paths
+namespace MonoDevelop.Xml.Tests.Paths
{
[TestFixture]
public class SingleElementPathTestFixture
@@ -21,15 +21,7 @@ namespace MonoDevelop.XmlEditor.Tests.Paths
[Test]
public void HasOneItem()
{
- Assert.AreEqual(1, path.Elements.Count,
- "Should have 1 element.");
- }
-
- [Test]
- public void RemoveLastItem()
- {
- path.Elements.RemoveLast();
- Assert.AreEqual(0, path.Elements.Count, "Should have no items.");
+ Assert.AreEqual(1, path.Elements.Count, "Should have 1 element.");
}
[Test]
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs b/main/src/addins/Xml/Tests/Paths/TwoElementPathTestFixture.cs
index 0f74db3836..95c936f410 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Paths/TwoElementPathTestFixture.cs
@@ -1,8 +1,8 @@
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Paths
+namespace MonoDevelop.Xml.Tests.Paths
{
[TestFixture]
public class TwoElementPathTestFixture
@@ -20,34 +20,6 @@ namespace MonoDevelop.XmlEditor.Tests.Paths
secondQualifiedName = new QualifiedName("bar", "http://bar", "b");
path.Elements.Add(secondQualifiedName);
- }
-
- [Test]
- public void HasTwoItems()
- {
- Assert.AreEqual(2, path.Elements.Count,
- "Should have 2 elements.");
- }
-
- [Test]
- public void RemoveLastItem()
- {
- path.Elements.RemoveLast();
- Assert.AreEqual(firstQualifiedName, path.Elements[0],
- "Wrong item removed.");
- }
-
- [Test]
- public void LastPrefix()
- {
- Assert.AreEqual("b", path.Elements.LastPrefix, "Incorrect last prefix.");
- }
-
- [Test]
- public void LastPrefixAfterLastItemRemoved()
- {
- path.Elements.RemoveLast();
- Assert.AreEqual("f", path.Elements.LastPrefix, "Incorrect last prefix.");
}
[Test]
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Resources/XMLSchema.xsd b/main/src/addins/Xml/Tests/Resources/XMLSchema.xsd
index 5acc282d5e..5acc282d5e 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Resources/XMLSchema.xsd
+++ b/main/src/addins/Xml/Tests/Resources/XMLSchema.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Resources/xhtml1-strict-modified.xsd b/main/src/addins/Xml/Tests/Resources/xhtml1-strict-modified.xsd
index 1d25a8e7ef..1d25a8e7ef 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Resources/xhtml1-strict-modified.xsd
+++ b/main/src/addins/Xml/Tests/Resources/xhtml1-strict-modified.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs b/main/src/addins/Xml/Tests/Schema/AbstractElementTestFixture.cs
index baccd90b7e..62dd1300db 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/AbstractElementTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests elements that are abstract and require substitution groups.
@@ -16,7 +16,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
public override void FixtureInit()
{
- XmlElementPath path = new XmlElementPath();
+ var path = new XmlElementPath();
path.Elements.Add(new QualifiedName("project", "http://foo"));
path.Elements.Add(new QualifiedName("items", "http://foo"));
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs b/main/src/addins/Xml/Tests/Schema/AllElementTestFixture.cs
index 241c719aac..a9a7a3265d 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/AllElementTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that element completion works for any child elements
@@ -17,7 +17,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
public override void FixtureInit()
{
- XmlElementPath path = new XmlElementPath();
+ var path = new XmlElementPath();
path.Elements.Add(new QualifiedName("person", "http://foo"));
personElementChildren = SchemaCompletionData.GetChildElementCompletionData(path);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs b/main/src/addins/Xml/Tests/Schema/AttributeAnnotationTestFixture.cs
index 90f5ea890b..071f9ac510 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/AttributeAnnotationTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that the completion data retrieves the annotation documentation
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs b/main/src/addins/Xml/Tests/Schema/AttributeGroupRefTestFixture.cs
index ecc4d15db3..94b397c1bc 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/AttributeGroupRefTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Element that uses an attribute group ref.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs b/main/src/addins/Xml/Tests/Schema/AttributeRefTestFixture.cs
index 8fb20a7a19..4cf58808ed 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/AttributeRefTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests attribute refs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs b/main/src/addins/Xml/Tests/Schema/AttributeValueAnnotationTestFixture.cs
index 530b728403..85860aeed5 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/AttributeValueAnnotationTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that the completion data retrieves the annotation documentation
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ChildElementAttributesTestFixture.cs
index a62b190d8e..4154ee41d4 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ChildElementAttributesTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Child element attributes.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ChoiceTestFixture.cs
index fa857945e0..6eff3b644c 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ChoiceTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that nested schema choice elements are handled.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ComplexContentExtensionTestFixture.cs
index 3db0909c74..10c8aebc3d 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ComplexContentExtensionTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests complex content extension elements.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs b/main/src/addins/Xml/Tests/Schema/DuplicateElementTestFixture.cs
index 2f37f1b0ee..07ccb2afb0 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/DuplicateElementTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests duplicate elements in the schema.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ElementAnnotationTestFixture.cs
index c3cf34381f..f4f709366e 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ElementAnnotationTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that the completion data retrieves the annotation documentation
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ElementRefAnnotationTestFixture.cs
index f4b248476b..f102adc70e 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ElementRefAnnotationTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that the completion data retrieves the annotation documentation
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs
index d0e6c65744..5929d39082 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Element that has a single attribute.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs b/main/src/addins/Xml/Tests/Schema/EnumAttributeValueTestFixture.cs
index cfd9e4c78a..7a56e0a84b 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/EnumAttributeValueTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests attribute refs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ExtensionElementTestFixture.cs
index 106f67d47e..f6ee5ba782 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ExtensionElementTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests complex content extension elements.
@@ -31,7 +31,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
includeAttributes = SchemaCompletionData.GetAttributeCompletionData(path);
// Get annotation element info.
- path.Elements.RemoveLast();
+ path.Elements.RemoveAt(path.Elements.Count - 1);
path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema"));
annotationChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs b/main/src/addins/Xml/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs
index 93147eee2c..1a4dc4bf83 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs
@@ -1,8 +1,8 @@
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
using System.Xml.Schema;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Element that has a single attribute.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs b/main/src/addins/Xml/Tests/Schema/GroupRefCompositorTestFixture.cs
index 042b18117e..6e6cb086f6 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/GroupRefCompositorTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that autocompletion data is correct for an xml schema containing:
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs b/main/src/addins/Xml/Tests/Schema/GroupRefTestFixture.cs
index 94d47ab956..25d87736df 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/GroupRefTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests element group refs
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs b/main/src/addins/Xml/Tests/Schema/Includes/AttributeGroupRefSchemaIncludeTestFixture.cs
index c3b8037055..e368466589 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/Includes/AttributeGroupRefSchemaIncludeTestFixture.cs
@@ -1,9 +1,9 @@
using NUnit.Framework;
-using MonoDevelop.XmlEditor.Completion;
-using MonoDevelop.XmlEditor.Tests.Utils;
-using MonoDevelop.XmlEditor.Tests.Schema;
+using MonoDevelop.Xml.Completion;
+using MonoDevelop.Xml.Tests.Utils;
+using MonoDevelop.Xml.Tests.Schema;
-namespace MonoDevelop.XmlEditor.Tests.Schema.Includes
+namespace MonoDevelop.Xml.Tests.Schema.Includes
{
/// <summary>
/// Tests that schemas referenced via xs:include elements are used when
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs b/main/src/addins/Xml/Tests/Schema/Includes/TwoElementSchemaIncludeTestFixture.cs
index 06041c6900..197230c76e 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/Includes/TwoElementSchemaIncludeTestFixture.cs
@@ -1,9 +1,9 @@
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-using MonoDevelop.XmlEditor.Tests.Utils;
-using MonoDevelop.XmlEditor.Tests.Schema;
+using MonoDevelop.Xml.Tests.Utils;
+using MonoDevelop.Xml.Tests.Schema;
-namespace MonoDevelop.XmlEditor.Tests.Schema.Includes
+namespace MonoDevelop.Xml.Tests.Schema.Includes
{
/// <summary>
/// Tests that schemas referenced via xs:include elements are used when
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs b/main/src/addins/Xml/Tests/Schema/MissingSchemaElementTestFixture.cs
index b5e5b77a8a..0736cbe62b 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/MissingSchemaElementTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
[TestFixture]
public class MissingSchemaElementTestFixture : SchemaTestFixtureBase
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs b/main/src/addins/Xml/Tests/Schema/NamespaceCompletionTestFixture.cs
index 415d3cb0e1..0cf108baec 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/NamespaceCompletionTestFixture.cs
@@ -1,9 +1,9 @@
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using MonoDevelop.Ide.CodeCompletion;
using NUnit.Framework;
using System.IO;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// The collection of schemas should provide completion data for the
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs b/main/src/addins/Xml/Tests/Schema/NestedAttributeGroupRefTestFixture.cs
index a8a22b8b10..fcb65fb900 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/NestedAttributeGroupRefTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Element that uses an attribute group ref.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs b/main/src/addins/Xml/Tests/Schema/NestedChoiceTestFixture.cs
index ba7a905192..3323065312 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/NestedChoiceTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that nested schema choice elements are handled.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs b/main/src/addins/Xml/Tests/Schema/NestedElementSchemaTestFixture.cs
index 6a74b8552f..20e01b0c72 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/NestedElementSchemaTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
[TestFixture]
public class NestedElementSchemaTestFixture : SchemaTestFixtureBase
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs b/main/src/addins/Xml/Tests/Schema/NestedSequenceTestFixture.cs
index 7c2958d62f..c4b24ce395 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/NestedSequenceTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that nested schema sequence elements are handled. This
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs b/main/src/addins/Xml/Tests/Schema/ReferencedElementsTestFixture.cs
index 88cc6479b5..125925b3c5 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/ReferencedElementsTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
[TestFixture]
public class ReferencedElementsTestFixture : SchemaTestFixtureBase
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs b/main/src/addins/Xml/Tests/Schema/RestrictionElementTestFixture.cs
index 0a6053f8e8..44e3075cee 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/RestrictionElementTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests complex content restriction elements.
@@ -27,7 +27,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
annotationChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
// Get choice child elements.
- path.Elements.RemoveLast();
+ path.Elements.RemoveAt (path.Elements.Count - 1);
path.Elements.Add(new QualifiedName("choice", "http://www.w3.org/2001/XMLSchema"));
choiceChildElements = SchemaCompletionData.GetChildElementCompletionData(path);
}
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs b/main/src/addins/Xml/Tests/Schema/SchemaAssociationTests.cs
index 2ff5377578..c9603ff192 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs
+++ b/main/src/addins/Xml/Tests/Schema/SchemaAssociationTests.cs
@@ -1,11 +1,10 @@
-using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
using System.IO;
using System.Text;
using System.Xml;
+using MonoDevelop.Xml.Editor;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
[TestFixture]
public class SchemaAssociationTests
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs b/main/src/addins/Xml/Tests/Schema/SchemaTestFixtureBase.cs
index 731c9c13a9..5997a316bd 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs
+++ b/main/src/addins/Xml/Tests/Schema/SchemaTestFixtureBase.cs
@@ -1,11 +1,11 @@
using ICSharpCode.NRefactory.Completion;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
using System;
using System.IO;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
[TestFixture]
public abstract class SchemaTestFixtureBase
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs b/main/src/addins/Xml/Tests/Schema/SequencedChoiceTestFixture.cs
index 56f0c88ebc..1d043b61c9 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/SequencedChoiceTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that nested schema choice elements inside a sequence are handled.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs b/main/src/addins/Xml/Tests/Schema/SimpleContentWithAttributeTestFixture.cs
index a9d29ac4bc..b83fc5e7e2 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/SimpleContentWithAttributeTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Element that is a simple content type.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs b/main/src/addins/Xml/Tests/Schema/SingleElementSchemaTestFixture.cs
index 62ba570e03..46cf1e2c70 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/SingleElementSchemaTestFixture.cs
@@ -1,8 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Retrieve completion data for an xml schema that specifies only one
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs b/main/src/addins/Xml/Tests/Schema/TwoElementSchemaTestFixture.cs
index 7d8b7f6c8d..3d101f7e23 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/TwoElementSchemaTestFixture.cs
@@ -1,7 +1,8 @@
using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Two elements defined in a schema, one uses the 'type' attribute to
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs b/main/src/addins/Xml/Tests/Schema/Uri/GetUriTestFixture.cs
index c635f94616..09b261034a 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/Uri/GetUriTestFixture.cs
@@ -1,8 +1,8 @@
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
using System;
-namespace MonoDevelop.XmlEditor.Tests.Schema.Uri
+namespace MonoDevelop.Xml.Tests.Schema.Uri
{
/// <summary>
/// Tests the <see cref="XmlSchemaCompletionData.GetUri"/> method.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs b/main/src/addins/Xml/Tests/Schema/XhtmlStrictSchemaTestFixture.cs
index dc6cc269f8..1082b73df2 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/XhtmlStrictSchemaTestFixture.cs
@@ -1,11 +1,10 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor.Completion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
+using MonoDevelop.Xml.Tests.Utils;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests the xhtml1-strict schema.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs b/main/src/addins/Xml/Tests/Schema/XmlSchemaNamespaceTests.cs
index b98ab6ec46..e1954c8c64 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs
+++ b/main/src/addins/Xml/Tests/Schema/XmlSchemaNamespaceTests.cs
@@ -1,8 +1,8 @@
-using MonoDevelop.XmlEditor;
+using MonoDevelop.Xml.Editor;
using NUnit.Framework;
using System;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests that the standard W3C namespace for XSD files is recognised.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs b/main/src/addins/Xml/Tests/Schema/XsdSchemaTestFixture.cs
index 8f171989db..2a436d7e41 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs
+++ b/main/src/addins/Xml/Tests/Schema/XsdSchemaTestFixture.cs
@@ -1,11 +1,10 @@
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using NUnit.Framework;
using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
+using MonoDevelop.Xml.Tests.Utils;
-namespace MonoDevelop.XmlEditor.Tests.Schema
+namespace MonoDevelop.Xml.Tests.Schema
{
/// <summary>
/// Tests the xsd schema.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs b/main/src/addins/Xml/Tests/Utils/ResourceManager.cs
index 493e495df6..5d3203b743 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs
+++ b/main/src/addins/Xml/Tests/Utils/ResourceManager.cs
@@ -2,7 +2,7 @@ using System.IO;
using System.Reflection;
using System.Xml;
-namespace MonoDevelop.XmlEditor.Tests.Utils
+namespace MonoDevelop.Xml.Tests.Utils
{
/// <summary>
/// Returns strings from the embedded test resources.
diff --git a/main/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs b/main/src/addins/Xml/Tests/Utils/SchemaIncludeTestFixtureHelper.cs
index bdb17999d9..d707dd0104 100755..100644
--- a/main/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs
+++ b/main/src/addins/Xml/Tests/Utils/SchemaIncludeTestFixtureHelper.cs
@@ -1,10 +1,10 @@
-using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.Xml.Completion;
using System;
using System.IO;
using System.Text;
using System.Xml;
-namespace MonoDevelop.XmlEditor.Tests.Utils
+namespace MonoDevelop.Xml.Tests.Utils
{
/// <summary>
/// Helper class when testing a schema which includes
diff --git a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-16.png b/main/src/addins/Xml/icons/light/prefs-xml-16.png
index fc6082d1cb..fc6082d1cb 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-16.png
+++ b/main/src/addins/Xml/icons/light/prefs-xml-16.png
Binary files differ
diff --git a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-16@2x.png b/main/src/addins/Xml/icons/light/prefs-xml-16@2x.png
index 0aef2fef5d..0aef2fef5d 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-16@2x.png
+++ b/main/src/addins/Xml/icons/light/prefs-xml-16@2x.png
Binary files differ
diff --git a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-schemas-16.png b/main/src/addins/Xml/icons/light/prefs-xml-schemas-16.png
index fc6082d1cb..fc6082d1cb 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-schemas-16.png
+++ b/main/src/addins/Xml/icons/light/prefs-xml-schemas-16.png
Binary files differ
diff --git a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-schemas-16@2x.png b/main/src/addins/Xml/icons/light/prefs-xml-schemas-16@2x.png
index 0aef2fef5d..0aef2fef5d 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/icons/light/prefs-xml-schemas-16@2x.png
+++ b/main/src/addins/Xml/icons/light/prefs-xml-schemas-16@2x.png
Binary files differ
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/MonoDevelopAddIn.xsd b/main/src/addins/Xml/schemas/MonoDevelopAddIn.xsd
index c05f35bc1f..c05f35bc1f 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/MonoDevelopAddIn.xsd
+++ b/main/src/addins/Xml/schemas/MonoDevelopAddIn.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/W3C-License.html b/main/src/addins/Xml/schemas/W3C-License.html
index 2edbb1ad27..2edbb1ad27 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/W3C-License.html
+++ b/main/src/addins/Xml/schemas/W3C-License.html
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/XMLSchema.xsd b/main/src/addins/Xml/schemas/XMLSchema.xsd
index 5acc282d5e..5acc282d5e 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/XMLSchema.xsd
+++ b/main/src/addins/Xml/schemas/XMLSchema.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/appconfig.xsd b/main/src/addins/Xml/schemas/appconfig.xsd
index 00ddaf09c9..00ddaf09c9 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/appconfig.xsd
+++ b/main/src/addins/Xml/schemas/appconfig.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/manifest.xsd b/main/src/addins/Xml/schemas/manifest.xsd
index 060dbec5f5..060dbec5f5 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/manifest.xsd
+++ b/main/src/addins/Xml/schemas/manifest.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/nant.xsd b/main/src/addins/Xml/schemas/nant.xsd
index 19118d1bc3..19118d1bc3 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/nant.xsd
+++ b/main/src/addins/Xml/schemas/nant.xsd
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/readme.txt b/main/src/addins/Xml/schemas/readme.txt
index a6158b05b9..a6158b05b9 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/readme.txt
+++ b/main/src/addins/Xml/schemas/readme.txt
diff --git a/main/src/addins/MonoDevelop.XmlEditor/schemas/xslt.xsd b/main/src/addins/Xml/schemas/xslt.xsd
index 45f77399af..45f77399af 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/schemas/xslt.xsd
+++ b/main/src/addins/Xml/schemas/xslt.xsd
diff --git a/main/tests/UnitTests/UnitTests.csproj b/main/tests/UnitTests/UnitTests.csproj
index ab2d1674f6..502d31e604 100644
--- a/main/tests/UnitTests/UnitTests.csproj
+++ b/main/tests/UnitTests/UnitTests.csproj
@@ -82,11 +82,6 @@
<Name>MonoDevelop.Ide</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\src\addins\MonoDevelop.XmlEditor\MonoDevelop.XmlEditor.csproj">
- <Project>{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}</Project>
- <Name>MonoDevelop.XmlEditor</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\src\addins\CSharpBinding\CSharpBinding.csproj">
<Project>{07CC7654-27D6-421D-A64C-0FFA40456FA2}</Project>
<Name>CSharpBinding</Name>