Browse Source

Schema errors in task list now use the schema filename. Fixed problem where each XmlView was creating its own output window category.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@632 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 21 years ago
parent
commit
417f61d4d1
  1. 14
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

14
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -39,7 +39,7 @@ namespace ICSharpCode.XmlEditor
XmlEditorControl xmlEditor = new XmlEditorControl(); XmlEditorControl xmlEditor = new XmlEditorControl();
FileSystemWatcher watcher; FileSystemWatcher watcher;
bool wasChangedExternally; bool wasChangedExternally;
MessageViewCategory category; static MessageViewCategory category;
string stylesheetFileName; string stylesheetFileName;
public XmlView() public XmlView()
@ -116,8 +116,14 @@ namespace ICSharpCode.XmlEditor
settings.ValidationFlags = XmlSchemaValidationFlags.None; settings.ValidationFlags = XmlSchemaValidationFlags.None;
settings.XmlResolver = null; settings.XmlResolver = null;
foreach (XmlSchemaCompletionData schemaData in XmlSchemaManager.SchemaCompletionDataItems) { XmlSchemaCompletionData schemaData = null;
settings.Schemas.Add(schemaData.Schema); try {
for (int i = 0; i < XmlSchemaManager.SchemaCompletionDataItems.Count; ++i) {
schemaData = XmlSchemaManager.SchemaCompletionDataItems[i];
settings.Schemas.Add(schemaData.Schema);
}
} catch (XmlSchemaException ex) {
DisplayValidationError(schemaData.FileName, ex.Message, ex.LinePosition - 1, ex.LineNumber - 1);
} }
XmlReader reader = XmlReader.Create(xmlReader, settings); XmlReader reader = XmlReader.Create(xmlReader, settings);
@ -622,7 +628,7 @@ namespace ICSharpCode.XmlEditor
void ShowErrorList() void ShowErrorList()
{ {
if (TaskService.TaskCount > 0) { if (TaskService.SomethingWentWrong) {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorList)).BringPadToFront(); WorkbenchSingleton.Workbench.GetPad(typeof(ErrorList)).BringPadToFront();
} }
} }

Loading…
Cancel
Save