Why clicking on function call navigates to function prototype?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Why clicking on function call navigates to function prototype?

ソリューションへジャンプ
3,148件の閲覧回数
anaseem
Contributor IV

My embedded system in based on LPC11E68 Microcontroller.  Language is C / C++.  From MCUXpresso IDE, I click on Ctrl key and left click on function call, and end up at function prototype.  For long time I ended up at the function definition.  What broke my code navigation to function definition?

ラベル(1)
タグ(1)
1 解決策
2,987件の閲覧回数
BlackNight
NXP Employee
NXP Employee

There is a discussion on this here: Re: [cdt-dev] open declaration vs open definition 

But basically it is the same as using 'Open Declaration (F3)' which actually might jump first to the definition depending on the context. Doing F3 then toggles between declaration and definition.

I hope this helps,

Erich

元の投稿で解決策を見る

3 返答(返信)
2,987件の閲覧回数
BlackNight
NXP Employee
NXP Employee

On another thought: that functionality depends on the 'Index', so if you see problems, I recommend to rebuild it:

pastedImage_1.png

Additionally, I always disable the 'heuristics' mode for better results, see Fixing the Eclipse Index | MCU on Eclipse  for details.

I hope this helps,

Erich

0 件の賞賛
返信
2,987件の閲覧回数
anaseem
Contributor IV

After rebuilding index, highlighting function and pressing <F3> twice navigates to function definition.  First press of <F3> only navigates to function prototype.  I always used to navigate to function definition on first press of <F3>.

In my workspace I have Three projects.  Two library projects and One application project.

I right-click on each project  -  Index  -  Rebuild

My indexer window is as follows:

indexer.PNG

On first press of <F3> I can navigate to function definition when function call and function definition reside in application.

But it takes two <F3> presses to navigate to function definition when function call is in application and function definition is in library.

0 件の賞賛
返信
2,988件の閲覧回数
BlackNight
NXP Employee
NXP Employee

There is a discussion on this here: Re: [cdt-dev] open declaration vs open definition 

But basically it is the same as using 'Open Declaration (F3)' which actually might jump first to the definition depending on the context. Doing F3 then toggles between declaration and definition.

I hope this helps,

Erich