Open Definition (F3) does not work

This topic contains 12 replies, has 3 voices, and was last updated by 10 months, 1 week ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #543692 Reply

    fljmayer
    Participant

    When I place the cursor on a referenced class that is used in one of my Typescript classes and press the F3 key, I should be taken to the source file of that referenced class. However, most of the time I am simply taken to the import statement at the top of my Typescript. Then I have to find the referenced class myself somewhere in the node_modules folder. I would expect more from an IDE.

    #543779 Reply

    support-swapna
    Moderator

    fljmayer,

    Sorry that you are seeing this issue. I could not replicate the problem at my end.
    If possible please share with us the code snippets to help us replicate the problem at our end. If you have no issues sharing your project then you can export it as zip excluding the node_modules folder and share it with us.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #544032 Reply

    Brian Fernandes
    Moderator

    fljmayer,

    I would expect more from an IDE.

    We agree, completely!

    I ran some additional tests and could not replicate issues with F3 – I was able to navigate to classes which were part of my project, as well as classes present in node_modules – we were never really taken to an import statement.

    1) Can you confirm the version of Webclipse you have installed? (Window > Preferences > Webclipse).
    2) For classes that you are unable to navigate to – do they show up in the Open TypeScript Symbol dialog?
    3) Project properties > TypeScript – is the right tsconfig.json file selected here?

    #544033 Reply

    Brian Fernandes
    Moderator

    I just realized that your last post on this forum was over thirteen years ago … welcome back! 🙂

    #544052 Reply

    fljmayer
    Participant

    I still have the problem; I will try you get you an example hopefully by tomorrow evening.

    To answer your question, I am using what seems to be the latest:
    Webclipse Angular 1.8.4.201709142220 com.genuitec.eclipse.webclipse.angular2.feature.feature.group

    • This reply was modified 11 months, 2 weeks ago by  fljmayer.
    #544205 Reply

    Brian Fernandes
    Moderator

    We did put out an update today, so if you haven’t received it yet, do check for updates. We did not fix any issues related to open declaration, but perhaps some other fixes made in this space will result in this indirectly fixed.

    When you do reproduce the problem, it would be handy to know the answers to the other questions too – to figure out if the problem is only a navigation issue, or we really have no idea where the referenced class is (if it’s not in the model, it won’t show up in the open symbol dialog).

    Thanks!

    #544275 Reply

    fljmayer
    Participant

    I created a new Angular project with ng new and copied some of the problematic imports into the generated app.component.ts. The good news is that the referenced files opened as expected from the new project. However, in my existing project within the same Eclipse workspace, F3 still doesn’t open any dependencies. I tried the existing project on a different computer, and F3 worked just fine there. So it’s somehow related to the environment, but I am surprised that within the same Eclipse instance the same import works in project but not the other.

    Regarding your questions:
    1. Version 1.8.4.201709142220
    2. I can only see my own classes in the ‘Open TypeScript Symbol’ dialog, nothing from node_modules.
    3. The selected file is ‘src/tsconfig.app.json’

    • This reply was modified 11 months, 2 weeks ago by  fljmayer.
    #544387 Reply

    fljmayer
    Participant

    I tried again today, and now F3 opens the source for imports in both of my projects, i.e. I can no longer reproduce the issue. Hopefully it stays that way. The ‘Open TypeScript Symbol’ dialog still only shows my own classes.

    #544636 Reply

    fljmayer
    Participant

    I was just to reproduce the problem again. I have a line of code like this (http is a HttpClient):

    When I press F3 on subscribe, it correctly goes into node_modules/rxjs/Observable.d.ts to the line

    When I then press F3 on the return type Subscription, in just takes me to the import statement at the top of the file. So in short, F3 is very unreliable.

    #544658 Reply

    Brian Fernandes
    Moderator

    We tried this very specific case and cannot reproduce the problem – on the systems we tried, we’re being taken to the Subscription.d.ts file. as expected. Clearly this is either an intermittent problem, or there’s something specific to your project that’s causing a problem – most likely also a bug that we need to fix.

    1) Can you reproduce this always with the same project? Or does it sometimes work?
    2) Do you have Project > Build Automatically checked?
    3) Can you send us the Error Log? If possible, would be great if you can delete the existing log, restart, reproduce the problem and then send us that log (would be a bit more focused on the problem at hand).
    4) If you open the Open TypeScript Symbol dialog, with Limit search to currently selected project and symbols from *.t.ds files checked, do you see the Subscription class? (see attached screenshot)

    Attachments:
    You must be logged in to view attached files.
    #545122 Reply

    fljmayer
    Participant

    Finally I got around to answer your questions:

    1. On the computer I mainly work on, I can reproduce the described problem across Eclipse and OS (Windows 10) restarts. On a laptop that I use occasionally, I don’t have that particular problem.
    2. Yes, I always have automatic builds on.
    3. I did as you asked, but there was nothing relevant in the fresh log file. Since pressing F3 does do something (it goes to the import), maybe you could add some logging about what’s going wrong?
    4. When I turned the checkbox on, I did see the Subscription class. Maybe that should be the default?

    • This reply was modified 11 months ago by  fljmayer.
    #545251 Reply

    Brian Fernandes
    Moderator

    We’ve made some fixes that may address this problem in the 2017 CI 10 release, which is due shortly – these are fixes made in the import area, though none specifically address navigation. Since we have been unable to replicate the problem, we can’t confirm that it really will be fixed, unfortunately.

    The wizard has no bearing on the navigation behavior, of course – I just wanted to ensure the classes were indeed accessible from your project. We’re taking a look at why *.d.ts is not on by default as well, certainly cuts out a lot of classes.

    Will let you know when an update is available – thank you for the details so far, and working with us through this issue.

    #547168 Reply

    Brian Fernandes
    Moderator

    CI 10 was released on the 20th of December with the fixes I mentioned above, apologies for forgetting to add a note here about the release. Your installs should have updated automatically to this version, however.

    Can you check if you are on 2017 CI 10, and if it fixed the problem on the problematic system?

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Open Definition (F3) does not work

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.