Search in sources :

Example 1 with QuickFix

use of org.eclipse.xtext.ide.editor.quickfix.QuickFix in project xtext-core by eclipse.

the class TestLanguageQuickFixProvider method fixLowerCaseName.

@QuickFix(TestLanguageValidator.INVALID_NAME)
public void fixLowerCaseName(DiagnosticResolutionAcceptor acceptor) {
    acceptor.accept("Change element name to first upper", obj -> {
        final TypeDeclaration element = (TypeDeclaration) obj;
        element.setName(StringExtensions.toFirstUpper(element.getName()));
    });
}
Also used : TypeDeclaration(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TypeDeclaration) QuickFix(org.eclipse.xtext.ide.editor.quickfix.QuickFix)

Aggregations

QuickFix (org.eclipse.xtext.ide.editor.quickfix.QuickFix)1 TypeDeclaration (org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TypeDeclaration)1