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 256962 - Code formatting not working for Drupal files on a git project
Summary: Code formatting not working for Drupal files on a git project
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2015-12-03 17:12 UTC by rice80
Modified: 2015-12-11 14:53 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Module file extension mime type association (208.69 KB, image/png)
2015-12-04 15:02 UTC, rice80
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rice80 2015-12-03 17:12:12 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Mac OS X version 10.11 running on x86_64
Java; VM; Vendor = 1.8.0_66
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.66-b17

Reproducibility: Happens every time

STEPS:
  * Open a PHP Project that has git on it, and is a Drupal Project
  * Open a .module file
  * type code that is not formatted, for example if($a === $b){/** code */}else{/** code*/}
  * Press Control + Shift + F to format the code

ACTUAL:
  nothing happens

EXPECTED:
  The code should be formatted as per the setting in "properties" sectio
Comment 1 rice80 2015-12-03 17:31:36 UTC
Also the following functionality is not present:
- Code completion for local variables.
- Automatic documentation generation (start documenting a function with /**).
- Local variables highlighting
Comment 2 Tomas Mysik 2015-12-04 08:41:23 UTC
(In reply to rice80 from comment #0)
>   * Open a .module file

If this is a PHP file, feel free to assign it PHP MIME type [1]. Then, all the PHP features should work as expected.

Thanks.
[1] Tools > Options > Miscellaneous > Files
Comment 3 rice80 2015-12-04 15:02:16 UTC
Created attachment 157667 [details]
Module file extension mime type association
Comment 4 rice80 2015-12-04 15:04:39 UTC
Hi Tomas

I did, and the issue is still present, however on version 7.4 this bug is not present at all. I had to switch back to version 7.4 which works fine for me, however it would be nice to be able to eventually move to version 8.

Please let me know if you need more details or a better test case.

Thank you
Comment 5 Tomas Mysik 2015-12-07 07:52:42 UTC
Weird; could you please attach a sample project so we can investigate it?

Thanks.
Comment 6 rice80 2015-12-11 14:53:38 UTC
Hi Tomas

This project was giving me the same behavior: 

https://github.com/BryanRice800/netbeans-bug-test

It is a full drupal project, just clone it into your www root folder, 


Tu run the site you can 

import the DB located in https://github.com/BryanRice800/netbeans-bug-test/blob/master/scripts/netbeans_bug_test.sql and create a vhost but that is not in the scope of this ticket.