Commit 882a9c17 authored by Romain Bioteau's avatar Romain Bioteau Committed by GitHub
Browse files

feat(startup) remove import workspace (#1570)

Closes BST-76
parent f160e329
......@@ -33,10 +33,9 @@ incompatibleJavaVersionMessage=You are running %s using an incompatible Java ver
exitWarningMessage=Exit {0}?\n\nClosing the Studio will delete unsaved work in the {1} and in the {2}. Be sure you have saved any opened elements in the {2}, and export your custom resources from the {1}.\n\nNote: In <A>Preferences > Database</A>, you can uncheck the "On exit clean database" option to keep your database content.
doNotShowMeAgain=Do not show me this dialog again
startDialogTitle=Welcome to Bonita Studio %s
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work from an existing workspace.
startDialogDetails=you can import an existing workspace later, using the following menu from the Studio:\nFile > Import > Workspace
startDialogMsg=\u2022 Many new values in this Bonita. We strongly advise you to read the <a>%s</a>.\n\n\u2022 If you are upgrading from a previous version you may want to import your work using BOS Archives.
startDialogDetails=you can import a BOS Archive using the following menu from the Studio:\nFile > Import > Import BOS archive
releaseNote=release notes
importWorkspace=Import a workspace
_6xFormsDontWorkAnymore=6.x forms based on Google Web Toolkit (GWT) technology are not supported anymore
letsStart=Let's start !
......@@ -16,7 +16,6 @@ package;
import java.util.HashMap;
import java.util.Objects;
......@@ -24,40 +23,25 @@ import;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.NotEnabledException;
import org.eclipse.core.commands.NotHandledException;
import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.e4.core.commands.ECommandService;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.internal.WorkbenchWindow;
public class StartupMessageDialog extends MessageDialogWithPrompt {
private Link startMessage;
private Label title;
public static int IMPORT_BUTTON_ID = 38;
public StartupMessageDialog(Shell parentShell) {
......@@ -141,10 +125,8 @@ public class StartupMessageDialog extends MessageDialogWithPrompt {
protected void createButtonsForButtonBar(Composite parent) {
Button importButton = createButton(parent, IMPORT_BUTTON_ID, Messages.importWorkspace, false);
importButton.addListener(SWT.Selection, e -> Display.getDefault().asyncExec(this::openImportWorkspaceDialog));
private void createDetailsSection(Composite parent) {
......@@ -173,37 +155,4 @@ public class StartupMessageDialog extends MessageDialogWithPrompt {
private void openImportWorkspaceDialog() {
IEclipseContext context = ((WorkbenchWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow()).getModel()
ECommandService commandService = context.get(ECommandService.class);
Command importWorksapceCommand = commandService.getCommand("");
try {
.executeWithChecks(new ExecutionEvent(importWorksapceCommand, new HashMap<>(), null, context));
} catch (ExecutionException | NotHandledException | NotDefinedException | NotEnabledException e1) {
throw new RuntimeException("Failed to execute import workspace command", e1);
private String getAccessibleMessageFor(Image image) {
if (image.equals(getErrorImage())) {
return JFaceResources.getString("error");//$NON-NLS-1$
if (image.equals(getWarningImage())) {
return JFaceResources.getString("warning");//$NON-NLS-1$
if (image.equals(getInfoImage())) {
return JFaceResources.getString("info");//$NON-NLS-1$
if (image.equals(getQuestionImage())) {
return JFaceResources.getString("question"); //$NON-NLS-1$
return null;
......@@ -68,7 +68,6 @@ public class Messages extends NLS {
public static String doNotShowMeAgain;
public static String startDialogMsg;
public static String startDialogDetails;
public static String importWorkspace;
public static String releaseNote;
public static String letsStart;
public static String _6xFormsDontWorkAnymore;
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