-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocompletion shouldn't fill the full method description #11
Comments
While I agree this is the ideal behavior, it relies on having Method Signature Help. Apex autocomplete currently doesn't have this service and without it, filling in parameters on complex signatures is not very productive. It potentially could be added by calling by calling completion on the column just before the opening brace ( Example
Now if I had the following code:
Without knowing type of myParam, the "Method Signature Help" wouldn't know which signature we are dealing with. It might be possible to use the @neowit might have some better ideas on how to make this happen. |
To add to that, this is the model I would need to be able to provide: export class SignatureHelp {
/**
* One or more signatures.
*/
signatures: SignatureInformation[];
/**
* The active signature.
*/
activeSignature: number;
/**
* The active parameter of the active signature.
*/
activeParameter: number;
}
/**
* Represents a parameter of a callable-signature. A parameter can
* have a label and a doc-comment.
*/
export class ParameterInformation {
/**
* The label of this signature. Will be shown in
* the UI.
*/
label: string;
/**
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
/**
* Creates a new parameter information object.
*
* @param label A label string.
* @param documentation A doc string.
*/
constructor(label: string, documentation?: string);
}
/**
* Represents the signature of something callable. A signature
* can have a label, like a function-name, a doc-comment, and
* a set of parameters.
*/
export class SignatureInformation {
/**
* The label of this signature. Will be shown in
* the UI.
*/
label: string;
/**
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
/**
* The parameters of this signature.
*/
parameters: ParameterInformation[];
/**
* Creates a new signature information object.
*
* @param label A label string.
* @param documentation A doc string.
*/
constructor(label: string, documentation?: string);
} |
Hello @ChuckJonas
if we are talking about
resulting in
then
|
@neowit so not quite. This is to get Method Signature Help after the completion has been evoked. Currently I have the completion write out the signature because I don't support signature help. Given:
I think I can get what I need by calling |
@ChuckJonas not sure I understand. If I am reading original post correctly - the issue was that if one calls
and select then the end result currently is
while desired behaviour (according to OP) is to end up with
Not sure if OP was about getting “Method Signature Help” after completion was done. |
@neowit ya the original post is suggesting that the autocomplete should function as you have outlined above. However, I'm reluctant to make that change unless I can provide method signature help. |
For example:
Either tabbing, clicking the method or pressing enter provokes this:
The expected behavior should be just completing the method name, just before the first parenthesis.
For example VS 2013:
The text was updated successfully, but these errors were encountered: