Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2016-03-03 10:21:58 +0000
committerGerrit Code Review @ Eclipse.org2016-05-27 14:01:29 +0000
commitc7f605b127748ccab1139c5fb22a141ed33251e4 (patch)
tree2e91181827f99701d3a90887f985e590d52bf93b /plugins/infra/types
parent17820dbc4c7575547ffc77fcc4ac42c475c61e60 (diff)
downloadorg.eclipse.papyrus-c7f605b127748ccab1139c5fb22a141ed33251e4.tar.gz
org.eclipse.papyrus-c7f605b127748ccab1139c5fb22a141ed33251e4.tar.xz
org.eclipse.papyrus-c7f605b127748ccab1139c5fb22a141ed33251e4.zip
Bug 488674: UI freeze in NewPapyrusProjectWizard.performFinish - URIHandlerImpl.createInputStream (7.6s)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=488674 - Added some loadOptions to the ElementTypeSetConfigurationRegistry's resourceSet - Deactivated the XMLResource.OPTION_USE_PACKAGE_NS_URI_AS_LOCATION in order to disable the URI to HTTP connection Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/infra/types')
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.core/src/org/eclipse/papyrus/infra/types/core/registries/ElementTypeSetConfigurationRegistry.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/infra/types/org.eclipse.papyrus.infra.types.core/src/org/eclipse/papyrus/infra/types/core/registries/ElementTypeSetConfigurationRegistry.java b/plugins/infra/types/org.eclipse.papyrus.infra.types.core/src/org/eclipse/papyrus/infra/types/core/registries/ElementTypeSetConfigurationRegistry.java
index 910d7aaabc5..22136866b8a 100644
--- a/plugins/infra/types/org.eclipse.papyrus.infra.types.core/src/org/eclipse/papyrus/infra/types/core/registries/ElementTypeSetConfigurationRegistry.java
+++ b/plugins/infra/types/org.eclipse.papyrus.infra.types.core/src/org/eclipse/papyrus/infra/types/core/registries/ElementTypeSetConfigurationRegistry.java
@@ -33,6 +33,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.gmf.runtime.emf.type.core.ClientContextManager;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeUtil;
@@ -301,7 +302,7 @@ public class ElementTypeSetConfigurationRegistry {
for (ElementTypeSetConfiguration elementTypeSetConfiguration : elementTypeSetConfigurations.get(contexId).values()) {
TreeIterator<EObject> it = elementTypeSetConfiguration.eAllContents();
while (it.hasNext()) {
- EObject element = (EObject) it.next();
+ EObject element = it.next();
if (element instanceof AdviceConfiguration) {
adviceToCheck.add((AdviceConfiguration) element);
}
@@ -313,7 +314,7 @@ public class ElementTypeSetConfigurationRegistry {
for (ElementTypeSetConfiguration elementTypeSetConfiguration : registrableElementTypeSetConfiguration) {
TreeIterator<EObject> it = elementTypeSetConfiguration.eAllContents();
while (it.hasNext()) {
- EObject element = (EObject) it.next();
+ EObject element = it.next();
if (element instanceof AdviceConfiguration) {
adviceToCheck.add((AdviceConfiguration) element);
@@ -413,7 +414,7 @@ public class ElementTypeSetConfigurationRegistry {
for (ElementTypeSetConfiguration elementTypeSetConfiguration : elementTypeSetConfigurations.get(contextId).values()) {
TreeIterator<EObject> it = elementTypeSetConfiguration.eAllContents();
while (it.hasNext()) {
- EObject element = (EObject) it.next();
+ EObject element = it.next();
if (element instanceof AdviceConfiguration) {
advices.add((AdviceConfiguration) element);
}
@@ -562,6 +563,11 @@ public class ElementTypeSetConfigurationRegistry {
protected ResourceSet createResourceSet() {
ResourceSet set = new ResourceSetImpl();
+ // Bug 488674 - Safe load and disable the URI to HTTP connection
+ set.getLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, true);
+ set.getLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
+ set.getLoadOptions().put(XMLResource.OPTION_USE_PACKAGE_NS_URI_AS_LOCATION, Boolean.FALSE);
+
return set;
}

Back to the top