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 233484

Summary: Incorrect default folder for new scss files
Product: web Reporter: Petr Jiricka <pjiricka>
Component: CSS Preprocessors (SASS, LESS, ...)Assignee: Milutin Kristofic <mkristofic>
Status: REOPENED ---    
Severity: normal    
Priority: P4    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 233764    
Bug Blocks:    

Description Petr Jiricka 2013-07-26 11:35:29 UTC
1. Create a HTML5 application
2. On the project root node, choose New File and select the Sass template

=> On the Name and Location panel, the IDE offers project root as the default location. At a minimum, it should default to site root (public_html). Next, there is the scss -> css mapping table, which by default contains mapping "/scss -> /css". This suggests that scss files should be placed under the scss directory. So it would make sense to use public_html/scss as the default location.

For LESS files the situation is analogous.
Comment 1 Tomas Mysik 2013-07-29 08:59:15 UTC
Not sure if it is doable, I will look at it.

Thanks.
Comment 2 Tomas Mysik 2013-07-30 10:06:24 UTC
Not nice solution but should work. Please verify, thanks.

http://hg.netbeans.org/web-main/rev/a141abd14a32
Comment 3 Quality Engineering 2013-07-31 02:25:32 UTC
Integrated into 'main-silver', will be available in build *201307302300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a141abd14a32
User: Tomas Mysik <tmysik@netbeans.org>
Log: #233484 - Incorrect default folder for new scss files
Comment 4 Tomas Mysik 2013-08-01 04:55:38 UTC
Fix improved.

http://hg.netbeans.org/web-main/rev/ea0650d45217
Comment 5 Petr Jiricka 2013-08-01 09:19:23 UTC
One question Tomas, why is the scss subfolder suggested only if it exists? Can we not preselect it even if it does not exist? That would IMO be the correct solution.
Comment 6 Tomas Mysik 2013-08-01 09:34:38 UTC
(In reply to comment #5)
> One question Tomas, why is the scss subfolder suggested only if it exists? Can
> we not preselect it even if it does not exist? That would IMO be the correct
> solution.

Unfortunately not, the API uses FileObjects, not Files.
Comment 7 Petr Jiricka 2013-08-01 09:54:01 UTC
Ok I see - well that's not nice. An ugly solution could be to create create the folder, but a better way would be to enhance the API so it accepts a File. Can we please file an issue for that? 

I am reopening as this issue is not fully addressed - I understand that we may not be able to fix this for 7.4, but let's still leave it open, as I feel this should be addressed at some point. Anyway, thanks for the partial fix, Tomas.
Comment 8 Tomas Mysik 2013-08-01 10:02:17 UTC
(In reply to comment #7)
> An ugly solution could be to create create the
> folder

This does not work if user click the Cancel button - the folder will stay there...


> but a better way would be to enhance the API so it accepts a File. Can
> we please file an issue for that?

Reported as issue #233764.

> I am reopening as this issue is not fully addressed - I understand that we may
> not be able to fix this for 7.4, but let's still leave it open, as I feel this
> should be addressed at some point. Anyway, thanks for the partial fix, Tomas.

Since we cannot do anything more (there P4 would be perhaps better here), changing TM to Next.

Thanks.
Comment 9 Petr Jiricka 2013-08-01 10:09:09 UTC
Thanks, I agree with P4.
Comment 10 Quality Engineering 2013-08-02 02:35:21 UTC
Integrated into 'main-silver', will be available in build *201308012300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ea0650d45217
User: Tomas Mysik <tmysik@netbeans.org>
Log: #233484 cont'd - Incorrect default folder for new scss files

New API used.