Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding SWT + JFace when creating a plugin that "makes contribution to the UI" #1306 #1472

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading