Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eclipse/mars/gwt-eclipse-mars.target
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
<target name="GWT Eclipse Plugin Mars" sequenceNumber="1499963709">
<target name="GWT Eclipse Plugin Mars" sequenceNumber="1507910989">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
Expand Down Expand Up @@ -43,7 +43,7 @@
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20160221192158/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="com.google.cloud.tools.eclipse.suite.e45.feature.feature.group" version="1.2.0.201706082053"/>
<unit id="com.google.cloud.tools.eclipse.suite.e45.feature.feature.group" version="1.3.1.201709121426"/>
<repository location="https://dl.google.com/eclipse/google-cloud-eclipse/stable/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
Expand Down
12 changes: 6 additions & 6 deletions eclipse/neon/gwt-eclipse-neon.target
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
<target name="GWT Eclipse Plugin Neon" sequenceNumber="1488306278">
<target name="GWT Eclipse Plugin Neon" sequenceNumber="1507911751">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="1.0.1.v20140414-1359"/>
<repository location="http://download.eclipse.org/cbi/updates/license"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.sdk.feature.group" version="4.6.2.v20161124-1529"/>
<unit id="org.eclipse.jdt.feature.group" version="3.12.2.v20161124-1400"/>
<unit id="org.eclipse.sdk.feature.group" version="4.6.3.v20170301-0400"/>
<unit id="org.eclipse.jdt.feature.group" version="3.12.3.v20170301-0400"/>
<unit id="org.eclipse.m2e.feature.feature.group" version="1.7.0.20160603-1933"/>
<unit id="org.eclipse.m2e.wtp.feature.feature.group" version="1.3.1.20160831-1005"/>
<unit id="org.eclipse.mylyn.commons.feature.group" version="3.21.0.v20160707-1856"/>
<unit id="org.eclipse.jpt.jpa.feature.feature.group" version="3.5.0.v201603181811"/>
<unit id="org.eclipse.jpt.jpa.feature.feature.group" version="3.5.0.v201607131827"/>
<unit id="org.eclipse.datatools.sdk.feature.feature.group" version="1.13.0.201603142002"/>
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.5.0.201609021837"/>
<unit id="org.eclipse.jetty.http" version="9.3.9.v20160517"/>
Expand Down Expand Up @@ -45,8 +45,8 @@
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="com.google.cloud.tools.eclipse.suite.e45.feature.feature.group" version="1.0.0.201702221633"/>
<repository location="https://storage.googleapis.com/gcloud-for-eclipse-testing/"/>
<unit id="com.google.cloud.tools.eclipse.suite.e45.feature.feature.group" version="1.3.1.201709121426"/>
<repository location="https://dl.google.com/eclipse/google-cloud-eclipse/stable/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="com.github.sdbg.feature.feature.group" version="1.0.10.201610081555"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import java.util.Map;

/**
*
*
*/
@SuppressWarnings("restriction")
public final class ClasspathUtilities {
Expand Down Expand Up @@ -77,7 +77,7 @@ public Class<?> find(ClassLoader classLoader, String className) {
/**
* Finds all the classpath containers in the specified project that match the
* provided container ID.
*
*
* @param javaProject the project to query
* @param containerId The container ID we are trying to match.
* @return an array of matching classpath containers.
Expand All @@ -87,6 +87,7 @@ public static IClasspathEntry[] findClasspathContainersWithContainerId(
throws JavaModelException {

Predicate<IClasspathEntry> matchPredicate = new Predicate<IClasspathEntry>() {
@Override
public boolean apply(IClasspathEntry entry) {
if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
IPath containerPath = entry.getPath();
Expand Down Expand Up @@ -123,7 +124,7 @@ public boolean apply(IClasspathEntry entry) {
/**
* Returns the {@link IClasspathEntry#CPE_CONTAINER} entry with the specified
* container ID or <code>null</code> if one could not be found.
*
*
* @param classpathEntries array of classpath entries
* @param containerId container ID
* @return {@link IClasspathEntry#CPE_CONTAINER} entry with the specified
Expand All @@ -141,7 +142,7 @@ public static IClasspathEntry findClasspathEntryContainer(
/**
* Return the raw classpath entry on the project's classpath that contributes
* the given type to the project.
*
*
* @param javaProject The java project
* @param fullyQualifiedName The fully-qualified type name
* @return The raw classpath entry that contributes the type to the project,
Expand All @@ -160,8 +161,20 @@ public static IClasspathEntry findRawClasspathEntryFor(
IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();
for (IClasspathEntry rawClasspathEntry : rawClasspath) {
IClasspathEntry[] resolvedClasspath = jProject.resolveClasspath(new IClasspathEntry[] {rawClasspathEntry});
IPackageFragmentRoot[] computePackageFragmentRoots = jProject.computePackageFragmentRoots(
resolvedClasspath, true, null);

// was this - which is no longer, internal api refactor
//IPackageFragmentRoot[] computePackageFragmentRoots = jProject.computePackageFragmentRoots(resolvedClasspath, true, null);

// now this - from IPackage
List<IPackageFragmentRoot> fragmentRoots = new ArrayList<IPackageFragmentRoot>();
for (IClasspathEntry classPathEntry : resolvedClasspath) {
IPackageFragmentRoot[] foundRoots = javaProject.findPackageFragmentRoots(classPathEntry);
fragmentRoots.addAll(Arrays.asList(foundRoots));
}

IPackageFragmentRoot[] computePackageFragmentRoots = new IPackageFragmentRoot[fragmentRoots.size()];
fragmentRoots.toArray(computePackageFragmentRoots);

if (Arrays.asList(computePackageFragmentRoots).contains(
packageFragmentRoot)) {
return rawClasspathEntry;
Expand All @@ -177,7 +190,7 @@ public static IClasspathEntry findRawClasspathEntryFor(
/**
* Returns a String (in the format of the JVM classpath argument) which
* contains the given classpath entries.
*
*
* @param classpathEntries array of runtime classpath entries
* @return flattened String of the given classpath entries in the format
* suitable for passing as a JVM argument
Expand Down Expand Up @@ -217,7 +230,7 @@ public static IClasspathEntry getNullableRawClasspathEntryForPackageFragmentRoot
/**
* Determines whether a ClasspathContainer exists on the provided project that
* matches the provided container ID.
*
*
* @param javaProject the project to query
* @param containerId The container ID we are trying to match.
* @return whether at least one classpath container exists that matches the
Expand All @@ -235,7 +248,7 @@ public static boolean includesClasspathContainerWithContainerId(
* Returns the first index of the specified
* {@link IClasspathEntry#CPE_CONTAINER} entry with the specified container ID
* or -1 if one could not be found.
*
*
* @param classpathEntries array of classpath entries
* @param containerId container ID
* @return index of the specified {@link IClasspathEntry#CPE_CONTAINER} entry
Expand Down Expand Up @@ -263,11 +276,11 @@ public static int indexOfClasspathEntryContainer(
/**
* Replace an {@link IClasspathEntry#CPE_CONTAINER} entry with the given
* container ID, with its corresponding resolved classpath entries.
*
*
* @param javaProject java project
* @param containerId container ID to replace
* @return true if a container was replaced
*
*
* @throws JavaModelException
*/
public static boolean replaceContainerWithClasspathEntries(
Expand All @@ -294,7 +307,7 @@ public static boolean replaceContainerWithClasspathEntries(
/**
* Replaces a project's classpath container entry with a new one or appends it
* to the classpath if none were found.
*
*
* @param javaProject The target project
* @param containerId the identifier of the classpath container type
* @param newContainerPath the path for the new classpath. Note: this path
Expand Down Expand Up @@ -333,30 +346,31 @@ public static void replaceOrAppendContainer(IJavaProject javaProject,
* more information: <a
* href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243692"
* >http://bugs.eclipse.org/bugs/show_bug.cgi?id=243692</a>
*
*
* <p>
* Note that this method is asynchronous, so the caller will regain control
* immediately, and the raw classpath will be set at some future time. Right
* now, there is no way to tell the caller when the operation has completed.
* If this becomes a concern in the future, a callback parameter can be
* introduced.
* </p>
*
*
* <p>
* This method does not accept an IProgressMonitor, unlike the equivalent
* method in IJavaProject, because there is an implicit progress monitor
* provided when running the setRawClasspath operation as a task. In the
* future, this method could be modified to accept a user-specified progress
* monitor.
* </p>
*
*
* NOTE: If you are already running in a job, you probably don't want to call
* this method.
*/
public static void setRawClasspath(final IJavaProject javaProject,
final IClasspathEntry[] newClasspathEntries) {

IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException,
OperationCanceledException {
javaProject.setRawClasspath(newClasspathEntries, monitor);
Expand All @@ -376,15 +390,15 @@ public void run(IProgressMonitor monitor) throws CoreException,
* more information: <a
* href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243692"
* >http://bugs.eclipse.org/bugs/show_bug.cgi?id=243692</a>
*
*
* <p>
* Note that this method is asynchronous, so the caller will regain control
* immediately, and the raw classpath will be set at some future time. Right
* now, there is no way to tell the caller when the operation has completed.
* If this becomes a concern in the future, a callback parameter can be
* introduced.
* </p>
*
*
* <p>
* This method does not accept an IProgressMonitor, unlike the equivalent
* method in IJavaProject, because there is an implicit progress monitor
Expand All @@ -401,7 +415,7 @@ public static void setRawClasspath(final IJavaProject javaProject,
/**
* Waits indefinitely until the given classpath entries are on the given
* project's raw classpath.
*
*
* @throws JavaModelException
* @throws InterruptedException
*/
Expand Down
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<os-jvm-flags />

<!-- Used In: GwtRuntimeTestUtilities.java TODO remove? -->
<gwt.version>2.7.0</gwt.version>
<gwt.version>2.8.1</gwt.version>

<!-- SwtBot Timeout -->
<org.eclipse.swtbot.search.timeout>50000</org.eclipse.swtbot.search.timeout>
Expand Down Expand Up @@ -55,13 +55,18 @@
<module>plugins/com.gwtplugins.gdt.eclipse.suite</module>
<module>plugins/com.gwtplugins.gdt.eclipse.suite.update</module>
<module>plugins/com.gwtplugins.gdt.eclipse.suite.test</module>
<module>plugins/com.gwtplugins.gdt.eclipse.suite.test.swtbot</module>
<module>plugins/com.gwtplugins.gdt.eclipse.swtbot</module>

<!-- TODO not enabled yet -->
<!-- <module>plugins/com.gwtplugins.gdt.eclipse.suite.test.swtbot</module> -->
<!-- <module>plugins/com.gwtplugins.gdt.eclipse.swtbot</module> -->

<!-- GWT -->
<module>plugins/com.gwtplugins.gwt.eclipse.core</module>
<module>plugins/com.gwtplugins.gwt.eclipse.core.test</module>
<module>plugins/com.gwtplugins.gwt.eclipse.core.test.swtbot</module>

<!-- TODO enable swtbot -->
<!-- <module>plugins/com.gwtplugins.gwt.eclipse.core.test.swtbot</module> -->

<module>plugins/com.gwtplugins.gwt.eclipse.oophm</module>
<module>plugins/com.gwtplugins.gwt.eclipse.oophm.test</module>
<module>plugins/com.gwtplugins.gwt.eclipse.testing</module>
Expand Down