You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org> on 2005/02/15 08:56:16 UTC

[jira] Created: (JELLY-201) NotAvailableTag

NotAvailableTag
---------------

         Key: JELLY-201
         URL: http://issues.apache.org/jira/browse/JELLY-201
     Project: jelly
        Type: Improvement
  Components: taglib.util  
    Reporter: Nacho G. Mac Dowell


It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.

Solution:

Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:

        if (!isAvailable()) {
            invokeBody(output);
        }



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (JELLY-201) NotAvailableTag

Posted by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=history ]

Nacho G. Mac Dowell updated JELLY-201:
--------------------------------------

    Attachment: NotAvailableTag.patch

Previous NotAvailableTag patch doesn't work... Too early in the morning...
The new patch now includes modifications to AvailableTag, creation of NotAvailableTag and inclusion of NotAVailableTag in UtilTagLibrary. So both previous patches are useless. Tests will be included in next patch.

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, NotAvailableTag.patch, UtilTagLibrary.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (JELLY-201) NotAvailableTag

Posted by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=history ]

Nacho G. Mac Dowell updated JELLY-201:
--------------------------------------

    Attachment: UtilTagLibrary.patch

Included NotAvailableTag in UtilTagLibrary for testing purposes

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, UtilTagLibrary.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (JELLY-201) NotAvailableTag

Posted by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=history ]

Nacho G. Mac Dowell updated JELLY-201:
--------------------------------------

    Attachment: NotAvailableTag.patch

Updated AvailableTag and created NotAvailableTag

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, UtilTagLibrary.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JELLY-201) NotAvailableTag

Posted by "Paul Libbrecht (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=comments#action_59193 ]
     
Paul Libbrecht commented on JELLY-201:
--------------------------------------

Do I understand that you are wishing a negative version of ant:available ?
Why not in ant taglib ? Or... even... in ant itself ?

paul

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, NotAvailableTag.patch, UtilTagLibrary.patch, suite.jelly.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (JELLY-201) NotAvailableTag

Posted by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=history ]

Nacho G. Mac Dowell updated JELLY-201:
--------------------------------------

    Attachment: suite.jelly.patch

Test cases for NotAvailableTag.

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, NotAvailableTag.patch, UtilTagLibrary.patch, suite.jelly.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JELLY-201) NotAvailableTag

Posted by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=comments#action_59192 ]
     
Nacho G. Mac Dowell commented on JELLY-201:
-------------------------------------------

Only attachments 2 and 4 should be used. I don't know why the order went weird as it should be attachments 3 and 4...

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, NotAvailableTag.patch, UtilTagLibrary.patch, suite.jelly.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JELLY-201) NotAvailableTag

Posted by "Nacho G. Mac Dowell (JIRA)" <co...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/JELLY-201?page=comments#action_59199 ]
     
Nacho G. Mac Dowell commented on JELLY-201:
-------------------------------------------

Hi, what I was looking for is the negative version of util:available. If ant:available exists, maybe util:available is not recommended? The util:available tag accepts a file and an uri. I suppose the ant:available doesn't provide the same functionality? The thing is that there are quite a few places I've seen where mkdir gets called regardless if the directory exists. While the overhead is not a problem, I think that it would improve readability of jelly scripts.

Thanks,

Nacho

> NotAvailableTag
> ---------------
>
>          Key: JELLY-201
>          URL: http://issues.apache.org/jira/browse/JELLY-201
>      Project: jelly
>         Type: Improvement
>   Components: taglib.util
>     Reporter: Nacho G. Mac Dowell
>  Attachments: NotAvailableTag.patch, NotAvailableTag.patch, UtilTagLibrary.patch, suite.jelly.patch
>
> It would be useful to have a NotAvailableTag. Even though (for example) mkdir can be called each time without any overhead, sometimes the code would improve readability with the use of this tag.
> Solution:
> Create a method boolean isAvailable() in AvailableTag which does all the job and have the NotAvailableTag extend AvailableTag and in the doTag method:
>         if (!isAvailable()) {
>             invokeBody(output);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org