Eclipse GWT unable to click "Next" on GWT classes - eclipse

I am trying to run my "Hello world" in GWT and using Eclipse. But I cannot create a module.
I right click on my package in the src-folder. Then I click other, find GWT classes, and choose Module. When I want to click next, it does not move to "next".
The next button works for all other gwt classes.
My download progress has been the following:
Download eclipse
Download the gwt plugin from the marketplace
Download the 2.9 sdk
Creation of the project progress:
New GWT Application project
Write name of project and package
Click so generate sample code is off
I create it, but get the following error:
The project description file (.project) for 'new project' is missing. This file contains important information about the project. The project will not function properly until this file is restored.
My attempt at creating the module:
Right click of package in src
Click other
Find gwt classes
Click on module
Click on next
Nothing happens.
What am I missing?

I, personally, use Maven and have not to deal with the Eclipse set up. There are several places where you can generate a ready-to-go GWT project:
https://github.com/tbroyer/gwt-maven-archetypes
https://github.com/NaluKit/gwt-maven-springboot-archetype
http://www.mvp4g.org/boot-starter-nalu/BootStarterNalu.html
Follow the instructions on the page or inside the project to get it working.

Related

Not able to create module in GWT in eclipse

I followed this link to write my first gwt hello world program in eclipse. I created GWT Project in eclipse,then I want to create module for that,then I right clicked on package,new-->module
in gwt,then it is not going to next step, that is the problem..
1- Start eclipse
2- From eclipse marketplace seearch for gwt
3- install Eclipse GWT plugin 3.0.0
4- From eclipse menu select window -> preferences
5- open entry GWT -> GWT settings
6- Click Download button, this will take you the gwt sdk download page.
7- Donwolad and extract the latest sdk.
8- From eclipse GWT setttings preference window click on add
9- Select the extracted SDK folder.
10- Check the check box next to the new added SDK to make it default.
11- click Apply and close
Create and run a project
1- Locate the gwt plugin action button in the toolbar.
2- Select the button and select New GWT application project ... from the dropdown.
3- Enter the project name and package then click Finish
4- Select the newly created project and from the GWT action button select GWT compile project.
5- Once the compilation is completed, Right click the project then select Run as -> 2 GWT Development mode with jetty.
6- Once ready double click the url of the HTML to open it in the browser.
#Devi George: As in your case the suggested above by #Ahmad Bawanesh answer didn't help resolving the caption issue. There is nothing in the answer that actually mentions "module", let alone how to add one. I've had everything set up as explained, and still had a compiler error. What helped to address it described in this thread. Next, you should make sure the Java JRE setting in Eclipse preferences points to the installed JRE 1.8 location and is selected as the default. This thread got it covered.
As to the actual question on adding a module to a GWT project, you can always add a file and name it as needed with an xml file extension. Search the page for "Modules: Units of configuration" on how to configure the newly created xml file. Obviously, it must have a module tag inside, among other things.

org.eclipse.swt.*; The import org.eclipse cannot be resolved

