diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.ldc.pde.ui.templates/META-INF/MANIFEST.MF index d1288409c..8b8832267 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/META-INF/MANIFEST.MF @@ -5,6 +5,9 @@ Bundle-SymbolicName: org.eclipse.passage.ldc.pde.ui.templates;singleton:=true Bundle-Version: 0.6.0.qualifier Bundle-Vendor: %Bundle-Vendor Export-Package: org.eclipse.passage.ldc.internal.pde.ui.templates;x-internal:=true, + org.eclipse.passage.ldc.internal.pde.ui.templates.e3;x-internal:=true, + org.eclipse.passage.ldc.internal.pde.ui.templates.e4;x-internal:=true, + org.eclipse.passage.ldc.internal.pde.ui.templates.fullfeather;x-internal:=true, org.eclipse.passage.ldc.internal.pde.ui.templates.i18n;x-internal:=true Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0", org.eclipse.core.resources;bundle-version="0.0.0", diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/plugin.xml b/bundles/org.eclipse.passage.ldc.pde.ui.templates/plugin.xml index f8aaa1726..106b61c39 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/plugin.xml +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/plugin.xml @@ -16,7 +16,7 @@ getRCP4Dependencies() { "org.apache.logging.log4j"); //$NON-NLS-1$ } + protected Requirement createProductRequirement(String product) { + return new DefaultProductRequirement(() -> product, // + () -> getManifestHeader("Bundle-Name"), // //$NON-NLS-1$ + () -> getManifestHeader("Bundle-Version"), // //$NON-NLS-1$ + () -> getManifestHeader("Bundle-Vendor")// //$NON-NLS-1$ + ).get(); + } + } diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/DefaultProductRequirement.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/DefaultProductRequirement.java index 8e48e34a5..29d6f8f46 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/DefaultProductRequirement.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/DefaultProductRequirement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 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 @@ -22,22 +22,27 @@ @SuppressWarnings("restriction") final class DefaultProductRequirement implements Supplier { - private final String product; - private final String version; + private final Supplier product; + private final Supplier version; + private final Supplier name; + private final Supplier provider; - DefaultProductRequirement(String product, String version) { + DefaultProductRequirement(Supplier product, Supplier name, Supplier version, + Supplier provider) { this.product = product; this.version = version; + this.name = name; + this.provider = provider; } @Override public Requirement get() { return new BaseRequirement(// new BaseFeature(// - product, // - version, // - product, // - "Eclipse Passage Template"), //$NON-NLS-1$ + product.get(), // + version.get(), // + name.get(), // + provider.get()), // new RestrictionLevel.Warning(), // this); } diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/HelpContexts.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/HelpContexts.java index 5ffceae02..44c6a2a08 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/HelpContexts.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/HelpContexts.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 ArSysOp + * Copyright (c) 2019, 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 @@ -12,6 +12,7 @@ *******************************************************************************/ package org.eclipse.passage.ldc.internal.pde.ui.templates; +//FIXME: AF: we need to split this class public class HelpContexts { public static final String PREFIX = "org.eclipse.passage.ldc.doc.user"; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE3ProductContentWizard.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e3/LicensedE3ProductContentWizard.java similarity index 89% rename from bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE3ProductContentWizard.java rename to bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e3/LicensedE3ProductContentWizard.java index cf9e0ddee..a6abcd72a 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE3ProductContentWizard.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e3/LicensedE3ProductContentWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 ArSysOp + * Copyright (c) 2019, 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 @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.ldc.internal.pde.ui.templates; +package org.eclipse.passage.ldc.internal.pde.ui.templates.e3; import org.eclipse.pde.ui.templates.ITemplateSection; import org.eclipse.pde.ui.templates.NewPluginTemplateWizard; diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE3ProductTemplateSection.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e3/LicensedE3ProductTemplateSection.java similarity index 94% rename from bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE3ProductTemplateSection.java rename to bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e3/LicensedE3ProductTemplateSection.java index 02ab7bbab..6b38d27c4 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE3ProductTemplateSection.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e3/LicensedE3ProductTemplateSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 ArSysOp + * Copyright (c) 2019, 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 @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.ldc.internal.pde.ui.templates; +package org.eclipse.passage.ldc.internal.pde.ui.templates.e3; import java.util.Arrays; import java.util.List; @@ -19,6 +19,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.passage.ldc.internal.pde.ui.templates.BaseLicensedTemplateSection; +import org.eclipse.passage.ldc.internal.pde.ui.templates.HelpContexts; import org.eclipse.passage.ldc.internal.pde.ui.templates.i18n.PdeUiTemplatesMessages; import org.eclipse.passage.lic.internal.api.requirements.Requirement; import org.eclipse.pde.core.plugin.IPluginBase; @@ -90,7 +92,7 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException { @Override protected List requirements(String product) { - return Arrays.asList(new DefaultProductRequirement(product, getManifestHeader("Bundle-Version")).get()); //$NON-NLS-1$ + return Arrays.asList(createProductRequirement(product)); } private void createPerspectiveExtension() throws CoreException { diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4ProductContentWizard.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e4/LicensedE4ProductContentWizard.java similarity index 89% rename from bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4ProductContentWizard.java rename to bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e4/LicensedE4ProductContentWizard.java index 222b7906f..32b396df0 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4ProductContentWizard.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e4/LicensedE4ProductContentWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 ArSysOp + * Copyright (c) 2019, 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 @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.ldc.internal.pde.ui.templates; +package org.eclipse.passage.ldc.internal.pde.ui.templates.e4; import org.eclipse.pde.ui.templates.ITemplateSection; import org.eclipse.pde.ui.templates.NewPluginTemplateWizard; diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4ProductTemplateSection.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e4/LicensedE4ProductTemplateSection.java similarity index 93% rename from bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4ProductTemplateSection.java rename to bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e4/LicensedE4ProductTemplateSection.java index c8796bd0a..a0f65a3b6 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4ProductTemplateSection.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/e4/LicensedE4ProductTemplateSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 ArSysOp + * Copyright (c) 2019, 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 @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.ldc.internal.pde.ui.templates; +package org.eclipse.passage.ldc.internal.pde.ui.templates.e4; import java.util.Arrays; import java.util.List; @@ -19,6 +19,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.passage.ldc.internal.pde.ui.templates.BaseLicensedTemplateSection; +import org.eclipse.passage.ldc.internal.pde.ui.templates.HelpContexts; import org.eclipse.passage.ldc.internal.pde.ui.templates.i18n.PdeUiTemplatesMessages; import org.eclipse.passage.lic.internal.api.requirements.Requirement; import org.eclipse.pde.core.plugin.IPluginBase; @@ -85,7 +87,7 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException { @Override protected List requirements(String product) { - return Arrays.asList(new DefaultProductRequirement(product, getManifestHeader("Bundle-Version")).get()); //$NON-NLS-1$ + return Arrays.asList(createProductRequirement(product)); } private void createProductExtension() throws CoreException { diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4FullFeatherProductContentWizard.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/fullfeather/LicensedE4FullFeatherProductContentWizard.java similarity index 88% rename from bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4FullFeatherProductContentWizard.java rename to bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/fullfeather/LicensedE4FullFeatherProductContentWizard.java index 30f458715..537c554c3 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4FullFeatherProductContentWizard.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/fullfeather/LicensedE4FullFeatherProductContentWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 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 @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.ldc.internal.pde.ui.templates; +package org.eclipse.passage.ldc.internal.pde.ui.templates.fullfeather; import org.eclipse.pde.ui.templates.ITemplateSection; import org.eclipse.pde.ui.templates.NewPluginTemplateWizard; diff --git a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4FullFeatherProductTemplateSection.java b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/fullfeather/LicensedE4FullFeatherProductTemplateSection.java similarity index 94% rename from bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4FullFeatherProductTemplateSection.java rename to bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/fullfeather/LicensedE4FullFeatherProductTemplateSection.java index 715d29143..3268cde8c 100644 --- a/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/LicensedE4FullFeatherProductTemplateSection.java +++ b/bundles/org.eclipse.passage.ldc.pde.ui.templates/src/org/eclipse/passage/ldc/internal/pde/ui/templates/fullfeather/LicensedE4FullFeatherProductTemplateSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 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 @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.ldc.internal.pde.ui.templates; +package org.eclipse.passage.ldc.internal.pde.ui.templates.fullfeather; import java.util.ArrayList; import java.util.Arrays; @@ -20,7 +20,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.passage.ldc.internal.pde.ui.templates.fullfeather.AntimagicShieldFeatureLicRequirement; +import org.eclipse.passage.ldc.internal.pde.ui.templates.BaseLicensedTemplateSection; +import org.eclipse.passage.ldc.internal.pde.ui.templates.HelpContexts; import org.eclipse.passage.ldc.internal.pde.ui.templates.i18n.PdeUiTemplatesMessages; import org.eclipse.passage.lic.internal.api.requirements.Requirement; import org.eclipse.pde.core.plugin.IPluginBase; @@ -78,7 +79,7 @@ protected void updateModel(IProgressMonitor monitor) throws CoreException { @Override protected List requirements(String product) { return Arrays.asList(// - new DefaultProductRequirement(product, getManifestHeader("Bundle-Version")).get(), //$NON-NLS-1$ + createProductRequirement(product), // new AntimagicShieldFeatureLicRequirement().get()); }