Commit 6492ad76 authored by Adrien's avatar Adrien Committed by Romain Bioteau

feat(elected for removal) remove user profiles (#669)

* remove developer/business analyst profiles from the Studio

closes [BS-16873](https://bonitasoft.atlassian.net/browse/BS-16873)
parent 74b49c92
......@@ -293,13 +293,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
version="0.0.0"
unpack="false"/>
<plugin
id="org.bonitasoft.studio.profiles"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.bonitasoft.studio.expression.editor"
download-size="0"
......
......@@ -37,7 +37,6 @@ Require-Bundle: org.bonitasoft.studio.diagram,
org.bonitasoft.studio.groovy.ui,
org.eclipse.equinox.security;bundle-version="1.0.200",
org.bonitasoft.studio.repository.themes,
org.bonitasoft.studio.profiles,
org.eclipse.ui.editors;bundle-version="3.6.0",
org.bonitasoft.studio.engine,
org.eclipse.jdt.launching;bundle-version="3.6.1",
......
......@@ -32,7 +32,6 @@ import org.bonitasoft.studio.common.platform.tools.PlatformUtil;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.preferences.BonitaCoolBarPreferenceConstant;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.e4.core.contexts.IEclipseContext;
......@@ -75,7 +74,8 @@ import org.osgi.service.event.EventHandler;
/**
* @author Romain Bioteau
*/
public class CoolbarToolControl implements INullSelectionListener, IActivityManagerListener, org.eclipse.e4.ui.workbench.modeling.IPartListener {
public class CoolbarToolControl
implements INullSelectionListener, IActivityManagerListener, org.eclipse.e4.ui.workbench.modeling.IPartListener {
private static final int ICON_SIZE = 24;
......@@ -96,15 +96,18 @@ public class CoolbarToolControl implements INullSelectionListener, IActivityMana
private boolean isRegistered;
@PostConstruct
public void createControls(final Composite parent, final IEclipseContext context, final IWorkbenchActivitySupport activitySupport) {
public void createControls(final Composite parent, final IEclipseContext context,
final IWorkbenchActivitySupport activitySupport) {
if (isRendered(context)) {
initCoolBarPreferredSize();
final Composite parentShell = parent.getParent();
final TrimmedPartLayout layout = (TrimmedPartLayout) parentShell.getLayout();
if (layout != null) {
toolbarContainer = new Composite(parentShell, SWT.INHERIT_FORCE);
toolbarContainer.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).create());
toolbarContainer.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0).margins(0, 0).create());
toolbarContainer.setLayoutData(
GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).create());
toolbarContainer
.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0).margins(0, 0).create());
layout.top = toolbarContainer;
final Composite leftTrim = layout.left;
if (leftTrim != null) {
......@@ -198,10 +201,12 @@ public class CoolbarToolControl implements INullSelectionListener, IActivityMana
}
if (size == CoolbarSize.SMALL) {
image = new Image(Display.getDefault(), Pics.getImage(COOLBAR_PNG).getImageData().scaledTo(Display.getDefault().getBounds().width, 40));
image = new Image(Display.getDefault(),
Pics.getImage(COOLBAR_PNG).getImageData().scaledTo(Display.getDefault().getBounds().width, 40));
} else {
image = new Image(Display.getDefault(), Pics.getImage(COOLBAR_PNG).getImageData().scaledTo(Display.getDefault().getBounds().width, 85));
image = new Image(Display.getDefault(),
Pics.getImage(COOLBAR_PNG).getImageData().scaledTo(Display.getDefault().getBounds().width, 85));
}
toolbarContainer.setBackgroundImage(image);
......@@ -266,8 +271,8 @@ public class CoolbarToolControl implements INullSelectionListener, IActivityMana
}
private void initCoolBarPreferredSize() {
BonitaProfilesManager.getInstance().setActiveProfile(BonitaProfilesManager.getInstance().getActiveProfile(), false);
final String value = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore().getString(BonitaCoolBarPreferenceConstant.COOLBAR_DEFAULT_SIZE);
final String value = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
.getString(BonitaCoolBarPreferenceConstant.COOLBAR_DEFAULT_SIZE);
if (value.equals(BonitaCoolBarPreferenceConstant.SMALL)) {
size = CoolbarSize.SMALL;
} else if (value.equals(BonitaCoolBarPreferenceConstant.NORMAL)) {
......@@ -415,7 +420,8 @@ public class CoolbarToolControl implements INullSelectionListener, IActivityMana
if (wp instanceof DiagramEditor) {
for (final IBonitaContributionItem bcItem : contributions.values()) {
if (bcItem instanceof ISelectionChangedListener) {
((DiagramEditor) wp).getDiagramGraphicalViewer().addSelectionChangedListener((ISelectionChangedListener) bcItem);
((DiagramEditor) wp).getDiagramGraphicalViewer()
.addSelectionChangedListener((ISelectionChangedListener) bcItem);
}
}
}
......
......@@ -19,7 +19,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.databinding;bundle-version="1.4.0",
org.eclipse.core.databinding.beans;bundle-version="1.2.100",
org.bonitasoft.studio.common.repository;bundle-version="1.0.0",
org.bonitasoft.studio.profiles;bundle-version="1.0.0",
org.bonitasoft.studio.diagram.custom;bundle-version="1.0.0",
org.eclipse.emf.databinding;bundle-version="1.2.0",
org.bonitasoft.studio.preferences;bundle-version="1.0.0",
......
......@@ -19,8 +19,6 @@ import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.configuration.i18n.Messages;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.pics.PicsConstants;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.action.ContributionItem;
......@@ -55,15 +53,6 @@ public class ConfigureCoolbarItem extends ContributionItem implements IBonitaCon
return getCommand().isEnabled();
}
/*
* (non-Javadoc)
* @see org.eclipse.jface.action.IContributionItem#isVisible()
*/
@Override
public boolean isVisible() {
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.EXECUTION);
}
@Override
public void fill(final ToolBar toolbar, final int index, final int iconSize) {
final ToolItem item = new ToolItem(toolbar, SWT.PUSH);
......
......@@ -20,7 +20,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.databinding;bundle-version="1.4.0",
org.eclipse.emf.databinding;bundle-version="1.2.0",
org.eclipse.jface.databinding;bundle-version="1.5.0",
org.bonitasoft.studio.profiles;bundle-version="1.0.0",
org.eclipse.jdt.core;bundle-version="3.7.1",
org.eclipse.core.databinding.property;bundle-version="1.4.0",
org.bonitasoft.studio.expression.editor;bundle-version="1.0.0",
......
......@@ -5,14 +5,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.connectors.ui.property.filter;
......@@ -23,29 +21,24 @@ import org.bonitasoft.studio.model.process.MainProcess;
import org.bonitasoft.studio.model.process.SendTask;
import org.bonitasoft.studio.model.process.SignalEvent;
import org.bonitasoft.studio.model.process.TimerEvent;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.jface.viewers.IFilter;
/**
* @author Aurelien Pupier
*
*/
public class ConnectableElementWithoutSendTaskAndSubProcessEvent implements IFilter {
@Override
public boolean select(Object object) {
if (object instanceof IGraphicalEditPart) {
IGraphicalEditPart editPart = (IGraphicalEditPart) object;
Object model = editPart.resolveSemanticElement();
if(model instanceof MainProcess){
return false ;
if (model instanceof MainProcess) {
return false;
}
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.CONNECTORS)
&& (model instanceof ConnectableElement || model instanceof Lane)
return (model instanceof ConnectableElement || model instanceof Lane)
&& !(model instanceof SendTask)
&& !(model instanceof ErrorEvent)
&& !(model instanceof TimerEvent)
......
......@@ -22,7 +22,6 @@ Require-Bundle: org.eclipse.ui,
org.bonitasoft.studio.common.repository;bundle-version="1.0.0",
org.eclipse.ui.ide,
org.eclipse.gmf.runtime.common.ui,
org.bonitasoft.studio.profiles,
org.bonitasoft.studio.expression.editor,
org.eclipse.emf.edit.ui,
org.eclipse.emf.databinding,
......
......@@ -43,15 +43,10 @@
style="push">
</command>
<visibleWhen
checkEnabled="false">
<with
variable="activeWorkbenchWindow">
<test
args="org.bonitasoft.studio.profiles.dependencies.menu"
forcePluginActivation="true"
property="org.bonitasoft.isActivityEnabled">
</test>
</with>
checkEnabled="true">
<reference
definitionId="isBonitaPerspectiveActive">
</reference>
</visibleWhen>
</menu>
</menuContribution>
......
......@@ -58,8 +58,7 @@ Require-Bundle: org.eclipse.ui,
com.fasterxml.jackson.dataformat.jackson-dataformat-xml;bundle-version="2.4.4",
com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;bundle-version="2.4.4",
com.fasterxml.jackson.module.jackson-module-jaxb-annotations;bundle-version="2.4.4",
stax2-api;bundle-version="3.1.4",
org.bonitasoft.studio.profiles
stax2-api;bundle-version="3.1.4"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Import-Package: org.bonitasoft.engine.bpm.bar,
......
......@@ -21,8 +21,6 @@ import org.bonitasoft.studio.designer.UIDesignerPlugin;
import org.bonitasoft.studio.designer.i18n.Messages;
import org.bonitasoft.studio.designer.ui.handler.OpenUIDesignerHandler;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
......@@ -112,9 +110,4 @@ public class OpenUIDesignerCoolBarItem extends ContributionItem implements IBoni
public String getId() {
return "org.bonitasoft.studio.coolbar.uiDesigner";
}
@Override
public boolean isVisible() {
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.FORMS_MODELING);
}
}
......@@ -32,7 +32,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.databinding.property;bundle-version="1.3.0",
org.bonitasoft.studio.common.repository;bundle-version="1.0.0",
org.bonitasoft.studio.groovy.ui;bundle-version="1.0.0",
org.bonitasoft.studio.profiles,
org.bonitasoft.studio.repository.themes,
org.bonitasoft.studio.expression.editor,
org.bonitasoft.studio.diagram.custom;bundle-version="1.0.0",
......
......@@ -5,14 +5,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.properties.form.filters;
......@@ -22,30 +20,28 @@ import org.bonitasoft.studio.model.form.FormField;
import org.bonitasoft.studio.model.form.HiddenWidget;
import org.bonitasoft.studio.model.form.ViewForm;
import org.bonitasoft.studio.model.form.Widget;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.jface.viewers.IFilter;
public class FormAndFormFieldFilter implements IFilter {
public boolean select(Object object) {
if (object instanceof IGraphicalEditPart) {
IGraphicalEditPart editPart = (IGraphicalEditPart) object;
Object model = editPart.resolveSemanticElement();
if((model instanceof FormField || model instanceof Form ) && !(model instanceof HiddenWidget)){
Form form;
if(model instanceof Form){
form = (Form) model;
}else{
form = ModelHelper.getForm((Widget) model);
}
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.VALIDATORS) && !(form instanceof ViewForm);
}else{
return false;
}
}
return false;
}
public boolean select(Object object) {
if (object instanceof IGraphicalEditPart) {
IGraphicalEditPart editPart = (IGraphicalEditPart) object;
Object model = editPart.resolveSemanticElement();
if ((model instanceof FormField || model instanceof Form) && !(model instanceof HiddenWidget)) {
Form form;
if (model instanceof Form) {
form = (Form) model;
} else {
form = ModelHelper.getForm((Widget) model);
}
return !(form instanceof ViewForm);
} else {
return false;
}
}
return false;
}
}
......@@ -14,7 +14,6 @@ Require-Bundle: org.bonitasoft.studio.model;bundle-version="1.0.0",
org.bonitasoft.studio.common.diagram;bundle-version="1.0.0",
org.bonitasoft.studio.configuration;bundle-version="1.0.0",
org.bonitasoft.studio.pics;bundle-version="1.0.0",
org.bonitasoft.studio.profiles;bundle-version="1.0.0",
org.bonitasoft.studio.diagram.custom;bundle-version="1.0.0",
org.bonitasoft.studio.decision.table;bundle-version="1.0.0",
org.eclipse.core.databinding.beans;bundle-version="1.2.100",
......
......@@ -19,8 +19,6 @@ import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.engine.i18n.Messages;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.pics.PicsConstants;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.action.ContributionItem;
......@@ -52,15 +50,6 @@ public class OpenPortalCoolbarItem extends ContributionItem implements IBonitaCo
return "org.bonitasoft.studio.coolbar.userXp";
}
/*
* (non-Javadoc)
* @see org.eclipse.jface.action.IContributionItem#isVisible()
*/
@Override
public boolean isVisible() {
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.EXECUTION);
}
@Override
public void fill(final ToolBar toolbar, final int index, final int iconSize) {
final ToolItem item = new ToolItem(toolbar, SWT.PUSH);
......
......@@ -23,8 +23,6 @@ import org.bonitasoft.studio.engine.i18n.Messages;
import org.bonitasoft.studio.model.form.Form;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.pics.PicsConstants;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.emf.ecore.EObject;
......@@ -84,15 +82,6 @@ public class RunCoolbarItem extends ContributionItem implements IBonitaContribut
return false;
}
/*
* (non-Javadoc)
* @see org.eclipse.jface.action.IContributionItem#isVisible()
*/
@Override
public boolean isVisible() {
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.EXECUTION);
}
@Override
public void fill(final ToolBar toolbar, final int index, final int iconSize) {
final ToolItem item = new ToolItem(toolbar, SWT.PUSH);
......
......@@ -27,7 +27,6 @@ Require-Bundle: org.bonitasoft.studio.common;bundle-version="6.0.0",
org.bonitasoft.studio.engine;bundle-version="1.0.0",
org.bonitasoft.studio.diagram.custom;bundle-version="1.0.0",
org.bonitasoft.studio.configuration;bundle-version="6.0.0",
org.bonitasoft.studio.profiles;bundle-version="6.0.0",
org.mockito;resolution:=optional,
assertj-core;bundle-version="1.5.0";resolution:=optional,
org.junit;bundle-version="4.11.0";resolution:=optional,
......
......@@ -19,8 +19,6 @@ import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.form.preview.i18n.Messages;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.pics.PicsConstants;
import org.bonitasoft.studio.profiles.manager.BonitaProfilesManager;
import org.bonitasoft.studio.profiles.manager.IBonitaActivitiesCategory;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.action.ContributionItem;
......@@ -61,15 +59,6 @@ public class FormPreviewCoolbarItem extends ContributionItem implements IBonitaC
return cmd.isEnabled();
}
/*
* (non-Javadoc)
* @see org.eclipse.jface.action.IContributionItem#isVisible()
*/
@Override
public boolean isVisible() {
return BonitaProfilesManager.getInstance().isEnabled(IBonitaActivitiesCategory.FORMS_MODELING);
}
@Override
public void fill(final ToolBar toolbar, final int index, final int iconSize) {
final ToolItem item = new ToolItem(toolbar, SWT.PUSH);
......
......@@ -35,3 +35,4 @@ Export-Package: org.bonitasoft.studio.preferences,
org.bonitasoft.studio.preferences.i18n,
org.bonitasoft.studio.preferences.pages
Bundle-ClassPath: .
Import-Package: org.eclipse.core.expressions
......@@ -112,5 +112,14 @@
label="%runKeywords">
</keyword>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="org.bonitasoft.studio.preferences.manager.ActivityPropertyTester"
id="org.eclipse.ui.activityPropertyTester"
namespace="org.bonitasoft"
properties="is6XLegacyEnabled"
type="org.eclipse.ui.IWorkbenchWindow">
</propertyTester>
</extension>
</plugin>
/**
* Copyright (C) 2013-2015 Bonitasoft S.A.
* Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.studio.profiles.manager;
/*******************************************************************************
* Copyright (C) 2017 BonitaSoft S.A.
* BonitaSoft is a trademark of BonitaSoft SA.
* This software file is BONITASOFT CONFIDENTIAL. Not For Distribution.
* For commercial licensing information, contact:
* BonitaSoft, 32 rue Gustave Eiffel 38000 Grenoble
* or BonitaSoft US, 51 Federal Street, Suite 305, San Francisco, CA 94107
*******************************************************************************/
package org.bonitasoft.studio.preferences.manager;
import org.bonitasoft.studio.preferences.BonitaPreferenceConstants;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.activities.IActivityManager;
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
/**
* @author Romain Bioteau
*
*/
public class ActivityPropertyTester extends PropertyTester {
protected static final String PROPERTY_IS_ACTIVITY_ENABLED = "isActivityEnabled"; //$NON-NLS-1$
protected static final String PROPERTY_IS_CATEGORY_ENABLED = "isCategoryEnabled"; //$NON-NLS-1$
protected static final String PROPERTY_IS_6XLEGACY_ENABLED = "is6XLegacyEnabled"; //$NON-NLS-1$
/*
* (non-Javadoc)
*
* @see org.eclipse.core.expressions.PropertyTester#test(java.lang.Object,
* java.lang.String, java.lang.Object[], java.lang.Object)
*/
@Override
@Override
public boolean test(final Object receiver, final String property, final Object[] args,
final Object expectedValue) {
if (args.length == 1 && receiver instanceof IWorkbenchWindow && args[0] instanceof String) {
switch (property) {
case PROPERTY_IS_ACTIVITY_ENABLED:
return isActivityEnabled((String) args[0], ((IWorkbenchWindow) receiver).getWorkbench());
case PROPERTY_IS_CATEGORY_ENABLED:
return isCategoryEnabled((String) args[0], ((IWorkbenchWindow) receiver).getWorkbench());
default:
return false;
}
}
if (PROPERTY_IS_6XLEGACY_ENABLED.equals(property)) {
return is6xLegacyModeActivated();
}
return false;
}
final Object expectedValue) {
return PROPERTY_IS_6XLEGACY_ENABLED.equals(property) ? is6xLegacyModeActivated() : false;
}
protected boolean is6xLegacyModeActivated() {
return getBonitaPreferenceStore().getBoolean(BonitaPreferenceConstants.SHOW_LEGACY_6X_MODE);
......@@ -68,26 +34,6 @@ public class ActivityPropertyTester extends PropertyTester {
return BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore();
}
private boolean isActivityEnabled(final String activityId, final IWorkbench workbench) {
try {
final IActivityManager activityManager = getActivityManager(workbench);
return activityManager.getActivity(activityId).isEnabled();
} catch (final Exception e) {
// workbench not yet activated; nothing enabled yet
}
return false;
}
private boolean isCategoryEnabled(final String categoryId, final IWorkbench workbench) {
try {
final IActivityManager activityManager = getActivityManager(workbench);
return WorkbenchActivityHelper.isEnabled(activityManager, categoryId);
} catch (final Exception e) {
// workbench not yet activated; nothing enabled yet
}
return false;
}
protected IActivityManager getActivityManager(final IWorkbench workbench) {
final IWorkbenchActivitySupport workbenchActivitySupport = workbench.getActivitySupport();
final IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
......
<?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.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-test"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.bonitasoft.studio.profiles</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.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: User Profiles Plug-In
Bundle-SymbolicName: org.bonitasoft.studio.profiles;singleton:=true
Bundle-Version: 7.6.0.qualifier
Bundle-Activator: org.bonitasoft.studio.profiles.ProfilePlugin
Bundle-Vendor: BonitaSoft S.A.
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.bonitasoft.studio.common,
org.bonitasoft.studio.preferences,
org.bonitasoft.studio.pics,
org.bonitasoft.studio.common.repository,
org.eclipse.core.resources,
org.eclipse.e4.core.contexts;bundle-version="1.3.1",
org.eclipse.e4.ui.workbench.renderers.swt,
org.eclipse.e4.ui.workbench.swt,
org.eclipse.e4.ui.workbench,
org.eclipse.e4.ui.model.workbench,
org.eclipse.core.expressions;bundle-version="3.4.500",
org.junit;bundle-version="4.11.0";resolution:=optional,
assertj-core;bundle-version="1.5.0";resolution:=optional,
org.mockito;bundle-version="1.10.19";resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.bonitasoft.studio.profiles,org.bonitasoft.studio.p
rofiles.manager,org.bonitasoft.studio.profiles.repository
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
messages*.properties,\
profiles/,\
icons/
profileRepository=Profiles
ApplicationDeveloper_Label=Application Developer