Remove ImmutableList from API method
This was generating a warning in Eclipse
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/Activator.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/Activator.java
index ac29c6b..5e8bc37 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/Activator.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/Activator.java
@@ -16,6 +16,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
@@ -107,7 +108,7 @@
* configured to track certain targets and this function fetch this list from the project
* preferences.
*/
- public static ImmutableList<String> getTargets(IProject project) throws BackingStoreException {
+ public static List<String> getTargets(IProject project) throws BackingStoreException {
// Get the list of targets from the preferences
IScopeContext projectScope = new ProjectScope(project);
Preferences projectNode = projectScope.getNode(PLUGIN_ID);
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/classpath/BazelClasspathContainer.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/classpath/BazelClasspathContainer.java
index 696122a..bdd0082 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/classpath/BazelClasspathContainer.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/classpath/BazelClasspathContainer.java
@@ -21,6 +21,7 @@
import java.nio.file.PathMatcher;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IResource;
@@ -34,8 +35,6 @@
import org.eclipse.jdt.core.JavaModelException;
import org.osgi.service.prefs.BackingStoreException;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
import com.google.devtools.bazel.e4b.Activator;
import com.google.devtools.bazel.e4b.command.BazelCommand.BazelInstance;
import com.google.devtools.bazel.e4b.command.BazelNotFoundException;
@@ -103,8 +102,8 @@
@Override
public IClasspathEntry[] getClasspathEntries() {
try {
- ImmutableList<String> targets = Activator.getTargets(project.getProject());
- ImmutableMap<String, IdeBuildInfo> infos = instance.getIdeInfo(targets);
+ List<String> targets = Activator.getTargets(project.getProject());
+ Map<String, IdeBuildInfo> infos = instance.getIdeInfo(targets);
Set<Jars> jars = new HashSet<>();
for (IdeBuildInfo s : infos.values()) {
jars.addAll(s.getGeneratedJars());
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/BazelCommand.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/BazelCommand.java
index 162929e..28fae71 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/BazelCommand.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/BazelCommand.java
@@ -216,7 +216,7 @@
*
* @throws BazelNotFoundException
*/
- public synchronized ImmutableMap<String, IdeBuildInfo> getIdeInfo(Collection<String> targets)
+ public synchronized Map<String, IdeBuildInfo> getIdeInfo(Collection<String> targets)
throws IOException, InterruptedException, BazelNotFoundException {
String key = NEW_LINE_JOINER.join(targets);
if (!buildInfoCache.containsKey(key)) {
@@ -281,7 +281,7 @@
*
* @throws BazelNotFoundException
*/
- public ImmutableList<String> complete(String string)
+ public List<String> complete(String string)
throws IOException, InterruptedException, BazelNotFoundException {
if (string.equals("/") || string.isEmpty()) {
return ImmutableList.of("//");
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/IdeBuildInfo.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/IdeBuildInfo.java
index c361b42..1f279fa 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/IdeBuildInfo.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/IdeBuildInfo.java
@@ -131,7 +131,7 @@
/**
* List of dependencies of the target.
*/
- public ImmutableList<String> getDeps() {
+ public List<String> getDeps() {
return deps;
}
@@ -152,21 +152,21 @@
/**
* List of jars generated by annotations processors when building this target.
*/
- public ImmutableList<Jars> getGeneratedJars() {
+ public List<Jars> getGeneratedJars() {
return generatedJars;
}
/**
* List of jars generated by building this target.
*/
- public ImmutableList<Jars> getJars() {
+ public List<Jars> getJars() {
return jars;
}
/**
* List of sources consumed by this target.
*/
- public ImmutableList<String> getSources() {
+ public List<String> getSources() {
return sources;
}
}
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/SelectOutputStream.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/SelectOutputStream.java
index 2f7c56e..126a5fa 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/SelectOutputStream.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/command/SelectOutputStream.java
@@ -95,7 +95,7 @@
/**
* Returns the list of selected lines.
*/
- public ImmutableList<String> getLines() {
+ ImmutableList<String> getLines() {
return ImmutableList.copyOf(lines);
}
}
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/BazelTargetCompletionContentProposalProvider.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/BazelTargetCompletionContentProposalProvider.java
index a67eaf9..6a32e89 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/BazelTargetCompletionContentProposalProvider.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/BazelTargetCompletionContentProposalProvider.java
@@ -15,12 +15,12 @@
package com.google.devtools.bazel.e4b.wizard;
import java.io.IOException;
+import java.util.List;
import org.eclipse.jface.fieldassist.ContentProposal;
import org.eclipse.jface.fieldassist.IContentProposal;
import org.eclipse.jface.fieldassist.IContentProposalProvider;
-import com.google.common.collect.ImmutableList;
import com.google.devtools.bazel.e4b.Activator;
import com.google.devtools.bazel.e4b.command.BazelCommand.BazelInstance;
import com.google.devtools.bazel.e4b.command.BazelNotFoundException;
@@ -40,7 +40,7 @@
return null;
}
try {
- ImmutableList<String> completions = bazel.complete(contents.substring(0, position));
+ List<String> completions = bazel.complete(contents.substring(0, position));
if (completions != null) {
IContentProposal[] result = new IContentProposal[completions.size()];
int i = 0;
diff --git a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/WorkspaceWizardPage.java b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/WorkspaceWizardPage.java
index bb4da5b..5f70a67 100644
--- a/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/WorkspaceWizardPage.java
+++ b/com.google.devtools.bazel.e4b/src/com/google/devtools/bazel/e4b/wizard/WorkspaceWizardPage.java
@@ -69,14 +69,14 @@
/**
* Returns the list of targets selected by the user.
*/
- public ImmutableList<String> getTargets() {
+ ImmutableList<String> getTargets() {
return ImmutableList.copyOf(targets.getItems());
}
/**
* Returns the list of directories selected by the user.
*/
- public ImmutableList<String> getDirectories() {
+ ImmutableList<String> getDirectories() {
return DirectoryTreeContentProvider.getSelectPathsRelativeToRoot(directories);
}