Skip to content

Commit a101385

Browse files
committed
Merge remote-tracking branch 'origin/master' into brandon-update
Conflicts: plugins/com.gwtplugins.gwt.eclipse.sdkbundle.gwt28/pom.xml
2 parents afa737f + 212e9fb commit a101385

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ Release update site.
6565

6666
* [http://storage.googleapis.com/gwt-eclipse-plugin/v3/release](http://storage.googleapis.com/gwt-eclipse-plugin/v3/release)
6767

68+
### Production Zip
69+
Download the repo in a zip file.
70+
71+
* [http://storage.googleapis.com/gwt-eclipse-plugin/v3/downloads/repo-3.0.0.zip](http://storage.googleapis.com/gwt-eclipse-plugin/v3/downloads/repo-3.0.0.zip)
72+
6873
### Snapshot
6974
Unstable update site
7075

plugins/com.gwtplugins.gdt.eclipse.core/src/com/google/gdt/eclipse/core/JavaASTUtils.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.eclipse.jdt.core.dom.Type;
5050
import org.eclipse.jdt.core.dom.TypeDeclaration;
5151
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
52+
import org.eclipse.jdt.internal.corext.dom.ASTNodes;
5253
import org.eclipse.jdt.internal.corext.dom.TypeBindingVisitor;
5354
import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
5455

@@ -122,6 +123,7 @@ public static boolean containsTypeVariable(Type type) {
122123
final boolean[] containsTypeVariable = {false};
123124

124125
ASTResolving.visitAllBindings(type, new TypeBindingVisitor() {
126+
@Override
125127
public boolean visit(ITypeBinding visitedBinding) {
126128
if (visitedBinding.isTypeVariable()) {
127129
containsTypeVariable[0] = true;
@@ -262,6 +264,15 @@ public static TypeDeclaration findTypeDeclaration(IJavaProject javaProject,
262264
return null;
263265
}
264266

267+
public static ITypeBinding findTypeBinding(IType currentType) throws JavaModelException{
268+
final ASTParser parser = ASTParser.newParser(AST.JLS3);
269+
parser.setKind(ASTParser.K_COMPILATION_UNIT);
270+
parser.setSource(currentType.getCompilationUnit());
271+
parser.setResolveBindings(true);
272+
CompilationUnit unit = (CompilationUnit) parser.createAST(null);
273+
return ASTNodes.getTypeBinding(unit, currentType);
274+
}
275+
265276
/**
266277
* Identical to
267278
* {@link org.eclipse.jdt.internal.corext.dom.Bindings#findTypeInHierarchy(ITypeBinding, String)}

plugins/com.gwtplugins.gwt.eclipse.core/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
<extension
300300
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
301301
<launchConfigurationTabGroup
302-
class="com.google.gwt.eclipse.core.launch.ui.groups.GWTJUnitTabGroup"
302+
class="com.google.gwt.eclipse.core.launch.ui.tab_groups.GWTJUnitTabGroup"
303303
helpContextId="org.eclipse.jdt.junit.junit_tab_group"
304304
id="com.gwtplugins.gwt.eclipse.core.launch.gwtJUnitTabGroup"
305305
type="com.gwtplugins.gwt.eclipse.core.launch.gwtJUnit">

plugins/com.gwtplugins.gwt.eclipse.core/src/com/google/gwt/eclipse/core/uibinder/UiBinderUtilities.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@
3333
import org.eclipse.jdt.core.ITypeHierarchy;
3434
import org.eclipse.jdt.core.JavaModelException;
3535
import org.eclipse.jdt.core.dom.FieldDeclaration;
36+
import org.eclipse.jdt.core.dom.IMethodBinding;
37+
import org.eclipse.jdt.core.dom.ITypeBinding;
3638
import org.eclipse.jdt.core.dom.MethodDeclaration;
3739
import org.eclipse.jdt.core.dom.Modifier;
40+
import org.eclipse.jdt.internal.corext.dom.Bindings;
3841
import org.eclipse.jface.text.IRegion;
3942
import org.eclipse.jface.text.Region;
4043

@@ -409,6 +412,16 @@ public static IType resolveJavaElExpression(IType contextType,
409412
currentType = fragmentType;
410413
continue;
411414
}
415+
416+
// Final attempt to resolve the type, this resolves the binding
417+
// in the case of generics or parameterized types. Fixes issue 373
418+
ITypeBinding binding = JavaASTUtils.findTypeBinding(currentType);
419+
IMethodBinding methodBinding = Bindings.findMethodInHierarchy(binding,
420+
fragment, new ITypeBinding[] {});
421+
if(methodBinding.getReturnType() != null) {
422+
currentType = fragmentType;
423+
continue;
424+
}
412425
}
413426
} catch (JavaModelException e) {
414427
// Ignore, and continue the search

plugins/com.gwtplugins.gwt.eclipse.sdkbundle.gwt28/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<url>https://goo.gl/pZZPXS</url>
3232
<unpack>true</unpack>
3333
<overwrite>true</overwrite>
34-
<outputFileName>${basedir}/gwt-2.8.2.zip</outputFileName>
34+
<outputFileName>gwt-2.8.2.zip</outputFileName>
3535
<outputDirectory>${basedir}</outputDirectory>
3636
</configuration>
3737
</execution>

0 commit comments

Comments
 (0)