Commit f50a9973 authored by apupier's avatar apupier

Merge remote-tracking branch 'origin/master' into BS-8676_eclipse4.4

Conflicts:
	bundles/plugins/org.bonitasoft.studio.actors/META-INF/MANIFEST.MF
parents feb9667f 92ef6467
all-in-one/icons/bonitasoft.ico

361 KB | W: | H:

all-in-one/icons/bonitasoft.ico

437 KB | W: | H:

all-in-one/icons/bonitasoft.ico
all-in-one/icons/bonitasoft.ico
all-in-one/icons/bonitasoft.ico
all-in-one/icons/bonitasoft.ico
  • 2-up
  • Swipe
  • Onion skin
#X-Generator: crowdin.net
java.version.error.message=有効な Java ランタイム環境が検出されませんでした。JRE 1.6 (またはそれ以上)をインストールする必要があります
#X-Generator: crowdin.com
java.version.title=Java バージョン
java.version.message=インストーラーは、あなたのシステムに Bonita BPMと互換性のあるJava バージョンを検出できませんでした。インストールを続行する場合、インストーラーは、Bonita BPM Studio に Java の組み込みバージョンを追加します。\n \: このJava バージョンはあなたのシステムにインストールされないので、他のアプリケーションには影響しません。組み込みJava バージョンを使用したくない場合は、このインストールをキャンセルし、Java をインストールしてから、このインストールを再開します。\n インストールを続行して組み込まれた Java を使用したいですか?
workspace.recovery.progressMessage=お待ちください。ワークスペースのデータを取得中...
initializing.progressMessage=お待ちください、初期化しています
workspace.location.title=ワークスペースの場所
workspace.location.description=パス
workspace.location.explanation=あなたがデータを取得したいBonita BPM 6 のインストール フォルダを選択してください
workspace.location.validation.error=ワークスペースの場所は、有効なBonita BPM ワークスペースではありません
workspace.location.explanation=1つのワークスペースだけを自動で移行できます:
workspace.location.explanation.choice1=- デフォルトのワークスペース\: あなたがBonita BPM Studio をインストールしたディレクトリを参照します。
workspace.location.explanation.choice2=- 別のワークスペース (サブスクリプションの各エディション)\: その親ディレクトリを参照します。
workspace.location.explanation.end=他のワークスペースを手動で移行する(サブスクリプション版のみ)\: 古いStudioバージョンのすべてのダイアグラムを閉じて、すべてのダイアグラムをエクスポートしてから、それらのアーカイブを新しいStudioバージョンにインポートします。
workspace.location.validation.error=あなたが選択したディレクトリは、有効なBonita BPM ワークスペースではありません
keep.workspace.title=今までのワークスペースを保持しますか?
keep.workspace.msg=既存のデータを保存しますか?
keep.workspace.msg=既存のデータをすべて保存しますか?
launch=起動
install.license.error=ライセンス ・ ファイルには、「.lic」の拡張子が付けられます
install.license.desc=ライセンス ・ ファイル(省略可能
request.key.explanation=以下のライセンス ・ キーをコピーし、BonitaSoftサポート・ポータル (http\://support.bonitasoft.com) にログインして、ライセンスを要求してください
install.license.desc=ライセンス ファイル(あなたのコンピュータ内のファイルを表示
request.key.explanation=以下のライセンス キーをコピーして、BonitaSoft カスタマー ポータル(https\://customer.bonitasoft.com/license/request)にログインし、コピーしたライセンス キーをライセンス リクエスト キー・フィールドに貼り付けます。\nその後、eメールでライセンス キー ファイルを受け取りますので、それをローカルに保存してから、このインストーラーへ戻ります
install.license.title=製品ライセンス
retrieve.workspace.title=データを取得
retrieve.workspace.message=既存のBonita BPM 6 ワークスペースからデータを取得したいですか?
workspace.setup=ワークスペースの設定
no.thanks=遠慮します!
yes.import=はい、別のワークスペースからデータをインポートします。
retrieve.workspace.message=既存のBonita BPM ワークスペースからデータを取得したいですか?
retrieve.workspace.message.warning=警告\: 共有リポジトリ(サブスクリプション・エディション)を含むワークスペースを移行する場合は、すべてのリポジトリ ユーザーは新しいStudioバージョンに移行する必要があります。
workspace.setup=ワークスペースのセットアップ
no.thanks=いいえ、データを移行しません。「手動で移行します」、\nまたは「移行するデータを持っていません」。
yes.import=はい、ワークスペースを移行します。
......@@ -49,6 +49,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.mockito;bundle-version="1.9.5";resolution:=optional,
org.bonitasoft.studio.expression.editor,
org.apache.commons.lang;bundle-version="2.6.0",
org.eclipse.emf.databinding,
org.eclipse.core.databinding.observable,
org.eclipse.emf.compare.rcp;bundle-version="2.2.0"
Bundle-ActivationPolicy: lazy
Import-Package: org.bonitasoft.engine.api,
......
......@@ -97,8 +97,9 @@ public class OrganizationValidator implements IValidator {
}
}
for (final Group group : organization.getGroups().getGroup()) {
if (!group.getDisplayName().isEmpty() && group.getDisplayName().length() > 75) {
return ValidationStatus.error(Messages.bind(Messages.groupDisplayLengthTooLong, group.getDisplayName()));
final String groupDisplayName = group.getDisplayName();
if (groupDisplayName != null && !groupDisplayName.isEmpty() && groupDisplayName.length() > 75) {
return ValidationStatus.error(Messages.bind(Messages.groupDisplayLengthTooLong, groupDisplayName));
}
}
return ValidationStatus.ok() ;
......
/**
* Copyright (C) 2012 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
* Copyright (C) 2012-2014 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
* 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.actors.ui.wizard.page;
......@@ -53,6 +51,7 @@ import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableValue;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.ECollections;
......@@ -117,9 +116,6 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage {
private static final int CUSTOM_USER_DEFINITION_VALUE_LIMIT_SIZE = 255;
private static final String DEFAULT_USER_PASSWORD = "bpm";
private static final int MIN_SC_WIDTH = 426;
private static final int MIN_SC_HEIGHT = 268;
CustomUserInfoDefinitions infoDefinitions;
......@@ -455,7 +451,17 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage {
final IObservableValue userPasswordObservableValue = EMFObservables.observeDetailValue(Realm.getDefault(), userSingleSelectionObservable, OrganizationPackage.Literals.USER__PASSWORD);
final IObservableValue passwordValueObservableValue = EMFObservables.observeDetailValue(Realm.getDefault(), userPasswordObservableValue, OrganizationPackage.Literals.PASSWORD_TYPE__VALUE);
final IObservableValue passwordValueObservableValue = EMFObservables.observeDetailValue(Realm.getDefault(), userPasswordObservableValue,
OrganizationPackage.Literals.PASSWORD_TYPE__VALUE);
passwordValueObservableValue.addValueChangeListener(new IValueChangeListener() {
@Override
public void handleValueChange(final ValueChangeEvent event) {
final IObservableValue value = event.getObservableValue();
final PasswordType password = (PasswordType) ((DetailObservableValue) value).getObserved();
password.setEncrypted(false);
}
});
final Binding binding = context.bindValue(SWTObservables.observeText(passwordText, SWT.Modify), passwordValueObservableValue,mandatoryStrategy,null);
ControlDecorationSupport.create(binding, SWT.LEFT, rightColumnComposite, new ControlDecorationUpdater(){
......
......@@ -25,7 +25,9 @@ Require-Bundle: org.bonitasoft.studio.condition;visibility:=reexport,
org.eclipse.jface.databinding;bundle-version="1.5.0",
org.bonitasoft.studio.pics;bundle-version="1.0.0",
org.eclipse.emf.edit,
org.eclipse.xtext.ui
org.eclipse.xtext.ui,
org.junit;resolution:=optional,
org.mockito;bundle-version="1.9.5"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.bonitasoft.studio.condition.ui.contentassist,org.b
......
......@@ -67,8 +67,8 @@ public class ComparisonExpressionValidator implements IExpressionValidator {
return ValidationStatus.ok();
}
final Injector injector = ConditionModelActivator.getInstance().getInjector(ConditionModelActivator.ORG_BONITASOFT_STUDIO_CONDITION_CONDITIONMODEL);
final XtextComparisonExpressionLoader xtextComparisonExpressionLoader = getXtextExpressionLoader(injector);
Resource resource = null;
final XtextComparisonExpressionLoader xtextComparisonExpressionLoader = new XtextComparisonExpressionLoader(injector);
try {
resource = xtextComparisonExpressionLoader.loadResource(value.toString(), context);
} catch (final ComparisonExpressionLoadException e) {
......@@ -79,7 +79,7 @@ public class ComparisonExpressionValidator implements IExpressionValidator {
final IResourceValidator xtextResourceChecker = injector.getInstance(IResourceValidator.class);
final MultiStatus status = new MultiStatus(ExpressionEditorPlugin.PLUGIN_ID, 0, "", null);
final ConditionModelJavaValidator validator = injector.getInstance(ConditionModelJavaValidator.class);
final ResourceSet resourceSet = context.eResource().getResourceSet();
final ResourceSet resourceSet = getContextResourceSet();
validator.setCurrentResourceSet(resourceSet);
final List<Issue> issues = xtextResourceChecker.validate(resource, CheckMode.FAST_ONLY, null);
......@@ -99,6 +99,27 @@ public class ComparisonExpressionValidator implements IExpressionValidator {
return status;
}
/**
* Public for test purpose
*
* @param injector
* @return
*/
public XtextComparisonExpressionLoader getXtextExpressionLoader(final Injector injector) {
final XtextComparisonExpressionLoader xtextComparisonExpressionLoader = new XtextComparisonExpressionLoader(injector);
return xtextComparisonExpressionLoader;
}
/**
* Public for test purpose
*
* @return
*/
public ResourceSet getContextResourceSet() {
final ResourceSet resourceSet = context.eResource().getResourceSet();
return resourceSet;
}
private void updateDependencies(final Resource resource) {
if(domain != null && inputExpression != null){
domain.getCommandStack().execute(new RemoveCommand(domain, inputExpression, ExpressionPackage.Literals.EXPRESSION__REFERENCED_ELEMENTS, inputExpression.getReferencedElements()));
......
......@@ -64,7 +64,7 @@ public class XtextComparisonExpressionLoader {
final Resource resource = loadResource(comparisonExpression, context);
final EList<EObject> contents = resource.getContents();
if (contents.isEmpty()) {
throw new ComparisonExpressionLoadException("Failed to laod comparison expression " + comparisonExpression);
throw new ComparisonExpressionLoadException("Failed to load comparison expression " + comparisonExpression);
}
if (context != null && context.eResource() != null) {
return resolveProxies(resource, context.eResource().getResourceSet());
......@@ -72,7 +72,13 @@ public class XtextComparisonExpressionLoader {
return (Operation_Compare) contents.get(0);
}
protected List<String> getAccessibleReferences(final EObject context) {
/**
* Public for test purpose
*
* @param context
* @return
*/
public List<String> getAccessibleReferences(final EObject context) {
final List<String> accessibleObjects = new ArrayList<String>();
for (final Data d : ModelHelper.getAccessibleData(context)) {
accessibleObjects.add(ModelHelper.getEObjectID(d));
......
......@@ -49,6 +49,7 @@ import org.bonitasoft.studio.model.process.AbstractProcess;
import org.bonitasoft.studio.model.process.AssociatedFile;
import org.bonitasoft.studio.model.process.Element;
import org.bonitasoft.studio.model.process.MainProcess;
import org.bonitasoft.studio.model.process.PageFlow;
import org.bonitasoft.studio.model.process.Pool;
import org.bonitasoft.studio.model.process.ProcessPackage;
import org.bonitasoft.studio.model.process.ResourceFile;
......@@ -244,32 +245,21 @@ public class DuplicateDiagramOperation implements IRunnableWithProgress {
}
}
/* Duplicate Confirmation Template */
final AssociatedFile confirmationTemplate = newProc.getConfirmationTemplate();
if (confirmationTemplate != null) {
final File confirmationFile = WebTemplatesUtil.getFile(confirmationTemplate.getPath());
if (confirmationFile != null) {
final ApplicationResourceFileStore artifact = getApplicationResourceFileStore(
resourceStore, newProcId);
final String confTemplateRelative = artifact.setConfirmationTemplate(confirmationFile.getAbsolutePath(), newProc);
confirmationTemplate.setPath(confTemplateRelative);
} else {
newProc.setConfirmationTemplate(null);
}
}
/* And also in all tasks */
//TODO: duplicate confirmation template for tasks
/* Duplicate Error Template */
final AssociatedFile errorTemplate = newProc.getErrorTemplate();
if (errorTemplate != null) {
final File errorFile = WebTemplatesUtil.getFile(errorTemplate.getPath());
if (errorFile != null) {
final ApplicationResourceFileStore artifact = getApplicationResourceFileStore(
resourceStore, newProcId);
final String errorTemplateRelative = artifact.setErrorTemplate(errorFile.getAbsolutePath());
errorTemplate.setPath(errorTemplateRelative);
} else {
newProc.setErrorTemplate(null);
final List<PageFlow> pageFlows = ModelHelper.getAllItemsOfType(newProc, ProcessPackage.Literals.PAGE_FLOW);
for (final PageFlow pageFlow : pageFlows) {
final AssociatedFile confirmationTemplate = pageFlow.getConfirmationTemplate();
if (confirmationTemplate != null) {
final File confirmationFile = WebTemplatesUtil.getFile(confirmationTemplate.getPath());
if (confirmationFile != null) {
final ApplicationResourceFileStore artifact = getApplicationResourceFileStore(
resourceStore, newProcId);
final String confTemplateRelative = artifact.setConfirmationTemplate(confirmationFile.getAbsolutePath(), pageFlow);
confirmationTemplate.setPath(confTemplateRelative);
} else {
pageFlow.setConfirmationTemplate(null);
}
}
}
......
package org.bonitasoft.studio.properties.sections.general;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import org.bonitasoft.studio.common.properties.ExtensibleGridPropertySection;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class NameGridPropertySectionContributionTest {
@Mock
private NameGridPropertySectionContribution nameGridPropertySectionContribution;
@Mock
private TabbedPropertySheetPage sheetPage;
private ExtensibleGridPropertySection gridPropertySection;
@Mock
private Display displayMock;
@Mock
private IGraphicalEditPart editPart;
@Mock
private ITextAwareEditPart textAwareEP;
@Before
public void setUp() throws Exception {
nameGridPropertySectionContribution = new NameGridPropertySectionContribution(sheetPage, gridPropertySection);
}
@After
public void tearDown() throws Exception {
}
@Test
public void should_updatePartName_call_refresh_on_pool_edit_part_asynchronously() throws Exception {
when(editPart.getChildren()).thenReturn(Arrays.asList(textAwareEP));
nameGridPropertySectionContribution.setSelection(new StructuredSelection(editPart));
nameGridPropertySectionContribution.updatePartName("new name", displayMock);
verify(displayMock).asyncExec(any(Runnable.class));
}
}
......@@ -107,7 +107,7 @@ public class NameGridPropertySectionContribution extends AbstractNamePropertySec
}
};
private final DiagramRepositoryStore diagramStore;
// private final DiagramRepositoryStore diagramStore;
/**
* @param tabbedPropertySheetPage
......@@ -116,7 +116,6 @@ public class NameGridPropertySectionContribution extends AbstractNamePropertySec
public NameGridPropertySectionContribution(final TabbedPropertySheetPage tabbedPropertySheetPage,
final ExtensibleGridPropertySection extensibleGridPropertySection) {
super(tabbedPropertySheetPage, extensibleGridPropertySection);
diagramStore = RepositoryManager.getInstance().getCurrentRepository().getRepositoryStore(DiagramRepositoryStore.class);
}
protected void updateEvents(final Element element) {
......@@ -244,7 +243,7 @@ public class NameGridPropertySectionContribution extends AbstractNamePropertySec
@Override
public void handleValueChange(final ValueChangeEvent event) {
updatePropertyTabTitle();
updatePartName((String) event.diff.getNewValue());
updatePartName((String) event.diff.getNewValue(), Display.getDefault());
}
});
ControlDecorationSupport.create(context.bindValue(observable,
......@@ -252,17 +251,27 @@ public class NameGridPropertySectionContribution extends AbstractNamePropertySec
bindingInitialized = true;
}
protected void updatePartName(final String name) {
protected void updatePartName(final String name, final Display display) {
if (selection != null && !selection.isEmpty()) {
final ITextAwareEditPart textAwareEditPart = getTextAwareEditPart((IStructuredSelection) selection);
if (textAwareEditPart != null) {
textAwareEditPart.setLabelText(name);
display.asyncExec(refreshPoolEditPart(textAwareEditPart));
}
}
}
protected Runnable refreshPoolEditPart(final ITextAwareEditPart textAwareEditPart) {
return new Runnable() {
@Override
public void run() {
final EditPart poolEp = getPoolEditPart(textAwareEditPart);
if (poolEp != null) {
poolEp.refresh();
}
}
}
};
}
protected EditPart getPoolEditPart(final EditPart textAwareEditPart) {
......@@ -305,6 +314,7 @@ public class NameGridPropertySectionContribution extends AbstractNamePropertySec
protected void editDiagramAndPoolNameAndVersion() {
final MainProcess diagram = ModelHelper.getMainProcess(element);
final DiagramRepositoryStore diagramStore = RepositoryManager.getInstance().getRepositoryStore(DiagramRepositoryStore.class);
final OpenNameAndVersionForDiagramDialog nameDialog = new OpenNameAndVersionForDiagramDialog(Display.getDefault().getActiveShell(), diagram,
diagramStore);
if (nameDialog.open() == Dialog.OK) {
......@@ -343,6 +353,7 @@ public class NameGridPropertySectionContribution extends AbstractNamePropertySec
protected void editSinglePoolNameAndVersion() {
final MainProcess diagram = ModelHelper.getMainProcess(element);
final DiagramRepositoryStore diagramStore = RepositoryManager.getInstance().getRepositoryStore(DiagramRepositoryStore.class);
final OpenNameAndVersionDialog dialog1 = new OpenNameAndVersionDialog(Display.getDefault().getActiveShell(), diagram, element.getName(),
((Pool) element).getVersion(), diagramStore);
if (dialog1.open() == Dialog.OK) {
......
......@@ -45,7 +45,9 @@ public class CatchMessageEventNamesExpressionNatureProvider implements IExpressi
final Set<String> names = new HashSet<String>();
for(final AbstractProcess process : processes){
for(final AbstractCatchMessageEvent catchMessage : ModelHelper.getAllCatchEvent(process)){
if(!names.contains(catchMessage.getName()) && (catchMessage.getIncomingMessag() == null || catchMessage.getIncomingMessag().getSource().equals(throwMessage))){
if (!names.contains(catchMessage.getName())
&& (catchMessage.getIncomingMessag() == null || catchMessage.getIncomingMessag().getSource() == null || catchMessage
.getIncomingMessag().getSource().equals(throwMessage))) {
names.add(catchMessage.getName());
}
}
......
......@@ -38,9 +38,9 @@ Bundle-Vendor: BonitaSoft S.A.
Import-Package: org.bonitasoft.engine.expression,
org.bonitasoft.engine.operation,
org.bonitasoft.studio.properties.i18n
Export-Package: org.bonitasoft.studio.validation,org.bonitasoft.studio
.validation.constraints,org.bonitasoft.studio.validation.constraints.
connector,org.bonitasoft.studio.validation.constraints.form;x-friends
:="org.bonitasoft.studio.validation.test",org.bonitasoft.studio.valid
ation.constraints.process;x-friends:="org.bonitasoft.studio.validatio
n.test"
Export-Package: org.bonitasoft.studio.validation,
org.bonitasoft.studio.validation.constraints,
org.bonitasoft.studio.validation.constraints.connector,
org.bonitasoft.studio.validation.constraints.form;x-friends:="org.bonitasoft.studio.validation.test",
org.bonitasoft.studio.validation.constraints.process;x-friends:="org.bonitasoft.studio.validation.test",
org.bonitasoft.studio.validation.i18n
......@@ -194,13 +194,13 @@ public class ValidatorsPropertySection extends AbstractBonitaDescriptionSection
// Label Label
getWidgetFactory().createLabel(fieldsComposite, Messages.Validator_ErrorMessage+" *");
// Label text
labelExpressionViewer = new ExpressionViewer(fieldsComposite,SWT.BORDER,getWidgetFactory(),getEditingDomain(),FormPackage.Literals.VALIDATOR__DISPLAY_NAME);
labelExpressionViewer = new ExpressionViewer(fieldsComposite, SWT.BORDER, getWidgetFactory());
labelExpressionViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 3, 1));
labelExpressionViewer.addFilter(new AvailableExpressionTypeFilterWitoutContingentWidgets());
/*create the parameter field */
getWidgetFactory().createLabel(fieldsComposite, Messages.Validator_Parameter);
parameterExpressionViewer = new ExpressionViewer(fieldsComposite,SWT.BORDER,getWidgetFactory(),getEditingDomain(),FormPackage.Literals.VALIDATOR__PARAMETER);
parameterExpressionViewer = new ExpressionViewer(fieldsComposite, SWT.BORDER, getWidgetFactory());
parameterExpressionViewer.getControl().setLayoutData(GridDataFactory.fillDefaults().hint(300, SWT.DEFAULT).span(3, 1).create());
parameterExpressionViewer.addFilter(new AvailableExpressionTypeFilterWitoutContingentWidgets());
......@@ -597,12 +597,10 @@ public class ValidatorsPropertySection extends AbstractBonitaDescriptionSection
final ValidatorDescriptor descriptior = validatorStore.getValidatorDescriptor(validatorId) ;
if(descriptior != null){
final boolean enabled = descriptior.getHasParameter() ;
parameterExpressionViewer.getTextControl().setEnabled(enabled);
parameterExpressionViewer.getButtonControl().setEnabled(enabled);
parameterExpressionViewer.getControl().setEnabled(enabled);
if (descriptior.getName().equals(GROOVY_TYPE) && !currentValidator.getParameter().getReturnType().equals(Boolean.class.getName())){
getEditingDomain().getCommandStack().execute(SetCommand.create(getEditingDomain(), currentValidator.getParameter(), ExpressionPackage.Literals.EXPRESSION__RETURN_TYPE, Boolean.class.getName()));
getEditingDomain().getCommandStack().execute(SetCommand.create(getEditingDomain(), currentValidator.getParameter(), ExpressionPackage.Literals.EXPRESSION__RETURN_TYPE_FIXED, true));
}
else {
if (descriptior.getName().equals(REGULAR_TYPE)){
......@@ -611,20 +609,10 @@ public class ValidatorsPropertySection extends AbstractBonitaDescriptionSection
}
}
}
}
}
}
// /**
// * @return
// */
// private boolean shouldShowEditParameterButton() {
// return currentValidator != null &&
// (GroovyFieldValidator.class.getName().equals(currentValidator.getValidatorClass())
// || GroovyFieldValidator.class.getName().equals(currentValidator.getValidatorClass()));
// }
/**
* get the Validable
*
......@@ -722,7 +710,6 @@ public class ValidatorsPropertySection extends AbstractBonitaDescriptionSection
tableViewer.setSelection(new StructuredSelection(validator));
}
@Override
public void dispose() {
super.dispose();
......
......@@ -23,6 +23,7 @@ Require-Bundle: org.bonitasoft.studio.common;bundle-version="1.0.0",
org.apache.log4j;bundle-version="1.2.15",
org.junit,
org.bonitasoft.studio.dependencies,
org.bonitasoft.studio.test.swtbot.util
org.bonitasoft.studio.test.swtbot.util,
org.bonitasoft.studio.swtbot.framework;bundle-version="6.4.1"
<?xml version="1.0" encoding="UTF-8"?>
<organization:Organization xmlns:organization="http://documentation.bonitasoft.com/organization-xml-schema/1.1">
<customUserInfoDefinitions/>
<users>
<user userName="User1">
<firstName>User1</firstName>
<lastName>User1</lastName>
<manager></manager>
<personalData/>
<professionalData/>
<password encrypted="true">thisIsAFakedEncryptedValue</password>
<customUserInfoValues/>
</user>
</users>
<roles>
<role name="Role1">
<displayName>Role1</displayName>
</role>
</roles>
<groups>
<group name="Group1">
<displayName>Group1</displayName>
</group>
</groups>
<memberships>
<membership>
<userName>User1</userName>
<roleName>Role1</roleName>
<groupName>Group1</groupName>
</membership>
</memberships>
</organization:Organization>
\ No newline at end of file
/**
* Copyright (C) 2014 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.actors.tests.SWTbot;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import org.bonitasoft.studio.actors.model.organization.PasswordType;
import org.bonitasoft.studio.actors.repository.OrganizationFileStore;
import org.bonitasoft.studio.actors.repository.OrganizationRepositoryStore;
import org.bonitasoft.studio.common.repository.RepositoryManager;
import org.bonitasoft.studio.swtbot.framework.application.BotApplicationWorkbenchWindow;
import org.bonitasoft.studio.swtbot.framework.organization.BotManageOrganizationWizard;
import org.bonitasoft.studio.test.swtbot.util.SWTBotTestUtil;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.swtbot.eclipse.gef.finder.SWTBotGefTestCase;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SWTBotJunit4ClassRunner.class)
public class TestOrganizationPassword extends SWTBotGefTestCase {
@Test
public void testImportExportWithPasswordUpdated() throws IOException {
importOrganizationProgrammatically();
final BotApplicationWorkbenchWindow botApplicationWorkbenchWindow = new BotApplicationWorkbenchWindow(bot);
final BotManageOrganizationWizard manageOrganizationWizard = botApplicationWorkbenchWindow.organizationMenu().manage();
manageOrganizationWizard.selectOrganization("OrganizationWithEncryptedPassword");
manageOrganizationWizard.next(/* Group page */).next(/* Role page */).next();
manageOrganizationWizard.manageUsers().selectUser("User1").setPassword("updatedPassord");
manageOrganizationWizard.finish();
SWTBotTestUtil.waitUntilBonitaBPmShellIsActive(bot);