You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2009/01/05 14:20:42 UTC
svn commit: r731558 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse: ./
src/java/org/apache/ivyde/eclipse/
src/java/org/apache/ivyde/eclipse/cpcontainer/
Author: hibou
Date: Mon Jan 5 05:20:42 2009
New Revision: 731558
URL: http://svn.apache.org/viewvc?rev=731558&view=rev
Log:
IVYDE-133:
- do not use internal class anymore
- better use the marker API: define a specific IvyDE marker
- if the marker cannot be set on the ivy file (because not found), set a problem on the project
Removed:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerDecorator.java
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt?rev=731558&r1=731557&r2=731558&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt Mon Jan 5 05:20:42 2009
@@ -15,6 +15,7 @@
- FIX: IvyDE does not save "Configurations" and "Types" field values for "Retrive" tab (IVYDE-142) (thanks to Daniel Becheanu)
- FIX: Retrieve after resolve task fails because of wrong resolve configuration (IVYDE-140) (thanks to Daniel Becheanu)
- FIX: Conversion from "file:" to "project:" fails (IVYDE-143) (thanks to Will Gorman)
+- FIX: The decorators can throw a NPE at startup (IVYDE-133)
version 2.0.0 beta1
==========================
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml?rev=731558&r1=731557&r2=731558&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml Mon Jan 5 05:20:42 2009
@@ -199,17 +199,6 @@
</command>
</extension>
<extension
- point="org.eclipse.ui.decorators">
- <decorator
- adaptable="true"
- class="org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerDecorator"
- id="org.apache.ivyde.eclipse.cpcontainer.decorator"
- label="IvyDE classpath decoration"
- location="BOTTOM_LEFT"
- state="true">
- </decorator>
- </extension>
- <extension
point="org.eclipse.help.toc">
<toc
file="doc/toc.xml"
@@ -223,6 +212,17 @@
variable="IVY_HOME">
</classpathVariableInitializer>
</extension>
+ <extension
+ id="marker"
+ name="IvyDE Problem"
+ point="org.eclipse.core.resources.markers">
+ <persistent
+ value="false">
+ </persistent>
+ <super
+ type="org.eclipse.core.resources.problemmarker">
+ </super>
+ </extension>
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java?rev=731558&r1=731557&r2=731558&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java Mon Jan 5 05:20:42 2009
@@ -23,7 +23,6 @@
import java.util.ResourceBundle;
import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer;
-import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerDecorator;
import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
import org.apache.ivyde.eclipse.cpcontainer.fragmentinfo.IPackageFragmentExtraInfo;
import org.apache.ivyde.eclipse.cpcontainer.fragmentinfo.PreferenceStoreInfo;
@@ -59,6 +58,9 @@
/** The ID of IvyDE plugin */
public static final String ID = "org.apache.ivyde.eclipse";
+ /** The ID of IvyDE problem markers */
+ public static final String MARKER_ID = ID + ".marker";
+
// The shared instance.
private static IvyPlugin plugin;
@@ -73,8 +75,6 @@
private BundleContext bundleContext;
- private IvyClasspathContainerDecorator containerDecorator;
-
/**
* The constructor.
*/
@@ -299,14 +299,6 @@
return console;
}
- public void setContainerDecorator(IvyClasspathContainerDecorator containerDecorator) {
- this.containerDecorator = containerDecorator;
- }
-
- public IvyClasspathContainerDecorator getContainerDecorator() {
- return containerDecorator;
- }
-
public IPackageFragmentExtraInfo getPackageFragmentExtraInfo() {
if (packageExtraInfo == null) {
packageExtraInfo = new PreferenceStoreInfo(getPreferenceStore());
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java?rev=731558&r1=731557&r2=731558&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java Mon Jan 5 05:20:42 2009
@@ -44,6 +44,7 @@
import org.apache.ivyde.eclipse.IvyPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -381,13 +382,12 @@
return confs;
}
- private void setConfStatus(IvyDEException e) {
+ private void setConfStatus(IvyDEException ex) {
if (!editing) {
- confOk = (e == null);
- IvyPlugin.getDefault().getContainerDecorator().statusChanged(this);
- if (e != null) {
- setResolveStatus(new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, e
- .getMessage(), e.getCause()));
+ confOk = (ex == null);
+ if (ex != null) {
+ setResolveStatus(new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, ex
+ .getMessage(), ex.getCause()));
} else {
setResolveStatus(Status.OK_STATUS);
}
@@ -396,16 +396,17 @@
public void setResolveStatus(IStatus status) {
if (!editing && javaProject != null) {
- IFile ivyFile = javaProject.getProject().getFile(ivyXmlPath);
- if (!ivyFile.exists()) {
- return;
- }
+ IProject p = javaProject.getProject();
try {
- ivyFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+ p.deleteMarkers(IvyPlugin.MARKER_ID, true, IResource.DEPTH_INFINITE);
if (status == Status.OK_STATUS) {
return;
}
- IMarker marker = ivyFile.createMarker(IMarker.PROBLEM);
+ IResource r = javaProject.getProject().getFile(ivyXmlPath);
+ if (!r.exists()) {
+ r = p;
+ }
+ IMarker marker = r.createMarker(IvyPlugin.MARKER_ID);
marker.setAttribute(IMarker.MESSAGE, status.getMessage());
switch (status.getSeverity()) {
case IStatus.ERROR: