UIBinder and CSS resources obfuscation

455 views
Skip to first unread message

david....@gmail.com

unread,
Apr 13, 2010, 4:02:03 AM4/13/10
to Google Web Toolkit
Hi,
I'm currently searching around the web to found out how to tell
UIBinder not to perform obfuscation (at-all) on css class. I've read
codes samples in which it is tell to put inside the .gwt.xml the
property CssResource.obfuscationPrefix to empty. But the css class
name doesn't have any links with original name. I've tried to combined
with the CssResource.style to pretty but the css class are still
prefixed with the package name in which the css resources are located.

Prefixing each class with @external in css is some kind of solution,
but doing it for all class in all css I want to test is not a real
solution.

So, my question is : Is there any options for telling UIBinder not to
obfuscate css class ? (like a "global" @external)

Thanks in advance

Sripathi Krishnan

unread,
Apr 13, 2010, 5:16:58 PM4/13/10
to google-we...@googlegroups.com
See the file Resources.gwt.xml .. It has a bunch of properties that you can specify to control how CSS is generated..
I haven't tried it, but putting this in your module.gwt.xml should do the trick.

<set-configuration-property name="CssResource.style" value="pretty" />


--Sri



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


david....@gmail.com

unread,
Apr 14, 2010, 7:09:42 AM4/14/10
to Google Web Toolkit
Thanks for the reply but I've already tried this solution but as I
have mentionned in my first post, it prefix all css class with the
package name in which the css is place.
I will have a look in Resources.gwt.xml.


On Apr 13, 11:16 pm, Sripathi Krishnan <sripathikrish...@gmail.com>
wrote:


> See the file Resources.gwt.xml .. It has a bunch of properties that you can
> specify to control how CSS is generated..
> I haven't tried it, but putting this in your module.gwt.xml should do the
> trick.
>
> <set-configuration-property name="CssResource.style" value="pretty" />
>
>
>
> --Sri
>

> On 13 April 2010 13:32, david.herv...@gmail.com <david.herv...@gmail.com>wrote:
>
> > Hi,
> > I'm currently searching around the web to found out how to tell
> > UIBinder not to perform obfuscation (at-all) on css class. I've read
> > codes samples in which it is tell to put inside the .gwt.xml the
> > property CssResource.obfuscationPrefix  to empty. But the css class
> > name doesn't have any links with original name. I've tried to combined
> > with the CssResource.style to pretty but the css class are still
> > prefixed with the package name in which the css resources are located.
>
> > Prefixing each class with @external in css is some kind of solution,
> > but doing it for all class in all css I want to test is not a real
> > solution.
>
> > So, my question is : Is there any options for telling UIBinder not to
> > obfuscate css class ? (like a "global" @external)
>
> > Thanks in advance
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>

davidroe

unread,
Apr 14, 2010, 4:27:23 PM4/14/10
to Google Web Toolkit
there was a time when I was also looking for this and was unable to
find the answer. pls report back to the group if you come across the
solution.

thanks.

On Apr 14, 4:09 am, "david.herv...@gmail.com"

> > > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>

Jeff Chimene

unread,
Apr 14, 2010, 4:32:49 PM4/14/10
to google-we...@googlegroups.com
On 04/14/2010 01:27 PM, davidroe wrote:
> there was a time when I was also looking for this and was unable to
> find the answer. pls report back to the group if you come across the
> solution.
>
> thanks.

Try using the @external annotation

@external gwt-TextBox;
.gwt-TextBox {
border-color: Black Black Gray;
border-style: solid double groove solid;
border-width: thin;
font-size: small;
padding: 0;
}

Message has been deleted

david....@gmail.com

unread,
Apr 15, 2010, 4:03:19 AM4/15/10
to Google Web Toolkit
Yep, I have already tried the @external and it does the trick, but I
was wondering if it
exists some kind of global '@external' annotation to tell UIBinder not
to obfuscate all classes. Or perhaps a global property to do that.


My fear is that the UIBinder has to keep this kind of obfuscation/
renaming rules to garantee the non collision in css class name.
But, why can't we imagine an option to not obfuscate css classes and
raise an error when a collision occured ?

Reply all
Reply to author
Forward
0 new messages