You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Hantsy Bai <ha...@gmail.com> on 2009/10/23 05:08:53 UTC

Click help

Hi, Malcolm

Can you provide an official DTD  header declaration for the click.xml 
(and menu.xml) in the 2.1 fcs ?
It is important for IDE. In my plugin, I used NetBeans grammar api to 
implement code completion, but if it is provided, the grammar code is no 
need.


-- 
Hantsy Bai
Guangzhou, China
http://hantsy.blogspot.com


Re: Click help

Posted by Hantsy Bai <ha...@gmail.com>.
Thank you provide the document.
I like most of the features described in this doc.
My original intention is providing a  alternative of clickide for 
NetBeans user.
I will do my best to implement them.

On 10/23/2009 04:07 PM, Adrian A. wrote:
>> I know content you provided.
>> May be you misunderstood my meanings.
>> Currently the click.xml is lack of Dtd declaration header, like the 
>> following.
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE click-app PUBLIC
>>     "-//Apache Software Foundation//DTD Click Configuration 2.1//EN"
>>     "http://click.apache.org/dtds/click-2.1.dtd">
>>
>> <click-app>
>> ....
>> </click-app>
> -1 for this.
> There's no need to "bloat" the click.xml :).
> It only takes one line code in most IDEs API (in custom plug-ins), to 
> enforce a specific DTD(or schema) upon a specific XML file.
>
>> In the click.xml, providing a doctype declaration(the red section, it 
>> is just an example) is helpful for IDE. NetBeans IDE can use this 
>> declaration to determine if this file is a click configuration file 
>> and provide basic code completion automatically (extra code 
>> completion is provided by Code completion api , my plugin provide 
>> extra code completion for package, path and classname attribute value).
> Yes, as IDE users, we are aware of this :), but please note that in 
> most projects, once created(mostly copied from other project) this 
> click.xml file is almost never changed, so concentrating the IDE 
> features on it won't gain any productivity boost :).
>
> A previous Click committer created a very nice list of "efficient 
> features" (roadmap) for a possible NB plug-in (but it's general enough 
> for other IDEs).
>
> I attached a PDF version of that list for you.
>
> Adrian.


-- 
Hantsy Bai
Guangzhou, China
http://hantsy.blogspot.com


Re: Click help

Posted by "Adrian A." <a....@gmail.com>.
> I know content you provided.
> May be you misunderstood my meanings.
> Currently the click.xml is lack of Dtd declaration header, like the 
> following.
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE click-app PUBLIC
>     "-//Apache Software Foundation//DTD Click Configuration 2.1//EN"
>     "http://click.apache.org/dtds/click-2.1.dtd">
> 
> <click-app>
> ....
> </click-app>
-1 for this.
There's no need to "bloat" the click.xml :).
It only takes one line code in most IDEs API (in custom plug-ins), to 
enforce a specific DTD(or schema) upon a specific XML file.

> In the click.xml, providing a doctype declaration(the red section, it is 
> just an example) is helpful for IDE. NetBeans IDE can use this 
> declaration to determine if this file is a click configuration file and 
> provide basic code completion automatically (extra code completion is 
> provided by Code completion api , my plugin provide extra code 
> completion for package, path and classname attribute value).
Yes, as IDE users, we are aware of this :), but please note that in most 
projects, once created(mostly copied from other project) this click.xml 
file is almost never changed, so concentrating the IDE features on it 
won't gain any productivity boost :).

A previous Click committer created a very nice list of "efficient 
features" (roadmap) for a possible NB plug-in (but it's general enough 
for other IDEs).

I attached a PDF version of that list for you.

Adrian.

Re: Click help

