Clarion 7 Code completion

One of the features of Clarion 7 is code completion, also called intellisense. Unfortunately it does not work in the embed editor but it does in the source editor and the Embeditor. The Embeditor is what you get when you right click on a procedure and select "Source" from the popup menu or open the Embed tree and click the Source button.

In one of the recent builds, Softvelocity gave us an option to open the Embeditor when we double click on an embed in the embed tree and thus give us full use of the intellisense.

It is easy to set this up once you know where to look! Which is why I'm writing this as I have to hunt this down every time I do a clean install of C7.

But before we go further, I want to clear up something that causes a lot of confusion.

In Clarion there are 3 editors:
Source editor: This is what you get when you open a source file for editing. This editor works like any other editor and edits files only.

Embed Editor: This is the editor that you get when you go into an embed via the embed tree. This editor only displays one embed and does not have code completion.

Embeditor: This is the editor that you see when you right click on a procedure and select "Source" or hit the "Source" button in the embed tree. This editor shows all embeds and does have code completion.

There are three places that affect the code completion. To set it up, please follow these steps.

1. Open the Tools menu and select "Application Options" Note that this option is disabled if an application is loaded.

Clarion 7 Tools Menu

2. Go to the "Embed Editor" tab and make sure that the "Edit source embeds in context by default (Using Embeditor)" is checked.

Clarion 7 Embed Editor Options

This allows you to use the Embeditor instead of the Embed Editor when you open an embed from the embed tree, giving you full access to the code completion.

3. Open the Tools menu and select the "Options" item which is at the bottom of the menu.

4. Select the "Text Editor | Code Completion" node in the tree on the left and check the options you want active. I believe that the settings I have are the default settings.

Clarion 7 Code Completion Options

5. Finally make sure that Code Completion is active in the Edit menu.

Clarion 7 Code Completion setting

Now when you double click on an embed entry in the embed tree, you will be taken directly into the Embeditor where you can edit your embed in context and get full use of the code completion/intellisense feature!

Clarion 7 Code Completion in the Embeditor

I hope this helps some people who are lost in where exactly to set this up.

Arnor Baldvinsson

5 thoughts on “Clarion 7 Code completion

  1. a REAL pity the :
    - code folding is NOT available in embed points
    - code completion compells us to have a "parsing" of the app at the end of EVERY compile
    - code folding is NOT tweakable
    - code folding is NOT working on all "case" code (loop case if etc..)

    ....

    all could have been SO much better but we have it 😉

    JP

  2. Arnor

    Jean-Pierre,

    Code folding and code completion are two completely different things. Code completion is bound to have performance effect, don't think there is any way around it. I'm not much for code folding myself and rarely use it in the editors I use. That said I might write up something about code folding in C7 compared to other editors that I use:)

    Best regards,

    Arnor

  3. Arnor,

    You should try UltraTree then to see what real code completion and code folding are and see by yourself there is NO performance issue.

    Open any file (clw tpl tpw inc etc...):
    add a "variable" or a column name or a table name etc in any code

    the second lines already "knows" that variable or column name or table name and offers it as code completion

    This simply shows - proves that the "full" procedure is NOT at all required to "know" all .... it is a choice done at SV level - and this choice is what I - personaly - find VERY restrictive (maybe the guys who decided work like that and did not think others could work differently) .....

    Which also shows - proves there is NO need to "parse" the full app after a compile like c7 does ....

    Let us hope one day ...;)

    JP

  4. Arnor

    Hi Jean-Pierre,

    This article was about how to implement code completion in C7. I'm not going to argue this with you. I suggest you take this up with Softvelocity directly with PTSS entries. Personally I have not seen any performance issues caused by code completion, but I do not have anything except small test apps in C7 yet. All I'm trying to do is to help people FIND where and how to set this up properly. I have no interest in arguing with you about anything.

    Best regards,

Leave a Reply