diff --git a/de.prob.units/src/de/prob/units/Activator.java b/de.prob.units/src/de/prob/units/Activator.java index fba86f06b5c128daf5aedca07bb8c87e4417c932..a867db55ff989f02df0adfa770760e0d69c1645f 100644 --- a/de.prob.units/src/de/prob/units/Activator.java +++ b/de.prob.units/src/de/prob/units/Activator.java @@ -4,7 +4,6 @@ import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; import org.rodinp.core.RodinCore; -import de.prob.units.sc.ConfSettor; /** * The activator class controls the plug-in life cycle diff --git a/de.prob.units/src/de/prob/units/sc/ConfSettor.java b/de.prob.units/src/de/prob/units/ConfSettor.java similarity index 84% rename from de.prob.units/src/de/prob/units/sc/ConfSettor.java rename to de.prob.units/src/de/prob/units/ConfSettor.java index 1fc7250685ff695aa9c17a690f314e2151a95d1d..c41716ec92dc0a51f2a0a3f7a4501be3c6a1dde5 100644 --- a/de.prob.units/src/de/prob/units/sc/ConfSettor.java +++ b/de.prob.units/src/de/prob/units/ConfSettor.java @@ -1,5 +1,6 @@ -package de.prob.units.sc; +package de.prob.units; +import org.eventb.core.IContextRoot; import org.eventb.core.IMachineRoot; import org.rodinp.core.ElementChangedEvent; import org.rodinp.core.IElementChangedListener; @@ -12,8 +13,6 @@ import org.rodinp.core.IRodinFile; import org.rodinp.core.IRodinProject; import org.rodinp.core.RodinDBException; -import de.prob.units.Activator; - /** * Class that updates the configuration of files, to add the static checker * modules for our qualitative probabilistic reasoning plug-in. @@ -53,6 +52,14 @@ public class ConfSettor implements IElementChangedListener { mch.setConfiguration(conf + ";" + CONFIG, null); } } + + if (root.getElementType().equals(IContextRoot.ELEMENT_TYPE)) { + final IContextRoot ctx = (IContextRoot) root; + final String conf = ctx.getConfiguration(); + if (!conf.contains(CONFIG)) { + ctx.setConfiguration(conf + ";" + CONFIG, null); + } + } } } } \ No newline at end of file