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 247997 - Sync changes between project and its package.json
Summary: Sync changes between project and its package.json
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-17 09:25 UTC by Tomas Mysik
Modified: 2014-11-07 10:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 212791


Attachments
stacktrace (6.37 KB, text/plain)
2014-10-17 09:25 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2014-10-17 09:25:46 UTC
Build: NetBeans IDE Dev (Build 20141009-55af4c8de886)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.72-b04, Java(TM) SE Runtime Environment, 1.7.0_72-b14
OS: Linux

User Comments:
tmysik: move package.json from one HTML5 project to another




Stacktrace: 
java.lang.AssertionError: Unhandled property change: PROJECT_NAME
   at org.netbeans.modules.web.clientproject.ClientSideProject$PlatformProvidersListenerImpl.propertyChanged(ClientSideProject.java:1011)
   at org.netbeans.modules.web.clientproject.api.platform.PlatformProvidersListener$Support.firePropertyChanged(PlatformProvidersListener.java:129)
   at org.netbeans.modules.web.clientproject.api.platform.PlatformProviders$DelegatingPlatformProviderListener.propertyChanged(PlatformProviders.java:272)
   at org.netbeans.modules.web.clientproject.spi.platform.PlatformProviderImplementationListener$Support.firePropertyChanged(PlatformProviderImplementationListener.java:115)
   at org.netbeans.modules.javascript.nodejs.platform.NodeJsPlatformProvider.propertyChange(NodeJsPlatformProvider.java:174)
   at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
Comment 1 Tomas Mysik 2014-10-17 09:25:47 UTC
Created attachment 149954 [details]
stacktrace
Comment 2 Tomas Mysik 2014-10-17 09:38:56 UTC
Mainly project name and start file.
Comment 3 Tomas Mysik 2014-10-17 09:39:29 UTC
This must be fixed in FCS.
Comment 4 Tomas Mysik 2014-10-22 05:50:46 UTC
Project name sync done, will be pushed today. Start file follows.
Comment 5 Tomas Mysik 2014-10-27 09:18:57 UTC
Should be working now I hope. Please verify, thanks.
Comment 6 Vladimir Riha 2014-10-31 07:49:30 UTC
Tomasi I've found two issues:

#1 
 - create a NodeJS sample project
 - right click on project and select Rename
 - check to also rename project folder
 => project name is not updated in package.json. It is if project folder is set to keep its name

#2
 - create a NodeJS sample project
 - in project properties, set start file to listdirectory.js instead 
 - confirm package.json sync
 => package.json contains

"start": "node src\/listdirectory.js"

while it should be

"start": "node src/listdirectory.js"



Product Version: NetBeans IDE Dev (Build 201410310002)
Updates: Updates available
Java: 1.8.0_20; Java HotSpot(TM) Client VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 7 Tomas Mysik 2014-10-31 09:18:42 UTC
(In reply to Vladimir Riha from comment #6)
> "start": "node src\/listdirectory.js"
> 
> while it should be
> 
> "start": "node src/listdirectory.js"

Likely not, we use JSONValue.escape() so it is perhaps OK.
Comment 8 Tomas Mysik 2014-10-31 12:06:37 UTC
(In reply to Vladimir Riha from comment #6)
> #1 
>  - create a NodeJS sample project
>  - right click on project and select Rename
>  - check to also rename project folder
>  => project name is not updated in package.json. It is if project folder is
> set to keep its name

Should be fixed now. Closing, point #2 explained earlier.

Thanks.

http://hg.netbeans.org/web-main/rev/227c025ba292
Comment 9 Quality Engineering 2014-11-01 04:46:33 UTC
Integrated into 'main-silver', will be available in build *201411010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/227c025ba292
User: Tomas Mysik <tmysik@netbeans.org>
Log: #247997 cont'd - Sync changes between project and its package.json
Comment 10 Vladimir Riha 2014-11-07 10:47:35 UTC
Tomasi, I've tried the 

>  - create a NodeJS sample project
>  - right click on project and select Rename
>  - check to also rename project folder
>  => project name is not updated in package.json. It is if project folder is
> set to keep its name

and now IDE displays the confirmation dialog (if I want to sync changes with package.json) but it immediately disappears without waiting for confirmation. The same happens if the folder is not supposed to be renamed. Do you want me to file a new issue for it? 


Thanks
Comment 11 Tomas Mysik 2014-11-07 10:51:53 UTC
(In reply to Vladimir Riha from comment #10)
> Do you want me to file a new issue for it?

Yes please, thanks.
Comment 12 Vladimir Riha 2014-11-07 10:59:23 UTC
Reported as #248485. Thank you