[159203] Entering invalid schema import location in XMLExamples hangs Eclipse - Approved
diff --git a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
index 3a9ae71..4a98244 100644
--- a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %_UI_PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.xsd.ui; singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.101.qualifier
Bundle-Activator: org.eclipse.wst.xsd.ui.internal.editor.XSDEditorPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java
index e9ddefe..f70fb4e 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java
@@ -33,6 +33,7 @@
Button wizardButton;
StyledText errorText;
Color red;
+ protected boolean isValidSchemaLocation;
// TODO: common up code with XSDSelectIncludeFileWizard
public void doHandleEvent(Event event)
@@ -42,7 +43,7 @@
if (event.widget == schemaLocationText)
{
String errorMessage = ""; //$NON-NLS-1$
- boolean isValidSchemaLocation = true;
+ isValidSchemaLocation = true;
String xsdModelFile = schemaLocationText.getText();
String namespace = ""; //$NON-NLS-1$
XSDSchema externalSchema = null;
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java
index bdac253..c1c030d 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java
@@ -347,8 +347,8 @@
}
}
- maxCombo.setEnabled(!xsdElementDeclaration.isGlobal());
- minCombo.setEnabled(!xsdElementDeclaration.isGlobal());
+ maxCombo.setEnabled(!xsdElementDeclaration.isGlobal() || isElementReference);
+ minCombo.setEnabled(!xsdElementDeclaration.isGlobal() || isElementReference);
}
}
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDImportSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDImportSection.java
index c60d571..1c7df7e 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDImportSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDImportSection.java
@@ -322,7 +322,7 @@
if (event.widget == prefixText)
{
String newPrefix = prefixText.getText();
- if (oldPrefixValue.equals(newPrefix))
+ if (oldPrefixValue.equals(newPrefix) || !isValidSchemaLocation)
return;
Map map = xsdSchema.getQNamePrefixToNamespaceMap();
String key = prefixText.getText();