Hi,
I already posted a question about dead code elimination yesterday, but
this one is different so I use a separate post.
I use the Debug facilities of gwt to set debug id's on the widgets.
I have my own MessageBox with the method ensureDebugId(String) that
does some initialization and will call ensureDebug on the widgets
contained in the messagebox.
When I disable the gwt debug facilities, the ensureDebug methods on
the widgets are correctly removed due to dead code elimination.
However, I want to remove also this method ensureDebugId(String) in
the Messagebox and as such remove the unncessary initialization.
How can I do this ?
At this moment the method ensureDebugId(String) still exists with the
intializaiton but without the ensureDebug() method calls on the
contained widgets.
The java code:
-------
public void ensureDebugId(final String id) {
initTitle();
this.title.ensureDebugId(id + "-title");
initText();
this.text.ensureDebugId(id + "-text");
initButtonCreator();
if (this.buttonCreator.getButtonCancel() != null) {
this.buttonCreator.getButtonCancel().ensureDebugId(id +
"-bt-
cancel");
}
if (this.buttonCreator.getButtonOk() != null) {
this.buttonCreator.getButtonOk().ensureDebugId(id +
"-bt-ok");
}
}
---------
The resulted javascript with debug disabled:
----------
function $ensureDebugId(this$static){
$initTitle(this$static);
$initText(this$static);
$initButtonCreator(this$static);
if ($getButtonCancel(this$static.buttonCreator)) {
$getButtonCancel(this$static.buttonCreator);
}
if ($getButtonOk(this$static.buttonCreator)) {
$getButtonOk(this$static.buttonCreator);
}
}
----------
Ed
PS: still using gwt 1.5.2
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---