From 93990218084201c62b448504d55c61cd82029265 Mon Sep 17 00:00:00 2001 From: Yadira Cervantes Date: Tue, 12 Nov 2024 13:26:09 -0800 Subject: [PATCH] Added jface and swt dependencies for plug-ins that contribute to the UI. Dependencies aren't added for plug-ins that generate an activator file or use a template. --- .../ui/wizards/plugin/NewProjectCreationOperation.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java index 57faee4b1a..f0f6384f87 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java @@ -84,6 +84,7 @@ import org.eclipse.pde.ui.IFragmentFieldData; import org.eclipse.pde.ui.IPluginContentWizard; import org.eclipse.pde.ui.IPluginFieldData; +import org.eclipse.pde.ui.templates.PluginReference; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; @@ -553,6 +554,9 @@ private IPluginReference[] getDependencies() { if (fGenerator != null) { IPluginReference[] refs = fGenerator.getDependencies(); Collections.addAll(result, refs); + } else if (fContentWizard == null && fData instanceof IPluginFieldData pluginData && pluginData.isUIPlugin()) { + result.add(new PluginReference("org.eclipse.swt")); //$NON-NLS-1$ + result.add(new PluginReference("org.eclipse.jface")); //$NON-NLS-1$ } if (fContentWizard != null) {