use of org.eclipse.jdt.ui.wizards.NewInterfaceWizardPage in project xtext-eclipse by eclipse.
the class CreateJavaTypeQuickfixes method newJavaInterfaceQuickfix.
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();
}
});
}
});
}
Aggregations