Skip to content

Commit

Permalink
Added jface and swt dependencies for plug-ins that contribute to the UI.
Browse files Browse the repository at this point in the history
Dependencies aren't added for plug-ins that generate an activator file
or use a template.

Fixes #1306
  • Loading branch information
cervantes-yadira authored and HannesWell committed Nov 27, 2024
1 parent 017b0b4 commit b15ee8b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -553,6 +554,10 @@ private IPluginReference[] getDependencies() {
if (fGenerator != null) {
IPluginReference[] refs = fGenerator.getDependencies();
Collections.addAll(result, refs);
} else if (fContentWizard == null && fData instanceof IPluginFieldData pluginData && pluginData.isUIPlugin()) {
// a plug-in project is being created and makes contributions to UI
result.add(new PluginReference("org.eclipse.swt")); //$NON-NLS-1$
result.add(new PluginReference("org.eclipse.jface")); //$NON-NLS-1$
}

if (fContentWizard != null) {
Expand Down

0 comments on commit b15ee8b

Please sign in to comment.