Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/META-INF/MANIFEST.MF3
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/src/org/eclipse/papyrus/customization/properties/model/xwt/resource/XWTResource.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/META-INF/MANIFEST.MF
index 087016a33f4..624751e2ea8 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/META-INF/MANIFEST.MF
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.views.properties.model;bundle-version="0.9.0",
org.eclipse.papyrus.infra.core.log;bundle-version="0.9.0",
org.eclipse.wst.xml.core;bundle-version="1.1.600",
- org.eclipse.core.resources;bundle-version="3.7.100"
+ org.eclipse.core.resources;bundle-version="3.7.100",
+ org.eclipse.e4.xwt.tools.ui;bundle-version="0.9.0"
Export-Package: org.eclipse.papyrus.customization.properties.model.xwt.resource
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/src/org/eclipse/papyrus/customization/properties/model/xwt/resource/XWTResource.java b/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/src/org/eclipse/papyrus/customization/properties/model/xwt/resource/XWTResource.java
index 2ec3bb2465b..79640834d13 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/src/org/eclipse/papyrus/customization/properties/model/xwt/resource/XWTResource.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt/src/org/eclipse/papyrus/customization/properties/model/xwt/resource/XWTResource.java
@@ -120,6 +120,10 @@ public class XWTResource extends ResourceImpl {
@Override
protected void doSave(OutputStream outputStream, Map<?, ?> options) throws IOException {
try {
+ if(getContents().isEmpty()) {
+ Activator.log.warn("Cannot save an Empty XWT resource : " + getURI());
+ return;
+ }
Root root = uiSectionToXML((CompositeWidget)getContents().get(0));
xmlResource.getContents().clear();
xmlResource.getContents().add(root);

Back to the top