diff --git a/bundles/org.eclipse.passage.lic.jface/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.jface/META-INF/MANIFEST.MF index d67a37b8a..cdf7733b0 100644 --- a/bundles/org.eclipse.passage.lic.jface/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.jface/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Automatic-Module-Name: org.eclipse.passage.lic.base.ui Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.passage.lic.jface -Bundle-Version: 1.2.0.qualifier +Bundle-Version: 2.0.0.qualifier Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright @@ -18,7 +18,6 @@ Export-Package: org.eclipse.passage.lic.internal.jface;x-friends:="org.eclipse.p org.eclipse.passage.lic.internal.jface.dialogs.licensing;x-friends:="org.eclipse.passage.lic.e4.ui,org.eclipse.passage.loc.dashboard.ui,org.eclipse.passage.loc.licenses.ui", org.eclipse.passage.lic.internal.jface.i18n;x-internal:=true, org.eclipse.passage.lic.jface;x-friends:="org.eclipse.passage.loc.workbench", - org.eclipse.passage.lic.jface.actions, org.eclipse.passage.lic.jface.resource; x-friends:="org.eclipse.passage.loc.dashboard.ui, org.eclipse.passage.loc.workbench, diff --git a/bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/jface/actions/LicensedAction.java b/bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/jface/actions/LicensedAction.java deleted file mode 100644 index bfd591b43..000000000 --- a/bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/jface/actions/LicensedAction.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018, 2020 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.jface.actions; - -import java.util.Optional; - -import org.eclipse.jface.action.Action; -import org.eclipse.passage.lic.internal.api.ServiceInvocationResult; -import org.eclipse.passage.lic.internal.api.access.GrantLockAttempt; -import org.eclipse.passage.lic.internal.equinox.EquinoxPassage; -import org.eclipse.passage.lic.internal.jface.EquinoxPassageUI; -import org.eclipse.swt.widgets.Event; - -/** - * @deprecated use - * {@link org.eclipse.passage.lic.internal.jface.actions.LicensedAction} - */ -@Deprecated -public class LicensedAction extends Action { - - @Override - public void runWithEvent(Event event) { - Optional> response = Optional.empty(); - try { - response = Optional.of(new EquinoxPassageUI(event.display::getActiveShell).acquireLicense(getId())); - if (response.get().data().isPresent()) { - super.runWithEvent(event); - } - } finally { - response.flatMap(ServiceInvocationResult::data)// - .ifPresent(lock -> new EquinoxPassage().releaseLicense(lock)); - } - } - -}