These are chat archives for carymrobbins/intellij-haskforce

29th
Jan 2018
Cary Robbins
@carymrobbins
Jan 29 2018 14:20
@i-am-the-slime that's awesome! i'll take a look at it today and get back with you
Cary Robbins
@carymrobbins
Jan 29 2018 14:38
@i-am-the-slime can you expand on this?
How to query for possible imports before even proposing help in importing anything?
i don't think this answers your question, but here's the workflow i'd expect
add the intention when the variable is not found (which you've done already)
then when it is invoked, lookup possible imports, provide the user with a popup to choose which import to use
then apply the import that was selected (unless the dialog was cancelled or something)
Cary Robbins
@carymrobbins
Jan 29 2018 14:44
but, is your question about how to query for imports before the user has invoked the intention? if so, why would we want that?
i could see how that might make it run slightly faster in some cases, but in others it might actually slow things down if we're constantly querying for stuff in the background. again, maybe i misunderstand the question
Cary Robbins
@carymrobbins
Jan 29 2018 15:26
@i-am-the-slime ok, i just tried out your branch, seems to work pretty well in some simple cases, well done!
Cary Robbins
@carymrobbins
Jan 29 2018 16:10
Someone in the plugin dev channel (here on gitter) pointed me to intellij's implementation of AddImportAction
Cary Robbins
@carymrobbins
Jan 29 2018 17:16
there's also this which the scala plugin uses
Cary Robbins
@carymrobbins
Jan 29 2018 17:29
@i-am-the-slime just cut a PR against your PR branch ;)
that seems to get us a little closer, although, as i mention, we should probably look into using QuestionAction instead.
the Scala plugin implementation might also point us to how to do this "right"
one thing i've been bad about is figuring out how to register the intentions in the gui itself so users can turn them on or off. we'll want to do that too once we're getting towards the end product
i think at this point though we're really close