Skip to content

Commit b15ee8b

Browse files
cervantes-yadiraHannesWell
authored andcommitted
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. Fixes #1306
1 parent 017b0b4 commit b15ee8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
import org.eclipse.pde.ui.IFragmentFieldData;
8585
import org.eclipse.pde.ui.IPluginContentWizard;
8686
import org.eclipse.pde.ui.IPluginFieldData;
87+
import org.eclipse.pde.ui.templates.PluginReference;
8788
import org.eclipse.swt.widgets.Display;
8889
import org.eclipse.ui.IWorkbenchPage;
8990
import org.eclipse.ui.IWorkbenchPart;
@@ -553,6 +554,10 @@ private IPluginReference[] getDependencies() {
553554
if (fGenerator != null) {
554555
IPluginReference[] refs = fGenerator.getDependencies();
555556
Collections.addAll(result, refs);
557+
} else if (fContentWizard == null && fData instanceof IPluginFieldData pluginData && pluginData.isUIPlugin()) {
558+
// a plug-in project is being created and makes contributions to UI
559+
result.add(new PluginReference("org.eclipse.swt")); //$NON-NLS-1$
560+
result.add(new PluginReference("org.eclipse.jface")); //$NON-NLS-1$
556561
}
557562

558563
if (fContentWizard != null) {

0 commit comments

Comments
 (0)