Enable code completion (basic)

LibreOffice 4.4.3.2 pl_PL, Calc

Hello, I’m trying to enable the code completion in BASIC code editor embded in Calc. I found that option in:
Tools → Options (maybe Settings) → LibreOffice → BASIC IDE options.

There is such an option, but I cannot check it, because it is grayed. How can I enable the code completion?

Using LO 4.4.1.2 on Windows 8.

I noticed that all the options in Basic IDE Options are greyed out. I found that by going to Advanced Options and enabling the option Enable experimental features the options in Basic IDE Options become available.

I am concerned however it states that these are experimental features marked as being unstable. Has anyone any experience of allowing this feature?

EDITED 13/01/2017

@EasyTrieve I set all the options on for the Basic IDE Options and had some success. All the options other than Enable code completion work. There appears to be no code completion. Looking at Help it says -

"Code Completion

This feature helps the Basic programmer to complete the code, saves extensive typing and helps to reduce coding errors.
Enable code completion

Display methods of a Basic object. Code completion will display the methods of a Basic object, provided the object is a UNO extended type. Its does not work on a generic Object or Variant Basic types.

When a variable is a UNO interface or structure, a list box appears when pressing the dot after a variable’s name (like aVar. [list box appears] ). Its methods and variables are listed in the list box, displayed just below. You can navigate between the suggested methods and variables with the arrow keys. To insert the selected entry, press the Enter key or double click on it with the mouse. To cancel the list box, press the Esc key.

When typing the method’s name, and pressing the Tab key once, it will complete the selected entry, pressing the Tab key again will cycle through the matches with the longest prefix. For example, when aVar.aMeth is typed, it will cycle through aMeth1, aMethod2, aMethod3 entries, and other entries are not hidden.

Example:

Dim aPicker As com.sun.star.ui.dialogs.XFilePicker

is a valid variable definition, its methods can be accessed via the dot (".") operator:

aPicker.getDisplayDirectory()"

The sample code shown here does work. As it says in Help it only applies to Methods and to objects of a UNO extended type and does not work on a generic Object or Variant Basic type so I guess that it is working as specified.

@Peterwt, Did you ever get this to work? I tried to enable it in 5.2.3.3 on linux with: Tools | Options | LibreOffice | Advanced | check Enable experimental features | Ok, followed a reboot, then Tools | Options | LibreOffice | Basic IDE Options | check Enable code completion | Ok, but I can’t see any changes in the basic IDE editor.

@EasyTrieve I have edited my original posting as it is too long for a comment.

It seems this feature is strictly limited to Interfaces and Structs
That’s poor… :frowning:

  1. Go (menu):ToolsOptionsAdvanced
    (place a tick in Enable experimental features + press OK)
  2. Go (menu):ToolsOptionsBASIC IDE Options
    (all options are now available for selection)

“BASIC IDE options” were introduced in 4.2. The current Fresh release is 5.0.0.5. The procedure to make them available is the same now as then: enable “Enable experimental features”. They were marked under Advanced as ‘(unstable)’ in 4.2 & are so-marked in 5.0. Use at your own risk, it seems.

If this helps then please tick the answer (:heavy_check_mark:).

1 Like

Thank you very much!