Ok, I have followed this before but I can't get Eclipse to work. It
does not give me an option when I select 'Debug as'. It just says
'none applicable'.

I am trying to run it from the entry point class. Here is the code:

package com.project.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;

import com.google.gwt.user.client.rpc.*;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.Label;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class ManagementApplication implements EntryPoint {

        //Main Menu Widgets
        Label title = new Label("Welcome to the Mangement Main Menu!");
        Button editItemsButton = new Button("Edit Items");
    Button editMenusButton = new Button("Edit Menus");
    Button editCategoryButton = new Button("Edit Categories");
    Button reportsButton = new Button("Managerial Reports");

    //Main Panel
    final VerticalPanel mainMenuPanel = new VerticalPanel();

    public void mainGUI(){

            mainMenuPanel.setWidth("100%");
            mainMenuPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
            //Set Spacing between buttons
            mainMenuPanel.setSpacing(20);
            mainMenuPanel.add(title);
            mainMenuPanel.add(editItemsButton);
            mainMenuPanel.add(editMenusButton);
            mainMenuPanel.add(editCategoryButton);
            mainMenuPanel.add(reportsButton);

            // Add Main Menu Panel to the RootPanel
            RootPanel.get().add(mainMenuPanel);


            //********LISTENERS***********
            //Edit items listener
            editItemsButton.addClickListener(new ClickListener() {
                public void onClick(Widget sender) {
                        mainMenuPanel.setVisible(false);
                        EditItemsGUI ei = new EditItemsGUI();
                        ei.editItemsGUI();
                }
            });



  /**
   * This is the entry point method.
   */
        public void onModuleLoad() {

                mainGUI();

                ServerStatusSQLServiceAsync serviceProxy =
                        (ServerStatusSQLServiceAsync) GWT.create
(ServerStatusSQLService.class);

                  ServiceDefTarget target =(ServiceDefTarget) serviceProxy;
                  target.setServiceEntryPoint(GWT.getModuleBaseURL()+"server-
status");

                  AsyncCallback callback = new AsyncCallback(){
                          public void onFailure (Throwable caught){
                                  GWT.log("RPC error", caught);

                                  try {
                                       throw caught;
                                     } catch 
(IncompatibleRemoteServiceException e) {
                                       // this client is not compatible with 
the server; cleanup
and refresh the
                                       // browser
                                     } catch (InvocationException e) {
                                       // the call didn't complete cleanly
                                     } catch (Throwable e) {
                                       // last resort -- a very unexpected 
exception
                                     }

                          }
                          public void onSuccess (Object result){
                                  ServerSQLData data = (ServerSQLData) result;
                                  GWT.log("ArrayList: " + 
data.itemCategoryArrayList, null);
                                  GWT.log("Item Types: " + 
data.itemTypeArrayList, null);
                                  GWT.log("Item Name: " + 
data.itemNameArrayList, null);
                                  GWT.log("Quantity in stock: " + 
data.itemQuantityArrayList,
null);

                          }
                  };

                  serviceProxy.getSQLData(callback);



        }
}


Can anyone spot what I need to do to get it working?

Regards,
Jack

On Feb 3, 10:15 pm, Dan Ox <[email protected]> wrote:
> http://code.google.com/intl/da/docreader/#p=google-web-toolkit-doc-1-...
>
> On Feb 4, 8:00 am, "[email protected]"
>
> <[email protected]> wrote:
> > Hi,
>
> > Can someone please tell me the best way to debug my GWT code using
> > Eclipse?
>
> > Regards,
> > Jack
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to