Commit 37e0f668 authored by Romain Bioteau's avatar Romain Bioteau

Merge remote-tracking branch 'origin/master' into dev

parents bef862fa 22a85904
......@@ -45,18 +45,12 @@ public abstract class AbstractFolderRepositoryStore<T extends IRepositoryFileSto
}
protected void refresh(final IFolder folder) {
try {
folder.getWorkspace().run(new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
if (!folder.isSynchronized(IResource.DEPTH_INFINITE)) {
folder.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
}
}, Repository.NULL_PROGRESS_MONITOR);
} catch (final CoreException e) {
BonitaStudioLog.error(e);
if (!folder.isSynchronized(IResource.DEPTH_INFINITE)) {
try {
folder.refreshLocal(IResource.DEPTH_INFINITE, Repository.NULL_PROGRESS_MONITOR);
} catch (CoreException e) {
BonitaStudioLog.error(e);
}
}
}
......
......@@ -14,6 +14,10 @@
*/
package org.bonitasoft.studio.swtbot.framework.projectExplorer;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.allOf;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withId;
import java.util.Objects;
import java.util.Optional;
......@@ -25,6 +29,9 @@ import org.bonitasoft.studio.swtbot.framework.connector.ConnectorDefinitionWizar
import org.bonitasoft.studio.swtbot.framework.connector.ConnectorImplementationWizardBot;
import org.bonitasoft.studio.swtbot.framework.diagram.BotProcessDiagramPerspective;
import org.bonitasoft.studio.swtbot.framework.organization.BotManageOrganizationWizard;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
......@@ -157,6 +164,7 @@ public class ProjectExplorerBot extends BotBase {
}
protected SWTBotTree getProjectExplorerTree() {
bot.waitUntil(Conditions.waitForWidget(allOf(widgetOfType(Tree.class), withId("org.bonitasoft.studio.application.projectExplorerTree"))), 120000);
return bot.treeWithId("org.bonitasoft.studio.application.projectExplorerTree");
}
......
......@@ -101,7 +101,11 @@ public class SWTGefBotRule implements TestRule {
for (final SWTBotShell shell : shells) {
if (shell.isOpen() && !isEclipseShell(shell)) {
System.out.println(String.format("Trying to close shell '%s' after test failure %s",shell.getText(),e));
shell.close();
try {
shell.close();
}catch(TimeoutException e1) {
System.out.println(String.format("Failed to close shell %s: %s",shell.getText(),e1));
}
}
}
}
......
......@@ -25,7 +25,9 @@ Require-Bundle: org.junit,
org.eclipse.ui.workbench,
org.bonitasoft.studio.preferences;bundle-version="7.7.0",
org.eclipse.ui.browser;bundle-version="3.6.100",
org.bonitasoft.studio.connectors.model.edit
org.bonitasoft.studio.connectors.model.edit,
org.eclipse.m2e.core,
org.eclipse.equinox.preferences
Export-Package: org.bonitasoft.studio.console.test.util,
org.bonitasoft.studio.tests.utils.wizards,
org.bonitasoft.studio.util.test,
......
......@@ -14,6 +14,8 @@
*/
package org.bonitasoft.studio.util.test;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
......@@ -30,7 +32,12 @@ import org.bonitasoft.studio.preferences.BonitaCoolBarPreferenceConstant;
import org.bonitasoft.studio.preferences.BonitaPreferenceConstants;
import org.bonitasoft.studio.preferences.BonitaStudioPreferencesPlugin;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.internal.browser.WebBrowserUIPlugin;
import org.junit.runner.Description;
......@@ -174,6 +181,14 @@ public class BonitaSuite extends Suite {
WebBrowserUIPlugin.getInstance().getPreferenceStore()
.setValue(BonitaPreferenceConstants.CONSOLE_BROWSER_CHOICE, BonitaPreferenceConstants.INTERNAL_BROWSER);
EnginePlugin.getDefault().getPreferenceStore().setValue(EnginePreferenceConstants.LAZYLOAD_ENGINE, true);
IEclipsePreferences store = DefaultScope.INSTANCE.getNode(IMavenConstants.PLUGIN_ID);
try {
File defaultSettings = new File(
FileLocator.toFileURL(BonitaSuite.class.getResource("default_settings.xml")).getFile());
store.put(MavenPreferenceConstants.P_USER_SETTINGS_FILE, defaultSettings.getAbsolutePath()); //$NON-NLS-1$
} catch (IOException e) {
BonitaStudioLog.error(e);
}
FileActionDialog.setDisablePopup(true);
}
......
<?xml version="1.0" encoding="UTF-8"?>
<settings
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<localRepository>${user.home}/.m2/studio-repository</localRepository>
</settings>
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