Skip to content

Instantly share code, notes, and snippets.

@jesperronn
Created October 5, 2010 21:45
Show Gist options
  • Select an option

  • Save jesperronn/612402 to your computer and use it in GitHub Desktop.

Select an option

Save jesperronn/612402 to your computer and use it in GitHub Desktop.
IntelliJ idea GWT snippets and templates
/* add this to IntelliJ Idea "File>Settings> Live templates"
*
* Abbreviation: binder
* Group: user
* Description: GWT UiBinder bootstrapping on existing class
*
*/
@com.google.gwt.uibinder.client.UiTemplate("$CLASS$.ui.xml")
interface Binder extends com.google.gwt.uibinder.client.UiBinder<com.google.gwt.user.client.ui.HTMLPanel,$CLASS$> {
}
private static Binder ourUiBinder = GWT.create(Binder.class);
//public $CLASS$() {
// com.google.gwt.user.client.ui.HTMLPanel rootElement = ourUiBinder.createAndBindUi(this);
//}
<!--
add this to IntelliJ Idea "File > Settings > File templates"
"Templates" tab
Name: GWT UI binder
Extension: xml
-->
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<${ROOT_TAG_NAME}>
</${ROOT_TAG_NAME}>
</ui:UiBinder>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment