gwt-plugins/gwt-eclipse-plugin

Project's GWT SDK not detected

Fuzzo opened this issue · 13 comments

Fuzzo commented

Hello,
it looks like the SDK is not detected even if it is in the build path, as the image below shows:
image
I already trigger a full rebuild.
As a consequence, the GWT compile task fails:
image

Eclipse 2022-12 v4.26
Plugin v4.0.0

Hi @Fuzzo, I tried with a sample project, and... it is working.

What I did is:

  • File -> New -> GWT Web Application Project
  • Right click on project -> GWT Compile

I see you have a fairly complicate project.

If you can replicate, ideally starting from a clean build install, I'll definitely have a look at your issue.

Another interesting check is if the problem is only with gwt-2.10.0 or also with older SDKs

Fuzzo commented

I created a new GWT project with sample code and... it works!
So, i compared .project and .classpath files but there are no significant differences, none for what concern the GWT Nature/Classpath of the project.
I noticed that the console looks like the following image:
image
Confirming that for some reasons the SDK is not detected for this project.
Any idea of what can i do to diagnose/solve this issue?
Thanks

@protoism do we need to explicitly package 2.10.0 (see #403)?

@Fuzzo are you using maven (and the m2e plugin) to get GWT 2.10.0? And when you made your new project, did you use GWT 2.10.0?

Fuzzo commented

@niloc132 My GWT SDKs have been set in Window > Preferences > GWT > GWT Settings pointing to a local directories to which I uncompressed the SDK distribution files (once per version).
When I made the new project, I left the "default" SDK in the dialog and it chooses 2.10.0 automatically (because it's the default).

@niloc132 gwt 2.10 should not be a problem per se. I don't have problems on simple projects, nor does @Fuzzo .
I wonder if there is another SDK brought in by maven (or ivy? what is ivy?).

@Fuzzo if you can try and replicate, we can definitely fix this one.

Do not forget to try with older gwt versions

Fuzzo commented

Sorry for delay,
I tried with another project:
snap283
snap284
This time I'm running on a Linux Mint VM with Eclipse 2022-12 and GWT SDK v2.9.0.
Please tell me how I can help.

Hi @Fuzzo,
there are two ways:

  • You try to debug Eclipse (not super-simple, but feasible)
  • You try and replicate the issue on a simple project, and I have a look at it.

I'm willing to investigate, but the information currently provided is simply not enough to start an investigation.

Let me know which one of the two proposals you like the best, I can try and guide you in setting up a debugging environment.

Fuzzo commented

Hello @protoism,
as we already tried to reproduce in a simple project with no success, I kindly ask you the instruction to debug Eclipse... thanks!

Fuzzo commented

Hi @ngfchristian, the Eclipse version I'm using is 2022-12.

@Fuzzo will send you instructions shortly, sorry for the delay.

Hi @Fuzzo,
sorry for the incredible delay.
I created a debugging environment from scratch, without using maven integration, It is not that complicate.
Debugging with Eclipse is IMHO a bit messy... but feasible.
Let me know what you come up with

Prerequisites

  • An eclipse installation (A dedicated eclipse installation, is not a bad idea, I chose j2ee for this instruction set)
  • A GWT SDK, preferably stand alone (I used GWT 2.10)

Create a workspace for the plugin

  • Create a new workspace
  • Import GIT project at https://github.com/gwt-plugins/gwt-eclipse-plugin.git, branch main
  • Create a "src_copied" directory in com.gwtplugins.gwt.eclipse.wtp directory
  • Disable maven nature, if detected (simply select all projects -> right click -> disable maven nature)
  • Close projects com.gwtplugins.gdt.eclipse.suite.test.swtbot com.gwtplugins.gdt.eclipse.swtbot com.gwtplugins.gwt.eclipse.core.test.swtbot
  • Create a new debug configuration of type "Eclipse Application"
  • Start debugging with the newly created configuration (in Eclipse 2023-03 there are some warnings, they seem safe to ignore)

Using the plugin in the debug (target) environment

At this point, we have two eclipse instances working: one workspace contains the GWT plugin code, the second one is blank (I'll call it target), with our GWT plugin available (and debuggable on the first instance)

In the target workspace:

  • Create a "GWT Web Application Project"
  • Configure GWT sdk
  • Work as usual

Debugging your issue

The target environment is fully functional. You'll probably need to add some plugins. They should be added to the "gwt-plugin" workspace (not the target one).
If after adding plugins to the "gwt-plugin" workspace some dependencies are missing, you may want to recreate the debug configuration

Fuzzo commented

Hi @protoism, I'm also sorry for delay.
First of all thank you for the response.
I tried to follow the instruciton but I've two problems:

  1. Git checked-out projects contains errors
    image
    (chenges you see is about the deactivation of Maven nature)
  2. The Debug button in the run configuration is disabled
    image
    May be I miss something.

Note: I used a fresh Eclipse "IDE for Eclipse Committers" edition as the "J2EE" edition won't let me create a run configuration of the right type "Eclipse Application".