Suppress or Override Quickfix for Unresolved Definition [message #1736736] |
Fri, 01 July 2016 11:46 |
Michael Colburn Messages: 10 Registered: November 2012 |
Junior Member |
|
|
I have an application with two DSLs, where one refers to the other. The extension for the first DSL is *.ares. The second uses *.atem.
As a simple example consider these two files:
First DSL file, test_data.ares has:
key01 = "text one"
key02 = "text two"
Second, different DSL, test.atem has:
import test_data.*
sid key01
sid key03
The argument of 'sid' is a key from test_data.ares.
Note that key03 does not exist. So, it gets flagged as an error:
Couldn't resolve reference to Definition 'key03'
If one places the cursor over the flagged key in test.atem, a popup
appears with the same message and suggests changing it to key01 or key02 as a quickfix. Normally this is a nice feature.
But, here is my problem...
The user of this application has created thousands of files for the DSL that uses the ares extension. The files contains nearly 1 million entries (key = value).
If the definition from the ares DSL that is referenced in the atem DSL exists, there is no performance problem. But if it does not exist, when the user hovers over the flagged reference, the application clocks for about five minutes before the user regains control.
I would like to avoid the quickfix for this situation, that is, either turn it off or override it so that it does nothing.
I believe that the message:
Couldn't resolve reference to Definition
comes from the Xtext core LinkingDiagnosticProxyMessage.getUnresolvedProxyMessage, line 32:
String msg = "Couldn't resolve reference to " + referenceType.getName() + " '" + linkText + "'.";
Which is called by Linker.ensureIsLinked, line 134:
DiagnosticMessage message = diagnosticMessageProvider.getUnresolvedProxyMessage(context);
Thank you!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02630 seconds