Not able to create module in GWT in eclipse - gwt

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.

Related

Eclipse GWT unable to click "Next" on GWT classes

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.

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

Hadoop Documentation for Eclipse

I recently installed Hadoop and am able to run simple programs.
However I would like to view documentation for Hadoop classes within Javadoc browser in Eclipse.
Please let me know how to enable that (I am a little novice with Eclipse IDE).
Thanks.
A couple of suggestions:
If you're using maven for your dependency management, you should be able to expand out the list of Maven dependencies in your Eclipse project, right click the hadoop-core-x.x.x.jar and select Maven -> Download Javadocs
Otherwise you'll need to source the Javadocs from the $HADOOP_HOME/docs/api folder and associated with your hadoop-core-x.x.x.jar in Eclipse. In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path $HADOOP_HOME/docs/api in the Javadoc URL text box (mine is file:/opt/hadoop/hadoop-1.0.2/docs/api/)
Either way now you should be able to hover over Hadoop classes in Eclipse and the Javadoc will popup. You can also show the Javadoc window that will populate for the class you are currently viewing, or just open an internal browser window and point it at the $HADOOP_HOME/docs/api/index.html file
Another easy solution for those who want to stay updated is to edit the Javadocs path like Chris said:
"In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path"
but instead of linking it directly to the api you have stored on your hard disk, link it to http://hadoop.apache.org/docs/stable/api/

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.