2

I have started using Mavensmate for few days now and trying to see how far it differs from eclipse IDE. Now, i understand it is well advanced and very easy to use especially the intelligent display of methods, variables, etc. But what i am wondering now is it also displays the response fields from a webservice response. Please note i never declared or used those variables in the controller or the visualforce page. I am very curious to know how it displays the response variables in the editor.

In the screen shot below, it is clear that the help context menu displays the variables, B1_AMT, B1_COUNT, etc were not declared anywhere in controller or any other classes. How it is displaying here is what i am curious about. Any thoughts on this, please.

enter image description here

Update as per Mark Pond answer:

This is like a magic as Mavensmate "intellisense" displays the variable like things in comments also. The below screen shot have an inner class in which for each attribute i have defined a comment such as B1_AMT, B1_COUNT and now i understand clearly from Mark's answer that intellisense fetched the values in the comments.

enter image description here

1 Answer 1

3

Sublime Text is simply building an index of all of the string values that are in your files and showing them to you in that list.

You've used all of those strings in the list, in the map.get() calls. Notice that B5_Count is not in the list, because you haven't used it yet in the code that Sublime Text has indexed.

You'll notice that the "intellisense" list also includes all of the words from your comments. It isn't being "smart" as much as it is being "helpful".

3
  • Thanks Mark. I understand better now the intellisense fetched the words from the comments from the inner class where i defined comment for each attribute. I do not know this is a essential thing or not. But at this point since i exactly defined the comment just as the variable names defined in the webservice response, i felt this is a useful functionality of Mavensmate.
    – Bforce
    Jun 3, 2014 at 16:27
  • 1
    (MavensMate author here): it's important to note we have to make some assumptions about Apex because no official lexer/grammer/parser/static code analyzer exists [currently] for Apex. Unfortunately, sometimes we're unable to properly parse an Apex class, so, in those instances, we fallback to the Sublime Text "intellisense" completions. In essense: we do the best we can and we strive to improve our completion algorithms regularly. Jun 4, 2014 at 16:22
  • @JosephFerraro Thank you very much for the additional information. I, for one, applaud your efforts and appreciate all of your hard work and dedication to the project!
    – Mark Pond
    Jun 4, 2014 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .