Skip to content

Commit

Permalink
Bug 571526 open license folder after issuing
Browse files Browse the repository at this point in the history
Use eclipse.swt.Program facility instead of java.awt.Desktop to open a
folder.

Signed-off-by: eparovyshnaya <[email protected]>
  • Loading branch information
eparovyshnaya committed Apr 9, 2021
1 parent 4dea1c2 commit 5fc55b3
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
*******************************************************************************/
package org.eclipse.passage.loc.dashboard.ui.wizards;

import java.awt.Desktop;
import java.io.IOException;
import java.nio.file.Path;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.passage.loc.internal.api.IssuedFloatingLicense;
import org.eclipse.passage.loc.internal.api.IssuedLicense;
import org.eclipse.passage.loc.internal.dashboard.ui.i18n.IssueLicensePageMessages;
import org.eclipse.passage.loc.internal.licenses.ui.i18n.LicensesUiMessages;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Shell;

public final class LicenseIssuedNotification {
Expand Down Expand Up @@ -61,11 +60,7 @@ private void show(String title, String description, Path residence) {
}, 0);
int result = dialog.open();
if (result == 1) {
try {
Desktop.getDesktop().open(residence.toFile());
} catch (IOException e) {
e.printStackTrace();
}
Program.launch(residence.toAbsolutePath().toString());
}
}

Expand Down

0 comments on commit 5fc55b3

Please sign in to comment.