FreeCAD / FreeCAD/FreeCAD

Gui: Scopes for autocompletion

Open
#17,106 0 comments 0 reactions 0 assignees View on GitHub
Mod: Core Topic: User Interface Type: Feature
Dominant language
C++
Stars
33.6k
Forks
6k
Avg merge
3d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Problem description

In complex designs, the user could be helped by limiting the scope of autocompletion search to a scope that a user prefers.

I worked on a (too large) PR that shows this kind of functionality: https://github.com/FreeCAD/FreeCAD/issues/13038.

However, independent from this work, a user on Discord reported this as well:


A more significat productivity improvement I wish for is to have some concept of 'scopes' for varset autocomplete, so that one could for example bind the varset to an object in the tree and all expressions in objects in the subtree could autocomplete with value names directly. Example: if I associate a varset ExternalParameters with a partdesign body, then in inside all sketches created inside the body, the expression editor would allow me to autocomplete just by typing the names of variables in varset ExternalParameters. I don't mind if the autocomplete then expands the variable name to fully qualified name so things don't break backward compatibility, just to reduce the typing overhead from Exter ↓↓ RET BlaBla to just BlaBla

### Full version info

```shell
OS: Arch Linux
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38925 (Git)
Build type: Release
Branch: main
Hash: 12c6fc2920d083c7407419f8b9ae3651798c005a
Python 3.12.6, Qt 6.7.3, Coin 4.0.3, Vtk , OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: OpenDark.qss/OpenDark/
Installed mods:
* OpenTheme 2024.5.16
* osh-autodoc-workbench 0.2.3
* Ondsel-Lens 2024.9.13.02
```

### Subproject(s) affected?

Core

### Anything else?

It is highly related to https://github.com/FreeCAD/FreeCAD/issues/16848 but I prefer to create a separate issue for it.

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.