[jira] [Commented] (NETBEANS-377) Only underline the non-matching part of namespace

2021-02-06 Thread Jira


[ 
https://issues.apache.org/jira/browse/NETBEANS-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17280403#comment-17280403
 ] 

Tomáš Procházka commented on NETBEANS-377:
--

I filed NETBEANS-5341 as follow-up improvement.

> Only underline the non-matching part of namespace
> -
>
> Key: NETBEANS-377
> URL: https://issues.apache.org/jira/browse/NETBEANS-377
> Project: NetBeans
>  Issue Type: Improvement
>  Components: php - Editor
>Affects Versions: 8.2
>Reporter: Simon Heimberg
>Assignee: Tomáš Procházka
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 12.3
>
> Attachments: image-2021-01-01-14-48-29-774.png
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> When the namespace does not correspondent to the directory structure, the 
> namespace is underlined. Fine!
> But with PSR4 structure, the start of the namespace is often different to the 
> directory structure. But the end should match.
> I suppose to only underline the part of the namespace, which does not match 
> the directory structure. Then the user can determine himself if this part is 
> because of PSR-4 or because of a typo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-377) Only underline the non-matching part of namespace

2021-01-28 Thread Cyril VERLOOP (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17273424#comment-17273424
 ] 

Cyril VERLOOP commented on NETBEANS-377:


Hi,

If i may add, having the "mapping from namespace prefix to base directory [...] 
read *from composer.json*" would be a very nice feature.

 

> Only underline the non-matching part of namespace
> -
>
> Key: NETBEANS-377
> URL: https://issues.apache.org/jira/browse/NETBEANS-377
> Project: NetBeans
>  Issue Type: Improvement
>  Components: php - Editor
>Affects Versions: 8.2
>Reporter: Simon Heimberg
>Assignee: Tomáš Procházka
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 12.3
>
> Attachments: image-2021-01-01-14-48-29-774.png
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> When the namespace does not correspondent to the directory structure, the 
> namespace is underlined. Fine!
> But with PSR4 structure, the start of the namespace is often different to the 
> directory structure. But the end should match.
> I suppose to only underline the part of the namespace, which does not match 
> the directory structure. Then the user can determine himself if this part is 
> because of PSR-4 or because of a typo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-377) Only underline the non-matching part of namespace

2021-01-01 Thread Jira


[ 
https://issues.apache.org/jira/browse/NETBEANS-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17257198#comment-17257198
 ] 

Tomáš Procházka commented on NETBEANS-377:
--

Here is sample of hint when source file is put into 
"src/MyApp/FirstNs/SomeClass.php".

!image-2021-01-01-14-48-29-774.png!

> Only underline the non-matching part of namespace
> -
>
> Key: NETBEANS-377
> URL: https://issues.apache.org/jira/browse/NETBEANS-377
> Project: NetBeans
>  Issue Type: Improvement
>  Components: php - Editor
>Affects Versions: 8.2
>Reporter: Simon Heimberg
>Assignee: Tomáš Procházka
>Priority: Minor
>  Labels: pull-request-available
> Attachments: image-2021-01-01-14-48-29-774.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When the namespace does not correspondent to the directory structure, the 
> namespace is underlined. Fine!
> But with PSR4 structure, the start of the namespace is often different to the 
> directory structure. But the end should match.
> I suppose to only underline the part of the namespace, which does not match 
> the directory structure. Then the user can determine himself if this part is 
> because of PSR-4 or because of a typo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-377) Only underline the non-matching part of namespace

2021-01-01 Thread Jira


[ 
https://issues.apache.org/jira/browse/NETBEANS-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17257169#comment-17257169
 ] 

Tomáš Procházka commented on NETBEANS-377:
--

[PSR-4|https://www.php-fig.org/psr/psr-4/] standard is evolution of 
[PSR-0|https://www.php-fig.org/psr/psr-0/] where workarounds for absence of 
namespaces in PHP before 5.3 were removed.
 Most notable changes are:
 * Underscore character is no longer namespace separator in class name in PSR-4.
 * Namespace prefix can be mapped to base directory.
 * Directory of file must match namespace after prefix.

So I think best solution is to prepare separate PSR-4 validations. Current 
PSR-0 validations are good starting point. Future enhancements can add mapping 
from namespace prefix to base directory (manually defined or even read from 
composer.json).


> Only underline the non-matching part of namespace
> -
>
> Key: NETBEANS-377
> URL: https://issues.apache.org/jira/browse/NETBEANS-377
> Project: NetBeans
>  Issue Type: Improvement
>  Components: php - Editor
>Affects Versions: 8.2
>Reporter: Simon Heimberg
>Priority: Minor
>
> When the namespace does not correspondent to the directory structure, the 
> namespace is underlined. Fine!
> But with PSR4 structure, the start of the namespace is often different to the 
> directory structure. But the end should match.
> I suppose to only underline the part of the namespace, which does not match 
> the directory structure. Then the user can determine himself if this part is 
> because of PSR-4 or because of a typo.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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