gwt /
gwt /
fbdabb27a537897d8f3afafc778ba53bca1669b7 Fixes a problem introduced post 1.4. In order to get package level annotations to work, ICompilationUnitAdapter.getMainTypeName() needed to return the simple name of the main type in the compilation unit. The work around of parsing the string returned by CompilationUnitProvider.getLocation() would return the package name instead of the simple type name when a generated class had ".java" as part of its package name. In that scenario, JDT would report a class must be defined in its own file error for the generated type.
The attached patch adds a getMainTypeName() method to CompilationUnitProvider since it does know what the main type name should be. This patch does not do anything with regards to the value returned by CompilationUnitProvider.getLocation () for generated CUPs.
Patch by: mmendez
Review by: scottb
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1502 8db76d5a-ed1c-0410-87a9-c151d255dfc7
7 files changed