Using Quickfixes and a LanguageServer [message #1851462] |
Wed, 06 April 2022 05:53  |
Eclipse User |
|
|
|
Hi,
I am trying to implement quickfixes for a Language Server based on Xtext. I would like to use the API developed in https://github.com/eclipse/xtext-core/pull/1597 but the package org.eclipse.xtext.ide.editor.quickfix is not exported in the MANIFEST.MF, so when I refer to IQuickFixProvider or DiagnosticResolutionAcceptor , tycho produces this errors when compiling
[ERROR] import org.eclipse.xtext.ide.editor.quickfix.QuickFix;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Access restriction: The type 'QuickFix' is not API (restriction on classpath entry '/data/jenkins-slave/workspace/asmd-cf-gerrit-verify-pipeline@2/.repository/p2/osgi/bundle/org.eclipse.xtext.ide/2.26.0.v20220228-0751/org.eclipse.xtext.ide-2.26.0.v20220228-0751.jar')
[ERROR] import org.eclipse.xtext.ide.editor.quickfix.IQuickFixProvider;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Access restriction: The type 'IQuickFixProvider' is not API (restriction on classpath entry '/data/jenkins-slave/workspace/asmd-cf-gerrit-verify-pipeline@2/.repository/p2/osgi/bundle/org.eclipse.xtext.ide/2.26.0.v20220228-0751/org.eclipse.xtext.ide-2.26.0.v20220228-0751.jar')
and I do not know how to suppress the restriction, using @SuppressWarnings("restriction") works in eclipse IDE but not on the maven build with type, and the same for the following part in the .classpath file
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/xtext/ide/editor/quickfix/**"/>
</accessrules>
</classpathentry>
So, can this API be used? If so, how can I circunvent the error in tycho?
Kind Regards
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04398 seconds