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 196885 - New C source file doesn't show in Project view
Summary: New C source file doesn't show in Project view
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-20 11:03 UTC by Vladimir Kvashin
Modified: 2011-03-31 13:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed partial fix for events (7.16 KB, patch)
2011-03-22 17:48 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2011-03-20 11:03:36 UTC
I imported a makefile based project. Then I tried adding a C source file to it (via Project pane context menu). Everything went OK except the fact that it didn't appear in Project pane. The file itself was OK, it is put in right place and builds OK.

After I restarted IDE the file appeared in Project pane.

With managed problem there are no such issues.
Comment 1 Alexander Pepin 2011-03-21 10:54:07 UTC
I believe it should be fixed by FCS (not in RC1).
Comment 2 Vladimir Kvashin 2011-03-21 19:15:37 UTC
Fixed in cnd-main
http://hg.netbeans.org/cnd-main/rev/8a9d17db98fd
Comment 3 Quality Engineering 2011-03-22 09:56:48 UTC
Integrated into 'main-golden', will be available in build *201103220400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8a9d17db98fd
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #196885 - New C source file doesn't show in Project view (for unmanaged project)
Comment 4 Vladimir Kvashin 2011-03-22 17:48:35 UTC
Created attachment 107196 [details]
proposed partial fix for events
Comment 7 Vladimir Kvashin 2011-03-23 16:55:28 UTC
fixed in cnd-main
http://hg.netbeans.org/cnd-main/rev/517c93a6d24f
Comment 8 Quality Engineering 2011-03-24 09:50:54 UTC
Integrated into 'main-golden', will be available in build *201103240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9f1c6bc2d268
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: recursive listeners support fixing #196885 - New C source file doesn't show in Project view
Comment 9 Alexander Pepin 2011-03-24 13:36:42 UTC
adding a new file causes an exception
java.io.FileNotFoundException: C:\working\full_remote\.cnd_dev\var\cache\remote-files\nyx-intel2_22_hudson\export\hudson\home\working\Quote_mkfb\.rfs_attr (The system cannot find the path specified)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
[catch] at org.netbeans.modules.remote.impl.fs.RemoteFileSystem.setAttribute(RemoteFileSystem.java:289)
	at org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase.setAttribute(RemoteFileObjectBase.java:346)
	at org.openide.filesystems.FileUtil.copyAttributes(FileUtil.java:1128)
	at org.netbeans.modules.cnd.source.SourceAbstractDataLoader$CndFormat.createFromTemplate(SourceAbstractDataLoader.java:273)
	at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:799)
	at org.netbeans.modules.cnd.source.SourceDataObject.handleCreateFromTemplate(SourceDataObject.java:135)
	at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1303)
	at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:261)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:125)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:566)
	at org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java:273)
	at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:888)
	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:820)
	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:800)
	at org.netbeans.modules.cnd.editor.filecreation.CCFSrcFileIterator.instantiate(CCFSrcFileIterator.java:168)
	at org.netbeans.modules.cnd.editor.filecreation.CCFSrcFileIterator.instantiate(CCFSrcFileIterator.java:154)
	at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1019)
	at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:591)
	at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:412)
	at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:256)
	at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:168)
	at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1548)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1505)
	at org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:137)
	at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2076)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 10 Vladimir Kvashin 2011-03-24 19:51:34 UTC
Alexander, could you specify steps to reproduce? I'm trying to reproduce, but constantly failing.
Comment 11 Alexander Pepin 2011-03-25 10:45:29 UTC
Steps to reproduce (on Windows):- import makefile based remote project- right-click on source folder in Projects view and call New->"C   Source File..."- enter a new file name or leave existing and press OKResult: An exception window appears for a second but the exception could be found in IDE log. If you repeat the steps then the exception window appears and stays visible. You can also push Previous button in the exception window to check the first exception.
Comment 12 Alexander Pepin 2011-03-25 10:47:23 UTC
Sorry for a mess in my last comment. It happened due to some bug in bugzilla.
Comment 13 Vladimir Voskresensky 2011-03-25 12:45:06 UTC
extra fix http://hg.netbeans.org/cnd-main?cmd=changeset;node=bcc414eafaf7
Comment 14 Quality Engineering 2011-03-28 08:48:01 UTC
Integrated into 'main-golden', will be available in build *201103280400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/bcc414eafaf7
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix for #196885 - New C source file doesn't show in Project view
Comment 15 Alexander Pepin 2011-03-28 15:33:56 UTC
in dev build #5042 when I try to create C++ header file I got:
java.lang.NullPointerException
	at org.netbeans.modules.cnd.makeproject.MakeTemplateListener.operationCreateFromTemplate(MakeTemplateListener.java:189)
	at org.openide.loaders.DataLoaderPool.fireOperationEvent(DataLoaderPool.java:240)
	at org.openide.loaders.DataObject.fireOperationEvent(DataObject.java:848)
	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:821)
	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:800)
	at org.netbeans.modules.cnd.editor.filecreation.CCFSrcFileIterator.instantiate(CCFSrcFileIterator.java:168)
	at org.netbeans.modules.cnd.editor.filecreation.CCFSrcFileIterator.instantiate(CCFSrcFileIterator.java:154)
	at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1019)
	at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:591)
	at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:412)
	at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:256)
	at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:168)
	at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1548)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1505)
	at org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:137)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2076)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 16 Vladimir Voskresensky 2011-03-28 16:14:01 UTC
fixed recursive refresh from refresh manager
http://hg.netbeans.org/cnd-main?cmd=changeset;node=8c819698d891
fixed NPE
http://hg.netbeans.org/cnd-main?cmd=changeset;node=11f88fba2786
fixed FileNotFoundException ...\.rfs_attr (The system cannot find the path specified)
http://hg.netbeans.org/cnd-main?cmd=changeset;node=b3b1c9ec0b17
Comment 17 Quality Engineering 2011-03-29 08:42:12 UTC
Integrated into 'main-golden', will be available in build *201103290400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8c819698d891
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixing #196885 -  New C source file doesn't show in Project view
- non-recursive refresh from refresh manager
Comment 18 Vladimir Voskresensky 2011-03-29 11:04:59 UTC
extra fix for encoding of new files:
- remote source file should have correct encoding based on data from remote project; we should return encoding for folders as well
http://hg.netbeans.org/cnd-main?cmd=changeset;node=8229bd330ced
Comment 19 Vladimir Kvashin 2011-03-29 11:08:58 UTC
yet one more extra fix: get correct base directory
http://hg.netbeans.org/cnd-main/rev/a29f54e56f53
Comment 20 Alexander Pepin 2011-03-29 13:26:14 UTC
verified in dev build #5052
Comment 22 Quality Engineering 2011-03-30 08:42:23 UTC
Integrated into 'main-golden', will be available in build *201103300400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8229bd330ced
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixing #196885 -  New C source file doesn't show in Project view
- remote source file should have correct encoding based on data from remote project; we should return encoding for folders as well
Comment 23 Alexander Pepin 2011-03-31 13:32:09 UTC
Verified in RC2 build 20110331