This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245041 - Wrong completion for files/modules in child directory
Summary: Wrong completion for files/modules in child directory
Status: REOPENED
Alias: None
Product: javascript
Classification: Unclassified
Component: RequireJS (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 13:23 UTC by Vladimir Riha
Modified: 2014-07-01 11:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (27.64 KB, application/zip)
2014-06-13 13:24 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-06-13 13:23:14 UTC
Please check the attached project:
  - open bbb/fs.js

define(["a"], function(e){
    window.console.log("fs...");
    window.console.log(e);
})

  - invoke cc for module dependency after the "a" (first parameter of define())

=> it should offer app. If you remove "a" and repeat, it should offer app, bbb, jquery etc. as if you repeat this action in main.js. 

It works if "app/" is already entered you invoke cc after the last slash, then it offers correct files from inside the app folder

define(["app/"], function(e){



Product Version: NetBeans IDE Dev (Build web-main-894-on-20140613)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-29-generic running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2014-06-13 13:24:04 UTC
Created attachment 147667 [details]
sample project
Comment 2 Petr Pisl 2014-06-16 15:05:13 UTC
Should be fixed in web-main.
Comment 3 Vladimir Riha 2014-06-20 11:25:45 UTC
I'm sorry but 

define([""], function(e){
    window.console.log("fs...");
    window.console.log(e);
})


in the bbb/fs.js still does not offer files/folders as if invoked from main.js instead it offers items from bbb folder.


Product Version: NetBeans IDE Dev (Build 201406190001)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-29-generic running on i386; UTF-8; en_US (nb)
Comment 4 Vladimir Riha 2014-07-01 11:32:26 UTC
FYI similar issue is when you use

define([], function(){
    var moduleA = require("");   
});


in file "test.js" in project with structure:
 - Site Root/main.js - the main RequireJS config file
 - Site Root/js/app/c/test.js 

then if you invoke cc inside the double quotes in require(""), it should offer paths relative to main.js, not test.js


Product Version: NetBeans IDE Dev (Build 201407010002)