Commit 25c08352 authored by Romain Bioteau's avatar Romain Bioteau
Browse files

remove xtext.ui dependencies

parent c0a940cf
......@@ -25,19 +25,19 @@ Require-Bundle: org.bonitasoft.studio.model;bundle-version="1.0.0",
org.eclipse.debug.ui;bundle-version="3.7.101",
org.bonitasoft.studio.repository.themes;bundle-version="1.0.0",
org.eclipse.jdt.launching;bundle-version="3.6.1",
org.bonitasoft.studio.condition.ui;bundle-version="1.0.0",
org.bonitasoft.studio.xml;bundle-version="6.0.0",
org.eclipse.ui.browser;bundle-version="3.3.101",
org.junit;bundle-version="4.11.0";resolution:=optional,
org.mockito;bundle-version="1.9.5";resolution:=optional,
assertj-core;bundle-version="1.5.0";resolution:=optional,
org.bonitasoft.studio.tests-utils;bundle-version="6.4.0";resolution:=optional,
org.bonitasoft.studio.expression.editor,
org.bonitasoft.studio.data,
org.bonitasoft.studio.tests-utils;bundle-version="6.4.0";resolution:=optional,
org.eclipse.core.databinding.property;bundle-version="1.4.200",
org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.7.0",
org.eclipse.emf.edit.ui,
org.eclipse.jdt.core
org.eclipse.jdt.core,
org.bonitasoft.studio.condition
Export-Package: org.bonitasoft.studio.engine,
org.bonitasoft.studio.engine.command,
org.bonitasoft.studio.engine.config,
......
......@@ -31,7 +31,6 @@ import org.bonitasoft.studio.condition.conditionModel.Operation_Compare;
import org.bonitasoft.studio.condition.conditionModel.Operation_NotUnary;
import org.bonitasoft.studio.condition.conditionModel.Unary_Operation;
import org.bonitasoft.studio.condition.scoping.ConditionModelGlobalScopeProvider;
import org.bonitasoft.studio.condition.ui.internal.ConditionModelActivator;
import org.bonitasoft.studio.engine.export.expression.converter.IExpressionConverter;
import org.bonitasoft.studio.model.expression.Expression;
import org.bonitasoft.studio.model.parameter.Parameter;
......@@ -40,14 +39,15 @@ import org.bonitasoft.studio.model.process.Data;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EValidator;
import org.eclipse.xtext.resource.SynchronizedXtextResourceSet;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.resource.XtextResourceSet;
import org.eclipse.xtext.util.StringInputStream;
import org.eclipse.xtext.validation.CancelableDiagnostician;
import org.eclipse.xtext.validation.CheckMode;
import org.eclipse.xtext.validation.IResourceValidator;
import com.google.inject.Injector;
import org.eclipse.xtext.validation.DiagnosticConverterImpl;
import org.eclipse.xtext.validation.ResourceValidatorImpl;
/**
* @author Romain Bioteau
......@@ -110,9 +110,9 @@ public class ComparisonExpressionConverter implements IExpressionConverter {
}
public Operation_Compare parseConditionExpression(final String content, final EObject context) {
final Injector injector = ConditionModelActivator.getInstance().getInjector(
ConditionModelActivator.ORG_BONITASOFT_STUDIO_CONDITION_CONDITIONMODEL);
final IResourceValidator xtextResourceChecker = injector.getInstance(IResourceValidator.class);
final ResourceValidatorImpl xtextResourceChecker = new ResourceValidatorImpl();
xtextResourceChecker.setDiagnostician(new CancelableDiagnostician(EValidator.Registry.INSTANCE));
xtextResourceChecker.setDiagnosticConverter(new DiagnosticConverterImpl());
final XtextResourceSet resourceSet = new SynchronizedXtextResourceSet();
final XtextResource resource = (XtextResource) resourceSet.createResource(URI.createURI("somefile.cmodel"));
try {
......@@ -126,7 +126,7 @@ public class ComparisonExpressionConverter implements IExpressionConverter {
if (contents.isEmpty()) {
return null;
}
final ConditionModelGlobalScopeProvider globalScopeProvider = injector.getInstance(ConditionModelGlobalScopeProvider.class);
final ConditionModelGlobalScopeProvider globalScopeProvider = new ConditionModelGlobalScopeProvider();
final List<String> accessibleObjects = new ArrayList<String>();
for (final Data d : ModelHelper.getAccessibleData(context)) {
accessibleObjects.add(ModelHelper.getEObjectID(d));
......
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