Skip to content
Snippets Groups Projects
Commit b298d113 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

removes postload extensions

refs 2553
parent 136fce05
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ import org.fortiss.tooling.kernel.introspection.items.EclipseResourceStorageServ
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 7BC189D9D2E683150E1B20948F6C4F93
* @ConQAT.Rating YELLOW Hash: 84C999BE87FC4F7D49629DA1B3F17837
*/
public final class EclipseResourceStorageProviderIntrospectionDetailsUIHandler extends
IntrospectionDetailsUIHandlerBase {
......@@ -53,9 +53,7 @@ public final class EclipseResourceStorageProviderIntrospectionDetailsUIHandler e
"Number of currently registered storage providers: " +
getInputObject().getStorageProviderList().size() + " (providing " +
getInputObject().getLoadedFiles().size() + " file[s], " +
getInputObject().getErrorFiles().size() + " erroneous). " +
"Currently registered post-load providers: " +
getInputObject().getPostLoadProviderList().size();
getInputObject().getErrorFiles().size() + " erroneous).";
return createFilteredTreeInTabFolder(parent, heading, footer, "Registered Providers");
}
......@@ -72,8 +70,8 @@ public final class EclipseResourceStorageProviderIntrospectionDetailsUIHandler e
}
/** String array of root categories. */
private final String[] ROOT_CATEGORY = new String[] {"Storage Provider", "Post-load Provider",
"Loaded Files", "Erroneous Files"};
private final String[] ROOT_CATEGORY = new String[] {"Storage Provider", "Loaded Files",
"Erroneous Files"};
/** {@inheritDoc} */
@Override
......@@ -89,12 +87,9 @@ public final class EclipseResourceStorageProviderIntrospectionDetailsUIHandler e
return getInputObject().getStorageProviderList().toArray();
}
if(ROOT_CATEGORY[1].equals(parentElement)) {
return getInputObject().getPostLoadProviderList().toArray();
}
if(ROOT_CATEGORY[2].equals(parentElement)) {
return getInputObject().getLoadedFiles().toArray();
}
if(ROOT_CATEGORY[3].equals(parentElement)) {
if(ROOT_CATEGORY[2].equals(parentElement)) {
return getInputObject().getErrorFiles().toArray();
}
return null;
......
......@@ -7,7 +7,6 @@
<extension-point id="modelStorageProvider" name="Model Storage Provider" schema="schema/modelStorageProvider.exsd"/>
<extension-point id="modelElementConstraintChecker" name="Model Element Constraint Checker" schema="schema/modelElementConstraintChecker.exsd"/>
<extension-point id="eclipseResourceStorageLocationProvider" name="Eclipse Resource Storage Location Provider" schema="schema/eclipseResourceStorageLocationProvider.exsd"/>
<extension-point id="eclipseResourcePostLoadProvider" name="Eclipse Resource Post Load Provider" schema="schema/eclipseResourcePostLoadProvider.exsd"/>
<extension-point id="modelConnectionCompositor" name="Model Connection Compositor" schema="schema/modelConnectionCompositor.exsd"/>
<extension-point id="transformationProvider" name="Transformation Provider" schema="schema/transformationProvider.exsd"/>
<extension-point id="uiMessageHandler" name="UI Message Handler" schema="schema/uiMessageHandler.exsd"/>
......
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.fortiss.tooling.kernel" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.fortiss.tooling.kernel" id="eclipseResourcePostLoadProvider" name="Eclipse Resource Post Load Provider"/>
</appinfo>
<documentation>
DEPRECATED use IPersistencyService instead.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence>
<element ref="storagePostLoadProvider" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="storagePostLoadProvider">
<complexType>
<attribute name="provider" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.fortiss.tooling.kernel.extension.IEclipseResourcePostLoadProvider"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
......@@ -58,7 +58,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.fortiss.tooling.kernel.ToolingKernelActivator;
import org.fortiss.tooling.kernel.extension.IEclipseResourcePostLoadProvider;
import org.fortiss.tooling.kernel.extension.IEclipseResourceStorageLocationProvider;
import org.fortiss.tooling.kernel.extension.IStorageProvider;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
......@@ -80,7 +79,7 @@ import org.osgi.framework.Bundle;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: BC5A41B219C8E63EBCB835612CCD0166
* @ConQAT.Rating YELLOW Hash: 369A922C7BD5B691476B472467231494
*/
public class EclipseResourceStorageService implements IEclipseResourceStorageService,
IResourceChangeListener, IResourceDeltaVisitor, IStorageProvider,
......@@ -94,21 +93,10 @@ public class EclipseResourceStorageService implements IEclipseResourceStorageSer
private static final String LOCATION_PROVIDER_CONFIGURATION_ELEMENT_NAME =
"storageLocationProvider";
/** The prototype provider extension point ID for post load providers. */
private static final String POSTLOAD_EXTENSION_POINT_NAME =
"org.fortiss.tooling.kernel.eclipseResourcePostLoadProvider";
/** The prototype provider configuration element name for post load providers. */
private static final String POSTLOAD_CONFIGURATION_ELEMENT_NAME = "storagePostLoadProvider";
/** Stores the registered storage providers. */
private final List<IEclipseResourceStorageLocationProvider> storageProviderList =
new ArrayList<IEclipseResourceStorageLocationProvider>();
/** Stores the registered post loading providers. */
private final List<IEclipseResourcePostLoadProvider> postLoadProviderList =
new ArrayList<IEclipseResourcePostLoadProvider>();
/** Cache of models loaded so far. */
private final Map<IFile, ModelContext> loadedContexts = new HashMap<IFile, ModelContext>();
......@@ -127,7 +115,6 @@ public class EclipseResourceStorageService implements IEclipseResourceStorageSer
/** Starts the storage provider. */
public void initializeService() {
setupLocationProviders();
setupPostModelLoadProviders();
searchWorkspaceForModels();
}
......@@ -309,9 +296,6 @@ public class EclipseResourceStorageService implements IEclipseResourceStorageSer
if(IMigrationService.getInstance().needMigration(mc, mc.getUnknownFeatures())) {
IMigrationService.getInstance().migrate(mc, mc.getUnknownFeatures());
}
for(IEclipseResourcePostLoadProvider provider : postLoadProviderList) {
provider.postModelLoadRun(mc);
}
}
/** Unloads the context and destroys it. */
......@@ -349,23 +333,6 @@ public class EclipseResourceStorageService implements IEclipseResourceStorageSer
}
}
/** Initializes the storage provider list from post load plugin extensions. */
private void setupPostModelLoadProviders() {
for(IConfigurationElement ce : getConfigurationElements(POSTLOAD_EXTENSION_POINT_NAME,
POSTLOAD_CONFIGURATION_ELEMENT_NAME)) {
Bundle bundle = getBundle(ce);
try {
Class<?> handlerClass = loadClass(ce.getAttribute("provider"), bundle);
IEclipseResourcePostLoadProvider provider =
(IEclipseResourcePostLoadProvider)handlerClass.getConstructor()
.newInstance();
postLoadProviderList.add(provider);
} catch(Exception ex) {
error(ToolingKernelActivator.getDefault(), ex.getMessage(), ex);
}
}
}
/** {@inheritDoc} */
@Override
public List<IFile> getModelElementResources() {
......@@ -424,8 +391,8 @@ public class EclipseResourceStorageService implements IEclipseResourceStorageSer
@Override
public IIntrospectionDetailsItem getDetailsItem() {
return new EclipseResourceStorageServiceIntrospectionDetailsItem(
unmodifiableList(storageProviderList), unmodifiableList(postLoadProviderList),
unmodifiableSet(loadedContexts.keySet()), unmodifiableList(errorFiles));
unmodifiableList(storageProviderList), unmodifiableSet(loadedContexts.keySet()),
unmodifiableList(errorFiles));
}
/** {@inheritDoc} */
......
......@@ -21,7 +21,6 @@ import java.util.Collection;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.fortiss.tooling.kernel.extension.IEclipseResourcePostLoadProvider;
import org.fortiss.tooling.kernel.extension.IEclipseResourceStorageLocationProvider;
import org.fortiss.tooling.kernel.extension.data.ModelStorageError;
import org.fortiss.tooling.kernel.introspection.IIntrospectionDetailsItem;
......@@ -33,7 +32,7 @@ import org.fortiss.tooling.kernel.service.IEclipseResourceStorageService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 312122A5EBA9A3ABBAFC6F1C8EA3CAA8
* @ConQAT.Rating YELLOW Hash: 6C1CCCAD57BAD571A65A2A221C2585DA
*/
public final class EclipseResourceStorageServiceIntrospectionDetailsItem implements
IIntrospectionDetailsItem {
......@@ -41,9 +40,6 @@ public final class EclipseResourceStorageServiceIntrospectionDetailsItem impleme
/** Stores the registered storage providers. */
private final List<IEclipseResourceStorageLocationProvider> storageProviderList;
/** Stores the registered post loading providers. */
private final List<IEclipseResourcePostLoadProvider> postLoadProviderList;
/** Cache of models loaded so far. */
private final Collection<IFile> loadedContexts;
......@@ -53,10 +49,8 @@ public final class EclipseResourceStorageServiceIntrospectionDetailsItem impleme
/** Constructor. */
public EclipseResourceStorageServiceIntrospectionDetailsItem(
List<IEclipseResourceStorageLocationProvider> storageProviderList,
List<IEclipseResourcePostLoadProvider> postLoadProviderList,
Collection<IFile> loadedContexts, List<ModelStorageError> errorFiles) {
this.storageProviderList = storageProviderList;
this.postLoadProviderList = postLoadProviderList;
this.loadedContexts = loadedContexts;
this.errorFiles = errorFiles;
}
......@@ -66,11 +60,6 @@ public final class EclipseResourceStorageServiceIntrospectionDetailsItem impleme
return storageProviderList;
}
/** Returns the post load provider list. */
public List<IEclipseResourcePostLoadProvider> getPostLoadProviderList() {
return postLoadProviderList;
}
/** Returns the loaded contexts. */
public Collection<IFile> getLoadedFiles() {
return loadedContexts;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment