2

I downloaded the Twitter Bootstrap for GWT zip from https://github.com/gwtbootstrap/gwt-bootstrap. I am new to GWT and I haven't yet found proper documentation or a tutorial on how to use the libraries with Eclipse.

madth3
  • 7,275
  • 12
  • 50
  • 74
Timothy
  • 4,198
  • 6
  • 49
  • 59

3 Answers3

2

As it's created as a maven project, you need to use m2eclipse plugin. You can start with cloning that outside eclipse and then you can import it into eclipse as an existing maven project. m2eclipse plugin will help you in doing that. For exact steps or tutorial, you can just google.

Swapnil
  • 8,201
  • 4
  • 38
  • 57
  • thanks but i hear 'maven' and 'creating a jar out of it' everywhere, wish i could find a simpler method or a step by step somewhere. – Timothy Jan 19 '13 at 14:15
2

If you are using maven build, configure m2eclipse in eclipse and go through Getting Started With GWT Bootstrap

The steps include :

STEP 1-A : add gwt-bootstrap maven dependency in pom.xml

 <!-- gwt-bootstrap dependencies start -->
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.1.0.0-SNAPSHOT</version>
</dependency>
<!-- gwt-bootstrap dependencies end -->

STEP 1-B : add gwt-bootstrap maven repository in pom.xml

 <repository>
 <id>sonatype</id>
 <url>http://oss.sonatype.org/content/repositories/snapshots</url>
 <snapshots><enabled>true</enabled></snapshots>
 <releases><enabled>false</enabled></releases>
 </repository>

STEP 2 : Configuring module - inherit the GWT-Bootstrap widget library

<!--  inherit the GWT-Bootstrap widget library -->
<inherits name="com.github.gwtbootstrap.Bootstrap"/>
<!--  end of inherit the GWT-Bootstrap widget library -->

STEP 3 : using in UiBinder

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:w="urn:import:com.zcode.t.client.ui.widget" 
xmlns:c="urn:import:com.google.gwt.user.cellview.client"
xmlns:gwt="urn:import:com.google.gwt.user.cellview.client"
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"
>
<g:HTMLPanel>
<b:Button ui:field="saveBtn"/>
 </g:HTMLPanel>
</ui:UiBinder> 
prayagupa
  • 30,204
  • 14
  • 155
  • 192
1

If you don't want to use maven, you can follow these steps:

  1. Download a version of library from here.

  2. Add the .jar file to your build path of Eclipse project

  3. Add to your Module.gwt.xml file:

<inherits name ="com.github.gwtbootstrap.Bootstrap"/>

Now you can use gwtbootstrap with only-Java code or UIBinder

heroandtn3
  • 164
  • 1
  • 7