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 237693 - Renaming Makefile to random extension does not track file
Summary: Renaming Makefile to random extension does not track file
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-26 23:17 UTC by cinderblock
Modified: 2014-09-19 13:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cinderblock 2013-10-26 23:17:17 UTC
1. Create a new project: "C/C++ Application", with all defaults
2. In Projects navigation tree, rename "Makefile" to "foo.bar"
Expected:
 - Physical file renamed to "foo.bar"
 - Element in project list to change to "foo.bar"
Result:
 - Physical file renamed to "foo.bar" (Correct result)
 - Element in project list changed to "foo" (Wrong result)

3. Similar problem happens if you re-add the read file "foo.bar" to the project
4. Rename "foo.bar" to "foo.mk"
Expected:
 - Physical file renamed to "foo.mk"
 - Element in project list to change to "foo.bar"
Result:
 - Physical file renamed to "foo.mk" (Correct result)
 - Element in project list remains "foo.bar" (Wrong result)

I was playing around with other combinations of renaming files, and I feel there were some other cases that generated these same bad behaviors. However I have been unable to reproduce these others cleanly.

However, once the file has a '.mk' file extension, it's stuck that way (which is normal behavior that I'm not a fan of: #122190) and the bad behaviors described don't happen anymore.

I have not explored what impact this has on versioning systems. Questions like "Does this rename the file according to the physical file or the element still in the tree in git's staged changes?"

I have also not explored if this happens when you have other files in a project that do not have file extensions, and you add one. Or change from an unrecognized extension to a known one. Or if this happens in projects other than C/C++ ones.
Comment 1 Alexander Simon 2014-08-13 07:16:36 UTC
fixed, change set:http://hg.netbeans.org/cnd-main/rev/23c892ec0229
Comment 2 Quality Engineering 2014-08-14 02:40:59 UTC
Integrated into 'main-silver', will be available in build *201408140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/23c892ec0229
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #237693 Renaming Makefile to random extension does not track file
Comment 3 Alexander Simon 2014-08-20 06:54:12 UTC
Fix of bug #244554 is also required.
Comment 4 soldatov 2014-09-19 13:32:34 UTC
If user use "C/C++ Application" project type, then nbproject/configurations.xml should be modified in order to restore build.

Verified in NetBeans 8.0.1 patch1

-------------------------------------------------------------------------------
>Log Session: Friday, September 19, 2014 12:00:43 PM MSK
>System Info: 
  Product Version         = NetBeans IDE 8.0.1 (Build 201409182200) (#8819efffa95e)
  Operating System        = SunOS version 5.11 running on amd64
  Java; VM; Vendor        = 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.8.0_05-b13
  Java Home               = /usr/jdk/instances/jdk1.8.0/jre