CShell
CShell copied to clipboard
Autocompletion does not work very well when creating a class in a script
It seems like the autocompletion doesn't currently work very well when defining new classes/methods/etc. right now, and because of that often completes something unexpected.
If I open a new script file and type public static[spacebar]
in it the static
gets autocompleted to ContextStaticAttribute
. This is unfortunate because I do actually want to static
because I'm creating a class but it doesn't seem to even consider static
as a possible completion.
Yep, this is a bit of a problem. So far CShell has not supported mixing class definitions and script code in one file. This is because the underlying mono engine did not really support it.
For example you can't execute all this at once:
class A
{
public int My;
}
var a = new A();
a.My = 10;
You'd have to evaluate first the class definition, and then the last two lines.
However, I'm working on switching over to using the Roslyn engine and this will work soon. So I agree, the code completion should support this as well.
Bumped this conversation over at the NRefactory project. A lot of exciting changes coming to code completion from NRefactory.