You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's hard to describe it as JaMoPP-specific as possible.
Refactory hooks in when some one right-clicks in an open editor. The current selection is determined with the EMFTextEditorConnector. The connector calls locationMap.getElementsAt(..). The problem for JaMoPP is that this map is empty while right-clicking in the editor (selecting some elements). But the map is populated after the call to locationMap.getElementsAt(..). It seems that the workflow is a little bit distinct to other EMFText-generated languages. @jjohannes, can something be done here?
The text was updated successfully, but these errors were encountered:
The LocationMap is populated during parsing. If you find it empty, you might be requesting information from the LocationMap in an invalid state (e.g., between two parse runs). Do you think that could be the case?
Well, I have the editor open, putting the cursor to arbitrary position reveals the outline to the right node. Thus, the locationmap must be valid somehow. But when I right-click and call getElementsAt it's empty for some reason. In other EMFText-generated editors the same scenario works as expected.
With "between two parse runs" you mean just right before another parse run? I assume a parse run is only initiated as a consequence of ocurred changes, isn't it? In this case I must answer with no because I'm just selecting some text without changing something.
Parse runs are initiated when a document is changed and when the editor receives focus. The latter is required to make sure that changes made in other editors are reflected when the editor is changed (e.g., error markers must be removed if references to external resource can be suddenly resolved).
Maybe you can add some debug output to the respective methods (e.g., reload()) to figure out when the resource content is actually parsed and when the location map is reset?
It's hard to describe it as JaMoPP-specific as possible.
Refactory hooks in when some one right-clicks in an open editor. The current selection is determined with the EMFTextEditorConnector. The connector calls locationMap.getElementsAt(..). The problem for JaMoPP is that this map is empty while right-clicking in the editor (selecting some elements). But the map is populated after the call to locationMap.getElementsAt(..). It seems that the workflow is a little bit distinct to other EMFText-generated languages. @jjohannes, can something be done here?
The text was updated successfully, but these errors were encountered: