Commit 54a7c69b authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

initial

parent 407c94d3
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="generated-src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.fortiss.af3.refinement</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Refinement of Components based on Test Cases
Bundle-SymbolicName: org.fortiss.af3.refinement
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.fortiss.af3.refinement.Activator
Require-Bundle: edu.tum.cs.af3.application;bundle-version="0.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: edu.tum.cs.af3.logicalarchitecture.model,
edu.tum.cs.ccts.model.base.compose,
edu.tum.cs.ccts.systemstructure.compose,
org.conqat.lib.commons.reflect,
org.eclipse.emf.ecore
# <copyright>
# </copyright>
#
# $Id$
bin.includes = .,\
model/,\
icons/,\
META-INF/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
source.. = generated-src/
output.. = bin/
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model"
nsURI="http://www.fortiss.org/~af3/refinement_specification" nsPrefix="refinement_specification">
<eClassifiers xsi:type="ecore:EClass" name="RefinementSpecification" eSuperTypes="../../edu.tum.cs.ccts.common.architecture/model/systemstructure.ecore#//IComponentSpecification ../../edu.tum.cs.ccts.model.base/model/base.ecore#//IRemovable">
<eOperations name="remove" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RefinementSpecificationStaticImpl.remove(this);"/>
</eAnnotations>
</eOperations>
<eOperations name="canRemove" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return RefinementSpecificationStaticImpl.canRemove(this);"/>
</eAnnotations>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="refinedComponent" eType="ecore:EClass ../../edu.tum.cs.ccts.common.architecture/model/systemstructure.ecore#//ComponentBase"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="representationFunction"
eType="ecore:EClass ../../edu.tum.cs.ccts.common.architecture/model/systemstructure.ecore#//ComponentBase"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="interpretationFunction"
eType="ecore:EClass ../../edu.tum.cs.ccts.common.architecture/model/systemstructure.ecore#//ComponentBase"
containment="true"/>
</eClassifiers>
</ecore:EPackage>
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.fortiss.af3.refinement/generated-src"
editDirectory="/org.fortiss.af3.refinement/generated-src" editorDirectory="/org.fortiss.af3.refinement/generated-src"
modelPluginID="org.fortiss.af3.refinement" modelName="Refinement-model" testsDirectory="/org.fortiss.af3.refinement/generated-src"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
usedGenPackages="../../edu.tum.cs.ccts.editor.base/model/editor-base.genmodel#//model ../../edu.tum.cs.ccts.common.architecture/model/systemstructure.genmodel#//model ../../edu.tum.cs.ccts.model.base/model/base.genmodel#//model">
<foreignModel>refinement_specification.ecore</foreignModel>
<genPackages prefix="RefinementSpecModel" basePackage="org.fortiss.af3.refinement" disposableProviderFactory="true"
ecorePackage="refinement_specification.ecore#/" />
</genmodel:GenModel>
# <copyright>
# </copyright>
#
# $Id$
pluginName = Refinement-model Model
providerName = www.example.org
package org.fortiss.af3.refinement;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.fortiss.af3.refinement"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
package org.fortiss.af3.refinement.compose;
import org.conqat.lib.commons.reflect.ReflectionUtils;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.refinement.model.RefinementSpecification;
import edu.tum.cs.af3.logicalarchitecture.model.Channel;
import edu.tum.cs.af3.logicalarchitecture.model.Component;
import edu.tum.cs.ccts.model.base.compose.ICompositionContext;
import edu.tum.cs.ccts.systemstructure.compose.ComponentCompositorBase;
public class ComponentCompositor extends
ComponentCompositorBase<Component, Channel> {
/** {@inheritDoc} */
@Override
protected boolean canComposeSpecific(Component container,
EObject contained, ICompositionContext context) {
return ReflectionUtils.isInstanceOfAny(contained,
RefinementSpecification.class);
}
}
\ No newline at end of file
package org.fortiss.af3.refinement.model.impl;
import org.fortiss.af3.refinement.model.RefinementSpecification;
public class RefinementSpecificationStaticImpl {
/**
* Removes the refinement specification from the component and returns true;
*/
/* package */static boolean remove(RefinementSpecification spec) {
spec.setSpecificationOf(null);
return true;
}
/**
* Returns true.
*/
/* package */static boolean canRemove(
@SuppressWarnings("unused") RefinementSpecification spec) {
return true;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment