private ValidationJob newValidationJob(final XtextEditor editor) { final IXtextDocument document = editor.getDocument(); final IAnnotationModel annotationModel = editor.getInternalSourceViewer().getAnnotationModel(); final IssueResolutionProvider issueResolutionProvider = getService(editor, IssueResolutionProvider.class); final MarkerTypeProvider markerTypeProvider = getService(editor, MarkerTypeProvider.class); final MarkerCreator markerCreator = getService(editor, MarkerCreator.class); final IValidationIssueProcessor issueProcessor = new CompositeValidationIssueProcessor( new AnnotationIssueProcessor(document, annotationModel, issueResolutionProvider), new MarkerIssueProcessor(editor.getResource(), markerCreator, markerTypeProvider)); return editor.getDocument().modify(resource -> { final IResourceServiceProvider serviceProvider = resource.getResourceServiceProvider(); final IResourceValidator resourceValidator = serviceProvider.getResourceValidator(); return new ValidationJob(resourceValidator, editor.getDocument(), issueProcessor, ALL); }); }
/** {@inheritDoc} */ @Override public Set<Binding> getGuiceBindingsUi(final Grammar grammar) { if (hasQuickfixes(getValidModel(grammar))) { final BindFactory addTypeToInstance = new BindFactory().addTypeToType(IssueResolutionProvider.class.getName(), getQuickfixProviderName(grammar, getNaming())); return addTypeToInstance.getBindings(); } else { return Collections.emptySet(); } }
public AnnotationIssueProcessor(IXtextDocument xtextDocument, IAnnotationModel annotationModel, IssueResolutionProvider issueResolutionProvider) { super(); this.annotationModel = annotationModel; if(annotationModel == null) throw new IllegalArgumentException("Annotation model cannot be null"); annotationModel.addAnnotationModelListener(this); this.xtextDocument = xtextDocument; this.issueResolutionProvider = issueResolutionProvider; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return PkmntcgoQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return N4JSQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return RegularExpressionQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return N4MFQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return TypesQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return MyDslQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return BromiumQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return DSLPoliciesQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return LcDslQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return DslQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return RestauranteQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return OCCIQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return MinitlQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return ModelEditorQuickfixProvider.class; }
private IssueResolutionProvider getIssueResolutionProvider() { return getXtextTestUtil().get(IssueResolutionProvider.class); }
@Override public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return org.xtext.mongobeans.ui.quickfix.MongoBeansQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return DefaultQuickfixProvider.class; }
protected IssueResolutionProvider getResolutionProvider() { return this.resolutionProvider; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return ComponentQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return ClsQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return UsecaseQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return ASBHLangQuickfixProvider.class; }
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() { return MiniOCLQuickfixProvider.class; }
/** * Creates a new instance of {@link FixedXtextResourceMarkerAnnotationModel}. * * @param file * the {@link IFile}, must not be {@code null} * @param issueResolutionProvider * the {@link IssueResolutionProvider}, must not be {@code null} * @param markerUtil * the {@link IssueUtil}, must not be {@code null} */ public FixedXtextResourceMarkerAnnotationModel(final IFile file, final IssueResolutionProvider issueResolutionProvider, final IssueUtil markerUtil) { super(file, issueResolutionProvider, markerUtil); }