use of org.eclipse.jdt.internal.ui.wizards.NewAnnotationCreationWizard in project xtext-eclipse by eclipse.
the class CreateJavaTypeQuickfixes method newJavaAnnotationQuickfix.
protected void newJavaAnnotationQuickfix(final String typeName, final String explicitPackage, final XtextResource resource, Issue issue, IssueResolutionAcceptor issueResolutionAcceptor) {
String packageDescription = getPackageDescription(explicitPackage);
issueResolutionAcceptor.accept(issue, "Create Java annotation '@" + typeName + "'" + packageDescription, "Opens the new Java annotation wizard to create the type '@" + typeName + "'" + packageDescription, "java_file.gif", new IModification() {
@Override
public void apply(/* @Nullable */
IModificationContext context) throws Exception {
runAsyncInDisplayThread(new Runnable() {
@Override
public void run() {
NewAnnotationWizardPage annotationWizardPage = new NewAnnotationWizardPage();
NewAnnotationCreationWizard wizard = new NewAnnotationCreationWizard(annotationWizardPage, true);
WizardDialog dialog = createWizardDialog(wizard);
configureWizardPage(annotationWizardPage, resource.getURI(), typeName, explicitPackage);
dialog.open();
}
});
}
});
}
Aggregations