Confirm to work with SmartGWT 4.1p + eclipse 4.3(kepler) + gwt-designer 3.1.2. Below modification code details changed on file linked
Daniele
Index: src/com/google/gdt/eclipse/designer/smart/parser/ClassLoaderValidator.java
===================================================================
src/com/google/gdt/eclipse/designer/smart/parser/ClassLoaderValidator.java (working copy)
import org.eclipse.jdt.core.IJavaProject;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* {@link IClassLoaderValidator} for SmartGWT.
*
* @coverage SmartGWT
*/
public final class ClassLoaderValidator implements IClassLoaderValidator {
private static final Pattern VERSIONS_PATTERN = Pattern.compile("^(\\d+\\.\\d+)[dp]?$");
private static final String[] VALID_VERSIONS = {"2.4", "2.5", "3.0", "3.1", "4.0", "4.1", "5.0"};
private static final String VALID_VERSIONS_STRING = StringUtils.join(VALID_VERSIONS, ", ");
////////////////////////////////////////////////////////////////////////////
//
public String runObject() throws Exception {
Class classVersion = classLoader.loadClass("com.smartgwt.client.Version");
String version = (String) ReflectionUtils.invokeMethod(classVersion, "getVersion()");
Matcher matcher = VERSIONS_PATTERN.matcher(version);
if (matcher.matches() && ArrayUtils.contains(VALID_VERSIONS, matcher.group(1))) {
initializeSmartGWT(classLoader);
return null;
}
No comments:
Post a Comment