Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

GWT can't compile SMC generated code

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used SMC (State Machine Compiler) to generate Java code I wanted to use in GWT. The code looks trivial, and I can compile it with javac with no problem.
However GWT produces errors like:

[java] [ERROR] Line 11: statemap cannot be resolved to a type
[java] [ERROR] Line 39: _transition cannot be resolved
[java] [ERROR] Line 41: _transition cannot be resolved
[java] [ERROR] Line 46: statemap cannot be resolved to a type
[java] [ERROR] Line 48: _state cannot be resolved

What can be the problem?

Here is the source code: (I could not attach a file)


 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

GWT accepts only those java classes for the client side, which it can convert to JS. Looks like your smc package cannot.
 
Jerry Storm
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand this, I want to know what causes the problem so that I can maybe address it.
 
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
statemap.FSMContext is not in the client or shared package? Is it inherited?
 
Maneesh Godbole
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jerry Storm wrote:I understand this, I want to know what causes the problem so that I can maybe address it.


This can only work if
1) Is the source code for the smc package available to GWT to 'compile' to JS?
2) Ensure the smc package uses only 'white listed' classes.
 
Maneesh Godbole
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hauke Ingmar Schmidt wrote:statemap.FSMContext is not in the client or shared package? Is it inherited?


I think then Jerry would have got the "Did you inherit the ...." error message.
 
Maneesh Godbole
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic