aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Haensli2014-04-25 12:36:50 (EDT)
committerLars Vogel2014-04-25 12:46:10 (EDT)
commit7dbcdcc28c49efb4da854e1de4312b7492bf7240 (patch)
treeef1fce8f589f9874ba31a31c67f7fd5a133e7a2a
parentdda1311f62cc2f883a77ef18ddcc907446e1df19 (diff)
downloadeclipse.platform.ui-7dbcdcc28c49efb4da854e1de4312b7492bf7240.zip
eclipse.platform.ui-7dbcdcc28c49efb4da854e1de4312b7492bf7240.tar.gz
eclipse.platform.ui-7dbcdcc28c49efb4da854e1de4312b7492bf7240.tar.bz2
Bug 431460 - Improve ModelAssembler error messages refs/changes/76/25576/2
Change-Id: I11d9f15eb434491b3a62e95ba5bbe7bedc55f9df Signed-off-by: Jan Haensli <jan.haensli@inventage.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java
index 7f1c8f6..8dc71e4 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelAssembler.java
@@ -113,25 +113,23 @@ public class ModelAssembler {
ResourceSet resourceSet = applicationResource.getResourceSet();
IContributor contributor = ce.getContributor();
String attrURI = ce.getAttribute("uri"); //$NON-NLS-1$
+ String bundleName = contributor.getName();
if (attrURI == null) {
- logger.warn("Unable to find location for the model extension \"{0}\"", //$NON-NLS-1$
- contributor.getName());
+ logger.warn("Unable to find location for the model extension \"{0}\"", bundleName); //$NON-NLS-1$
return;
}
URI uri;
-
try {
// check if the attrURI is already a platform URI
if (URIHelper.isPlatformURI(attrURI)) {
uri = URI.createURI(attrURI);
} else {
- String bundleName = contributor.getName();
String path = bundleName + '/' + attrURI;
uri = URI.createPlatformPluginURI(path, false);
}
} catch (RuntimeException e) {
- logger.warn(e, "Model extension has invalid location"); //$NON-NLS-1$
+ logger.warn(e, "Invalid location \"" + attrURI + "\" of model extension \"" + bundleName + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return;
}
@@ -140,7 +138,7 @@ public class ModelAssembler {
try {
resource = resourceSet.getResource(uri, true);
} catch (RuntimeException e) {
- logger.warn(e, "Unable to read model extension from " + uri.toString()); //$NON-NLS-1$
+ logger.warn(e, "Unable to read model extension from \"" + uri.toString() +"\" of \"" + bundleName + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return;
}
@@ -152,8 +150,7 @@ public class ModelAssembler {
Object extensionRoot = contents.get(0);
if (!(extensionRoot instanceof MModelFragments)) {
- logger.warn("Unable to create model extension \"{0}\"", //$NON-NLS-1$
- contributor.getName());
+ logger.warn("Unable to create model extension \"{0}\"", bundleName); //$NON-NLS-1$
return;
}
boolean checkExist = !initial && NOTEXISTS.equals(ce.getAttribute("apply")); //$NON-NLS-1$
@@ -311,7 +308,7 @@ public class ModelAssembler {
@Override
public void run() {
if (internalFeature.isMany()) {
- System.err.println("Replacing"); //$NON-NLS-1$
+ logger.error("Replacing"); //$NON-NLS-1$
@SuppressWarnings("unchecked")
List<Object> l = (List<Object>) interalTarget.eGet(internalFeature);
int index = l.indexOf(internalImportObject);