facebook

Code navigation on javascript + requirejs and nodejs projects.

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #591335 Reply

    sblantipodi
    Participant

    Hi,
    I see no navigation at all on codemix for my javascript+requirejs project and for my nodejs project.

    Codemix simply is not able to navigate to another file.
    It can navigate to functions in the same file but it is not able to navigate to other files.

    Will navigation ever be implemented on this kind of projects?

    Thanks,
    Davide

    #591358 Reply

    support-swapna
    Moderator

    Davide,

    Sorry that you are seeing this problem. The dev team is looking into it. We will keep you posted about the fix schedule.

    Thank you for reporting.

    –Swapna
    Genuitec Support

    #597361 Reply

    thibaut-vacca
    Participant

    Any update ? I’m having the same problem for .ts and .html files opened with CodeMix editors.

    Original message :

    I’m using CodeMix with Webclipse plugin on Eclipse Oxygen. 

    It works great except one important feature. I can’t Ctrl + click on elements anymore. 

    On HTML files and TS files (opened with CodeMix editors), clicking + hover will display a popup with the element definition but if I click on the element, nothing happens. I am not redirected to the element definition. Sometimes my cursor just moves to the element declaration if it’s in the same file but if it’s not, nothing happens at all. 

    This functionnality works with the Webclipse editors.

    This actually only happens on a big project. I have another small Angular project for which Ctrl + Click works perfectly with CodeMix Editors. 

    #597424 Reply

    Brian Fernandes
    Moderator

    Each of these issues are different as it does depend on the support for a given language, as well as your project structure. The functionality you’re after should work of course, even more so if it does work with Webclipse.

    What is most likely happening is that there’s something different about this project structure that the tooling isn’t able to work with. Can you help us with answers to the following questions:

    1) What sort of project is this – is an Angular project or a mix of Angular and Java, or something else?
    2) If Angular, did you create it with the CLI? Do you recall what version of the CLI you used, or what version of Angular you are currently using?
    3) For the elements where Ctrl + Click does nothing, did you get content assist suggesting that element in the first place? If you make a typo, does validation catch this problem?
    4) Can you share with us your project structure or key files that might help us reproduce, like package.json?
    5) Are any errors logged when you press Ctrl + Click? You can see these in the Error log view – do send us the error log as well, you can export it from the view.

    Thanks!

    #597425 Reply

    thibaut-vacca
    Participant

    1. I imported it as an Angular Project. I launch it with ng serve from the Webclipse Terminal +.
    2. I probably created it with the CLI yes. This is the version in my package.lock: “@angular/cli”: “^1.7.3”. I’m currently using Angular 5 (5.2.9)
    3. Yes, I get content assist and validation. I even get the popup on hover with the source definition. It’s jsut the Ctrl + click that doesn’t do anything. Actually F3 takes me to the definition if it’s in the same file. F3 also takes me to the definition IF and only IF the file containing the declaration is opened. But this is by pressing F3 (not Ctrl + Click).
    4.Package.json is attached

    5. Absolutely no error is shown on the Error log view when I Ctrl + click

    Could this be an indexing problem ? I don’t know how Eclipse indexes files to allow file navigation but it’s strange that F3 works if the file with the definition is open. Solving this could be fine as long as I can access the definition with F3 instead of Ctrl + Click.
    For the Ctrl + click issue, maybe the shortcut is override by another webclipse plugin ?

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

    Brian Fernandes
    Moderator

    Vacca,
    Appreciate the detailed responses.

    Actually F3 takes me to the definition if it’s in the same file. F3 also takes me to the definition IF and only IF the file containing the declaration is opened. But this is by pressing F3 (not Ctrl + Click).

    1) This is interesting – and in the small project, Ctrl + Click works even if the target file is not open?
    2) The fact that F3 only works if the destination file is open does seem like a project indexing / scanning issue. Just for a better idea, can you give us the project relative paths of the source file (where you click) and the target file?
    3) Can you send us a screenshot of your project properties > CodeMix > Validation page? Does setting it to the 3rd, “Always watch this project …” setting make any difference?
    4) If F3 works, Ctrl + Click really should as well. This is editor controlled functionality, so the Webclipse editors (or anything else really) should not interfere.
    5) Could you send us your error log anyway? There may be some other errors in there that occur before you Ctrl + Click

    Thanks.

    #597434 Reply

    thibaut-vacca
    Participant

    1. Yes, on the small project, every Ctrl + click work, on TS files opened with CodeMix editors. On HTML files, (I don’t know if Ctrl + click is supposed to work on HTML files), only F3 works but it takes a few seconds before navigating.
    2. Source path : /gdd-angular/src/app/shared/individual-components/selector-input/selector-input.ts
    Dest path : /gdd-angular/src/app/shared/service/user-credentials.service.ts
    3. it’s already on this option..
    5. Attached

    I just noticed a difference between the two projects (attached screenshot.). The small project has a ‘Typescript Resource (2.4.1) folder containing all the project files and on Ctrl + click, the opened file seems to be in this folder because the package explorer Link with editor function link the opened file to the one in this folder.
    I don’t have this folder for the big project.

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

    thibaut-vacca
    Participant

    The Error log file

    #597453 Reply

    Brian Fernandes
    Moderator

    Vacca,

    Sorry for the issues uploading your error log, as a post we have a 10K limit, and see we only see a partial log. Could you zip your log file and send that instead please? It looked like there were some CodeMix errors in there that might have a bearing on this.

    Very interesting observation on the TypeScript Resources folder, and off the top of my head, I don’t think this a node that either Webclipse or CodeMix add. Do you happen to have other TypeScript / Node tooling installed as well?

    As a sanity check, are you sure you’re opening the files in the TypeScript :: CodeMix editor? You can confirm this by looking at what editor is selected under the “Open With” context menu for the file.

    #597493 Reply

    thibaut-vacca
    Participant

    Here it is in a .zip.

    Yes I’m totally sure I open the files in Typescript :: CodeMix and HTML :: CodeMix editors.

    I also attached a screenshot on the software installed in Eclipse.

    Thanks

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

    Brian Fernandes
    Moderator

    Vacca,

    Thank you for the screenshot – you can see that you have a number of items from “Angelo ZERR” installed – very likely his TypeScript tools, and this is where that TypeScript Resources node comes from. Please uninstall this set of features and try again.

    We have designed CodeMix such that it will work well with the current version of Webclipse, but neither Webclipse nor CodeMix are compatible with other TypeScript plugins, like Angelo’s which you have installed. It is difficult to predict exactly where failures will occur.

    If you have trouble uninstalling, you may want to try starting with a fresh install, perhaps just Eclipse and CodeMix (without Webclipse) if you’re already using just CodeMix features.

    Do let us know how it turns out.

    #597497 Reply

    thibaut-vacca
    Participant

    I just uninstalled the unwanted packages.

    I attached a screenshot on my current installation.

    Problem is still here. Have you found anything interesting in the Error log file ?

    Could the Eclipse WTP cause the problem ?

    Thanks for your reactivity

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

    thibaut-vacca
    Participant

    I ended up reinstalling Eclipse on my computer (delete all eclipse related folder, download and install Eclipse Oxygen 3, install WebClipse then CodeMix). I imported my Angular project and it seems to work now. I can Ctrl + click on elements and it takes me to the definition in both HTML and TS files opened with CodeMix.

    Thanks for your help.

    I still have one problem though, when I click on a TS file in the git history view (a file of a particular commit for example) the editor opens but cannot display the file. It displays an error. However if I compare this particular file with the local one, the comparison window opens just fine for both files.

    Maybe this will be fixed in CodeMix 2.0.

    This seems to be a really great tool for Eclipse web developpers. We really needed a complete and efficient Angular development plugin for eclipse.

    #597553 Reply

    Brian Fernandes
    Moderator

    Vacca,

    It’s good to hear that the fresh install worked – if the uninstall was not clean, there could have been configurations and settings that could cause continued issues.

    The problem with being able to open a file directly from the repository views is a known problem – yes, it will definitely be fixed for CM 2.0.

    We’re really glad you like CodeMix – please let us know if you have any other questions or suggestions.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Code navigation on javascript + requirejs and nodejs projects.

You must be logged in to post in the forum log in