how do I change the default open behavior to not be a class property

30 ビュー (過去 30 日間)
Jim Hokanson
Jim Hokanson 2025 年 2 月 6 日 23:12
コメント済み: Jim Hokanson 2025 年 2 月 12 日 15:12
How do I change the default behavior in the MATLAB editor so that selecting text and opening it (selecting "open") doesn't go the property first (as opposed to a class with the same path)? (note, this may also apply to functions in the same package, I haven't tested it
Consider the following layout:
+p/@class1
+p/+class1/@class2
If class1 has a property "class2" then if I select code that is "p.class1.class2" and open it the editor goes to the property "class2" instead of the class "class2"

回答 (1 件)

Karan Singh
Karan Singh 2025 年 2 月 12 日 10:15
The issue is that when an object’s property and a class (or function) share the same name in your package structure, the Editor’s “open” command goes to the property definition by default. This behavior is built into MATLAB’s name resolution. I dont think there is a documented way to change it.
Karan
  1 件のコメント
Jim Hokanson
Jim Hokanson 2025 年 2 月 12 日 15:12
That's what I figure but I was hoping that someone knew a workaround.

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

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by