Posted by Hantsy Bai <ha...@gmail.com>.
On 10/26/2009 08:56 AM, Bob Schellink wrote:
> Hantsy Bai wrote:
>> Currently the click.xml is lack of Dtd declaration header, like the 
>> following.
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE click-app PUBLIC
>>     "-//Apache Software Foundation//DTD Click Configuration 2.1//EN"
>>     "http://click.apache.org/dtds/click-2.1.dtd">
>
> I think it would be a good idea to publish the official DTD online. As 
> for the menu we don't have a DTD yet, but that shouldn't be too hard 
> to write.
>
> Adrian made the comment on bloating the click.xml but its also worth 
> considering that existing Click projects won't have the DTD header 
> defined. For IDE plugins it would be nice if the click.xml and 
> menu.xml would be recognized without having to declare the DTD. This 
> is similar to HTML pages which work without defining a DOCTYPE.
>
> @Hantsy, can you raise a JIRA for publishing the DTDs online?
>
> kind regards
>
> bob
>
Ok , I've just filed an issue on JIRA.
https://issues.apache.org/jira/browse/CLK-587


Best Regards

-- 
Hantsy Bai
Guangzhou, China
http://hantsy.blogspot.com


Re: Click help

Posted by Bob Schellink <sa...@gmail.com>.
Hantsy Bai wrote:
> Currently the click.xml is lack of Dtd declaration header, like the 
> following.
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE click-app PUBLIC
>     "-//Apache Software Foundation//DTD Click Configuration 2.1//EN"
>     "http://click.apache.org/dtds/click-2.1.dtd">

I think it would be a good idea to publish the official DTD online. As for the menu we don't have a 
DTD yet, but that shouldn't be too hard to write.

Adrian made the comment on bloating the click.xml but its also worth considering that existing Click 
projects won't have the DTD header defined. For IDE plugins it would be nice if the click.xml and 
menu.xml would be recognized without having to declare the DTD. This is similar to HTML pages which 
work without defining a DOCTYPE.

@Hantsy, can you raise a JIRA for publishing the DTDs online?

kind regards

bob

Re: Click help

Posted by Hantsy Bai <ha...@gmail.com>.
On 10/23/2009 02:21 PM, Malcolm Edgar wrote:
> Hi Hantsy,
>
> Please see below:
>
> http://incubator.apache.org/click/docs/click-dtd.html
>
> regards Malcolm Edgar
>
> On Fri, Oct 23, 2009 at 2:08 PM, Hantsy Bai<ha...@gmail.com>  wrote:
>    
>> Hi, Malcolm
>>
>> Can you provide an official DTD  header declaration for the click.xml (and
>> menu.xml) in the 2.1 fcs ?
>> It is important for IDE. In my plugin, I used NetBeans grammar api to
>> implement code completion, but if it is provided, the grammar code is no
>> need.
>>
>>
>> --
>> Hantsy Bai
>> Guangzhou, China
>> http://hantsy.blogspot.com
>>
>>
>>      
>    
I know content you provided.
May be you misunderstood my meanings.
Currently the click.xml is lack of Dtd declaration header, like the 
following.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE click-app PUBLIC
     "-//Apache Software Foundation//DTD Click Configuration 2.1//EN"
     "http://click.apache.org/dtds/click-2.1.dtd">

<click-app>
....
</click-app>

In the click.xml, providing a doctype declaration(the red section, it is 
just an example) is helpful for IDE. NetBeans IDE can use this 
declaration to determine if this file is a click configuration file and 
provide basic code completion automatically (extra code completion is 
provided by Code completion api , my plugin provide extra code 
completion for package, path and classname attribute value).

-- 
Hantsy Bai
Guangzhou, China
http://hantsy.blogspot.com


Re: Click help

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Hantsy,

Please see below:

http://incubator.apache.org/click/docs/click-dtd.html

regards Malcolm Edgar

On Fri, Oct 23, 2009 at 2:08 PM, Hantsy Bai <ha...@gmail.com> wrote:
> Hi, Malcolm
>
> Can you provide an official DTD  header declaration for the click.xml (and
> menu.xml) in the 2.1 fcs ?
> It is important for IDE. In my plugin, I used NetBeans grammar api to
> implement code completion, but if it is provided, the grammar code is no
> need.
>
>
> --
> Hantsy Bai
> Guangzhou, China
> http://hantsy.blogspot.com
>
>