flat assembler
Message board for the users of flat assembler.

flat assembler > IDE Development > Code Completion?

Author
Thread Post new topic Reply to topic
Betov



Joined: 17 Jun 2003
Posts: 98
Hi! Guys.


I recall you have some plan for Code Completion in Fresh.

The first time i have read this, i was a bit estonished, because, in my opinion, this kind of toy is not very "serious". Then recently, i got an exchange at some Board, where a guy was saying that my Assembler was not interresting because, among other things, it has no Code Completion. Also, at various Boards, the users seem to consider this feature a "must-have".

So, i am on the way to implement this. Only a couple of work days, anyway, and, as long as i can implement this through a Flag On-Off, in the Configuration...

My question is: How do you plan to implement this, from the final user point of view. I mean how will this Functionality come out to the eye of the typing guy?


Betov.
Post 28 Dec 2003, 15:25
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
To only kind of CC i can find usefull is CC for function calls (both API and userdefnied, maybe configured at project level (and global), thus primarily a (mid to large) project feature), I mean there isn't much to complete in the mnemonics. (the time it takes to look up the mnemonic that begins with 'm' is the time (compring speed with (V)HLL CCs) it takes to type 'mov').
Maybe C-SPC (= Ctrl + Space (in non emacs 'syntax')) could bring upp an scrollbox (a it does in Delphi, VB, etc). I don't think the CC "window" should popup by default when coding with ut user request (something like C-SPC), (rather an option that activates RTCC ("Real-Time CC"), which defaults to off).

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 28 Dec 2003, 15:59
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
Betov



Joined: 17 Jun 2003
Posts: 98
Yes, i am also choosing [Ctrl][Space] for the validation.

For mnemonics, i don't see it any use, because of the size. I am implementing this feature from a minimum of 4 consecutive entered Chars... too short for being usefull for Mnemonics.

What with all other user defined symbols? (Equates, macros, Labels -i am at this actually...-)?

Also, what i am trying to implement is a Functionality without any PopUp jumping into the face of the user: Just a discrete underline when fitting symbol found >>> [Ctrl]/[Space] >>> replacement done, that's all. What do you think?


Betov.
Post 28 Dec 2003, 16:46
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
Betov wrote:
Also, what i am trying to implement is a Functionality without any PopUp jumping into the face of the user: Just a discrete underline when fitting symbol found >>> [Ctrl]/[Space] >>> replacement done, that's all. What do you think?

You mean like the auto complete in text fields, where the auto completed text is showed after as if it was selected (typically: blue bg + white text) (not just a facny thing first seen windows, it's been in linux for long time - clearly possible). I don't know how it works ("code logically") or if it can be implented in the asmedit controll.

Macros, possible, maybe there should be a tab for just the CC? (so that checkboxes like "Code Complete Macro names", "CC Win32 API names", "CC Custom list"(with some muli-line edit box or so where the user can enter custom CC strings)).

IMO it's better to have a scrollbox or something like that, since:
1) it's a bit de facto stanard for CC (better not confuse people with a gazilion diferent CC styles)
2) I think it's easier to imlpement
3) it's easier to choose among multiple choises (like "Create" would for instance render "CreateWindow","CreateSolidBrush",etc as possbile "correct matches")

However I feel that this feature is something that has a low priority for the moment, there are mopre important pices of code to be written first. But this is a feature which I'd like to see in future versions of Fresh.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 28 Dec 2003, 18:11
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3494
Location: Bulgaria
Hi, Betov.
Code completition (maybe there are other names for this, I don't know) is not a toy. It is very very power tool for rapid source typing. Of course if it is right way implemented. I think that experienced Delphi user, for example, types only 20..30 % of the source. Remaining is created by code completition system. BTW this is the function that I really miss in assembler.

IMHO, the right behaviour of code-completition is following:

1.When you type something partially and press Ctrl+Space, the list box is open with all simbols defined in the project that begins with chars you typed.

2. When you type something and type "." (example: "RECT.") and if typed by you label (symbol) is defined in the project, a listbox with all local labels for that label is open. (example: "left", "top", "right", "bottom"

When the list is opened, the behaviour of the source editor is changed following way:
0. The listbox appears just under the cursor in the editor (of course if the free space allows this)
1. Keys for vertical movement of the cursor, now move the selection in the listbox instead of cursor.
2. Key "ENTER" adds selected from listbox line in the text and closes the listbox.
3. Key "ESCAPE" closes listbox without adding the text to the source.
4. Any other char key, simply types the char in the editor AND the content of the listbox is updated in acordance with changed text in the editor.

It is not right solutions to use fixed databases for listbox, for example API functions and/or standard equates, structures etc.
The right solution (btw, possible only with fast built-in compiler) is to use only symbols defined in the edited/compiled project. This will include all user defined symbols AND all standard symbols (API etc.) because they are already defined in the standard include files.

Well I hope my explanation is clear enough. Maybe I should make some pictures, but now I have no time for this.

Regards.
Post 28 Dec 2003, 18:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
IMO the API should be selectable, since it's/will not only be windows applicaiton written with fresh, but DOS, *nix and MOS too, so IMO it should be optional which API (if at all) that will be in the CC list.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 28 Dec 2003, 20:31
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 865
Location: Colombia
scientica wrote:
IMO the API should be selectable, since it's/will not only be windows applicaiton written with fresh, but DOS, *nix and MOS too, so IMO it should be optional which API (if at all) that will be in the CC list.

It will depend on the project include files (external references are symbols as well)
Post 29 Dec 2003, 05:24
View user's profile Send private message Yahoo Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3494
Location: Bulgaria
Betov wrote:
Also, what i am trying to implement is a Functionality without any PopUp jumping into the face of the user: Just a discrete underline when fitting symbol found >>> [Ctrl]/[Space] >>> replacement done, that's all. What do you think?


In Delphi I often use CC like small help/remainder tool. When I can't remember the exact name of some function ot structure field, I type the first 1..2 letters and then open CC pop-up listbox, I can see several items and find exactly what I need. It is the most rapid way if you can remember only first letters of what you need. You know there are thousend of names and often they are similar. That is the reason why there must be at least 7..8 rows in the pop-up listbox.

Regards.
Post 29 Dec 2003, 13:31
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Betov



Joined: 17 Jun 2003
Posts: 98
Yes, John, i agrea. This is how i am doing it right now, after having condered Scientifica advice (good for Api). Just, i set the minimum Chars number to 4, because smaller numbers would seem to me _more_ work at selecting that at typing.

Also, i am implementing all of this in two ways:

For user defined Equates, Macros, label, simply: Found univoque > underlined > [Ctrl][Space] > Replace. Quick and simple.

for Api: > found not univoque or univoque > Underlined > [Ctrl][Space] > // Uninvoque > Replace // Not univoque > ComboBox > Selection > Replace.

At a practical point of view, these ways seem to me well appropriated. Users' tests, (in a day or two...) will say... Wink I will do first the release with User Symbols and Api only. If they like it this way, i'll add the Routines for the Win32 Equates later...


Betov.
Post 29 Dec 2003, 15:44
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3494
Location: Bulgaria
Hi Betov.

I am waiting with interest your release. Smile Keep good working.

Regards.
Post 29 Dec 2003, 16:14
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.