Commit e09841b8 authored by Bonita CI's avatar Bonita CI
Browse files

Merge branch 'CoreProduct' into 'master'

parents 9c112d24 ead4e8d4
......@@ -45,8 +45,20 @@ public class «EXPAND className» extends org.eclipse.gmf.runtime.diagram.ui.pro
}
super.dispose();
}
«REM»Remove unwanted contextual popup contributions«ENDREM»
/**
*@Generated BonitaSoft
*/
@Override
protected void addDefaultExclusions() {
super.addDefaultExclusions();
final java.util.Set exclusionSet = getExclusionSet();
exclusionSet.add("org.eclipse.releng.tools.advancedFixCopyrights");
exclusionSet.add("groovyfile");
exclusionSet.add("groovyresource");
}
«EXPAND xpt::Common::generatedMemberComment»
«REM»Remove the contibution of the delete from model action«ENDREM»
/**
*@Generated BonitaSoft
......
......@@ -45,9 +45,24 @@ public class «EXPAND className» extends org.eclipse.gmf.runtime.diagram.ui.pro
}
super.dispose();
}
«REM»Remove unwanted contextual popup contributions«ENDREM»
/**
*@Generated BonitaSoft
*/
@Override
protected void addDefaultExclusions() {
super.addDefaultExclusions();
final java.util.Set exclusionSet = getExclusionSet();
exclusionSet.add("org.eclipse.releng.tools.advancedFixCopyrights");
exclusionSet.add("groovyfile");
exclusionSet.add("groovyresource");
}
«EXPAND xpt::Common::generatedMemberComment»
«REM»Remove the contibution of the delete from model action«ENDREM»
/**
*@Generated BonitaSoft
*/
public void buildContextMenu(final org.eclipse.jface.action.IMenuManager menu) {
getViewer().flush();
try {
......
......@@ -12,7 +12,6 @@ Export-Package: org.bonitasoft.studio.actors,
org.bonitasoft.studio.actors.model.organization,
org.bonitasoft.studio.actors.model.organization.impl,
org.bonitasoft.studio.actors.model.organization.util,
org.bonitasoft.studio.actors.preference,
org.bonitasoft.studio.actors.repository,
org.bonitasoft.studio.actors.ui.wizard.page,
org.bonitasoft.studio.actors.validator
......@@ -60,6 +59,7 @@ Import-Package: org.bonitasoft.engine.api,
org.bonitasoft.engine.bpm,
org.bonitasoft.engine.bpm.bar,
org.bonitasoft.engine.bpm.process,
org.bonitasoft.engine.exception,
org.bonitasoft.engine.filter,
org.bonitasoft.engine.identity,
org.bonitasoft.engine.profile,
......
......@@ -5,54 +5,72 @@
* 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.action;
import java.io.FileNotFoundException;
import org.bonitasoft.engine.api.IdentityAPI;
import org.bonitasoft.engine.exception.BonitaHomeNotSetException;
import org.bonitasoft.engine.exception.SearchException;
import org.bonitasoft.engine.exception.ServerAPIException;
import org.bonitasoft.engine.exception.UnknownAPITypeException;
import org.bonitasoft.engine.search.SearchOptionsBuilder;
import org.bonitasoft.engine.session.APISession;
import org.bonitasoft.engine.session.InvalidSessionException;
import org.bonitasoft.studio.actors.operation.PublishOrganizationOperation;
import org.bonitasoft.studio.actors.repository.OrganizationFileStore;
import org.bonitasoft.studio.actors.repository.OrganizationRepositoryStore;
import org.bonitasoft.studio.common.extension.IEngineAction;
import org.bonitasoft.studio.common.repository.Repository;
import org.bonitasoft.studio.common.repository.RepositoryManager;
import org.bonitasoft.studio.common.repository.core.ActiveOrganizationProvider;
import org.bonitasoft.studio.engine.BOSEngineManager;
import org.bonitasoft.studio.preferences.BonitaPreferenceConstants;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
/**
* @author Romain Bioteau
*
*/
public class PublishActiveOrganizationAction implements IEngineAction {
private final ActiveOrganizationProvider activeOrganizationProvider;
public PublishActiveOrganizationAction() {
activeOrganizationProvider = new ActiveOrganizationProvider();
}
/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.common.extension.IEngineAction#run(org.bonitasoft.engine.session.APISession)
*/
@Override
public void run(APISession session) throws Exception {
if(BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore().getBoolean(BonitaPreferenceConstants.LOAD_ORGANIZATION)) {
String artifactId = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore().getString(BonitaPreferenceConstants.DEFAULT_ORGANIZATION) +"."+OrganizationRepositoryStore.ORGANIZATION_EXT ;
OrganizationRepositoryStore store = RepositoryManager.getInstance().getRepositoryStore(OrganizationRepositoryStore.class);
OrganizationFileStore organizationFileStore = store.getChild(artifactId);
if(organizationFileStore == null){
throw new FileNotFoundException(artifactId);
public void run(final APISession session) throws Exception {
if (noOrganizationDeployed(session)
|| BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore().getBoolean(BonitaPreferenceConstants.LOAD_ORGANIZATION)) {
final String artifactId = activeOrganizationProvider.getActiveOrganization();
final OrganizationRepositoryStore store = RepositoryManager.getInstance().getRepositoryStore(OrganizationRepositoryStore.class);
final OrganizationFileStore organizationFileStore = store.getChild(artifactId + "." + OrganizationRepositoryStore.ORGANIZATION_EXT);
if (organizationFileStore == null) {
throw new FileNotFoundException(artifactId + "." + OrganizationRepositoryStore.ORGANIZATION_EXT);
}
PublishOrganizationOperation op = new PublishOrganizationOperation(organizationFileStore.getContent());
final PublishOrganizationOperation op = new PublishOrganizationOperation(organizationFileStore.getContent());
op.setSession(session);
op.run(Repository.NULL_PROGRESS_MONITOR);
}
}
}
private boolean noOrganizationDeployed(final APISession session)
throws InvalidSessionException, BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException, SearchException {
final IdentityAPI identityAPI = BOSEngineManager.getInstance().getIdentityAPI(session);
return identityAPI.searchUsers(new SearchOptionsBuilder(0, 1).done()).getCount() == 0
&& identityAPI.searchGroups(new SearchOptionsBuilder(0, 1).done()).getCount() == 0
&& identityAPI.searchRoles(new SearchOptionsBuilder(0, 1).done()).getCount() == 0;
}
}
/**
* Copyright (C) 2012 BonitaSoft S.A.
* BonitaSoft, 31 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.preference;
import org.bonitasoft.studio.preferences.BonitaPreferenceConstants;
/**
* @author Romain Bioteau
*
*/
public interface ActorsPreferenceConstants {
public static final String DEFAULT_ORGANIZATION = BonitaPreferenceConstants.DEFAULT_ORGANIZATION ;
public static final String DEFAULT_ORGANIZATION_NAME = BonitaPreferenceConstants.DEFAULT_ORGANIZATION_NAME ;
public static final String TOGGLE_STATE_FOR_PUBLISH_ORGANIZATION = BonitaPreferenceConstants.TOGGLE_STATE_FOR_PUBLISH_ORGANIZATION;
public static final String PUBLISH_ORGANIZATION = BonitaPreferenceConstants.PUBLISH_ORGANIZATION;
}
......@@ -53,7 +53,7 @@ public class ImportActorFilterArchiveOperation extends ImportConnectorArchiveOpe
@Override
protected SourceRepositoryStore<?> getSourceStore() {
return (SourceRepositoryStore<?>) RepositoryManager.getInstance().getRepositoryStore(ActorFilterSourceRepositoryStore.class);
return RepositoryManager.getInstance().getRepositoryStore(ActorFilterSourceRepositoryStore.class);
}
}
/**
* Copyright (C) 2009 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
*
* Copyright (C) 2009-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
* 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.handler;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import org.bonitasoft.studio.actors.i18n.Messages;
import org.bonitasoft.studio.actors.repository.ImportActorFilterArchiveOperation;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.IProgressService;
import org.bonitasoft.studio.connectors.handler.ImportConnectorHandler;
import org.bonitasoft.studio.connectors.repository.ImportConnectorArchiveOperation;
/**
* @author Mickael Istria
*
*/
public class ImportActorFilterHandler extends AbstractHandler {
public class ImportActorFilterHandler extends ImportConnectorHandler {
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.connectors.handler.ImportConnectorHandler#newImportOperation()
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
FileDialog fileDialog = new FileDialog(Display.getDefault().getActiveShell(), SWT.OPEN);
fileDialog.setFilterExtensions(new String[] {"*.zip"});
fileDialog.setText(Messages.importFilterArchive);
final String fileName = fileDialog.open();
IProgressService service = PlatformUI.getWorkbench().getProgressService() ;
service.run(true, false,new IRunnableWithProgress() {
protected ImportConnectorArchiveOperation newImportOperation() {
return new ImportActorFilterArchiveOperation();
}
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try{
if (fileName != null) {
monitor.beginTask(Messages.importingFilterArchive,IProgressMonitor.UNKNOWN) ;
File zipFile = new File(fileName);
ImportActorFilterArchiveOperation importOp = new ImportActorFilterArchiveOperation() ;
importOp.setFile(zipFile) ;
final IStatus status = importOp.run(monitor) ;
if(IStatus.OK == status.getSeverity()){
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
MessageDialog.openInformation(Display.getDefault().getActiveShell(), Messages.importSuccessfulTitle, Messages.importSuccessfulMsg) ;
}
}) ;
}else{
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.importFailedTitle,Messages.bind(Messages.importFailedMsg,status.getMessage())) ;
}
}) ;
}
}
}catch (Exception e) {
throw new InvocationTargetException(e);
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.connectors.handler.ImportConnectorHandler#getDialogTitle()
*/
@Override
protected String getDialogTitle() {
return Messages.importFilterArchive;
}
}
});
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.connectors.handler.ImportConnectorHandler#getFailedImportTitle()
*/
@Override
protected String getFailedImportTitle() {
return Messages.importFailedTitle;
}
return null;
} catch (Exception ex) {
throw new ExecutionException(ex.getMessage(), ex);
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.connectors.handler.ImportConnectorHandler#getFailedTitleMessage()
*/
@Override
protected String getFailedImportMessage() {
return Messages.importFailedMsg;
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.connectors.handler.ImportConnectorHandler#getSuccessDialogMessage()
*/
@Override
protected String getImportSuccessMessage() {
return Messages.importSuccessfulMsg;
}
/*
* (non-Javadoc)
* @see org.bonitasoft.studio.connectors.handler.ImportConnectorHandler#getSuccessDialogTitle()
*/
@Override
protected String getImportSuccessTitle() {
return Messages.importSuccessfulTitle;
}
}
......@@ -20,10 +20,10 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bonitasoft.studio.actors.ActorsPlugin;
import org.bonitasoft.studio.actors.i18n.Messages;
import org.bonitasoft.studio.actors.model.organization.Organization;
import org.bonitasoft.studio.actors.model.organization.User;
import org.bonitasoft.studio.actors.preference.ActorsPreferenceConstants;
import org.bonitasoft.studio.actors.repository.OrganizationRepositoryStore;
import org.bonitasoft.studio.actors.ui.wizard.page.AbstractOrganizationWizardPage;
import org.bonitasoft.studio.actors.ui.wizard.page.GroupsWizardPage;
......@@ -33,16 +33,18 @@ import org.bonitasoft.studio.actors.ui.wizard.page.UsersWizardPage;
import org.bonitasoft.studio.actors.validator.OrganizationValidator;
import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.common.repository.RepositoryManager;
import org.bonitasoft.studio.common.repository.core.ActiveOrganizationProvider;
import org.bonitasoft.studio.common.repository.model.IRepositoryFileStore;
import org.bonitasoft.studio.common.repository.model.ReadFileStoreException;
import org.bonitasoft.studio.common.repository.preferences.OrganizationPreferenceConstants;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.preferences.BonitaPreferenceConstants;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.Parameterization;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
......@@ -50,7 +52,6 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.widgets.Display;
......@@ -70,8 +71,10 @@ public class ManageOrganizationWizard extends Wizard {
private Organization activeOrganization;
private boolean activeOrganizationHasBeenModified = false;
String userName;
private final ActiveOrganizationProvider activeOrganizationProvider;
public ManageOrganizationWizard() {
activeOrganizationProvider = new ActiveOrganizationProvider();
organizations = new ArrayList<Organization>();
organizationsWorkingCopy = new ArrayList<Organization>();
setWindowTitle(Messages.manageOrganizationTitle);
......@@ -83,8 +86,10 @@ public class ManageOrganizationWizard extends Wizard {
BonitaStudioLog.error("Failed read organization content", e);
}
}
final String activeOrganizationName = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
.getString(BonitaPreferenceConstants.DEFAULT_ORGANIZATION);
final IScopeContext projectScope = RepositoryManager.getInstance().getCurrentRepository().getScopeContext();
final IEclipsePreferences node = projectScope.getNode(ActorsPlugin.PLUGIN_ID);
final String activeOrganizationName = node.get(OrganizationPreferenceConstants.DEFAULT_ORGANIZATION,
OrganizationPreferenceConstants.DEFAULT_ORGANIZATION_NAME);
for (final Organization orga : organizations) {
final Organization copy = EcoreUtil.copy(orga);
if (activeOrganizationName.equals(orga.getName())) {
......@@ -190,12 +195,11 @@ public class ManageOrganizationWizard extends Wizard {
BonitaStudioLog.error(e);
return false;
}
final IPreferenceStore preferenceStore = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore();
final String pref = preferenceStore.getString(ActorsPreferenceConstants.TOGGLE_STATE_FOR_PUBLISH_ORGANIZATION);
final boolean publishOrganization = preferenceStore.getBoolean(ActorsPreferenceConstants.PUBLISH_ORGANIZATION);
final String pref = activeOrganizationProvider.getPublishOrganizationState();
final boolean publishOrganization = activeOrganizationProvider.shouldPublishOrganization();
if (publishOrganization && MessageDialogWithToggle.ALWAYS.equals(pref)) {
try {
publishOrganization(preferenceStore);
publishOrganization();
} catch (final InvocationTargetException e) {
BonitaStudioLog.error(e);
......@@ -209,25 +213,20 @@ public class ManageOrganizationWizard extends Wizard {
Messages.organizationHasBeenModifiedTitle,
null, Messages.bind(Messages.organizationHasBeenModifiedMessage, activeOrganization.getName()), MessageDialog.WARNING, buttons, 0,
Messages.doNotDisplayAgain, false);
mdwt.setPrefStore(preferenceStore);
mdwt.setPrefKey(ActorsPreferenceConstants.TOGGLE_STATE_FOR_PUBLISH_ORGANIZATION);
mdwt.setPrefStore(activeOrganizationProvider.getPreferenceStore());
mdwt.setPrefKey(OrganizationPreferenceConstants.TOGGLE_STATE_FOR_PUBLISH_ORGANIZATION);
final int index = mdwt.open();
if (index == 2) {
try {
publishOrganization(preferenceStore);
if (mdwt.getToggleState()) {
preferenceStore.setDefault(ActorsPreferenceConstants.PUBLISH_ORGANIZATION, true);
}
} catch (final InvocationTargetException e) {
BonitaStudioLog.error(e);
} catch (final InterruptedException e) {
publishOrganization();
activeOrganizationProvider.savePublishOrganization(mdwt.getToggleState());
} catch (final InvocationTargetException | InterruptedException e) {
BonitaStudioLog.error(e);
}
} else {
if (mdwt.getToggleState()) {
preferenceStore.setDefault(ActorsPreferenceConstants.PUBLISH_ORGANIZATION, false);
preferenceStore.setDefault(ActorsPreferenceConstants.TOGGLE_STATE_FOR_PUBLISH_ORGANIZATION, MessageDialogWithToggle.ALWAYS);
activeOrganizationProvider.savePublishOrganization(false);
activeOrganizationProvider.savePublishOrganizationState(MessageDialogWithToggle.ALWAYS);
}
}
}
......@@ -236,13 +235,13 @@ public class ManageOrganizationWizard extends Wizard {
return true;
}
private void publishOrganization(final IPreferenceStore preferenceStore) throws InvocationTargetException, InterruptedException {
private void publishOrganization() throws InvocationTargetException, InterruptedException {
getContainer().run(true, false, new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor maonitor) throws InvocationTargetException, InterruptedException {
maonitor.beginTask(Messages.synchronizingOrganization, IProgressMonitor.UNKNOWN);
userName = preferenceStore.getString(BonitaPreferenceConstants.USER_NAME);
userName = activeOrganizationProvider.getDefaultUser();
if (isUserExist(activeOrganization.getUsers().getUser(), userName)) {
......
......@@ -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.actors.ui.wizard;
......@@ -21,17 +19,16 @@ import java.lang.reflect.InvocationTargetException;
import org.bonitasoft.studio.actors.i18n.Messages;
import org.bonitasoft.studio.actors.model.organization.Organization;
import org.bonitasoft.studio.actors.model.organization.User;
import org.bonitasoft.studio.actors.preference.ActorsPreferenceConstants;
import org.bonitasoft.studio.actors.repository.OrganizationFileStore;
import org.bonitasoft.studio.actors.ui.wizard.page.DefaultUserOrganizationWizardPage;
import org.bonitasoft.studio.actors.ui.wizard.page.SynchronizeOrganizationWizardPage;
import org.bonitasoft.studio.actors.validator.OrganizationValidationException;
import org.bonitasoft.studio.actors.validator.OrganizationValidator;
import org.bonitasoft.studio.common.log.BonitaStudioLog;
import org.bonitasoft.studio.common.repository.RepositoryManager;
import org.bonitasoft.studio.common.repository.core.ActiveOrganizationProvider;
import org.bonitasoft.studio.common.repository.model.IRepositoryFileStore;
import org.bonitasoft.studio.pics.Pics;
import org.bonitasoft.studio.preferences.BonitaPreferenceConstants;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.Parameterization;
import org.eclipse.core.commands.ParameterizedCommand;
......@@ -39,7 +36,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.widgets.Display;
......@@ -49,7 +45,6 @@ import org.eclipse.ui.handlers.IHandlerService;
/**
* @author Romain Bioteau
*
*/
public class SynchronizeOrganizationWizard extends Wizard {
......@@ -58,44 +53,46 @@ public class SynchronizeOrganizationWizard extends Wizard {
private DefaultUserOrganizationWizardPage userPage;
private Organization activeOrganization;
private final OrganizationValidator validator;
private final ActiveOrganizationProvider activeOrganizationProvider;
public SynchronizeOrganizationWizard(){
public SynchronizeOrganizationWizard() {
setWindowTitle(Messages.synchronizeOrganizationTitle);
setDefaultPageImageDescriptor(Pics.getWizban()) ;
setForcePreviousAndNextButtons(false) ;
setNeedsProgressMonitor(true) ;
setDefaultPageImageDescriptor(Pics.getWizban());
setForcePreviousAndNextButtons(false);
setNeedsProgressMonitor(true);
validator = new OrganizationValidator();
activeOrganizationProvider = new ActiveOrganizationProvider();
}
@Override
public void addPages() {
page = new SynchronizeOrganizationWizardPage() ;
userPage = new DefaultUserOrganizationWizardPage() ;