org.eclipse.jdt.internal.ui.wizards.NewInterfaceCreationWizard Java Examples

The following examples show how to use org.eclipse.jdt.internal.ui.wizards.NewInterfaceCreationWizard. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CreateJavaTypeQuickfixes.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
protected void newJavaInterfaceQuickfix(final String typeName, final String explicitPackage, final XtextResource resource, Issue issue,
		IssueResolutionAcceptor issueResolutionAcceptor) {
	String packageDescription = getPackageDescription(explicitPackage);
	issueResolutionAcceptor.accept(issue, "Create Java interface '" + typeName + "'" + packageDescription,
			"Opens the new Java interface wizard to create the type '" + typeName + "'" + packageDescription,
			"java_interface.gif", new IModification() {
				@Override
				public void apply(/* @Nullable */ IModificationContext context) throws Exception {
					runAsyncInDisplayThread(new Runnable() {
						@Override
						public void run() {
							NewInterfaceWizardPage classWizardPage = new NewInterfaceWizardPage();
							NewInterfaceCreationWizard wizard = new NewInterfaceCreationWizard(classWizardPage, true);
							WizardDialog dialog = createWizardDialog(wizard);
							configureWizardPage(classWizardPage, resource.getURI(), typeName, explicitPackage);
							dialog.open();
						}
					});
				}
			});
}
 
Example #2
Source File: OpenNewInterfaceWizardAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected final INewWizard createWizard() throws CoreException {
	return new NewInterfaceCreationWizard(fPage, fOpenEditorOnFinish);
}