Code asisstant proposes all methods!

In this section you can write to us about the MDT bugs & problems you have noticed.

Code asisstant proposes all methods!

Postby iman760 » 11 Nov 2011, 11:18

Dear Customer support,

I am using your trail version and I found something really annoying in code assist,

the problem is : when I am using code assist (Ctrl-Space) on a variable it shows all available methods in all classes in image and it does not filter other classes methods! This really makes code assist unusable because in most of the case we are not going to call a method on exemplar itself.(Statics)

I have also tried to find a setting in Preferences>Magik>Editor>Code Assit>Advanced but it didn't work.

Is there any other setting or patch available for this problem.
Many Thanks,
Posts: 1
Joined: 10 Nov 2011, 21:16

Re: Code asisstant proposes all methods!

Postby Bartek » 11 Nov 2011, 14:19

Dear Iman,

I assume that you already have some experience with plug-ins for Eclipse like JDT for Java where you can use Code Assist in the way in which you will get only the methods related to the class which given variable is instance of. That is great of course but that is the advantage of typed language like Java where you can always establish a class related to some variables while defining them.

Nevertheless, Smallworld Magik is a typeless language and it is not possible in most of the cases to establish (while having only language grammar structures) what the type of given variable is (or will be), you can do that only at the run time of related code. Of course there are some situations when Code Assist can collect methods related only to one class like in case when you invoke it after the name of some global exemplar, after _self or _super keyword, etc.

In many cases you probably know what the class name related to given variable is while writing code, so after all the solution of your problem is to use class filter available at the top of Code Assist window to specify the name of the class for which you would like to get proposals. To jump to the filter, press TAB after invoking Code Assist.

If you have any ideas how to establish types in typeless language while defining variables (not at the run time but having only code structures) then we will be very grateful for your remarks.

With best regards.
Bartlomiej Laczkowski
Training & Deployment Manager - MDT Team
ASTEC Sp. z o.o.
Posts: 10
Joined: 02 Jun 2006, 17:01

Return to Bugs & problems

Who is online

Users browsing this forum: No registered users and 1 guest