Commit 19599dc2 authored by Romain Bioteau's avatar Romain Bioteau
Browse files

Disale groovy dsl

parent e73c18f0
......@@ -17,11 +17,7 @@ package org.bonitasoft.studio.application;
import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.debug.DebugPlugin;
import org.bonitasoft.studio.validation.ValidationPlugin;
import org.codehaus.groovy.eclipse.dsl.DSLPreferences;
import org.codehaus.groovy.eclipse.dsl.DSLPreferencesInitializer;
import org.codehaus.groovy.eclipse.dsl.GroovyDSLCoreActivator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -64,13 +60,6 @@ public class ApplicationPlugin extends AbstractUIPlugin {
try {
DebugPlugin.getDefault().getBundle().start();
ValidationPlugin.getDefault().getBundle().start();
final IPreferenceStore groovyDSLstore = GroovyDSLCoreActivator.getDefault().getPreferenceStore();
groovyDSLstore.setDefault(DSLPreferencesInitializer.AUTO_ADD_DSL_SUPPORT, false);
groovyDSLstore.setValue(DSLPreferencesInitializer.AUTO_ADD_DSL_SUPPORT, false);
groovyDSLstore.setDefault(DSLPreferencesInitializer.DSLD_DISABLED, true);
groovyDSLstore.setValue(DSLPreferencesInitializer.DSLD_DISABLED, true);
groovyDSLstore.setDefault(DSLPreferences.DISABLED_SCRIPTS, false);
groovyDSLstore.setValue(DSLPreferences.DISABLED_SCRIPTS, false);
} catch (final BundleException e) {
BonitaStudioLog.error(e);
}
......
......@@ -54,6 +54,9 @@ import org.bonitasoft.studio.common.repository.preferences.RepositoryPreferenceC
import org.bonitasoft.studio.engine.BOSEngineManager;
import org.bonitasoft.studio.model.process.impl.ContractInputImpl;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
import org.codehaus.groovy.eclipse.dsl.DSLPreferences;
import org.codehaus.groovy.eclipse.dsl.DSLPreferencesInitializer;
import org.codehaus.groovy.eclipse.dsl.GroovyDSLCoreActivator;
import org.codehaus.groovy.eclipse.launchers.GroovyConsoleLineTracker;
import org.eclipse.core.internal.databinding.beans.BeanPropertyHelper;
import org.eclipse.core.internal.resources.Workspace;
......@@ -401,6 +404,7 @@ public class BonitaStudioWorkbenchAdvisor extends WorkbenchAdvisor implements IS
monitor.subTask(Messages.initializingCurrentRepository);
disableInternalWebBrowser();
disableGroovyDSL();
checkCurrentRepository(monitor);
final List<IConfigurationElement> sortedConfigElems = retrievePreStartupContribution();
......@@ -412,6 +416,16 @@ public class BonitaStudioWorkbenchAdvisor extends WorkbenchAdvisor implements IS
executeContributions();
}
protected void disableGroovyDSL() {
final IPreferenceStore groovyDSLstore = GroovyDSLCoreActivator.getDefault().getPreferenceStore();
groovyDSLstore.setDefault(DSLPreferencesInitializer.AUTO_ADD_DSL_SUPPORT, false);
groovyDSLstore.setValue(DSLPreferencesInitializer.AUTO_ADD_DSL_SUPPORT, false);
groovyDSLstore.setDefault(DSLPreferencesInitializer.DSLD_DISABLED, true);
groovyDSLstore.setValue(DSLPreferencesInitializer.DSLD_DISABLED, true);
groovyDSLstore.setDefault(DSLPreferences.DISABLED_SCRIPTS, false);
groovyDSLstore.setValue(DSLPreferences.DISABLED_SCRIPTS, false);
}
protected void doInitWorkspace() {
new WorkspaceInitializationJob(repositoryAccessor).schedule();
}
......
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