diff options
author | rschnekenbu | 2014-01-27 13:44:01 +0000 |
---|---|---|
committer | rschnekenbu | 2014-01-27 14:43:02 +0000 |
commit | e5c1fb2bfcb44e7b8df9add7158388eb79fd0873 (patch) | |
tree | d02b5bb1f8db7c712633c8d2ca86744f4d19a454 /plugins | |
parent | 1935461ae61fe3819bc347f11a79ab236d614968 (diff) | |
download | org.eclipse.papyrus-e5c1fb2bfcb44e7b8df9add7158388eb79fd0873.tar.gz org.eclipse.papyrus-e5c1fb2bfcb44e7b8df9add7158388eb79fd0873.tar.xz org.eclipse.papyrus-e5c1fb2bfcb44e7b8df9add7158388eb79fd0873.zip |
424402: [Core] Runtime deployment of the element types shall be possible
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424402
- fixed 2 NPE: palette configuration with no file to contribute and
invariant element type with a null matcher
Diffstat (limited to 'plugins')
2 files changed, 6 insertions, 3 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java index 1f1da509c57..d5f13e06fdb 100644 --- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java +++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantsemantictypeconfiguration/InvariantElementTypeFactory.java @@ -67,8 +67,11 @@ public class InvariantElementTypeFactory extends AbstractConfigurableElementType if(superMatcher !=null) { // create a composed matcher to have the matcher described by the model configuration element type and the one for the specific invariants IElementMatcher invariantMatcher = RuleConfigurationFactoryRegistry.getInstance().createMatcher(configuration.getInvariantRuleConfiguration()); - ComposedElementMatcher composedMatcher = new ComposedElementMatcher(Arrays.asList(superMatcher, invariantMatcher)); - return composedMatcher; + if(invariantMatcher!=null) { + ComposedElementMatcher composedMatcher = new ComposedElementMatcher(Arrays.asList(superMatcher, invariantMatcher)); + return composedMatcher; + } + return superMatcher; } // no configured matcher. Return the invariant one return RuleConfigurationFactoryRegistry.getInstance().createMatcher(configuration.getInvariantRuleConfiguration()); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java index 536c94a0515..5126b349a45 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java @@ -117,7 +117,7 @@ public class LocalPaletteProvider extends AbstractProvider implements IPalettePr // sub-classes could return null if(inputStream == null) { contributions = new EmptyNodeList(); - throw new IOException("Impossible to load file: " + path); + Activator.log.debug("Impossible to load file: " + path); } else { Document document = documentBuilder.parse(inputStream); contributions = document.getChildNodes(); |