-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #740 from eclipse-passage/572833
Bug 572833 protect the product with common-use license
- Loading branch information
Showing
7 changed files
with
98 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...sage.lic.jface/src/org/eclipse/passage/lic/internal/jface/actions/LicensedRunnableUi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 ArSysOp | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0/. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* ArSysOp - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lic.internal.jface.actions; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.internal.api.ServiceInvocationResult; | ||
import org.eclipse.passage.lic.internal.api.access.GrantLockAttempt; | ||
import org.eclipse.passage.lic.internal.equinox.LicensedRunnable; | ||
import org.eclipse.passage.lic.internal.jface.EquinoxPassageUI; | ||
import org.eclipse.swt.widgets.Display; | ||
import org.eclipse.swt.widgets.Shell; | ||
|
||
public final class LicensedRunnableUi extends LicensedRunnable { | ||
|
||
private final Supplier<Shell> shell; | ||
|
||
public LicensedRunnableUi(Supplier<Shell> shell, String feature, Runnable action) { | ||
super(feature, action); | ||
this.shell = shell; | ||
} | ||
|
||
public LicensedRunnableUi(String feature, Runnable action) { | ||
this(Display.getDefault()::getActiveShell, feature, action); | ||
} | ||
|
||
@Override | ||
protected ServiceInvocationResult<GrantLockAttempt> acquireLicense(String feature) { | ||
return new EquinoxPassageUI(shell).acquireLicense(feature); | ||
} | ||
|
||
} |
45 changes: 0 additions & 45 deletions
45
...g.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/jface/actions/LicensedAction.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters