I recently joined this group, the reason is the following question.
I have a Gwt app, and i have to share classes between modules, i mean,
just one "shared" folder in all of the modules.
I had the idea to put all the gwt xml config files in one folder, and
change de "client" package declaration to the name of the functions,
like this:
TheProject
|_src
|_com.package.root.app
| |___Login.gwt.xml
| |___ForgetPass.gwt.xml
| |___MailSender.gwt.xml
| |___Suscriber.gwt.xml
|_com.package.root.app.login
| |__Login.java
|_com.package.root.app.suscribe
| |__Suscriber.java
|_com.package.root.app.forget
| |__ForgetPass.java
|_com.package.root.app.mail
| |__MailSender.java
|_com.package.root.app.shared
| |__LoginService.java
| |
__ForgetPassService.java
| |
__MailSenderService.java
| |__( .... Async
interfaces ... )
|_com.package.root.app.server
|__( .... other
stuff ... )
for each gwt.xml config file. i changed the 'client' declaration,
like:
--Login.gwt.xml
<source path='login'>
<source path='shared'>
--ForgetPass.gwt.xml
<source path='forget'>
<source path='shared'>
--MailSender.gwt.xml
<source path='mail'>
<source path='shared'>
--Suscriber.gwt.xml
<source path='suscribe'>
<source path='shared'>
So, i could to have independent modules. but in practice, this is not
true.
If i compile just Login module, eclipse does it fast and efficient,
but if i want to compile, for example, the Suscriber module, this
error appears:
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)
at com.google.gwt.dev.jjs.impl.BuildTypeMap.getType(BuildTypeMap.java:
730)
at com.google.gwt.dev.jjs.impl.BuildTypeMap.access
$000(BuildTypeMap.java:99)
at com.google.gwt.dev.jjs.impl.BuildTypeMap
$BuildDeclMapVisitor.visit(BuildTypeMap.java:195)
at
org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.traverse(LocalDeclaration.java:
237)
at
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:
239)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:
1239)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:
687)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:
637)
at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:
514)
at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:
523)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:
599)
at
com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:
33)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
88)
at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[ERROR] <no source info>: public class
com.package.root.app.suscribe.Suscriber
extends java.lang.Object
implements :
com.smartgwt.client.widgets.form.fields.events.ClickHandler
/* methods */
public void <init>()
[unresolved] private void configureWindow()
[unresolved] public void
onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
public void onModuleLoad()
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
[ERROR] at BootstrapperImpl.java(12): final Suscriber inj19 =
new Suscriber();
org.eclipse.jdt.internal.compiler.ast.LocalDeclaration
So the question is: can't i have my file structure like i explained, i
mean, all the xml config files in one package, and make the difference
between modules with the susbtitution of 'client' package
declaration ?
If i can, then, how can i fix the exception, o rhow can i workaround
it?
If not, how can i share the 'shared' folder between all modules ?
--
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.