final FileObject fo = project.getProjectDirectory().getFileObject( NodeJSProjectFactory.PACKAGE_JSON );
if (!fo.isValid()) {
Logger.getLogger( ProjectMetadataImpl.class.getName() ).log( Level.WARNING, "Project root dir became invalid" );
return;
}
project.getProjectDirectory().getFileSystem().runAtomicAction( new AtomicAction() {
@Override
public void run () throws IOException {
FileObject save = fo;
if (save == null) {
save = project.getProjectDirectory().createData( NodeJSProjectFactory.PACKAGE_JSON );