Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-04-08 12:00:38 -0400
committerChristian W. Damus2014-04-15 13:49:12 -0400
commita69ae2b062345500a8aefc6c90d5795ecda3302b (patch)
tree4d5a41c921dc5ab0436e7e389b62c50d548d02ac /plugins/views/org.eclipse.papyrus.views.search
parentf12a871dde88d2ea09453b757daf02ec4847bc5a (diff)
downloadorg.eclipse.papyrus-a69ae2b062345500a8aefc6c90d5795ecda3302b.tar.gz
org.eclipse.papyrus-a69ae2b062345500a8aefc6c90d5795ecda3302b.tar.xz
org.eclipse.papyrus-a69ae2b062345500a8aefc6c90d5795ecda3302b.zip
431953: Stereotype garbage left in .uml file after removing profile (crash reason?)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=431953 Refactor the initialization of the ModelSet service so that its own service factory associates it with the service registry (removing the additional service-factory that did this). This introduces a new concept of service adapters that can externally provide a POJO service instance with the service lifecycle hooks, for POJOs that are injected into the service registry by a client and not created by a factory. Non-POJO services and factory-created services do not need this because they have the service lifecycle built-in. Update the CoreMultiDiagramEditor to start itself early to let other services such as the model set find it in the registry. Fix an NPE in the abstract editor triggered by the service registry's attempt to obtain a service adapter from it.
Diffstat (limited to 'plugins/views/org.eclipse.papyrus.views.search')
-rw-r--r--plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeEntry.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeEntry.java b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeEntry.java
index 51e3ccdfbd3..3a7c9ae311b 100644
--- a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeEntry.java
+++ b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeEntry.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST and others.
- *
+ * Copyright (c) 2013, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +10,7 @@
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA LIST) - Fix leaking of all UML models in search results
* Christian W. Damus (CEA LIST) - Replace workspace IResource dependency with URI for CDO compatibility
+ * Christian W. Damus (CEA) - bug 431953 (fix start-up of selective services to require only their dependencies)
*
*****************************************************************************/
package org.eclipse.papyrus.views.search.scope;
@@ -27,7 +27,6 @@ import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.EditorUtils;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceInitializerService;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.services.openelement.service.OpenElementService;
@@ -144,8 +143,7 @@ public class ScopeEntry {
modelSet = ModelUtils.openResource(getResourceURI());
getServicesRegistry().add(ModelSet.class, 10, modelSet);
- getServicesRegistry().add(ServiceUtilsForResourceInitializerService.class, 10, new ServiceUtilsForResourceInitializerService());
- getServicesRegistry().startServicesByClassKeys(ModelSet.class, ServiceUtilsForResourceInitializerService.class);
+ getServicesRegistry().startServicesByClassKeys(ModelSet.class);
} catch (ModelMultiException modelMultiException) {
Activator.log.error(Messages.ScopeEntry_1 + this.getResourceURI(), modelMultiException);
} catch (ServiceMultiException e1) {

Back to the top