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 20 years ago
parent
commit
417f61d4d1
  1. 12
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

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

@ -39,7 +39,7 @@ namespace ICSharpCode.XmlEditor @@ -39,7 +39,7 @@ namespace ICSharpCode.XmlEditor
XmlEditorControl xmlEditor = new XmlEditorControl();
FileSystemWatcher watcher;
bool wasChangedExternally;
MessageViewCategory category;
static MessageViewCategory category;
string stylesheetFileName;
public XmlView()
@ -116,9 +116,15 @@ namespace ICSharpCode.XmlEditor @@ -116,9 +116,15 @@ namespace ICSharpCode.XmlEditor
settings.ValidationFlags = XmlSchemaValidationFlags.None;
settings.XmlResolver = null;
foreach (XmlSchemaCompletionData schemaData in XmlSchemaManager.SchemaCompletionDataItems) {
XmlSchemaCompletionData schemaData = null;
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);
@ -622,7 +628,7 @@ namespace ICSharpCode.XmlEditor @@ -622,7 +628,7 @@ namespace ICSharpCode.XmlEditor
void ShowErrorList()
{
if (TaskService.TaskCount > 0) {
if (TaskService.SomethingWentWrong) {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorList)).BringPadToFront();
}
}

Loading…
Cancel
Save