Skip to content
Snippets Groups Projects
Commit f168c6cb authored by Sebastian Krings's avatar Sebastian Krings
Browse files

tried to move unit analysis to its own plugin. there are remaining references...

tried to move unit analysis to its own plugin. there are remaining references in the translation/core.
parent 48f77a16
Branches
Tags
No related merge requests found
Showing
with 242 additions and 121 deletions
......@@ -23,17 +23,4 @@
class="de.prob.core.StaticListenerRegistry">
</listener>
</extension>
<extension
point="org.rodinp.core.attributeTypes">
<attributeType
id="unitPragmaAttribute"
kind="string"
name="Content of a unit Pragma to send to ProB">
</attributeType>
<attributeType
id="inferredUnitPragmaAttribute"
kind="string"
name="Content of a unit Pragma received from ProB">
</attributeType>
</extension>
</plugin>
......@@ -54,7 +54,6 @@ import de.be4.classicalb.core.parser.node.PPredicate;
import de.be4.classicalb.core.parser.node.PSet;
import de.be4.classicalb.core.parser.node.TIdentifierLiteral;
import de.hhu.stups.sablecc.patch.SourcePosition;
import de.prob.core.internal.Activator;
import de.prob.core.translator.TranslationFailedException;
import de.prob.core.translator.pragmas.IPragma;
import de.prob.core.translator.pragmas.UnitPragma;
......@@ -133,7 +132,7 @@ public final class ContextTranslator extends AbstractComponentTranslator {
private void collectPragmas() throws RodinDBException {
// unit pragma, attached to constants
final IAttributeType.String UNITATTRIBUTE = RodinCore
.getStringAttrType(Activator.PLUGIN_ID + ".unitPragmaAttribute");
.getStringAttrType("de.prob.units.unitPragmaAttribute");
final ISCConstant[] constants = context.getSCConstants();
......
......@@ -69,7 +69,6 @@ import de.be4.classicalb.core.parser.node.PPredicate;
import de.be4.classicalb.core.parser.node.PSubstitution;
import de.be4.classicalb.core.parser.node.PWitness;
import de.be4.classicalb.core.parser.node.TIdentifierLiteral;
import de.prob.core.internal.Activator;
import de.prob.core.translator.TranslationFailedException;
import de.prob.core.translator.pragmas.IPragma;
import de.prob.core.translator.pragmas.UnitPragma;
......@@ -184,7 +183,7 @@ public class ModelTranslator extends AbstractComponentTranslator {
private void collectPragmas() throws RodinDBException {
// unit pragma, attached to constants
final IAttributeType.String UNITATTRIBUTE = RodinCore
.getStringAttrType(Activator.PLUGIN_ID + ".unitPragmaAttribute");
.getStringAttrType("de.prob.units.unitPragmaAttribute");
final IVariable[] variables = origin.getVariables();
......
......@@ -10,8 +10,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
de.prob.core;bundle-version="[9.3.0,9.4.0)",
org.eventb.core;bundle-version="[2.1.0,2.6.0)",
org.eclipse.core.expressions;bundle-version="[3.4.101,4.0.0)",
org.eclipse.gef;bundle-version="[3.5.0,4.0.0)",
org.eventb.ui;bundle-version="[2.1.0,2.6.0)"
org.eclipse.gef;bundle-version="[3.5.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: HHU Düsseldorf STUPS Group
Bundle-Activator: de.prob.ui.ProbUiPlugin
......
......@@ -355,10 +355,6 @@
id="de.prob.command.startCspAnimation"
name="Start CSP Animation">
</command>
<command
id="de.prob.ui.startunitanalysis"
name="Analyse Physical Units">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
......@@ -749,42 +745,6 @@
</with>
</enabledWhen>
</handler>
<handler
commandId="de.prob.ui.startunitanalysis">
<class
class="de.prob.ui.eventb.StartUnitAnalysisHandler">
</class>
<enabledWhen>
<with
variable="selection">
<iterate
operator="or">
<or>
<instanceof
value="org.eventb.core.IEventBRoot">
</instanceof>
<and>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
<or>
<test
forcePluginActivation="true"
property="org.eclipse.core.resources.extension"
value="bum">
</test>
<test
forcePluginActivation="true"
property="org.eclipse.core.resources.extension"
value="buc">
</test>
</or>
</and>
</or>
</iterate>
</with>
</enabledWhen>
</handler>
<!-- <handler
commandId="de.prob.ui.startdmc">
<class
......@@ -1016,23 +976,6 @@
</with>
</visibleWhen>
</command>
<command
commandId="de.prob.ui.startunitanalysis"
icon="icons/prob.png"
label="Analyse Physical Units"
style="push">
<visibleWhen>
<with
variable="selection">
<iterate
operator="or">
<instanceof
value="org.eventb.core.IEventBRoot">
</instanceof>
</iterate>
</with>
</visibleWhen>
</command>
<!-- <command
commandId="de.prob.ui.startdmc"
icon="icons/prob.png"
......@@ -1252,43 +1195,4 @@
</variable>
</sourceProvider>
</extension>
<extension
point="org.eventb.ui.editorItems">
<textAttribute
class="de.prob.ui.pragmas.UnitPragmaAttribute"
expandsHorizontally="true"
id="de.prob.ui.unitPragmaAttribute"
isMath="true"
prefix="Physical Unit:"
style="de.prob.ui.unitPragmaAttribute"
typeId="de.prob.core.unitPragmaAttribute">
</textAttribute>
<attributeRelation
elementTypeId="org.eventb.core.variable">
<attributeReference
descriptionId="de.prob.ui.unitPragmaAttribute">
</attributeReference>
<attributeReference
descriptionId="de.prob.ui.inferredUnitPragmaAttribute">
</attributeReference>
</attributeRelation>
<attributeRelation
elementTypeId="org.eventb.core.constant">
<attributeReference
descriptionId="de.prob.ui.unitPragmaAttribute">
</attributeReference>
<attributeReference
descriptionId="de.prob.ui.inferredUnitPragmaAttribute">
</attributeReference>
</attributeRelation>
<textAttribute
class="de.prob.ui.pragmas.InferredUnitPragmaAttribute"
expandsHorizontally="true"
id="de.prob.ui.inferredUnitPragmaAttribute"
isMath="true"
prefix="Inferred Physical Unit:"
style="de.prob.ui.inferredUnitPragmaAttribute"
typeId="de.prob.core.inferredUnitPragmaAttribute">
</textAttribute>
</extension>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<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>de.prob.units</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>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Units
Bundle-SymbolicName: de.prob.units;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: de.prob.units.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
de.prob.core;bundle-version="9.3.0",
org.eventb.ui;bundle-version="2.5.0",
de.prob.ui;bundle-version="7.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
de.prob.units/icons/unit_analysis.png

3.51 KiB

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eventb.ui.editorItems">
<textAttribute
class="de.prob.units.pragmas.UnitPragmaAttribute"
expandsHorizontally="true"
id="de.prob.units.unitPragmaAttribute"
isMath="true"
prefix="Physical Unit:"
style="de.prob.units.unitPragmaAttribute"
typeId="de.prob.units.unitPragmaAttribute">
</textAttribute>
<attributeRelation
elementTypeId="org.eventb.core.variable">
<attributeReference
descriptionId="de.prob.units.unitPragmaAttribute">
</attributeReference>
<attributeReference
descriptionId="de.prob.units.inferredUnitPragmaAttribute">
</attributeReference>
</attributeRelation>
<attributeRelation
elementTypeId="org.eventb.core.constant">
<attributeReference
descriptionId="de.prob.units.unitPragmaAttribute">
</attributeReference>
<attributeReference
descriptionId="de.prob.units.inferredUnitPragmaAttribute">
</attributeReference>
</attributeRelation>
<textAttribute
class="de.prob.units.pragmas.InferredUnitPragmaAttribute"
expandsHorizontally="true"
id="de.prob.units.inferredUnitPragmaAttribute"
isMath="true"
prefix="Inferred Physical Unit:"
style="de.prob.units.inferredUnitPragmaAttribute"
typeId="de.prob.units.inferredUnitPragmaAttribute">
</textAttribute>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="de.prob.units.ui.StartUnitAnalysisHandler"
commandId="de.prob.units.startunitanalysis">
</handler>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:fr.systerel.explorer.navigator.view">
<separator
name="de.prob.units.separator2">
</separator>
<command
commandId="de.prob.units.startunitanalysis"
icon="icons/unit_analysis.png"
label="Analyse Physical Units"
style="push">
<visibleWhen>
<with
variable="selection">
<iterate
operator="or">
<instanceof
value="org.eventb.core.IEventBRoot">
</instanceof>
</iterate>
</with>
</visibleWhen>
</command>
<separator
name="de.prob.units.separator1">
</separator>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="de.prob.units.startunitanalysis"
name="Analyse Physical Units">
</command>
</extension>
<extension
point="org.rodinp.core.attributeTypes">
<attributeType
id="unitPragmaAttribute"
kind="string"
name="Content of a unit Pragma to send to ProB">
</attributeType>
<attributeType
id="inferredUnitPragmaAttribute"
kind="string"
name="Content of a unit Pragma received from ProB">
</attributeType>
</extension>
</plugin>
package de.prob.units;
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 = "de.prob.units"; //$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;
}
}
......@@ -4,7 +4,7 @@
* (http://www.eclipse.org/org/documents/epl-v10.html)
* */
package de.prob.ui.pragmas;
package de.prob.units.pragmas;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eventb.core.IVariable;
......@@ -16,7 +16,7 @@ import org.rodinp.core.IRodinElement;
import org.rodinp.core.RodinCore;
import org.rodinp.core.RodinDBException;
import de.prob.core.internal.Activator;
import de.prob.units.Activator;
public class InferredUnitPragmaAttribute implements IAttributeManipulation {
public static IAttributeType.String ATTRIBUTE = RodinCore
......
......@@ -4,7 +4,7 @@
* (http://www.eclipse.org/org/documents/epl-v10.html)
* */
package de.prob.ui.pragmas;
package de.prob.units.pragmas;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eventb.core.IVariable;
......@@ -16,7 +16,7 @@ import org.rodinp.core.IRodinElement;
import org.rodinp.core.RodinCore;
import org.rodinp.core.RodinDBException;
import de.prob.core.internal.Activator;
import de.prob.units.Activator;
public class UnitPragmaAttribute implements IAttributeManipulation {
public static IAttributeType.String ATTRIBUTE = RodinCore
......
......@@ -4,7 +4,7 @@
* (http://www.eclipse.org/org/documents/epl-v10.html)
* */
package de.prob.ui.eventb;
package de.prob.units.ui;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -56,7 +56,7 @@ import de.prob.parser.ResultParserException;
import de.prob.prolog.term.CompoundPrologTerm;
import de.prob.prolog.term.ListPrologTerm;
import de.prob.prolog.term.PrologTerm;
import de.prob.ui.pragmas.InferredUnitPragmaAttribute;
import de.prob.units.pragmas.InferredUnitPragmaAttribute;
public class StartUnitAnalysisHandler extends AbstractHandler implements
IHandler {
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.prob2.units.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
#Tue Nov 29 16:17:25 CET 2011
eclipse.preferences.version=1
encoding/<project>=UTF-8
#Tue Nov 29 16:17:25 CET 2011
eclipse.preferences.version=1
line.separator=\n
bin.includes = feature.xml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment