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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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 @@ -265,7 +266,7 @@
// Set required EE
String exeEnvironment = ((AbstractFieldData) fData).getExecutionEnvironment();
if (exeEnvironment != null) {
bundle.setHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, exeEnvironment);

Check warning on line 269 in ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java

View check run for this annotation

Jenkins - eclipse-pde / Compiler and API Tools

Deprecation

NORMAL: The field Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT is deprecated
}

String framework = ((AbstractFieldData) fData).getOSGiFramework();
Expand Down Expand Up @@ -553,6 +554,10 @@
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