Hi sasmas,

GWT needs to be told which paths and source files are
"translatable" (everything in your source tree is not included by
default). The most common way of doing this is including a
Module.gwt.xml somewhere in the source tree below the path you want to
include, and then specifying "<source path="..."/> in the module
definition. The module name is the combined list of package names
leading up the the Module.gwt.xml file + the first part of the
Module.gwt.xml file.

src/
   example/
      test/
         TestModule.gwt.xml
         client/
            MyTestModule.java

If you wanted to make the source in this module available, you'd do as
above. The module name would be "example.test.TestModule". Within
"TestModule.gwt.xml" you'd use the line "<source path="client"/
>" (though "client" is implicitly included by default if found). Now
when you inherit this module from your main module, the sources will
be found and used.

com.example.main.MainModule.gwt.xml
   ...
   <inherits name="example.test.TestModule"/>

The other option is to use super-source, but it's a bit trickier.You
can find examples on how this works by searching a bit, it's a little
complicated to get into here.

On Jun 6, 6:43 pm, samsus <[email protected]> wrote:
> Hi All,
>
> Im trying to use classes from a package inside /src but outside the /
> src/<project_name>/client folder. Until now i didnt had much sucess, i
> get the following error: "No source code is available for type
> test.Test; did you forget to inherit a required module?"
>
> This is what i did:
>
> created the folder "test" at /src
>
> --------------------------------------
>
> then the file /src/test/Test.java
>
> package test;
>
> import com.google.gwt.user.client.Window;
>
> public class Test {
>         public Test() {
>                 Window.alert("hello");
>         }
>
> }
>
> --------------------------------------
>
> inside my application i have:
>
> import test.Test;
>
> (...)
>
> public void onModuleLoad() {
>
> Test test = new Test();
>
> }
>
> --------------------------------------
>
> Could someone please point me in the right direction? :)
--~--~---------~--~----~------------~-------~--~----~
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