Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 567035 implement floating license pack issuing #522

Merged
merged 1 commit into from
Nov 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.function.Supplier;

import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack;
import org.eclipse.passage.lic.internal.api.ServiceInvocationResult;
Expand All @@ -23,6 +24,7 @@
import org.eclipse.passage.loc.dashboard.ui.wizards.license.WizardInfoBar;
import org.eclipse.passage.loc.internal.api.IssuedFloatingLicense;
import org.eclipse.passage.loc.internal.dashboard.ui.i18n.IssueLicensePageMessages;
import org.eclipse.swt.SWT;

public final class IssueFloatingLicenseWizard extends Wizard {

Expand Down Expand Up @@ -58,7 +60,18 @@ public boolean performFinish() {
new DiagnosticDialog(getShell(), result.diagnostic()).open();
return false;
}
new WizardInfoBar(this).wipe();
reportSuccess(result.data().get());
return true;
}

private void reportSuccess(IssuedFloatingLicense data) {
MessageDialog.open(MessageDialog.INFORMATION, //
getShell(), //
IssueLicensePageMessages.IssueFloatingLicenseWizard_success,
String.format(IssueLicensePageMessages.IssueFloatingLicenseWizard_success_description,
data.residence().toAbsolutePath()),
SWT.NONE);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public final class IssueLicensePageMessages extends NLS {
public static String IssueLicensingMailJob_task_text;
public static String IssueFloatingLicenseWizard_failure;
public static String IssueFloatingLicenseWizard_title;
public static String IssueFloatingLicenseWizard_success;
public static String IssueFloatingLicenseWizard_success_description;
public static String Floating_DataPage_description;
public static String Floating_DataPage_title;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@ IssueLicensingMailJob_task_text=Processing mail request

IssueFloatingLicenseWizard_failure=Floating license issuing failed
IssueFloatingLicenseWizard_title=Issue Floating License
IssueFloatingLicenseWizard_success = Floating License has been issued successfully
IssueFloatingLicenseWizard_success_description=Floating License Pack files are stored in %s
Floating_DataPage_title=Floating license information
Floating_DataPage_description=Provide the information regarding the requested floating license