Skip to content

Commit

Permalink
[#1283] extend API for 'license issued' notification dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
eparovyshnaya authored and ruspl-afed committed Feb 18, 2024
1 parent 4dab917 commit 7d6be71
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021 ArSysOp
* Copyright (c) 2021, 2024 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,6 +9,7 @@
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.loc.dashboard.ui.wizards;

Expand All @@ -33,7 +34,7 @@ public LicenseIssuedNotification(Shell shell) {
public void showPersonal(IssuedLicense license) {
show(//
IssueLicensePageMessages.IssueLicenseWizard_ok_licensed_title, //
String.format(LicensesUiMessages.LicenseExportHandler_success_description, //
String.format("", // //$NON-NLS-1$
license.encrypted().toAbsolutePath().toString(), //
license.decrypted().toAbsolutePath().toString()), //
license.encrypted().getParent());
Expand All @@ -47,16 +48,20 @@ public void showFloating(IssuedFloatingLicense license) {
license.residence());
}

private void show(String title, String description, Path residence) {
public void show(String title, String description, Path residence) {
show(title, description, residence, MessageDialog.INFORMATION);
}

public void show(String title, String description, Path residence, int kind) {
MessageDialog dialog = new MessageDialog(//
shell, //
title, //
null, //
description, //
MessageDialog.INFORMATION, //
kind, //
new String[] { //
"OK", //$NON-NLS-1$
"Open &Folder" //$NON-NLS-1$
IssueLicensePageMessages.LicenseIssuedNotification_open_folder //
}, 0);
int result = dialog.open();
if (result == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public final class IssueLicensePageMessages extends NLS {
public static String Floating_DataPage_description;
public static String Floating_DataPage_title;
public static String IssueUserConfigsRequestPage_page_description;
public static String LicenseIssuedNotification_open_folder;

static {
// initialize resource bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ IssueFloatingLicenseWizard_success_description=Floating License Pack files are s
Floating_DataPage_title=Floating license information
Floating_DataPage_description=Provide the information for the requested floating license
IssueUserConfigsRequestPage_page_description=Specify information for personal floating license access for listed users
LicenseIssuedNotification_open_folder=Open &Folder

0 comments on commit 7d6be71

Please sign in to comment.