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 243911 - Module not resolved if declared as object literal
Summary: Module not resolved if declared as object literal
Status: RESOLVED WORKSFORME
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-04-18 11:46 UTC by Vladimir Riha
Modified: 2015-04-29 12:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (24.05 KB, application/zip)
2014-04-18 11:46 UTC, Vladimir Riha
Details
proper sample project (24.46 KB, application/zip)
2014-04-18 11:48 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-04-18 11:46:23 UTC
Created attachment 146820 [details]
sample project

Please check the attached project:
 - open custom.js
 - on line 2, type
shirts.
 - check code completion

=> "color" and "size" are not offered. It seems to be caused by the simplified module definition where the 2nd parameter is not a function but object literal

define([], {
    color: "black",
    size: "unisize"
});

(note that it could be also defined via

define({
    color: "black",
    size: "unisize"
});



Product Version: NetBeans IDE Dev (Build javascript2-frameworks-30-on-20140416)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Linux version 3.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2014-04-18 11:48:43 UTC
Created attachment 146821 [details]
proper sample project
Comment 2 Petr Pisl 2014-05-19 14:25:21 UTC
Fixed in web-main/requirejs branch.
Comment 3 Vladimir Riha 2014-05-30 07:32:33 UTC
I'm sorry but it still doesn't work for me


Product Version: NetBeans IDE Dev (Build javascript2-frameworks-61-on-20140530)
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.2.0-60-generic-pae running on i386; UTF-8; en_US (nb)
Comment 4 Quality Engineering 2014-06-04 02:14:13 UTC
Integrated into 'main-silver', will be available in build *201406040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8051ef66668d
User: Petr Pisl <ppisl@netbeans.org>
Log: #243911 - Module not resolved if declared as object literal
Comment 5 Roman Svitanic 2015-04-29 12:42:19 UTC
Can't reproduce the issue anymore on

Product Version: NetBeans IDE Dev (Build 20150429-dbfa5313bcfb)
Java: 1.7.0_75; Java HotSpot(TM) 64-Bit Server VM 24.75-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_75-b13
System: Mac OS X version 10.10.3 running on x86_64; UTF-8; en_US (nb)