Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

For a single project in Workbench, the "Find Definition" feature (F3, when a function name is selected) takes you to the place where the function was defined, see documentation. According to this documentation, Workbench should find your definition in any .m file in current workspace, which is not the case for me.

Even for project 'App1' which has reference to function from 'App2', the Find Definition cannot find function in 'App2' (which also shows as blue color of the function, meaning Workbench doesn't know its definition).

ADDED according to @magma: When I tried to get the definition of a function written in a different .m file, the Find Definition feature did not work. I even tried with all relevant .m files open in different tabs, to no avail.

Anybody has a clue? thanks Peter

share|improve this question
    
Is this the same as "Find Selected Function" in the HELP menu? FindSelectedFunction doesn't work for add-on packages which is an ongoing bug and one wonders if it will ever be resolved?? –  wolfies Jan 15 at 16:31
    
@wolfies: I don't know, because "Find Selected Function" is in Mathematica GUI and "Find Definition" is in Wolfram Workbench. –  Cendo Jan 16 at 6:46
add comment

1 Answer

I have just tested this functionality and it works perfectly well within a single .m file. I tested both the F3 key and the popup menu call , as described in the user guide. All works well.

However, when I tried to get the definition of a function written in a different .m file, the Find Definition feature did not work. I even tried with all relevant .m files open in different tabs, to no avail.

So, my conclusion is that Find Definition only works in a single .m file, contrary to what is stated in the documentation.

On the bright side, the Find References functionality works as specified, even on multiple files. In fact, in my opinion, it has a better implementation than the Find Definition command, since it does not send you to a different place in the .m file, it simply creates a new search tab with all the references it found. In this way the user can decide where to go next.

I never tested these things before, since I do not like to work on the .m files directly, preferring to use the MMA front end editor with the .m file auto saved. This technique is explained in my answer here

share|improve this answer
    
did you really try F3 with function which is in a different project? For me it doesn't work even with WRI Workbench examples. –  Cendo Jan 17 at 10:18
    
@Cendo I rewrote my answer. You are right, it does not work as promised. –  magma Jan 17 at 10:50
    
Is this the same as Ctrl+Click? –  Ajasja Jan 17 at 10:53
    
@Ajasja : Yes it's the same according the documentation. –  Cendo Jan 17 at 11:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.