You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/01/15 10:50:51 UTC

[GitHub] [netbeans] junichi11 opened a new pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

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


   https://issues.apache.org/jira/browse/NETBEANS-5244
   
   - Add settings for an XML configuration file
   - Add parameters (`--config /path/to/configuration/file.xml`)
   
   ![netbeans-5244-phpDocumentor-configuration-path](https://user-images.githubusercontent.com/738383/104715757-49b9df00-576a-11eb-8629-f00eba64bd21.png)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] tmysik commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
tmysik commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559206155



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       Thank you.
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] tmysik commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
tmysik commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559223060



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       Nicely done, thank you.
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] tmysik commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
tmysik commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559086510



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       If the path is incorrect, PhpDoc itself will complain, I guess, so we don't need to run the validator here. Or do we? :thinking: 
   
   AFAIR we validate project properties before each run and if they are incorrect, the Project Properties dialog is opened.
   
   @junichi11 @KacerCZ What do you think, guys?
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] junichi11 commented on pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
junichi11 commented on pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#issuecomment-762281336


   Thank you for your reviews.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] junichi11 merged pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
junichi11 merged pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] junichi11 commented on pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
junichi11 commented on pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#issuecomment-761300387


   @tmysik Sorry for the many review requests. Don't worry, I'll wait anyway :) Thanks.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] junichi11 commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559205858



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       I'll improve it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] KacerCZ commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
KacerCZ commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559167280



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       Properties are opened only if target directory for generated documentation is not valid.
   `sanitizePath()` only replaces backslashes on Windows with slashes.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] tmysik commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
tmysik commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559180537



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       > Properties are opened only if target directory for generated documentation is not valid.
   
   So, should not it be opened also if the enabled configuration file is invalid, typically it does not exist?
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] tmysik commented on pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
tmysik commented on pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#issuecomment-761743703


   @junichi11 Just added one comment. Feel free to merge it as it is now, it is more a question. Thank you!
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] junichi11 commented on a change in pull request #2678: [NETBEANS-5244] Add the project settings for XML configuration of phpDocumentor

Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2678:
URL: https://github.com/apache/netbeans/pull/2678#discussion_r559222604



##########
File path: php/php.phpdoc/src/org/netbeans/modules/php/phpdoc/PhpDocScript.java
##########
@@ -145,13 +149,24 @@ private String sanitizePath(String path) {
         return path;
     }
 
-    private List<String> getParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+    private List<String> getAllParameters(String sanitizedPhpDocTarget, PhpModule phpModule) {
+        List<String> params = new ArrayList<>(getDefaultParameters(sanitizedPhpDocTarget, phpModule));
+        if (PhpDocPreferences.isConfigurationEnabled(phpModule)) {
+            String configurationPath = PhpDocPreferences.getPhpDocConfigurationPath(phpModule);
+            if (!StringUtils.isEmpty(configurationPath)) {
+                params.add(PARAM_CONFIG);
+                params.add(sanitizePath(PhpDocPreferences.getPhpDocConfigurationPath(phpModule)));

Review comment:
       Fixed.
   ![netbeans-5244-phpdocumentor-invalid-settings](https://user-images.githubusercontent.com/738383/104852801-4b3d0000-5940-11eb-9cf9-4cbff474cb1b.gif)
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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