Call quickfix validation from Problems View [message #1807321] |
Tue, 28 May 2019 07:25 |
Martin Jedlicka Messages: 122 Registered: January 2016 |
Senior Member |
|
|
Hi,
I have a question on xtext, validace and quickfixes.
We have defined validations in xtext. I have defined quickfix (Ctrl + 1) for the validation. This works fine.
validation:
warning("Component version is deprecated", ProcessDesignerPackage.eINSTANCE.componentVersionElement_Version, DEPRECATED_VERSION)
quickfix:
@Fix(ProcessDesignerValidator.DEPRECATED_VERSION)
public void removeDeprecatedVersion(final Issue issue, IssueResolutionAcceptor acceptor) {
acceptor.accept(issue, REMOVE_COMPONENT_VERSION, REMOVE_COMPONENT_VERSION, null, new ISemanticModification() {
@Override
public void apply(EObject element, IModificationContext context) throws Exception {
...
}
});
}
The validation result defined in xtext is also displayed in Problems View. However, if I want to call quickfix from Problems View (via the right button),
this is not possible because the menu item is disabled.
How to call (enable) quickfix validation from Problems View?
Thanks for every advice.
Martin
|
|
|
|
|
|
|
Re: Call quickfix validation from Problems View [message #1807356 is a reply to message #1807348] |
Tue, 28 May 2019 12:46 |
|
i cannot reproduced that.
you might want to debug
org.eclipse.ui.internal.views.markers.QuickFixPropertyTester
respectively org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator.hasResolutions(IMarker)
=> can you provide a hello world example reproducing the problem
=> can you also provide details about your system (Help -> About -> Installation Details -> Configuration
=> can you also have a look into the error log if there are any issues.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02496 seconds