Added:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java?rev=1096453&view=auto
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java
(added)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java
Mon Apr 25 10:43:24 2011
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.resolvevisualizer.model;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+
+/**
+ * Assists in the further separation of concerns between the view and the Ivy
resolve report. The view looks at the
+ * IvyNode in a unique way that can lead to expensive operations if we do not
achieve this separation.
+ */
+public class IvyNodeElement {
+ private ModuleRevisionId moduleRevisionId;
+ private boolean evicted = false;
+ private int depth = Integer.MAX_VALUE / 10;
+ private Collection/* <IvyNodeElement> */dependencies = new HashSet/*
<IvyNodeElement> */();
+ private Collection/* <IvyNodeElement> */callers = new HashSet/*
<IvyNodeElement> */();
+ private Collection/* <IvyNodeElement> */conflicts = new HashSet/*
<IvyNodeElement> */();
+
+ /**
+ * The caller configurations that caused this node to be reached in the
resolution, grouped by caller.
+ */
+ private Map/* <IvyNodeElement, String[]> */callerConfigurationMap = new
HashMap/* <IvyNodeElement, String[]> */();
+
+ /**
+ * We try to avoid building the list of this nodes deep dependencies by
storing them in this cache by depth level.
+ */
+ private IvyNodeElement[] deepDependencyCache;
+
+ public boolean equals(Object obj) {
+ if (obj instanceof IvyNodeElement) {
+ IvyNodeElement elem = (IvyNodeElement) obj;
+ if (elem.getOrganization().equals(getOrganization()) &&
elem.getName().equals(getName())
+ && elem.getRevision().equals(getRevision()))
+ return true;
+ }
+ return false;
+ }
+
+ public IvyNodeElement[] getDependencies() {
+ return (IvyNodeElement[]) dependencies.toArray(new
IvyNodeElement[dependencies.size()]);
+ }
+
+ /**
+ * Recursive dependency retrieval
+ *
+ * @return The array of nodes that represents a node's immediate and
transitive dependencies down to an arbitrary
+ * depth.
+ */
+ public IvyNodeElement[] getDeepDependencies() {
+ if (deepDependencyCache == null) {
+ deepDependencyCache = (IvyNodeElement[])
getDeepDependencies(this).toArray(new IvyNodeElement[] {});
+ }
+ return deepDependencyCache;
+ }
+
+ /**
+ * Recursive dependency retrieval
+ *
+ * @param node
+ * @return
+ */
+ private Collection/* <IvyNodeElement> */getDeepDependencies(IvyNodeElement
node) {
+ Collection/* <IvyNodeElement> */deepDependencies = new HashSet/*
<IvyNodeElement> */();
+ deepDependencies.add(node);
+
+ IvyNodeElement[] directDependencies = node.getDependencies();
+ for (int i = 0; i < directDependencies.length; i++) {
+
deepDependencies.addAll(getDeepDependencies(directDependencies[i]));
+ }
+
+ return deepDependencies;
+ }
+
+ /**
+ * @return An array of configurations by which this module was resolved
+ */
+ public String[] getCallerConfigurations(IvyNodeElement caller) {
+ return (String[]) callerConfigurationMap.get(caller);
+ }
+
+ public void setCallerConfigurations(IvyNodeElement caller, String[]
configurations) {
+ callerConfigurationMap.put(caller, configurations);
+ }
+
+ public String getOrganization() {
+ return moduleRevisionId.getOrganisation();
+ }
+
+ public String getName() {
+ return moduleRevisionId.getName();
+ }
+
+ public String getRevision() {
+ return moduleRevisionId.getRevision();
+ }
+
+ public boolean isEvicted() {
+ return evicted;
+ }
+
+ public void setEvicted(boolean evicted) {
+ this.evicted = evicted;
+ }
+
+ public int getDepth() {
+ return depth;
+ }
+
+ /**
+ * Set this node's depth and recursively update the node's children to
relative to the new value.
+ *
+ * @param depth
+ */
+ public void setDepth(int depth) {
+ this.depth = depth;
+ for (Iterator iter = dependencies.iterator(); iter.hasNext();) {
+ IvyNodeElement dependency = (IvyNodeElement) iter.next();
+ dependency.setDepth(depth + 1);
+ }
+ }
+
+ public IvyNodeElement[] getConflicts() {
+ return (IvyNodeElement[]) conflicts.toArray(new
IvyNodeElement[conflicts.size()]);
+ }
+
+ public void setConflicts(Collection conflicts) {
+ this.conflicts = conflicts;
+ }
+
+ public ModuleRevisionId getModuleRevisionId() {
+ return moduleRevisionId;
+ }
+
+ public void setModuleRevisionId(ModuleRevisionId moduleRevisionId) {
+ this.moduleRevisionId = moduleRevisionId;
+ }
+
+ public void addCaller(IvyNodeElement caller) {
+ callers.add(caller);
+ caller.dependencies.add(this);
+ }
+
+ public IvyNodeElement[] getCallers() {
+ return (IvyNodeElement[]) callers.toArray(new
IvyNodeElement[callers.size()]);
+ }
+}
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElement.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java?rev=1096453&view=auto
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java
(added)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java
Mon Apr 25 10:43:24 2011
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.resolvevisualizer.model;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ivy.core.module.id.ModuleId;
+import org.apache.ivy.core.report.ResolveReport;
+import org.apache.ivy.core.resolve.IvyNode;
+import org.apache.ivy.core.resolve.IvyNodeCallers.Caller;
+
+public class IvyNodeElementAdapter {
+ /**
+ * Adapt all dependencies and evictions from the ResolveReport.
+ *
+ * @param report
+ * @return the root node adapted from the ResolveReport
+ */
+ public static IvyNodeElement adapt(ResolveReport report) {
+ Map/* <ModuleRevisionId, IvyNodeElement> */resolvedNodes = new
HashMap/* <ModuleRevisionId, IvyNodeElement> */();
+
+ IvyNodeElement root = new IvyNodeElement();
+
root.setModuleRevisionId(report.getModuleDescriptor().getModuleRevisionId());
+ resolvedNodes.put(report.getModuleDescriptor().getModuleRevisionId(),
root);
+
+ List/* <IvyNode> */dependencies = report.getDependencies();
+
+ // First pass - build the map of resolved nodes by revision id
+ for (Iterator iter = dependencies.iterator(); iter.hasNext();) {
+ IvyNode node = (IvyNode) iter.next();
+ if (node.getAllEvictingNodes() != null) {
+ // Nodes that are evicted as a result of conf inheritance
still appear
+ // as dependencies, but with eviction data. They also appear
as evictions.
+ // We map them as evictions rather than dependencies.
+ continue;
+ }
+ IvyNodeElement nodeElement = new IvyNodeElement();
+ nodeElement.setModuleRevisionId(node.getResolvedId());
+ resolvedNodes.put(node.getResolvedId(), nodeElement);
+ }
+
+ // Second pass - establish relationships between the resolved nodes
+ for (Iterator iter = dependencies.iterator(); iter.hasNext();) {
+ IvyNode node = (IvyNode) iter.next();
+ if (node.getAllEvictingNodes() != null) {
+ continue; // see note above
+ }
+
+ IvyNodeElement nodeElement = (IvyNodeElement)
resolvedNodes.get(node.getResolvedId());
+ Caller[] callers = node.getAllRealCallers();
+ for (int i = 0; i < callers.length; i++) {
+ IvyNodeElement caller = (IvyNodeElement)
resolvedNodes.get(callers[i].getModuleRevisionId());
+ if (caller != null) {
+ nodeElement.addCaller(caller);
+ nodeElement.setCallerConfigurations(caller,
callers[i].getCallerConfigurations());
+ }
+ }
+ }
+
+ IvyNode[] evictions = report.getEvictedNodes();
+ for (int i = 0; i < evictions.length; i++) {
+ IvyNode eviction = evictions[i];
+ IvyNodeElement evictionElement = new IvyNodeElement();
+ evictionElement.setModuleRevisionId(eviction.getResolvedId());
+ evictionElement.setEvicted(true);
+
+ Caller[] callers = eviction.getAllCallers();
+ for (int j = 0; j < callers.length; j++) {
+ IvyNodeElement caller = (IvyNodeElement)
resolvedNodes.get(callers[j].getModuleRevisionId());
+ if (caller != null) {
+ evictionElement.addCaller(caller);
+ evictionElement.setCallerConfigurations(caller,
callers[j].getCallerConfigurations());
+ }
+ }
+ }
+
+ // Recursively set depth starting at root
+ root.setDepth(0);
+ findConflictsBeneathNode(root);
+
+ return root;
+ }
+
+ /**
+ * Derives configuration conflicts that exist between node and all of its
descendant dependencies.
+ *
+ * @param node
+ */
+ private static void findConflictsBeneathNode(IvyNodeElement node) {
+ // Derive conflicts
+ Map/* <ModuleId, Collection<IvyNodeElement>> */moduleRevisionMap = new
HashMap/*
+
* <ModuleId,
+
* Collection<IvyNodeElement>>
+
*/();
+ IvyNodeElement[] deepDependencies = node.getDeepDependencies();
+ for (int i = 0; i < deepDependencies.length; i++) {
+ if (deepDependencies[i].isEvicted())
+ continue;
+
+ ModuleId moduleId =
deepDependencies[i].getModuleRevisionId().getModuleId();
+ if (moduleRevisionMap.containsKey(moduleId)) {
+ Collection/* <IvyNodeElement> */conflicts = (Collection/*
<IvyNodeElement> */) moduleRevisionMap
+ .get(moduleId);
+ conflicts.add(deepDependencies[i]);
+ for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
+ IvyNodeElement conflict = (IvyNodeElement) iter.next();
+ conflict.setConflicts(conflicts);
+ }
+ } else {
+ List/* <IvyNodeElement> */immutableMatchingSet = Arrays
+ .asList(new IvyNodeElement[] { deepDependencies[i] });
+ moduleRevisionMap.put(moduleId, new
HashSet(immutableMatchingSet));
+ }
+ }
+ }
+}
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementAdapter.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java?rev=1096453&view=auto
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java
(added)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java
Mon Apr 25 10:43:24 2011
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse.resolvevisualizer.model;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+public abstract class IvyNodeElementFilterAdapter implements
IIvyNodeElementFilter {
+ protected boolean enabled = false;
+
+ public IvyNodeElement[] filter(IvyNodeElement[] unfiltered) {
+ if (!enabled)
+ return unfiltered;
+
+ Collection/* <IvyNodeElement> */filtered = new HashSet/*
<IvyNodeElement> */();
+ for (int i = 0; i < unfiltered.length; i++) {
+ if (accept(unfiltered[i]))
+ filtered.add(unfiltered[i]);
+ }
+
+ return (IvyNodeElement[]) filtered.toArray(new
IvyNodeElement[filtered.size()]);
+ }
+
+ public abstract boolean accept(IvyNodeElement unfiltered);
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/model/IvyNodeElementFilterAdapter.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java
Mon Apr 25 10:43:24 2011
@@ -26,6 +26,7 @@ import org.apache.ivy.Ivy;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.core.report.ArtifactDownloadReport;
+import org.apache.ivy.core.report.ResolveReport;
import org.apache.ivy.util.Message;
import org.apache.ivyde.eclipse.resolve.IvyResolver;
import org.apache.ivyde.eclipse.resolve.ResolveResult;
@@ -42,6 +43,8 @@ public class ClasspathEntriesResolver ex
private IClasspathEntry[] classpathEntries = null;
+ private ResolveReport resolveReport;
+
public ClasspathEntriesResolver(IvyClasspathContainer ivycp, boolean
usePreviousResolveIfExist) {
super(ivycp.getConf().getIvyXmlPath(), ivycp.getConf().getConfs(),
ivycp.getConf()
.getJavaProject() == null ? null :
ivycp.getConf().getJavaProject().getProject());
@@ -56,10 +59,6 @@ public class ClasspathEntriesResolver ex
}
}
- public IClasspathEntry[] getClasspathEntries() {
- return classpathEntries;
- }
-
protected void postResolveOrRefresh(Ivy ivy, ModuleDescriptor md,
ResolveResult resolveResult,
IProgressMonitor monitor) throws IOException {
IvyClasspathContainerMapper mapper = new
IvyClasspathContainerMapper(monitor, ivy, conf,
@@ -68,6 +67,15 @@ public class ClasspathEntriesResolver ex
warnIfDuplicates(ivy, mapper, resolveResult.getArtifactReports());
classpathEntries = mapper.map();
+ resolveReport = resolveResult.getReport();
+ }
+
+ public IClasspathEntry[] getClasspathEntries() {
+ return classpathEntries;
+ }
+
+ public ResolveReport getResolveReport() {
+ return resolveReport;
}
/**
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
Mon Apr 25 10:43:24 2011
@@ -24,6 +24,7 @@ import java.util.Comparator;
import org.apache.ivy.Ivy;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.report.ResolveReport;
import org.apache.ivyde.eclipse.IvyPlugin;
import org.apache.ivyde.eclipse.resolve.IvyResolveJob;
import org.apache.ivyde.eclipse.resolve.ResolveRequest;
@@ -54,6 +55,8 @@ public class IvyClasspathContainer imple
private final IvyClasspathContainerState state;
+ private ResolveReport resolveReport;
+
/**
* Create an Ivy class path container from some predefined classpath
entries. The provided class
* path entries should come from the default "persisted" classpath
container. Note that no
@@ -84,6 +87,7 @@ public class IvyClasspathContainer imple
conf = cp.conf;
classpathEntries = cp.classpathEntries;
state = cp.state;
+ resolveReport = cp.resolveReport;
}
public IvyClasspathContainerConfiguration getConf() {
@@ -198,4 +202,12 @@ public class IvyClasspathContainer imple
public String toString() {
return conf.toString();
}
+
+ public void setResolveReport(ResolveReport resolveReport) {
+ this.resolveReport = resolveReport;
+ }
+
+ public ResolveReport getResolveReport() {
+ return resolveReport;
+ }
}
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathResolver.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathResolver.java?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathResolver.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathResolver.java
Mon Apr 25 10:43:24 2011
@@ -37,6 +37,7 @@ public class IvyClasspathResolver extend
public void postBatchResolve() {
if (getClasspathEntries() != null) {
ivycp.updateClasspathEntries(getClasspathEntries());
+ ivycp.setResolveReport(getResolveReport());
}
}
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathUtil.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathUtil.java?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathUtil.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathUtil.java
Mon Apr 25 10:43:24 2011
@@ -24,6 +24,7 @@ import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -35,6 +36,7 @@ import org.apache.ivyde.eclipse.IvyPlugi
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.IClasspathAttribute;
@@ -357,4 +359,24 @@ public final class IvyClasspathUtil {
}
return sb.toString();
}
+
+ /**
+ * This will return all ivy projects in the workspace <br>
+ *
+ * @return collection of ivy projects
+ */
+ public static IProject[] getIvyProjectsInWorkspace() {
+ Collection/* <IProject> */ivyProjects = new HashSet();
+
+ IProject[] projects =
ResourcesPlugin.getWorkspace().getRoot().getProjects();
+
+ for (int i = 0; i < projects.length; i++) {
+ if (projects[i].isOpen() &&
getIvyClasspathContainers(projects[i]).size() > 0) {
+ ivyProjects.add(projects[i]);
+ }
+ }
+
+ return (IProject[]) ivyProjects.toArray(new
IProject[ivyProjects.size()]);
+ }
+
}
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/revdepexplorer/IvyUtil.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/revdepexplorer/IvyUtil.java?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/revdepexplorer/IvyUtil.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/revdepexplorer/IvyUtil.java
Mon Apr 25 10:43:24 2011
@@ -40,26 +40,6 @@ public final class IvyUtil {
// utility class
}
- /**
- * This will return all ivy projects in the workspace <br>
- *
- * @return collection of ivy projects
- */
- public static IProject[] getIvyProjectsInWorkspace() {
- Collection/* <IProject> */ivyProjects = new HashSet();
-
- IProject[] projects =
ResourcesPlugin.getWorkspace().getRoot().getProjects();
-
- for (int i = 0; i < projects.length; i++) {
- if (projects[i].isOpen()
- &&
IvyClasspathUtil.getIvyClasspathContainers(projects[i]).size() > 0) {
- ivyProjects.add(projects[i]);
- }
- }
-
- return (IProject[]) ivyProjects.toArray(new
IProject[ivyProjects.size()]);
- }
-
public static MultiRevDependencyDescriptor[]
getDependencyDescriptorsByProjects(
IProject[] projects) {
// a temporary cache of multi-revision dependency descriptors
@@ -122,6 +102,6 @@ public final class IvyUtil {
* @return multi-revision dependency descriptors
*/
public static MultiRevDependencyDescriptor[]
getAllDependencyDescriptorsInWorkspace() {
- return getDependencyDescriptorsByProjects(getIvyProjectsInWorkspace());
+ return
getDependencyDescriptorsByProjects(IvyClasspathUtil.getIvyProjectsInWorkspace());
}
}
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.feature/build.properties
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.feature/build.properties?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.feature/build.properties (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.feature/build.properties Mon Apr 25
10:43:24 2011
@@ -26,4 +26,5 @@ src.includes = .project,\
NOTICE,\
build.properties,\
feature.xml,\
- LICENSE
+ LICENSE,\
+ feature.properties
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.properties
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.properties?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.properties (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.properties Mon Apr 25
10:43:24 2011
@@ -34,7 +34,8 @@ It lets you manage your dependencies dec
\n\
Apache IvyDE can be also used with other plugins like WTP and Apache Ant.
-license=Licensed to the Apache Software Foundation (ASF) under one\n\
+license=Apache License, Version 2.0\n\
+Licensed to the Apache Software Foundation (ASF) under one\n\
or more contributor license agreements. See the NOTICE file\n\
distributed with this work for additional information\n\
regarding copyright ownership. The ASF licenses this file\n\
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.xml
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.xml?rev=1096453&r1=1096452&r2=1096453&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.xml (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.feature/feature.xml Mon Apr 25
10:43:24 2011
@@ -24,7 +24,7 @@
provider-name="%providerName"
plugin="org.apache.ivyde.eclipse">
- <description url="http://www.apache.org/dist/ant/ivyde/updatesite">
+ <description url="http://ant.apache.org/ivy/ivyde/">
%description
</description>