myroslavarm / Experimental-Completion

My internship project: improving code completion for Pharo
6 stars 3 forks source link

Pharo8 : completion for "" comments #50

Closed myroslavarm closed 5 years ago

myroslavarm commented 5 years ago

right now they get completed. we need to decide if it's good or not, and if not how to fix it

myroslavarm commented 5 years ago

e.g. node isSequence ifTrue: [ ^NECEmptyModel new ]. would fix the comment problem when it is part of the sequence.

MarcusDenker commented 5 years ago

we could add a test method to RBProgramNode that returns true if a position in the text is in a comment. It seems we have all the information available (comments know their start/stop position):

(Object>>#halt) ast comments anySatisfy: [ :each | each intersectsInterval: (20 to:20)]

myroslavarm commented 5 years ago

what would be an example case for a "" comment not being part of the sequence? because i've been testing various cases just now, and it seems that the empty model for sequence takes care of everything

MarcusDenker commented 5 years ago

something like

1 + 2 "comment here".

MarcusDenker commented 5 years ago

ah, the fun thing: the OLD (NECController) gives a completion here, ours does not! :-)

So yes, this seems to be fixed!

myroslavarm commented 5 years ago

already fixed