Having issues with the auto-import feature

This topic contains 5 replies, has 4 voices, and was last updated by Profile photo of support-swapna support-swapna 6 months, 4 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #520333
    Profile photo of James
    James
    Participant

    First of all, I’m loving Angular IDE. Thanks for all the hard work you guys have been putting into the project.

    I seem to be running into a problem, though, but I’m not sure if it’s because I haven’t configured things correctly. Basically, I’m trying to get Webclipse to add imports for me automatically, but I’m having mixed results. This is a TypeScript project, using AngularJS.

    To show the problem, I’ve created a package.json file, with the following dependencies:

    Then in the file: foo.ts, I add the following code:
    let myPromise: IPromise<string>;

    …then the IDE tells me: “Cannot find name ‘IPromise'”

    But if add the import for angular, it does what I expect:

    I’ve uploaded a video so you can see the problem I’m experiencing:

    I’ve also added my project to github:
    https://github.com/jalbr74/import-test

    My thinking was that dependencies would be resolved in the project using package.json, so I could auto-import these dependencies as I need them.
    Am I going about this the wrong way?

    Thanks,
    James

    #520392 Reply
    Profile photo of support-piotr
    support-piotr
    Moderator

    James,

    Thank you for a very detailed demo of the problem! This looks definitely like a bug on our side and I’ll be glad to fix it. I am adding it to my TODO list 🙂 It’s awesome to hear that you love Angular IDE! Thanks for all of your bug reports 🙂

    Best regards,
    Piotr Tomiak

    #520425 Reply
    Profile photo of James
    James
    Participant

    Awesome, thank you.

    Yeah, I’ve used Eclipse for 15 years on my Java projects, but in the last couple of years my career has switched over to Angular development. So I tried using WebStorm for the last six months, but kept wishing I had a way to do Angular and node development in Eclipse. So when I found Webclipse/Angular IDE, I was glad you guys had a solution for my situation.

    So thanks again!
    James

    #522089 Reply
    Profile photo of support-tony
    support-tony
    Keymaster

    James,

    This is now fixed in the latest release, CI 5. Please go to Help->Webclipse->Check for Updates and follow the wizard to install them. Let us know if you see any problems.

    #522925 Reply
    Profile photo of James
    James
    Participant

    Hi, I have verified it now imports properly ‘Injectable’ from angular properly, thank you.

    However, I am still seeing a problem with resolving ambiguity, when the type exists in more than one location. For example, given the following code:

    If I use the “quick fix” feature to add the import, I end up with:

    … when I want to end up with:

    I would have expected to be prompted for the right one to import, since it exists in two different places.

    Thanks,
    James

    • This reply was modified 7 months ago by Profile photo of James James.
    • This reply was modified 7 months ago by Profile photo of James James.
    #523020 Reply
    Profile photo of support-swapna
    support-swapna
    Moderator

    James,

    I have filed a bug for the dev team to fix the import issue when the type exists in more than one location.
    Thank you for raising it. Sorry for inconvenience caused.

    –Swapna
    MyEclipse Support

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.