I am trying to write a small program that requires the import statement import org.eclipse.swt.*;. (I'm practicing with THIS tutorial).
However, Eclipse won't compile the program and is giving me the error "The import org.eclipse cannot be resolved"
Google hasn't been such a a great friend at finding the answer this time.
This is because you haven't added the SWT library to your buildpath. Follow the steps of the tutorial:
Download SWT library. For 3.1.2 version of eclipse, SWT library is available at
http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/index.php
Look for the section titled SWT Binary and Source.
From main menu tool bar, select "File" followed by "Import". Doing so will bring up the "Import wizard" dialog.
Now select "Existing Projects into Workspace" and click on "Next" button.
Click on "Select archive file" followed by "Browse" button. Now locate the SWT archive that you downloaded in step 1.
Click the Finish button to finish importing the SWT project into your workspace.
Create new java project from File > New Java Project.
Right-click on the project and select the Properties command to open the Properties dialog.
Select the Java Build Path followed by Projects tab and click the Add button.
Select the org.eclipse.swt project and click OK to finish adding the SWT libraries to your project's classpath
Create a Maven project and add org.eclipse.swt dependency in pom.xml:
<!-- https://mvnrepository.com/artifact/org.eclipse.swt.org.eclipse.swt.win32.win32.x86_64.4.3.swt/org.eclipse.swt.win32.win32.x86_64 -->
<dependency>
<groupId>org.eclipse.swt.org.eclipse.swt.win32.win32.x86_64.4.3.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>4.3</version>
</dependency>
You can find the 64bit version of the SWT library by changing the download url to this:
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.3-201306052000/swt-4.3-win32-win32-x86_64.zip
I had the same issue, was using wrong settings in the target file.
If you are working with a target-definition make sure to use the right platform/architecture settings, see

Eclipse Plugin - XML Editor

I've followed this tutorial:
Eclipse Plugin
This tutorial explain why create a HTML Editor.
I need a Text editor,just for auto-highlight some words, anyway I thought this tuto should be a good one to start with.
The thing is that I created the Plugin project and the only thing that I changed it was the extension "pat" instead "html, htm", just that. After that I created a .pat file, but eclipse doesn't open it with my plugin, and my text editor is not in the editor's list.
Any suggestion??
Let me know if you need more information.
My guess is that you have just created the plugin, but aren't running it in your current Eclipse instance. That can be verified by opening the view "Plugin registry". That will show a list of all plugins, see if the plugin you have created is in that list.
If you click on the run button in Eclipse you will open a run configuration dialog. In one of the tabs, you get to choose what plugins should be available. Make sure your plug-in is selected. This will start up a new Eclipse instance that will run your plugin.
To make your plugin be a part of your ordinary Eclipse installation, you will need to export it to a jar and copy that jar to the dropins catalog.

How to configure Ext GWT with GWT Designer?

I have problem with configuration GXT with GWT Designer. I have all new releases of Eclipse, GWT plugin and GXT and cannot configure GXT to work with GWT Designer. I setup my project so that I can compile my GXT project and run it in browser.
However I can't design in GWT Designer. I don't see any GXT widget in GWT Designer.
All forums reffer to Google Web Toolkit -> Configure for using Ext-GWT (GXT) but I don't have this option.
I have done all steps defined in setup.txt of GXT.
The only thing that is not working is GWT designer do not see GXT widgets.
Regrads,
Folks:
It simply appears that GXT 3 is not supported in the latest version of Windowbuilder. Period. All the instructions given in this thread work well for GXT 2, but GXT 3 has radical differences (different styling mechanisms, for one thing!) that Windowbuilder cannot seem to handle.
This is a bug that needs to be fixed in Windowbuilder.
I see this is an old article, but might still help people with the same problem.
If you right click on your gwt.xml file, the options are visible, if you click on your project, the options are not visible. That's the problem I was having.
I had this problem. I solved by installing:
(If you are using Eclipse Indigo)
http://dl.google.com/eclipse/inst/d2gwt/latest/3.7
Just check for the version you have. That should do the trick.
"select your GWT module file and right-click to select the Google Web Toolkit > Configure for using Ext GWT (GXT)" http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/gxt.html
Read setup.txt in ext-gwt zip:
STEP 1 -> Create a Google Web Application Project project within Eclipse.
Copy the contents of the /resources folder in the download to a {foldername} location within your war folder.
Substitute {foldername} with the name of the folder you've created for resources within your war folder.
STEP 3 -> Add the following stylesheet to your host page.
STEP 3b -> If you are using Charts, add the following script to your host page.
STEP 4 -> Add the following entry to you projects module xml file.
STEP 5 -> Eclipse Setup (should be similar for other development environments)
These instructions assume you have a existing project and launch configuration.
Add gxt.jar to the project.
a. Right click on project name in 'Package Explorer'.
b. Select 'Properties' from content menu.
c. Select 'Java Build Path'.
d. Select 'Libraries' tab.
e. Add the gxt.jar either with 'Add JARs...' or 'Add External JARs...'.
Add GXT jar to launch configuration.
a. Choose Run / Open Run Dialog.
b. Select your appropriate launch configuration under 'Java Application'.
c. Select the 'Classpath' tab.
d. Add the gxt.jar to the classpath.
that happened to me too. I had to install WindowBuilder Pro from the update site (you can found it here) and after that the "Google Web Toolkit > Configure for using Ext GWT (GXT)" option appeared.
Support for 3rd party components like GXT and SmartGWT is only available in the full version of GWT Designer available here...
http://code.google.com/webtoolkit/tools/download-gwtdesigner.html
Install the full version and then follow the instructions here...
http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/gxt.html
I just had the same problem. The only way I got it working is this:
I installed the full version of GWT designer as recommended by Eric Clayberg's answer (http://code.google.com/webtoolkit/tools/download-gwtdesigner.html)
However, the instructions at http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/gxt.html didn't work, because there simply isn't any "Google Web Toolkit > Configure for using Ext GWT (GXT)" for me either.
So instead, I created a new Project, using: New Project > WindowBuilder/GWT Designer/Model/GWT Java Project:
I went through the Wizard, clicked Finish, and then it asked me about a GXT installation. The important thing is: You must select this now, I don't see any way to add this later. So navigate to a GXT installation folder. In that folder, I had to rename my "gxt-*.jar" to "gxt.jar" first, otherwise it couldn't be found (!).
Now, when opening a Java file using "Open With > GWT Designer", and selecting the Design view tab at the bottom of the editor - voila, the GXT menus appear.

How do I open the GWT samples in eclipse Helios and GWT 2.1.1?

What is the straight-forward way of importing one of the GWT samples in eclipse Helios + GWT 2.1.1. It seems like the content of the zip file doesn't contain any project files for eclipse.
I tried the following:
create a GWT project 'bla'
Delete the src ad war folder and
replace it with the src and war
folder from the sample
refresh the project in eclipse
hit 'run'
[ERROR] Unable to find
'bla/bla.gwt.xml' on
your classpath; could be a typo, or
maybe you forgot to include a
classpath entry for source?
So I go to the run configuration and remove the path for the example projects from the arguments list. I also changed the name of hosted html page to the one in the sample. Hit 'run' and:
[ERROR] Invalid version number "2.0"
passed to external.gwtOnLoad(),
expected "2.1"; your hosted mode
bootstrap file may be out of date;
Now I need an out of date version of GWT to run these samples? What is going on, I just want to look at a sample to learn a new concept.
Reading the readme.txt in the GWT samples directory I came across a solution that works on Eclipse 3.7. Assuming you have ant installed on your machine, execute the following from the sample's directory:
ant eclipse.generate
This will generate both the .classpath and .project files needed to import the sample into Eclipse and run it.
Here the relevant excerpt from README.txt:
-- Option A: Import your project into Eclipse (recommended) --
If you use Eclipse, you can simply import the generated project into
Eclipse. We've tested against Eclipse 3.4 and 3.5. Later versions
will likely also work, earlier versions may not.
If the directory containing this file does not have a .classpath or
.project file, generate them by running 'ant eclipse.generate'
In Eclipse, go to the File menu and choose:
File -> Import... -> Existing Projects into Workspace
Browse to the directory containing this file, select "Mail".
Be sure to uncheck "Copy projects into workspace" if it is checked.
Click Finish. You can now browse the project in Eclipse.
To launch your web app in GWT development mode, go to the Run menu and
choose:
Run -> Open Debug Dialog...
Under Java Application, you should find a launch configuration
named "Mail". Select and click "Debug".
You can now use the built-in debugger to debug your web app in
development mode.
In eclipse 3.7, instead of Run -> Open Debug Dialog..., its Run -> Debug Configurations. I got both the showcase and mail samples running following those commands. Should work for all of the other samples as well.
The examples that come with GWT SDK were built in different ways. Some are Maven builds, others use Ant. Eclipse can handle these common builds directly, but you have to choose the right option.
So, if you want to open the Expenses project in eclipse, you would look in the projects root directory (i.e. ../gwt2.4/samples/Expenses) where you'll find a file called pom.xml. That is a Maven build file. To import it into your Work space select:
File->Import...
Open Maven->Existing Maven Projects, and click on Next > button
Browse your file system til you reach the Expenses folder. Click on it and Select OK.
At this point it will show you the Projects in that directory in the Projects: area of the window...only one in this case: /pom.xml com.google.gwt.sample.expenses:...etc.
click on the checkbox for that project, Next>
Finally, it ask you to map plugins. You'll need to select in the drop down menu under Actions the required plugins (such as m2e).
In other project folders you may find a build.xml file instead. That's an Ant build file. To import that you do something similar, but different (of course!):
File->New->Project...
Open the Java folder and select "Java Project from Existing Ant Buildfile", Next >
Click the Browse button, dig through your directory to the project folder and select the build.xml file, and Open it.
Project name should fill in automatically, just select the declaration to use in the middle window and click Finish.
Since those tutorial only include the src and war directory, the idea remains to:
create a new project following this tutorial
remove any created class part of the example files which are automatically added (see Issue 1547)
Unfortunately the Google Plugin does not allow to created a new Web Application Project without creating template files. The template files are nice for the first try but annoying if you want to start from scratch with a new GWT application.
copy the src and war directory in place within the now empty project
Following your ticket 5847 (No easy and straight-forward way to make examples work in eclipse),
as xo4yhamope comments, you need the right GWT option.
and did you consider the Issue 5038 about the error message:
Unable to find 'xxxx.gwt.xml' on your classpath;
could be a typo, or maybe you forgot to include a classpath entry for source?
This message usually means you attempted to refresh the browser before dev mode has had a chance to finish loading the module.
The uppercase/lowercase confusion happens because the module has been renamed to 'stockwatcher', but dev mode cannot map 'stockwatcher' to "StockWatcher' until it has finished loading the entire module.
So, it's just a matter of waiting a few seconds longer after the Development Mode pane says I should go to http://127.0.0.1:8888/StockWatcher.html?gwt.codesvr=127.0.0.1:9997 ?
That seems a little messed up. It should wait until it's actually ready before telling me it's ok, because users (like me) are going to go there as soon as the UI says it's ready.
The other confusing part is that the server begins serving the host page as soon as that message in the UI comes up. Because this was happening, I assumed that the server was completely up, even though (as it turns out) it wasn't.
Anyway, waiting a few more seconds seems to resolve the "Unable to find 'stockwatcher.gwt.xml' on your classpath" problem. Thanks!
I'm beginning to suspect this is a bug in the samples. I am adding this answer so it can be marked as an answer when I get confirmation about that.
I was trying out some other samples and came across this page. At the top is a little explanation for how to download and import the sample.
Before you begin
The StockWatcher project
This tutorial builds on the GWT
concepts and the StockWatcher
application created in the Build a
Sample GWT Application tutorial.
If you have not completed the Build a
Sample GWT Application tutorial and
are familiar with basic GWT concepts,
you can import the StockWatcher
project as coded to this point.
Download the StockWatcher project.
Unzip the file.
Import the project into Eclipse
From the File menu, select the Import... menu option.
Select the import source General > Existing Projects into
Workspace. Click the Next button.
For the root directory, browse to and select the StockWatcher
directory (from the unzipped file).
Click the Finish button.
If you are using ant, edit the
gwt.sdk property in
StockWatcher/build.xml to point to
where you unzipped GWT.
Now this is what I call straight-forward and easy.
At that point I had already built the StockWatcher in a previous tutorial but I got intrigued by the fact that it was explained exactly as I tried it the first time. So I downloaded the project and it had the correct eclipse project structure. I tried to import it 'et voila' I have the project in eclipse. I runs out of the box (with warnings). That is how expected the samples to be.
This experience leads me into thinking that the sample projects are malformed (as eclipse projects) and need to be updated. Let's hope my issue report leads to results.
-- Option A: Import your project into Eclipse (recommended) --
If you use Eclipse, you can simply import the generated project into Eclipse.
We've tested against Eclipse 3.4 and 3.5. Later versions will likely also
work, earlier versions may not.
If the directory containing this file does not have a .classpath or .project
file, generate them by running 'ant eclipse.generate'
In Eclipse, go to the File menu and choose:
File -> Import... -> Existing Projects into Workspace
Browse to the directory containing this file,
select "Mail".
Be sure to uncheck "Copy projects into workspace" if it is checked.
Click Finish.
You can now browse the project in Eclipse.
Copy from readme.txt supplied by samples. I tried this method, it's OK.
To import GWT showcase(2.5.1) I did following steps:
Create a new Google Web Application Project
New –> Other –> Google –> Web Application Project
Provide the project name “Showcase” and the Package name is com.google.gwt.sample.showcase
Click Finish
Go to eclipse plugin folder and traverse to the gwt
Under that folder go to gwt-2.3.\samples\Showcase
Copy (Ctrl C) all the contents. The contents are
a. src
b. test
c. war
d. build.xml
e. README.txt
In the eclipse, right click on the Showcase project and paste. Overwrite all the files
The files should start copying without any problem
Right click on the Showcase and Run As “Web Application”
You should have your Showcase working like Gem!
For me it worked like a charm ;)
Ref : http://simplestepswebdev.wordpress.com/2011/05/16/import-gwt-samples-into-eclipse/