クラス フォルダーを利用してメンバ関数を別ファイルに作成した際に、TAB補完によるメンバ変数、メンバ関数を表示させる方法について
Show older comments
1. クラス フォルダーを利用してクラスを定義
@Test/Test.m
classdef Test < handle
properties
a;
end
methods
function this = Test()
end
end
methods(Access = private)
func1(this);
end
methods
function check(this)
this.func1(); % A
end
end
end
2. クラスフォルダ内に別ファイルとしてメンバ関数を作成
@Test/func1.m
function func1(this)
this.<TAB> % B
end
操作1:@Test/Test.m のA行でctrl+Dを押す
期待する動作1:@Test/func1.m が開く
実際の動作1:「ファイルthis.func1は存在しません、作成しますか?」とメッセージが表示される
操作2:@Test/func1.m 内のB行において"this."に続いて<TAB>を押す
期待する動作2:Testクラスのメンバ変数aやメンバ関数func1, checkが候補として表示される。
実際の動作2:Testクラスのメンバ変数aやメンバ関数func1, checkが候補として表示されない。
質問
クラスフォルダーを使ってクラスを構築する際に、TAB補完やctrl+Dによるコードの移動を実現させたいのですが、何か方法はありますか?
Accepted Answer
More Answers (0)
Categories
Find more on PHY Components in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!