junichi11 opened a new pull request, #6825:
URL: https://github.com/apache/netbeans/pull/6825

   ### Add the enum case icon
   
   #### CC Light 
   Before:
   
   
![nb-php-enum-case-icon-light-cc-before](https://github.com/apache/netbeans/assets/738383/538bd7be-c25d-47e1-86b0-81813613da0d)
   
   After:
   
   
![nb-php-enum-case-icon-light-cc-after](https://github.com/apache/netbeans/assets/738383/44b6fb6c-0272-48ff-a326-c40ceff763bd)
   
   #### Navigator Light
   Before:
   
   
![nb-php-enum-case-icon-light-navi-before](https://github.com/apache/netbeans/assets/738383/ef3726a5-274f-4f8c-b394-6138a0f9103d)
   
   After:
   
   
![nb-php-enum-case-icon-light-navi-after](https://github.com/apache/netbeans/assets/738383/c112269e-5308-4e86-a72c-e76edc3cf4bb)
   
   #### CC Dark
   Before:
   
   
![nb-php-enum-case-icon-dark-cc-before](https://github.com/apache/netbeans/assets/738383/5e60d8cd-d5d7-4ad3-8bf3-9d71c95d8ca1)
   
   After:
   
   
![nb-php-enum-case-icon-dark-cc-after](https://github.com/apache/netbeans/assets/738383/b10ef6f7-b10f-4730-ab25-e6c43c324d31)
   
   #### Navigator Light
   After:
   
   
![nb-php-enum-case-icon-dark-navi-before](https://github.com/apache/netbeans/assets/738383/4a9acace-877f-41d4-a7b9-b21b1b1f31b9)
   
   Before:
   
   
![nb-php-enum-case-icon-dark-navi-after](https://github.com/apache/netbeans/assets/738383/c9d641bd-2fe9-492d-87c9-2af5b642af05)
   
   ### Improve the code completion documentation for enum cases
   
   - Add the `isBacked()` method to the `CaseElement` and the `EnumCaseElement` 
interfaces
   - Don't add values of non-backed enums to the code completion documentation
   - Index whether it is an enum case of a backed enum as a boolean value
   - Fix/Add unit tests
   - Increment spec version
   
   Before:
   
   
![nb-php-improve-enum-case-cc-doc-before](https://github.com/apache/netbeans/assets/738383/66411448-d85f-471d-bbc5-6f21344d657b)
   
   After:
   
   
![nb-php-improve-enum-case-cc-doc-after](https://github.com/apache/netbeans/assets/738383/d7188818-f326-4e30-8269-70cc709d0a6b)
   
   ### Check an initializer of an enum case 
   
   - Fix the `IncorrectEnumHintErorr`
     - Cases of non-backed enum must not have a value (e.g. the following
       is a fatal error: `enum NonBacked {case EXAMPLE = 1;}`)
     - Cases of backed enum must have a value (e.g. the following is a
       fatal error: `enum Backed: int {case EXAMPLE;}`)
   - Add/Fix unit tests
   
   Before:
   
   
![nb-php-check-enum-case-initializer-before](https://github.com/apache/netbeans/assets/738383/6633af78-d16f-4d9d-bcf2-3018c784b93b)
   
   After:
   
   
![nb-php-check-enum-case-initializer-after](https://github.com/apache/netbeans/assets/738383/81d2ca35-8c33-4882-83f4-c260a5145099)
   
   
   ### Improve the code completion for enum cases 
   
   There is an error in the following example because `case B = self::` is not 
a complete statement.
   Thus, the result of parsing doesn't recognize the enum declaration.
   This means that some features don't work correctly.
   (e.g. The enum declaration doesn't exist in the navigator. The code 
completion doesn't work.)
   
   ```php
   enum Example: int {
       case A = 1;
       case B = self::
   }
   ```
   
   To improve this, add the `ASTErrorExpression` as a result of an enum case 
initializer part.
   
   - Fix the parser
   - Add unit tests
   
   Before:
   
   
![nb-php-improve-enum-case-navi-with-error-before](https://github.com/apache/netbeans/assets/738383/3755ecf4-fbc3-48a2-ad43-a8fc9fd12cf8)
   
   
![nb-php-improve-enum-case-cc-with-error-before](https://github.com/apache/netbeans/assets/738383/cd1a3228-3b28-4881-ae0d-488cf0737aaf)
   
   After:
   
   
![nb-php-improve-enum-case-navi-with-error-after](https://github.com/apache/netbeans/assets/738383/cba9f7fc-b05e-4268-aaf5-17546aa3259e)
   
   
![nb-php-improve-enum-case-cc-with-error-after](https://github.com/apache/netbeans/assets/738383/56b948cc-e4e7-472b-8590-2766223ca0f8)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to