tab autocompete feature with imported packages

3 visualizaciones (últimos 30 días)
Brian Wilson
Brian Wilson el 19 de En. de 2012
Comentada: Ryan Mott el 3 de Ag. de 2019
Is there a way to make the tab auto-complete popup menu include in its search the functions/classes in an imported Package/namespace?
for instance, i have the following directory structure
C:\Mfiles (exists on matlab path)
C:\Mfiles\+Units ( a package of classdef files)
C:\Mfiles\+Units\AngleUnits.m ( class file within Units package)
If i type the following within the command env or in the editor
import Units.*
bob= AngleUn
and then press \tab, it does not find AngleUnits.m in the popup menu. Is there a way to make the autocomplete search the Units namespace for matching filenames as well as the matlab path?
thanks
  3 comentarios
Tomas Thalmann
Tomas Thalmann el 8 de Sept. de 2015
In 2015 I have still the same problem as Brain with MATLAB R2015a... Any news on that?
Ryan Mott
Ryan Mott el 3 de Ag. de 2019
It appears this feature has not been added yet as of R2018b.
For example, suppose package 'pack' is on the MATLAB path and class 'Obj' is in 'pack'. After opening a script file and typing
pack.Ob
and then tab, the editor auto-completes the name 'Obj'.
However, after instead typing
import pack.Obj
Ob
and then tab, the auto-complete popup says "No completions found," even though MATLAB can find Obj at run time if the name is completed.
I would not call tab complete's failure to search imported packages a bug. But I regularly lose time typing due to this feature's absence. I hope MathWorks adds it.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by