tab autocompete feature with imported packages

6 ビュー (過去 30 日間)
Brian Wilson
Brian Wilson 2012 年 1 月 19 日
コメント済み: Ryan Mott 2019 年 8 月 3 日
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 件のコメント
Tomas Thalmann
Tomas Thalmann 2015 年 9 月 8 日
In 2015 I have still the same problem as Brain with MATLAB R2015a... Any news on that?
Ryan Mott
Ryan Mott 2019 年 8 月 3 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by