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 2008/09/06 17:06:54 UTC

svn commit: r692658 [2/3] - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde: common/completion/ common/ivyfile/ common/ivysettings/ common/model/ eclipse/ eclipse/cpcontainer/ eclipse/cpcontainer/fragmentinfo/ eclipse/ui/acti...

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=692658&r1=692657&r2=692658&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 Sat Sep  6 08:06:53 2008
@@ -57,6 +57,9 @@
  */
 public class IvyClasspathContainerConfiguration {
 
+    private static final String UTF8_ERROR = "The UTF-8 encoding support is required"
+            + " is decode the path of the container.";
+
     private static final String PROJECT_SCHEME_PREFIX = "project://";
 
     private static final int PROJECT_SCHEME_PREFIX_LENGTH = PROJECT_SCHEME_PREFIX.length();
@@ -165,9 +168,8 @@
                 value = parameter.length > 1 ? URLDecoder.decode(parameter[1], "UTF-8") : "";
             } catch (UnsupportedEncodingException e) {
                 // this should never never happen
-                String message = "The UTF-8 encoding support is required is decode the path of the container.";
-                IvyPlugin.log(IStatus.ERROR, message, e);
-                throw new RuntimeException(message, e);
+                IvyPlugin.log(IStatus.ERROR, UTF8_ERROR, e);
+                throw new RuntimeException(UTF8_ERROR, e);
             }
             if (parameter[0].equals("ivyXmlPath")) {
                 ivyXmlPath = value;
@@ -302,11 +304,10 @@
                 path.append(URLEncoder.encode(Boolean.toString(this.resolveInWorkspace), "UTF-8"));
             }
         } catch (UnsupportedEncodingException e) {
-            String message = "The UTF-8 encoding support is required is endecode the path of the container.";
-            IvyPlugin.log(IStatus.ERROR, message, e);
-            throw new RuntimeException(message, e);
+            IvyPlugin.log(IStatus.ERROR, UTF8_ERROR, e);
+            throw new RuntimeException(UTF8_ERROR, e);
         }
-        return new Path(IvyClasspathContainer.IVY_CLASSPATH_CONTAINER_ID).append(path.toString());
+        return new Path(IvyClasspathContainer.CONTAINER_ID).append(path.toString());
     }
 
     public String getIvyXmlPath() {
@@ -317,6 +318,10 @@
         return javaProject;
     }
 
+    public List getConfs() {
+        return confs;
+    }
+
     private void setConfStatus(IvyDEException e) {
         if (confOk != (e == null)) {
             confOk = (e == null);
@@ -353,6 +358,9 @@
                     case IStatus.INFO:
                         marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
                         break;
+                    default:
+                        IvyPlugin.log(IStatus.WARNING, "Unsupported resolve status: "
+                                + status.getSeverity(), null);
                 }
             } catch (CoreException e) {
                 IvyPlugin.log(e);
@@ -361,8 +369,8 @@
     }
 
     public Ivy getIvy() throws IvyDEException {
-        String ivySettingsPath = getInheritedIvySettingsPath();
-        if (ivySettingsPath == null || ivySettingsPath.trim().length() == 0) {
+        String settingsPath = getInheritedIvySettingsPath();
+        if (settingsPath == null || settingsPath.trim().length() == 0) {
             // no settings specified, so take the default one
             if (ivy == null) {
                 ivy = new Ivy();
@@ -388,10 +396,10 @@
             return ivy;
         }
 
-        if (ivySettingsPath.startsWith(PROJECT_SCHEME_PREFIX)) {
-            int pathIndex = ivySettingsPath.indexOf("/", PROJECT_SCHEME_PREFIX_LENGTH);
-            String projectName = ivySettingsPath.substring(PROJECT_SCHEME_PREFIX_LENGTH, pathIndex);
-            String path = ivySettingsPath.substring(pathIndex + 1);
+        if (settingsPath.startsWith(PROJECT_SCHEME_PREFIX)) {
+            int pathIndex = settingsPath.indexOf("/", PROJECT_SCHEME_PREFIX_LENGTH);
+            String projectName = settingsPath.substring(PROJECT_SCHEME_PREFIX_LENGTH, pathIndex);
+            String path = settingsPath.substring(pathIndex + 1);
             if (projectName.equals("")) {
                 IFile f = javaProject.getProject().getFile(path);
                 File file = new File(f.getLocation().toOSString());
@@ -409,8 +417,7 @@
                     if (i == javaProjects.length) {
                         IvyDEException ex = new IvyDEException("Project '" + projectName
                                 + "' not found", "The project name '" + projectName + "' from '"
-                                + ivySettingsPath + "' was not found (" + this.toString() + ")",
-                                null);
+                                + settingsPath + "' was not found (" + this.toString() + ")", null);
                         setConfStatus(ex);
                         throw ex;
                     }
@@ -426,11 +433,11 @@
         // before returning the found ivy, try to refresh it if the settings changed
         URL url;
         try {
-            url = new URL(ivySettingsPath);
+            url = new URL(settingsPath);
         } catch (MalformedURLException e) {
             IvyDEException ex = new IvyDEException("Incorrect url of the Ivy settings",
-                    "The Ivy settings url '" + ivySettingsPath + "' is incorrect ("
-                            + this.toString() + ")", e);
+                    "The Ivy settings url '" + settingsPath + "' is incorrect (" + this.toString()
+                            + ")", e);
             setConfStatus(ex);
             throw ex;
         }
@@ -446,13 +453,13 @@
                     ivySettingsLastModified = 0;
                 } catch (ParseException e) {
                     IvyDEException ex = new IvyDEException("Parsing error of the Ivy settings",
-                            "The ivy settings file '" + ivySettingsPath + "' could not be parsed ("
+                            "The ivy settings file '" + settingsPath + "' could not be parsed ("
                                     + this.toString() + ")", e);
                     setConfStatus(ex);
                     throw ex;
                 } catch (IOException e) {
                     IvyDEException ex = new IvyDEException("Read error of the Ivy settings",
-                            "The ivy settings file '" + ivySettingsPath + "' could not be read ("
+                            "The ivy settings file '" + settingsPath + "' could not be read ("
                                     + this.toString() + ")", e);
                     setConfStatus(ex);
                     throw ex;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerDecorator.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerDecorator.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerDecorator.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerDecorator.java Sat Sep  6 08:06:53 2008
@@ -18,11 +18,8 @@
 package org.apache.ivyde.eclipse.cpcontainer;
 
 import org.apache.ivyde.eclipse.IvyPlugin;
-import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jdt.core.IClasspathContainer;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer;
 import org.eclipse.jface.resource.ImageDescriptor;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java Sat Sep  6 08:06:53 2008
@@ -84,7 +84,7 @@
     public void requestClasspathContainerUpdate(IPath containerPath, final IJavaProject project,
             IClasspathContainer containerSuggestion) throws CoreException {
         if (IvyClasspathUtil.isIvyClasspathContainer(containerPath)) {
-            IClasspathEntry ice[] = containerSuggestion.getClasspathEntries();
+            IClasspathEntry[] ice = containerSuggestion.getClasspathEntries();
             IPackageFragmentExtraInfo ei = IvyPlugin.getDefault().getPackageFragmentExtraInfo();
             for (int i = 0; i < ice.length; i++) {
                 IClasspathEntry entry = ice[i];

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=692658&r1=692657&r2=692658&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 Sat Sep  6 08:06:53 2008
@@ -35,11 +35,14 @@
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations;
 import org.eclipse.jdt.internal.ui.packageview.ClassPathContainer;
 import org.eclipse.jface.viewers.IStructuredSelection;
 
-public class IvyClasspathUtil {
+public final class IvyClasspathUtil {
+
+    private IvyClasspathUtil() {
+        // utility class
+    }
 
     /**
      * Adds an Ivy classpath container to the list of existing classpath entries in the given
@@ -56,8 +59,7 @@
     public static void addCPContainer(IJavaProject project, IPath projectRelativePath, String confs) {
         try {
             IClasspathEntry newEntry = JavaCore.newContainerEntry(new Path(
-                    IvyClasspathContainer.IVY_CLASSPATH_CONTAINER_ID).append(projectRelativePath)
-                    .append(confs));
+                    IvyClasspathContainer.CONTAINER_ID).append(projectRelativePath).append(confs));
 
             IClasspathEntry[] entries = project.getRawClasspath();
 
@@ -128,7 +130,7 @@
     }
 
     public static boolean isIvyClasspathContainer(IPath containerPath) {
-        return containerPath.segment(0).equals(IvyClasspathContainer.IVY_CLASSPATH_CONTAINER_ID);
+        return containerPath.segment(0).equals(IvyClasspathContainer.CONTAINER_ID);
     }
 
     /**
@@ -198,7 +200,8 @@
 
         int kind = entry.getEntryKind();
         if (kind != IClasspathEntry.CPE_LIBRARY && kind != IClasspathEntry.CPE_VARIABLE) {
-            throw new IllegalArgumentException("Entry must be of kind CPE_LIBRARY or CPE_VARIABLE"); //$NON-NLS-1$
+            throw new IllegalArgumentException(
+                    "Entry must be of kind CPE_LIBRARY or " + "CPE_VARIABLE"); //$NON-NLS-1$
         }
 
         IClasspathAttribute[] extraAttributes = entry.getExtraAttributes();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java Sat Sep  6 08:06:53 2008
@@ -85,51 +85,61 @@
  * Eclipse classpath container that will contain the ivy resolved entries.
  */
 public class IvyResolveJob extends Job implements TransferListener, IvyListener {
-    long _expectedTotalLength = 1;
+    private static final int DOWNLOAD_MONITOR_LENGTH = 100;
 
-    long _currentLength = 0;
+    private static final int KILO_BITS_UNIT = 1024;
 
-    private IProgressMonitor _monitor;
+    private static final int MONITOR_LENGTH = 1000;
 
-    private IProgressMonitor _dlmonitor;
+    private static final int WAIT_FOR_JOIN = 100;
 
-    private boolean _usePreviousResolveIfExist;
+    private long expectedTotalLength = 1;
 
-    private int _workPerArtifact = 100;
+    private long currentLength = 0;
 
-    Ivy ivy;
+    private IProgressMonitor monitor;
 
-    final IvyClasspathContainerConfiguration conf;
+    private IProgressMonitor dlmonitor;
+
+    private boolean usePreviousResolveIfExist;
+
+    private int workPerArtifact = 100;
+
+    private Ivy ivy;
+
+    private final IvyClasspathContainerConfiguration conf;
 
     private final IvyClasspathContainer container;
 
-    ModuleDescriptor md;
+    private ModuleDescriptor md;
 
     public IvyResolveJob(IvyClasspathContainer container, boolean usePreviousResolveIfExist) {
         super("Resolve " + container.getConf() + " dependencies");
         this.container = container;
         this.conf = container.getConf();
-        _usePreviousResolveIfExist = usePreviousResolveIfExist;
+        this.usePreviousResolveIfExist = usePreviousResolveIfExist;
     }
 
     public void transferProgress(TransferEvent evt) {
         switch (evt.getEventType()) {
             case TransferEvent.TRANSFER_INITIATED:
-                _monitor.setTaskName("downloading " + evt.getResource());
+                monitor.setTaskName("downloading " + evt.getResource());
                 break;
             case TransferEvent.TRANSFER_STARTED:
-                _currentLength = 0;
+                currentLength = 0;
                 if (evt.isTotalLengthSet()) {
-                    _expectedTotalLength = evt.getTotalLength();
-                    _dlmonitor.beginTask("downloading " + evt.getResource(), 100);
+                    expectedTotalLength = evt.getTotalLength();
+                    dlmonitor
+                            .beginTask("downloading " + evt.getResource(), DOWNLOAD_MONITOR_LENGTH);
                 }
                 break;
             case TransferEvent.TRANSFER_PROGRESS:
-                if (_expectedTotalLength > 1) {
-                    _currentLength += evt.getLength();
-                    _dlmonitor.worked((int) (_currentLength * 100 / _expectedTotalLength));
-                    _monitor.subTask((_currentLength / 1024) + " / "
-                            + (_expectedTotalLength / 1024) + "kB");
+                if (expectedTotalLength > 1) {
+                    currentLength += evt.getLength();
+                    int progress = (int) (currentLength * DOWNLOAD_MONITOR_LENGTH / expectedTotalLength);
+                    dlmonitor.worked(progress);
+                    monitor.subTask((currentLength / KILO_BITS_UNIT) + " / "
+                            + (expectedTotalLength / KILO_BITS_UNIT) + "kB");
                 }
                 break;
             default:
@@ -138,33 +148,33 @@
 
     public void progress(IvyEvent event) {
         if (event instanceof TransferEvent) {
-            if (_dlmonitor != null) {
+            if (dlmonitor != null) {
                 transferProgress((TransferEvent) event);
             }
         } else if (event instanceof PrepareDownloadEvent) {
             PrepareDownloadEvent pde = (PrepareDownloadEvent) event;
             Artifact[] artifacts = pde.getArtifacts();
             if (artifacts.length > 0) {
-                _workPerArtifact = 1000 / artifacts.length;
+                workPerArtifact = MONITOR_LENGTH / artifacts.length;
             }
         } else if (event instanceof StartArtifactDownloadEvent) {
             StartArtifactDownloadEvent evt = (StartArtifactDownloadEvent) event;
-            _monitor.setTaskName("downloading " + evt.getArtifact());
-            if (_dlmonitor != null) {
-                _dlmonitor.done();
+            monitor.setTaskName("downloading " + evt.getArtifact());
+            if (dlmonitor != null) {
+                dlmonitor.done();
             }
-            _dlmonitor = new SubProgressMonitor(_monitor, _workPerArtifact);
+            dlmonitor = new SubProgressMonitor(monitor, workPerArtifact);
         } else if (event instanceof EndArtifactDownloadEvent) {
-            if (_dlmonitor != null) {
-                _dlmonitor.done();
+            if (dlmonitor != null) {
+                dlmonitor.done();
             }
-            _monitor.subTask(" ");
-            _dlmonitor = null;
+            monitor.subTask(" ");
+            dlmonitor = null;
         } else if (event instanceof StartResolveDependencyEvent) {
             StartResolveDependencyEvent ev = (StartResolveDependencyEvent) event;
-            _monitor.subTask("resolving " + ev.getDependencyDescriptor().getDependencyRevisionId());
+            monitor.subTask("resolving " + ev.getDependencyDescriptor().getDependencyRevisionId());
         } else if (event instanceof EndResolveDependencyEvent) {
-            _monitor.subTask(" ");
+            monitor.subTask(" ");
         }
     }
 
@@ -179,9 +189,9 @@
         return result;
     }
 
-    protected IStatus run(IProgressMonitor monitor) {
-        Message.info("resolving dependencies of " + conf.ivyXmlPath);
-        _monitor = monitor;
+    protected IStatus run(IProgressMonitor m) {
+        Message.info("resolving dependencies of " + conf);
+        this.monitor = m;
         final IStatus[] status = new IStatus[1];
         final IClasspathEntry[][] classpathEntries = new IClasspathEntry[1][];
 
@@ -197,28 +207,30 @@
                 try {
                     ivy.pushContext();
                     ivy.getEventManager().addIvyListener(IvyResolveJob.this);
-    
-                    _monitor.beginTask("resolving dependencies", 1000);
-                    _monitor.setTaskName("resolving dependencies...");
-    
+
+                    monitor.beginTask("resolving dependencies", MONITOR_LENGTH);
+                    monitor.setTaskName("resolving dependencies...");
+
                     String[] confs;
                     Collection/* <ArtifactDownloadReport> */all;
                     List problemMessages;
-    
+
                     // context Classloader hook for commonlogging used by httpclient
                     ClassLoader old = Thread.currentThread().getContextClassLoader();
-                    Thread.currentThread().setContextClassLoader(IvyResolveJob.class.getClassLoader());
+                    Thread.currentThread().setContextClassLoader(
+                        IvyResolveJob.class.getClassLoader());
                     try {
                         Map dependencies = Collections.EMPTY_MAP;
-                        if (_usePreviousResolveIfExist) {
+                        if (usePreviousResolveIfExist) {
                             if (conf.confs.size() == 1 && "*".equals(conf.confs.get(0))) {
                                 confs = md.getConfigurationsNames();
                             } else {
-                                confs = (String[]) conf.confs.toArray(new String[conf.confs.size()]);
+                                confs = (String[]) conf.confs
+                                        .toArray(new String[conf.confs.size()]);
                             }
-    
+
                             all = new LinkedHashSet();
-    
+
                             problemMessages = new ArrayList();
                             // we check if all required configurations have been
                             // resolved
@@ -236,7 +248,8 @@
                                         resolved = true;
                                     } catch (ParseException e) {
                                         Message.info("\n\nIVYDE: Error while parsing the report "
-                                                + report + ". Falling back by doing a resolve again.");
+                                                + report
+                                                + ". Falling back by doing a resolve again.");
                                         // it fails, so let's try resolving
                                     }
                                 }
@@ -256,7 +269,7 @@
                                     dependencies = listDependencies(r);
                                     problemMessages.addAll(r.getAllProblemMessages());
                                     maybeRetrieve(md, confs);
-    
+
                                     break;
                                 }
                             }
@@ -271,40 +284,44 @@
                             all = new LinkedHashSet(Arrays.asList(report.getArtifactsReports(null,
                                 false)));
                             confs = report.getConfigurations();
-    
+
                             dependencies = listDependencies(report);
-    
-                            if (_monitor.isCanceled()) {
+
+                            if (monitor.isCanceled()) {
                                 status[0] = Status.CANCEL_STATUS;
                                 return;
                             }
-    
+
                             maybeRetrieve(md, confs);
                         }
-    
+
                         warnIfDuplicates(all);
-    
+
                         classpathEntries[0] = artifacts2ClasspathEntries(all, dependencies);
                     } catch (ParseException e) {
-                        String errorMsg = "Error while parsing the ivy file " + conf.ivyXmlPath + "\n"
-                                + e.getMessage();
+                        String errorMsg = "Error while parsing the ivy file " + conf.ivyXmlPath
+                                + "\n" + e.getMessage();
                         Message.error(errorMsg);
-                        status[0] = new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, errorMsg, e);
+                        status[0] = new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR,
+                                errorMsg, e);
                         return;
                     } catch (Exception e) {
-                        String errorMsg = "Error while resolving dependencies for " + conf.ivyXmlPath
-                                + "\n" + e.getMessage();
+                        String errorMsg = "Error while resolving dependencies for "
+                                + conf.ivyXmlPath + "\n" + e.getMessage();
                         Message.error(errorMsg);
-                        status[0] = new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, errorMsg, e);
+                        status[0] = new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR,
+                                errorMsg, e);
                         return;
                     } finally {
                         Thread.currentThread().setContextClassLoader(old);
-                        _monitor.done();
+                        monitor.done();
                         ivy.getEventManager().removeIvyListener(IvyResolveJob.this);
                     }
-    
+
                     if (!problemMessages.isEmpty()) {
-                        MultiStatus multiStatus = new MultiStatus(IvyPlugin.ID, IStatus.ERROR,
+                        MultiStatus multiStatus = new MultiStatus(
+                                IvyPlugin.ID,
+                                IStatus.ERROR,
                                 "Impossible to resolve dependencies of " + md.getModuleRevisionId(),
                                 null);
                         for (Iterator iter = problemMessages.iterator(); iter.hasNext();) {
@@ -314,14 +331,11 @@
                         status[0] = multiStatus;
                         return;
                     }
-    
+
                     status[0] = Status.OK_STATUS;
                 } catch (Throwable e) {
                     status[0] = new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR,
-                        "The resolve job of "
-                                + (conf.getJavaProject() == null ? "" : conf.getJavaProject()
-                                        .getProject().getName()
-                                        + "/") + conf.ivyXmlPath + " has unexpectedly stopped", e);                    
+                            "The resolve job of " + conf + " has unexpectedly stopped", e);
                 }
             }
         };
@@ -330,7 +344,7 @@
             resolver.start();
             while (true) {
                 try {
-                    resolver.join(100);
+                    resolver.join(WAIT_FOR_JOIN);
                 } catch (InterruptedException e) {
                     ivy.interrupt(resolver);
                     return Status.CANCEL_STATUS;
@@ -340,7 +354,7 @@
                         break;
                     }
                 }
-                if (_monitor.isCanceled()) {
+                if (monitor.isCanceled()) {
                     ivy.interrupt(resolver);
                     return Status.CANCEL_STATUS;
                 }
@@ -351,11 +365,8 @@
             setResolveStatus(status[0]);
             return status[0];
         } finally {
-            container.job = null;
-            IvyPlugin.log(IStatus.INFO, "resolved dependencies of "
-                    + (conf.getJavaProject() == null ? "" : conf.getJavaProject().getProject()
-                            .getName()
-                            + "/") + conf.ivyXmlPath, null);
+            container.resetJob();
+            IvyPlugin.log(IStatus.INFO, "resolved dependencies of " + conf, null);
         }
     }
 
@@ -382,6 +393,9 @@
                     case IStatus.INFO:
                         marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
                         break;
+                    default:
+                        IvyPlugin.log(IStatus.WARNING, "Unsupported resolve status: "
+                                + status.getSeverity(), null);
                 }
             } catch (CoreException e) {
                 IvyPlugin.log(e);
@@ -418,8 +432,8 @@
         }
         if (!duplicates.isEmpty()) {
             StringBuffer buffer = new StringBuffer(
-                    "There are some duplicates entries due to conflicts between the resolved configurations "
-                            + conf.confs);
+                    "There are some duplicates entries due to conflicts"
+                            + " between the resolved configurations " + conf.confs);
             buffer.append(":\n  - ");
             Iterator it = duplicates.iterator();
             while (it.hasNext()) {
@@ -436,7 +450,7 @@
         if (conf.getInheritedDoRetrieve()) {
             String pattern = conf.javaProject.getProject().getLocation().toPortableString() + "/"
                     + conf.getInheritedRetrievePattern();
-            _monitor.setTaskName("retrieving dependencies in " + pattern);
+            monitor.setTaskName("retrieving dependencies in " + pattern);
             RetrieveOptions c = new RetrieveOptions().setConfs(confs);
             c.setSync(conf.getInheritedRetrieveSync());
             ivy.retrieve(md.getModuleRevisionId(), pattern, c);
@@ -523,7 +537,7 @@
 
     private Path getSourcesArtifactPath(ArtifactDownloadReport adr, Collection all) {
         Artifact artifact = adr.getArtifact();
-        _monitor.subTask("searching sources for " + artifact);
+        monitor.subTask("searching sources for " + artifact);
         for (Iterator iter = all.iterator(); iter.hasNext();) {
             ArtifactDownloadReport otherAdr = (ArtifactDownloadReport) iter.next();
             Artifact a = otherAdr.getArtifact();
@@ -543,7 +557,7 @@
 
     private Path getJavadocArtifactPath(ArtifactDownloadReport adr, Collection all) {
         Artifact artifact = adr.getArtifact();
-        _monitor.subTask("searching javadoc for " + artifact);
+        monitor.subTask("searching javadoc for " + artifact);
         for (Iterator iter = all.iterator(); iter.hasNext();) {
             ArtifactDownloadReport otherAdr = (ArtifactDownloadReport) iter.next();
             Artifact a = otherAdr.getArtifact();
@@ -574,7 +588,7 @@
                 .getPublicationDate(), artifact.getName(), metaType, "jar", extraAtt);
         RepositoryCacheManager cache = ivy.getSettings()
                 .getResolver(artifact.getModuleRevisionId()).getRepositoryCacheManager();
-        if (! (cache instanceof DefaultRepositoryCacheManager)) {
+        if (!(cache instanceof DefaultRepositoryCacheManager)) {
             /*
              * we're not using a default implementation of repository cache manager, so we don't
              * cache attempts to locate metadata artifacts
@@ -584,19 +598,19 @@
                 return metaArtifactLocalPath;
             }
             Message.info(metaType + " not found for " + artifact);
-            Message.verbose(
-                "Attempt not stored in cache because a non Default cache implementation is used.");
+            Message
+                    .verbose("Attempt not stored in cache because a non Default cache implementation is used.");
             return null;
         }
-        
+
         File metaArtifactFile = ((DefaultRepositoryCacheManager) cache)
-                                                .getArchiveFileInCache(metaArtifact);
+                .getArchiveFileInCache(metaArtifact);
         File attempt = new File(metaArtifactFile.getAbsolutePath() + ".notfound");
         if (metaArtifactFile.exists()) {
             return new Path(metaArtifactFile.getAbsolutePath());
         } else if (attempt.exists()) {
             return null;
-        } 
+        }
         Path metaArtifactLocalPath = downloadMetaArtifact(adr, metaType, metaArtifact);
         if (metaArtifactLocalPath != null) {
             return metaArtifactLocalPath;
@@ -617,19 +631,18 @@
     private Path downloadMetaArtifact(ArtifactDownloadReport adr, String metaType,
             Artifact metaArtifact) {
         Artifact artifact = adr.getArtifact();
-        Message.info("checking " + metaType + " for " + artifact );
+        Message.info("checking " + metaType + " for " + artifact);
         ArtifactOrigin origin = ivy.getResolveEngine().locate(metaArtifact);
         if (!ArtifactOrigin.isUnknown(origin)) {
             /*
-             * fix for IVYDE-117: we need to check that the location of this metadata
-             * artifact is different from the original artifact
+             * fix for IVYDE-117: we need to check that the location of this metadata artifact is
+             * different from the original artifact
              */
-            if (adr.getArtifactOrigin() != null 
-                    && (ArtifactOrigin.isUnknown(adr.getArtifactOrigin())
-                            || !origin.getLocation()
-                                .equals(adr.getArtifactOrigin().getLocation()))) {
-                ArtifactDownloadReport metaAdr = ivy.getResolveEngine()
-                                            .download(origin, new DownloadOptions());
+            if (adr.getArtifactOrigin() != null
+                    && (ArtifactOrigin.isUnknown(adr.getArtifactOrigin()) || !origin.getLocation()
+                            .equals(adr.getArtifactOrigin().getLocation()))) {
+                ArtifactDownloadReport metaAdr = ivy.getResolveEngine().download(origin,
+                    new DownloadOptions());
                 File localFile = metaAdr.getLocalFile();
                 if (localFile != null && localFile.exists()) {
                     return new Path(localFile.getAbsolutePath());

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java Sat Sep  6 08:06:53 2008
@@ -79,41 +79,41 @@
 public class IvydeContainerPage extends NewElementWizardPage implements IClasspathContainerPage,
         IClasspathContainerPageExtension {
 
-    IJavaProject project;
+    private IJavaProject project;
 
-    Text ivyFilePathText;
+    private Text ivyFilePathText;
 
-    CheckboxTableViewer confTableViewer;
+    private CheckboxTableViewer confTableViewer;
 
-    Text settingsText;
+    private Text settingsText;
 
-    Text acceptedTypesText;
+    private Text acceptedTypesText;
 
-    Text sourcesTypesText;
+    private Text sourcesTypesText;
 
-    Text sourcesSuffixesText;
+    private Text sourcesSuffixesText;
 
-    Text javadocTypesText;
+    private Text javadocTypesText;
 
-    Text javadocSuffixesText;
+    private Text javadocSuffixesText;
 
-    Button doRetrieveButton;
+    private Button doRetrieveButton;
 
-    Text retrievePatternText;
+    private Text retrievePatternText;
 
-    Button alphaOrderCheck;
+    private Button alphaOrderCheck;
 
-    Button resolveInWorkspaceCheck;
+    private Button resolveInWorkspaceCheck;
 
-    Button projectSpecificButton;
+    private Button projectSpecificButton;
 
-    Button browse;
+    private Button browse;
 
-    Link generalSettingsLink;
+    private Link generalSettingsLink;
 
-    Composite configComposite;
+    private Composite configComposite;
 
-    IvyClasspathContainerConfiguration conf;
+    private IvyClasspathContainerConfiguration conf;
 
     private IClasspathEntry entry;
 
@@ -139,7 +139,6 @@
 
     /**
      * Constructor
-     * 
      */
     public IvydeContainerPage() {
         super("IvyDE Container");
@@ -223,7 +222,7 @@
                 if (item == mainTab && ivyXmlError != null) {
                     ivyFilePathTextDeco.showHoverText(ivyXmlError.getShortMsg());
                     settingsTextDeco.showHoverText(null);
-                } else if (item == advancedTab &&  settingsError != null) {
+                } else if (item == advancedTab && settingsError != null) {
                     settingsTextDeco.showHoverText(settingsError.getShortMsg());
                     ivyFilePathTextDeco.showHoverText(null);
                 }
@@ -242,6 +241,57 @@
         tabs.setFocus();
     }
 
+    private class BrowseButtonListener extends SelectionAdapter {
+        public void widgetSelected(SelectionEvent e) {
+            String path = null;
+            if (project != null) {
+                ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(Display
+                        .getDefault().getActiveShell(), new WorkbenchLabelProvider(),
+                        new WorkbenchContentProvider());
+                dialog.setValidator(new ISelectionStatusValidator() {
+                    private final IStatus errorStatus = new Status(IStatus.ERROR, IvyPlugin.ID, 0,
+                            "", null);
+
+                    public IStatus validate(Object[] selection) {
+                        if (selection.length == 0) {
+                            return errorStatus;
+                        }
+                        for (int i = 0; i < selection.length; i++) {
+                            Object o = selection[i];
+                            if (!(o instanceof IFile)) {
+                                return errorStatus;
+                            }
+                        }
+                        return Status.OK_STATUS;
+                    }
+
+                });
+                dialog.setTitle("choose ivy file");
+                dialog.setMessage("choose the ivy file to use to resolve dependencies");
+                dialog.setInput(project.getProject());
+                dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
+
+                if (dialog.open() == Window.OK) {
+                    Object[] elements = dialog.getResult();
+                    if (elements.length > 0 && elements[0] instanceof IFile) {
+                        IPath p = ((IFile) elements[0]).getProjectRelativePath();
+                        path = p.toString();
+                    }
+                }
+            } else {
+                FileDialog dialog = new FileDialog(IvyPlugin.getActiveWorkbenchShell(), SWT.OPEN);
+                dialog.setText("Choose an ivy.xml");
+                path = dialog.open();
+            }
+
+            if (path != null) {
+                conf.ivyXmlPath = path;
+                ivyFilePathText.setText(path);
+                ivyXmlPathUpdated();
+            }
+        }
+    }
+
     private Control createMainTab(Composite parent) {
         Composite composite = new Composite(parent, SWT.NONE);
         composite.setLayout(new GridLayout(3, false));
@@ -273,57 +323,7 @@
 
         Button btn = new Button(composite, SWT.NONE);
         btn.setText("Browse");
-        btn.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                String path = null;
-                if (project != null) {
-                    ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(Display
-                            .getDefault().getActiveShell(), new WorkbenchLabelProvider(),
-                            new WorkbenchContentProvider());
-                    dialog.setValidator(new ISelectionStatusValidator() {
-                        private final IStatus errorStatus = new Status(IStatus.ERROR, IvyPlugin.ID,
-                                0, "", null);
-
-                        public IStatus validate(Object[] selection) {
-                            if (selection.length == 0) {
-                                return errorStatus;
-                            }
-                            for (int i = 0; i < selection.length; i++) {
-                                Object o = selection[i];
-                                if (!(o instanceof IFile)) {
-                                    return errorStatus;
-                                }
-                            }
-                            return Status.OK_STATUS;
-                        }
-
-                    });
-                    dialog.setTitle("choose ivy file");
-                    dialog.setMessage("choose the ivy file to use to resolve dependencies");
-                    dialog.setInput(project.getProject());
-                    dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
-
-                    if (dialog.open() == Window.OK) {
-                        Object[] elements = dialog.getResult();
-                        if (elements.length > 0 && elements[0] instanceof IFile) {
-                            IPath p = ((IFile) elements[0]).getProjectRelativePath();
-                            path = p.toString();
-                        }
-                    }
-                } else {
-                    FileDialog dialog = new FileDialog(IvyPlugin.getActiveWorkbenchShell(),
-                            SWT.OPEN);
-                    dialog.setText("Choose an ivy.xml");
-                    path = dialog.open();
-                }
-
-                if (path != null) {
-                    conf.ivyXmlPath = path;
-                    ivyFilePathText.setText(path);
-                    ivyXmlPathUpdated();
-                }
-            }
-        });
+        btn.addSelectionListener(new BrowseButtonListener());
 
         // Label for ivy configurations field
         Label confLabel = new Label(composite, SWT.NONE);
@@ -465,8 +465,10 @@
         label.setText("Ivy settings path:");
 
         settingsText = new Text(configComposite, SWT.SINGLE | SWT.BORDER);
-        settingsText
-                .setToolTipText("The url where your ivysettings file can be found. \nUse 'default' to reference the default ivy settings. \nRelative paths are handled relative to the project. Example: 'file://./ivysettings.xml'.");
+        settingsText.setToolTipText("The url where your ivysettings file can be found. \n"
+                + "Use 'default' to reference the default ivy settings. \n"
+                + "Relative paths are handled relative to the project."
+                + " Example: 'file://./ivysettings.xml'.");
         settingsText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
         settingsText.addModifyListener(new ModifyListener() {
             public void modifyText(ModifyEvent e) {
@@ -510,8 +512,8 @@
         acceptedTypesText = new Text(configComposite, SWT.SINGLE | SWT.BORDER);
         acceptedTypesText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2,
                 1));
-        acceptedTypesText
-                .setToolTipText("Comma separated list of artifact types to use in IvyDE Managed Dependencies Library.\nExample: jar, zip");
+        acceptedTypesText.setToolTipText("Comma separated list of artifact types"
+                + " to use in IvyDE Managed Dependencies Library.\n" + "Example: jar, zip");
 
         label = new Label(configComposite, SWT.NONE);
         label.setText("Sources types:");
@@ -520,7 +522,8 @@
         sourcesTypesText.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false,
                 2, 1));
         sourcesTypesText
-                .setToolTipText("Comma separated list of artifact types to be used as sources.\nExample: source, src");
+                .setToolTipText("Comma separated list of artifact types to be used as sources.\n"
+                        + "Example: source, src");
 
         label = new Label(configComposite, SWT.NONE);
         label.setText("Sources suffixes:");
@@ -529,7 +532,8 @@
         sourcesSuffixesText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false,
                 2, 1));
         sourcesSuffixesText
-                .setToolTipText("Comma separated list of suffixes to match sources to artifacts.\nExample: -source, -src");
+                .setToolTipText("Comma separated list of suffixes to match sources to artifacts.\n"
+                        + "Example: -source, -src");
 
         label = new Label(configComposite, SWT.NONE);
         label.setText("Javadoc types:");
@@ -538,7 +542,8 @@
         javadocTypesText
                 .setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
         javadocTypesText
-                .setToolTipText("Comma separated list of artifact types to be used as javadoc.\nExample: javadoc.");
+                .setToolTipText("Comma separated list of artifact types to be used as javadoc.\n"
+                        + "Example: javadoc.");
 
         label = new Label(configComposite, SWT.NONE);
         label.setText("Javadoc suffixes:");
@@ -547,7 +552,8 @@
         javadocSuffixesText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false,
                 2, 1));
         javadocSuffixesText
-                .setToolTipText("Comma separated list of suffixes to match javadocs to artifacts.\nExample: -javadoc, -doc");
+                .setToolTipText("Comma separated list of suffixes to match javadocs to artifacts.\n"
+                        + "Example: -javadoc, -doc");
 
         doRetrieveButton = new Button(configComposite, SWT.CHECK);
         doRetrieveButton.setText("Do retrieve after resolve");
@@ -561,8 +567,9 @@
         retrievePatternText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false,
                 2, 1));
         retrievePatternText.setEnabled(doRetrieveButton.getSelection());
-        retrievePatternText
-                .setToolTipText("Example: lib/[conf]/[artifact].[ext]\nTo copy artifacts in folder named lib without revision by folder named like configurations");
+        retrievePatternText.setToolTipText("Example: lib/[conf]/[artifact].[ext]\n"
+                + "To copy artifacts in folder named lib without revision by folder"
+                + " named like configurations");
 
         retrieveSyncButton = new Button(configComposite, SWT.CHECK);
         retrieveSyncButton.setText("Delete old retrieved artifacts");
@@ -710,7 +717,7 @@
         }
     }
 
-    public void initialize(IJavaProject p, IClasspathEntry currentEntries[]) {
+    public void initialize(IJavaProject p, IClasspathEntry[] currentEntries) {
         this.project = p;
     }
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/fragmentinfo/PreferenceStoreInfo.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/fragmentinfo/PreferenceStoreInfo.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/fragmentinfo/PreferenceStoreInfo.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/fragmentinfo/PreferenceStoreInfo.java Sat Sep  6 08:06:53 2008
@@ -33,14 +33,14 @@
 
     private static final String DOC_SUFFIX = "-doc";
 
-    private IPreferenceStore _preferenceStore;
+    private IPreferenceStore preferenceStore;
 
     public PreferenceStoreInfo(IPreferenceStore preferenceStore) {
-        _preferenceStore = preferenceStore;
+        this.preferenceStore = preferenceStore;
     }
 
     public IPath getSourceAttachment(Path path) {
-        String srcPath = _preferenceStore.getString(path.toPortableString() + SRC_SUFFIX);
+        String srcPath = preferenceStore.getString(path.toPortableString() + SRC_SUFFIX);
         if (!"".equals(srcPath)) {
             return new Path(srcPath);
         }
@@ -48,7 +48,7 @@
     }
 
     public IPath getSourceAttachmentRoot(Path path) {
-        String srcPath = _preferenceStore.getString(path.toPortableString() + SRCROOT_SUFFIX);
+        String srcPath = preferenceStore.getString(path.toPortableString() + SRCROOT_SUFFIX);
         if (!"".equals(srcPath)) {
             return new Path(srcPath);
         }
@@ -56,12 +56,13 @@
     }
 
     public URL getDocAttachment(Path path) {
-        String srcPath = _preferenceStore.getString(path.toPortableString() + DOC_SUFFIX);
+        String srcPath = preferenceStore.getString(path.toPortableString() + DOC_SUFFIX);
         if (!"".equals(srcPath)) {
             try {
                 return new URL(srcPath);
             } catch (MalformedURLException e) {
-                IvyPlugin.log(IStatus.WARNING, "The path for the doc attachement is not a valid URL", e);
+                IvyPlugin.log(IStatus.WARNING,
+                    "The path for the doc attachement is not a valid URL", e);
                 return null;
             }
         }
@@ -69,17 +70,17 @@
     }
 
     public void setSourceAttachmentPath(IPath containerPath, String entryPath, IPath sourcePath) {
-        _preferenceStore.setValue(entryPath + SRC_SUFFIX, sourcePath == null ? "" : sourcePath
+        preferenceStore.setValue(entryPath + SRC_SUFFIX, sourcePath == null ? "" : sourcePath
                 .toPortableString());
     }
 
     public void setSourceAttachmentRootPath(IPath containerPath, String entryPath, IPath rootPath) {
-        _preferenceStore.setValue(entryPath + SRCROOT_SUFFIX, rootPath == null ? "" : rootPath
+        preferenceStore.setValue(entryPath + SRCROOT_SUFFIX, rootPath == null ? "" : rootPath
                 .toPortableString());
     }
 
     public void setJavaDocLocation(IPath containerPath, String entryPath, URL libraryJavadocLocation) {
-        _preferenceStore.setValue(entryPath + DOC_SUFFIX, libraryJavadocLocation == null ? ""
+        preferenceStore.setValue(entryPath + DOC_SUFFIX, libraryJavadocLocation == null ? ""
                 : libraryJavadocLocation.toString());
     }
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheAction.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheAction.java Sat Sep  6 08:06:53 2008
@@ -65,7 +65,7 @@
     }
 
     public CleanCacheAction(Cleanable cleanable) {
-        this.cleanables = new Cleanable[] { cleanable };
+        this.cleanables = new Cleanable[] {cleanable};
     }
 
     public CleanCacheAction(Cleanable[] cleanables) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheMenuAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheMenuAction.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheMenuAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/CleanCacheMenuAction.java Sat Sep  6 08:06:53 2008
@@ -46,23 +46,23 @@
         ResolutionCacheCleanable resolutionCacheCleanable = new ResolutionCacheCleanable(
                 resolutionCacheManager);
 
-        RepositoryCacheManager[] repositoryCacheManagers = ivy.getSettings()
+        RepositoryCacheManager[] managers = ivy.getSettings()
                 .getRepositoryCacheManagers();
-        RepositoryCacheCleanable[] repositoryCacheCleanables = new RepositoryCacheCleanable[repositoryCacheManagers.length];
-        for (int i = 0; i < repositoryCacheManagers.length; i++) {
-            repositoryCacheCleanables[i] = new RepositoryCacheCleanable(repositoryCacheManagers[i]);
+        RepositoryCacheCleanable[] cleanables = new RepositoryCacheCleanable[managers.length];
+        for (int i = 0; i < managers.length; i++) {
+            cleanables[i] = new RepositoryCacheCleanable(managers[i]);
         }
 
-        Cleanable[] all = new Cleanable[repositoryCacheManagers.length + 1];
+        Cleanable[] all = new Cleanable[managers.length + 1];
         all[0] = resolutionCacheCleanable;
-        System.arraycopy(repositoryCacheCleanables, 0, all, 1, repositoryCacheManagers.length);
+        System.arraycopy(cleanables, 0, all, 1, managers.length);
 
         add(menu, "All", all);
         add(menu, "Resolution cache", resolutionCacheCleanable);
-        add(menu, "Every repository cache", repositoryCacheCleanables);
-        for (int i = 0; i < repositoryCacheManagers.length; i++) {
-            add(menu, "Cache '" + repositoryCacheManagers[i].getName() + "'",
-                repositoryCacheCleanables[i]);
+        add(menu, "Every repository cache", cleanables);
+        for (int i = 0; i < managers.length; i++) {
+            add(menu, "Cache '" + managers[i].getName() + "'",
+                cleanables[i]);
         }
     }
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerAction.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerAction.java Sat Sep  6 08:06:53 2008
@@ -39,5 +39,5 @@
         action.setEnabled(false);
     }
 
-    abstract protected void selectionChanged(IAction a, IvyClasspathContainer cp);
+    protected abstract void selectionChanged(IAction a, IvyClasspathContainer cp);
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerMenuAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerMenuAction.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerMenuAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/IvyDEContainerMenuAction.java Sat Sep  6 08:06:53 2008
@@ -27,13 +27,14 @@
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
 
-public abstract class IvyDEContainerMenuAction extends IvyDEContainerAction implements IMenuCreator {
+public abstract class IvyDEContainerMenuAction extends IvyDEContainerAction
+        implements IMenuCreator {
 
-    boolean selectionChanged;
+    private boolean selectionChanged;
 
     private IAction proxyAction;
 
-    IvyClasspathContainer cp;
+    private IvyClasspathContainer cp;
 
     private MenuListener menuListener = new MenuAdapter() {
         public void menuShown(MenuEvent e) {
@@ -63,7 +64,7 @@
         return menu;
     }
 
-    abstract protected void fill(Menu menu, IvyClasspathContainer ivycp);
+    protected abstract void fill(Menu menu, IvyClasspathContainer ivycp);
 
     public void run(IAction action) {
         // nothing to run

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/ResolveAllAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/ResolveAllAction.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/ResolveAllAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/actions/ResolveAllAction.java Sat Sep  6 08:06:53 2008
@@ -65,7 +65,8 @@
                 }
                 List containers = new ArrayList();
                 for (int i = 0; i < projects.length; i++) {
-                    IvyClasspathContainer cp = IvyClasspathUtil.getIvyClasspathContainer(projects[i]);
+                    IvyClasspathContainer cp = IvyClasspathUtil
+                            .getIvyClasspathContainer(projects[i]);
                     if (cp != null) {
                         containers.add(cp);
                     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/ConsoleDocument.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/ConsoleDocument.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/ConsoleDocument.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/ConsoleDocument.java Sat Sep  6 08:06:53 2008
@@ -78,8 +78,9 @@
     }
 
     public ConsoleLine[] getLines() {
-        if (isEmpty())
+        if (isEmpty()) {
             return new ConsoleLine[0];
+        }
         ConsoleLine[] docLines = new ConsoleLine[readIndex > writeIndex ? BUFFER_SIZE : writeIndex];
         int index = readIndex;
         for (int i = 0; i < docLines.length; i++) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java Sat Sep  6 08:06:53 2008
@@ -70,9 +70,11 @@
     }
 
     public void endProgress(String msg) {
+        // nothing to log
     }
 
     public void progress() {
+        // nothing to step
     }
 
     public void log(String msg, int level) {
@@ -109,11 +111,6 @@
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.ui.console.AbstractConsole#init()
-     */
     protected void init() {
         // Called when console is added to the console view
         super.init();
@@ -133,7 +130,7 @@
     private void initializeStreams() {
         synchronized (document) {
             if (!initialized) {
-                for (int i = 0; i < 5; i++) {
+                for (int i = 0; i < streams.length; i++) {
                     streams[i] = newMessageStream();
                 }
 
@@ -190,6 +187,7 @@
         RGB rgb = PreferenceConverter.getColor(IvyPlugin.getDefault().getPreferenceStore(),
             preference);
         if (rgb == PreferenceConverter.COLOR_DEFAULT_DEFAULT) {
+            //CheckStyle:MagicNumber| OFF
             if (PREF_CONSOLE_DEBUG_COLOR.equals(preference)) {
                 rgb = new RGB(180, 180, 255);
             } else if (PREF_CONSOLE_VERBOSE_COLOR.equals(preference)) {
@@ -199,6 +197,7 @@
             } else if (PREF_CONSOLE_ERROR_COLOR.equals(preference)) {
                 rgb = new RGB(255, 0, 0);
             }
+            //CheckStyle:MagicNumber| ON
         }
         return new Color(display, rgb);
     }
@@ -211,10 +210,11 @@
      */
     public void show(boolean showNoMatterWhat) {
         if (showNoMatterWhat || showOnMessage) {
-            if (!visible)
+            if (!visible) {
                 IvyConsoleFactory.showConsole();
-            else
+            } else {
                 consoleManager.showConsoleView(this);
+            }
         }
 
     }
@@ -228,67 +228,32 @@
 
     private boolean showProgress = true;
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#debug(java.lang.String)
-     */
     public void debug(String msg) {
         log(msg, Message.MSG_DEBUG);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#verbose(java.lang.String)
-     */
     public void verbose(String msg) {
         log(msg, Message.MSG_VERBOSE);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#deprecated(java.lang.String)
-     */
     public void deprecated(String msg) {
         log("DEPRECATED: " + msg, Message.MSG_WARN);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#info(java.lang.String)
-     */
     public void info(String msg) {
         log(msg, Message.MSG_INFO);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#info(java.lang.String)
-     */
     public void rawinfo(String msg) {
         rawlog(msg, Message.MSG_INFO);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#warn(java.lang.String)
-     */
     public void warn(String msg) {
         log("WARN: " + msg, Message.MSG_VERBOSE);
         problems.add("WARN:  " + msg);
         getWarns().add(msg);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#error(java.lang.String)
-     */
     public void error(String msg) {
         // log in verbose mode because message is appended as a problem, and will be
         // logged at the end at error level
@@ -297,20 +262,10 @@
         getErrors().add(msg);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#getProblems()
-     */
     public List getProblems() {
         return problems;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#sumupProblems()
-     */
     public void sumupProblems() {
         MessageLoggerHelper.sumupProblems(this);
         clearProblems();
@@ -330,29 +285,14 @@
         return warns;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#endProgress()
-     */
     public void endProgress() {
         endProgress("");
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#isShowProgress()
-     */
     public boolean isShowProgress() {
         return showProgress;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.ivy.util.MessageLogger#setShowProgress(boolean)
-     */
     public void setShowProgress(boolean progress) {
         showProgress = progress;
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFactory.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFactory.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFactory.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFactory.java Sat Sep  6 08:06:53 2008
@@ -35,11 +35,13 @@
             IConsole[] existing = manager.getConsoles();
             boolean exists = false;
             for (int i = 0; i < existing.length; i++) {
-                if (console == existing[i])
+                if (console == existing[i]) {
                     exists = true;
+                }
             }
-            if (!exists)
+            if (!exists) {
                 manager.addConsoles(new IConsole[] {console});
+            }
             manager.showConsoleView(console);
         }
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/core/IvyFileEditorInput.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/core/IvyFileEditorInput.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/core/IvyFileEditorInput.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/core/IvyFileEditorInput.java Sat Sep  6 08:06:53 2008
@@ -28,15 +28,15 @@
 import org.eclipse.ui.IStorageEditorInput;
 
 public class IvyFileEditorInput implements IPathEditorInput, IStorageEditorInput, IFileEditorInput {
-    private IFile _ivyFile;
+    private IFile ivyFile;
 
     public IvyFileEditorInput(IFile input) {
         super();
-        _ivyFile = input;
+        ivyFile = input;
     }
 
     public boolean exists() {
-        return _ivyFile.exists();
+        return ivyFile.exists();
     }
 
     public ImageDescriptor getImageDescriptor() {
@@ -44,28 +44,19 @@
     }
 
     public String getName() {
-        return _ivyFile.getName();
+        return ivyFile.getName();
     }
 
-    /*
-     * (non-Javadoc) Method declared on IEditorInput.
-     */
     public String getToolTipText() {
-        return _ivyFile.getFullPath().makeRelative().toString();
+        return ivyFile.getFullPath().makeRelative().toString();
     }
 
-    /*
-     * (non-Javadoc) Method declared on IPathEditorInput
-     * 
-     * @since 3.0 @issue consider using an internal adapter for IPathEditorInput rather than adding
-     *        this as API
-     */
     public IPath getPath() {
-        return _ivyFile.getLocation();
+        return ivyFile.getLocation();
     }
 
     public String toString() {
-        return getClass().getName() + "(" + _ivyFile.getFullPath() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+        return getClass().getName() + "(" + ivyFile.getFullPath() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     public Object getAdapter(Class adapter) {
@@ -77,11 +68,11 @@
     }
 
     public IStorage getStorage() throws CoreException {
-        return _ivyFile;
+        return ivyFile;
     }
 
     public IFile getFile() {
-        return _ivyFile;
+        return ivyFile;
     }
 
     public boolean equals(Object obj) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditor.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditor.java Sat Sep  6 08:06:53 2008
@@ -54,11 +54,11 @@
 import org.eclipse.ui.part.FileEditorInput;
 
 public class IvyModuleDescriptorEditor extends FormEditor implements IResourceChangeListener {
-    public final static String ID = "org.apache.ivyde.editors.IvyEditor";
+    public static final String ID = "org.apache.ivyde.editors.IvyEditor";
 
     private XMLEditor xmlEditor;
 
-    private Browser _browser;
+    private Browser browser;
 
     /**
      * Creates a multi-page editor example.
@@ -91,8 +91,8 @@
         try {
             xmlEditor = new XMLEditor(new IvyContentAssistProcessor() {
                 protected IvyModel newCompletionModel(IFile file) {
-                    return new IvyModuleDescriptorModel(
-                        new EclipseIvyModelSettings(getJavaProject()));
+                    return new IvyModuleDescriptorModel(new EclipseIvyModelSettings(
+                            getJavaProject()));
                 }
             }) {
                 public void doSave(IProgressMonitor progressMonitor) {
@@ -122,9 +122,9 @@
 
     void createPagePreview() {
         try {
-            _browser = new Browser(getContainer(), SWT.NONE);
-            _browser.setUrl(((IvyFileEditorInput) getEditorInput()).getPath().toOSString());
-            int index = addPage(_browser);
+            browser = new Browser(getContainer(), SWT.NONE);
+            browser.setUrl(((IvyFileEditorInput) getEditorInput()).getPath().toOSString());
+            int index = addPage(browser);
             setPageText(index, "Preview");
         } catch (SWTError e) {
             // IVYDE-10: under Linux if MOZILLA_FIVE_HOME is not set, it fails badly
@@ -181,9 +181,6 @@
         setInput(xmlEditor.getEditorInput());
     }
 
-    /*
-     * (non-Javadoc) Method declared on IEditorPart
-     */
     public void gotoMarker(IMarker marker) {
         setActivePage(0);
         IDE.gotoMarker(getEditor(0), marker);
@@ -194,14 +191,12 @@
      * is an instance of <code>IFileEditorInput</code>.
      */
     public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
-        if (!(editorInput instanceof IFileEditorInput))
+        if (!(editorInput instanceof IFileEditorInput)) {
             throw new PartInitException("Invalid Input: Must be IFileEditorInput");
+        }
         super.init(site, editorInput);
     }
 
-    /*
-     * (non-Javadoc) Method declared on IEditorPart.
-     */
     public boolean isSaveAsAllowed() {
         return xmlEditor.isSaveAsAllowed();
     }
@@ -212,7 +207,7 @@
     protected void pageChange(int newPageIndex) {
         super.pageChange(newPageIndex);
         if (newPageIndex == 1) {
-            _browser.refresh();
+            browser.refresh();
         }
     }
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditorContributor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditorContributor.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditorContributor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvyModuleDescriptorEditorContributor.java Sat Sep  6 08:06:53 2008
@@ -54,13 +54,10 @@
         return (editor == null ? null : editor.getAction(actionID));
     }
 
-    /*
-     * (non-JavaDoc) Method declared in AbstractMultiPageEditorActionBarContributor.
-     */
-
     public void setActivePage(IEditorPart part) {
-        if (activeEditorPart == part)
+        if (activeEditorPart == part) {
             return;
+        }
 
         activeEditorPart = part;
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java Sat Sep  6 08:06:53 2008
@@ -47,7 +47,7 @@
 import org.eclipse.ui.part.FileEditorInput;
 
 public class IvySettingsEditor extends FormEditor implements IResourceChangeListener {
-    public final static String ID = "org.apache.ivyde.editors.IvySettingsEditor";
+    public static final String ID = "org.apache.ivyde.editors.IvySettingsEditor";
 
     private XMLEditor xmlEditor;
 
@@ -152,14 +152,12 @@
      * is an instance of <code>IFileEditorInput</code>.
      */
     public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
-        if (!(editorInput instanceof IFileEditorInput))
+        if (!(editorInput instanceof IFileEditorInput)) {
             throw new PartInitException("Invalid Input: Must be IFileEditorInput");
+        }
         super.init(site, editorInput);
     }
 
-    /*
-     * (non-Javadoc) Method declared on IEditorPart.
-     */
     public boolean isSaveAsAllowed() {
         return xmlEditor.isSaveAsAllowed();
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyConfSection.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyConfSection.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyConfSection.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyConfSection.java Sat Sep  6 08:06:53 2008
@@ -28,9 +28,9 @@
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 public class IvyConfSection extends SectionPart {
-    IFormPage page;
+    private IFormPage page;
 
-    private static int NUM_COLUMNS = 2;
+    private static final int NUM_COLUMNS = 2;
 
     public IvyConfSection(IFormPage page, Composite parent, int style, boolean titleBar) {
         super(parent, page.getManagedForm().getToolkit(),
@@ -41,11 +41,13 @@
 
     protected void createClient(Section section, FormToolkit toolkit) {
         section.setText("Configurations"); //$NON-NLS-1$
-        section.setDescription("This section describe the configurations defined in your project"); //$NON-NLS-1$
+        String desc = "This section describe the configurations defined in your project";
+        section.setDescription(desc);
 
         Composite client = toolkit.createComposite(section);
         TableWrapLayout layout = new TableWrapLayout();
-        layout.leftMargin = layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
+        layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
+        layout.leftMargin = layout.rightMargin;
         layout.numColumns = NUM_COLUMNS;
         client.setLayout(layout);
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyInfoSection.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyInfoSection.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyInfoSection.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/IvyInfoSection.java Sat Sep  6 08:06:53 2008
@@ -33,9 +33,9 @@
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 public class IvyInfoSection extends SectionPart implements PropertyChangeListener {
-    IFormPage page;
+    private IFormPage page;
 
-    private static int NUM_COLUMNS = 2;
+    private static final int NUM_COLUMNS = 2;
 
     public IvyInfoSection(IFormPage page, Composite parent, int style, boolean titleBar) {
         super(parent, page.getManagedForm().getToolkit(),
@@ -48,11 +48,13 @@
 
     protected void createClient(Section section, FormToolkit toolkit) {
         section.setText("General Information"); //$NON-NLS-1$
-        section.setDescription("This section describe the general information about your project"); //$NON-NLS-1$
+        String desc = "This section describe the general information about your project";
+        section.setDescription(desc);
 
         Composite client = toolkit.createComposite(section);
         TableWrapLayout layout = new TableWrapLayout();
-        layout.leftMargin = layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
+        layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
+        layout.leftMargin = layout.rightMargin;
         layout.numColumns = 2;
         client.setLayout(layout);
         IvyFileEditorInput editorInput = (IvyFileEditorInput) page.getEditorInput();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/OverviewFormPage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/OverviewFormPage.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/OverviewFormPage.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/pages/OverviewFormPage.java Sat Sep  6 08:06:53 2008
@@ -21,9 +21,8 @@
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
 import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
 
 public class OverviewFormPage extends FormPage {
@@ -40,15 +39,15 @@
     protected void createFormContent(IManagedForm managedForm) {
         super.createFormContent(managedForm);
         ScrolledForm form = managedForm.getForm();
-        FormToolkit toolkit = managedForm.getToolkit();
         form.setText("Overview");
-        fillBody(managedForm, toolkit);
+        fillBody(managedForm);
         managedForm.refresh();
     }
 
-    private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
+    private void fillBody(IManagedForm managedForm) {
         Composite body = managedForm.getForm().getBody();
         TableWrapLayout layout = new TableWrapLayout();
+        //CheckStyle:MagicNumber| OFF
         layout.bottomMargin = 10;
         layout.topMargin = 5;
         layout.leftMargin = 10;
@@ -57,10 +56,11 @@
         layout.makeColumnsEqualWidth = true;
         layout.verticalSpacing = 30;
         layout.horizontalSpacing = 10;
+        //CheckStyle:MagicNumber| ON
         body.setLayout(layout);
 
         // sections
-        managedForm.addPart(new IvyInfoSection(this, body, Section.TWISTIE, true));
-        managedForm.addPart(new IvyConfSection(this, body, Section.TWISTIE, true));
+        managedForm.addPart(new IvyInfoSection(this, body, ExpandableComposite.TWISTIE, true));
+        managedForm.addPart(new IvyConfSection(this, body, ExpandableComposite.TWISTIE, true));
     }
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/ColorManager.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/ColorManager.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/ColorManager.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/ColorManager.java Sat Sep  6 08:06:53 2008
@@ -27,12 +27,13 @@
 
 public class ColorManager {
 
-    protected Map fColorTable = new HashMap(10);
+    private Map fColorTable = new HashMap();
 
     public void dispose() {
         Iterator e = fColorTable.values().iterator();
-        while (e.hasNext())
+        while (e.hasNext()) {
             ((Color) e.next()).dispose();
+        }
     }
 
     public Color getColor(RGB rgb) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/EclipseIvyModelSettings.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/EclipseIvyModelSettings.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/EclipseIvyModelSettings.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/EclipseIvyModelSettings.java Sat Sep  6 08:06:53 2008
@@ -49,6 +49,9 @@
     }
 
     public Ivy getIvyInstance() {
+        if (cp == null) {
+            return null;
+        }
         try {
             return cp.getConf().getIvy();
         } catch (IvyDEException e) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IXMLColorConstants.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IXMLColorConstants.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IXMLColorConstants.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IXMLColorConstants.java Sat Sep  6 08:06:53 2008
@@ -19,14 +19,19 @@
 
 import org.eclipse.swt.graphics.RGB;
 
-public interface IXMLColorConstants {
-    RGB XML_COMMENT = new RGB(128, 0, 0);
+public final class IXMLColorConstants {
 
-    RGB PROC_INSTR = new RGB(128, 128, 128);
+    private IXMLColorConstants() {
+        // utility class
+    }
 
-    RGB STRING = new RGB(0, 128, 0);
+    public static final RGB XML_COMMENT = new RGB(128, 0, 0);
 
-    RGB DEFAULT = new RGB(0, 0, 0);
+    public static final RGB PROC_INSTR = new RGB(128, 128, 128);
 
-    RGB TAG = new RGB(0, 0, 128);
+    public static final RGB STRING = new RGB(0, 128, 0);
+
+    public static final RGB DEFAULT = new RGB(0, 0, 0);
+
+    public static final RGB TAG = new RGB(0, 0, 128);
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IvyContentAssistProcessor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IvyContentAssistProcessor.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IvyContentAssistProcessor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/IvyContentAssistProcessor.java Sat Sep  6 08:06:53 2008
@@ -17,21 +17,10 @@
  */
 package org.apache.ivyde.eclipse.ui.editors.xml;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.ivyde.common.completion.CodeCompletionProposal;
 import org.apache.ivyde.common.completion.IvyCodeCompletionProcessor;
-import org.apache.ivyde.common.ivyfile.IvyModuleDescriptorModel;
 import org.apache.ivyde.common.model.IvyFile;
 import org.apache.ivyde.common.model.IvyModel;
-import org.apache.ivyde.common.model.IvyTag;
-import org.apache.ivyde.common.model.IvyTagAttribute;
-import org.apache.ivyde.common.model.Proposal;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -76,19 +65,18 @@
             return null;
         }
         IProject project = getProject();
-        IvyFile ivyfile = completionProcessor.getModel().newIvyFile(project != null ? project.getName() : "", ivyFileString,
-                documentOffset);
-        CodeCompletionProposal[] proposals = 
-            completionProcessor.computeCompletionProposals(ivyfile, selectedRange.y);
-        
+        IvyFile ivyfile = completionProcessor.getModel().newIvyFile(
+            project != null ? project.getName() : "", ivyFileString, documentOffset);
+        CodeCompletionProposal[] proposals = completionProcessor.computeCompletionProposals(
+            ivyfile, selectedRange.y);
+
         // convert code completion proposal into eclipse ICompletionProposal
         ICompletionProposal[] ret = new ICompletionProposal[proposals.length];
         for (int i = 0; i < proposals.length; i++) {
             CodeCompletionProposal prop = proposals[i];
-            ret[i] = new CompletionProposal(
-                prop.getReplacementString(), prop.getReplacementOffset(), 
-                prop.getReplacementLength(), prop.getCursorPosition(), 
-                null, prop.getDisplayString(), null, prop.getDoc());
+            ret[i] = new CompletionProposal(prop.getReplacementString(), prop
+                    .getReplacementOffset(), prop.getReplacementLength(), prop.getCursorPosition(),
+                    null, prop.getDisplayString(), null, prop.getDoc());
         }
 
         return ret;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/NonRuleBasedDamagerRepairer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/NonRuleBasedDamagerRepairer.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/NonRuleBasedDamagerRepairer.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/NonRuleBasedDamagerRepairer.java Sat Sep  6 08:06:53 2008
@@ -69,8 +69,9 @@
     protected int endOfLineOf(int offset) throws BadLocationException {
 
         IRegion info = fDocument.getLineInformationOfOffset(offset);
-        if (offset <= info.getOffset() + info.getLength())
+        if (offset <= info.getOffset() + info.getLength()) {
             return info.getOffset() + info.getLength();
+        }
 
         int line = fDocument.getLineOfOffset(offset);
         try {
@@ -98,8 +99,9 @@
                 if (info.getOffset() <= end && end <= info.getOffset() + info.getLength()) {
                     // optimize the case of the same line
                     end = info.getOffset() + info.getLength();
-                } else
+                } else {
                     end = endOfLineOf(end);
+                }
 
                 end = Math.min(partition.getOffset() + partition.getLength(), end);
                 return new Region(start, end - start);
@@ -134,8 +136,9 @@
      */
     protected void addRange(TextPresentation presentation, int offset, int length,
             TextAttribute attr) {
-        if (attr != null)
+        if (attr != null) {
             presentation.addStyleRange(new StyleRange(offset, length, attr.getForeground(), attr
                     .getBackground(), attr.getStyle()));
+        }
     }
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLConfiguration.java?rev=692658&r1=692657&r2=692658&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLConfiguration.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/xml/XMLConfiguration.java Sat Sep  6 08:06:53 2008
@@ -46,13 +46,13 @@
 
     private IProject project;
 
-    private IvyContentAssistProcessor _processor;
+    private IvyContentAssistProcessor processor;
 
-    private IFile _file;
+    private IFile file;
 
     public XMLConfiguration(ColorManager colorManager, IvyContentAssistProcessor processor) {
         this.colorManager = colorManager;
-        this._processor = processor;
+        this.processor = processor;
     }
 
     public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
@@ -62,8 +62,9 @@
 
     public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer,
             String contentType) {
-        if (doubleClickStrategy == null)
+        if (doubleClickStrategy == null) {
             doubleClickStrategy = new XMLDoubleClickStrategy();
+        }
         return doubleClickStrategy;
     }
 
@@ -115,20 +116,20 @@
             }
         });
 
-        _processor.setFile(_file);
+        processor.setFile(file);
         // Set this processor for each supported content type
-        assistant.setContentAssistProcessor(_processor, XMLPartitionScanner.XML_TAG);
-        assistant.setContentAssistProcessor(_processor, XMLPartitionScanner.XML_DEFAULT);
-        assistant.setContentAssistProcessor(_processor, IDocument.DEFAULT_CONTENT_TYPE);
+        assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_TAG);
+        assistant.setContentAssistProcessor(processor, XMLPartitionScanner.XML_DEFAULT);
+        assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
 
         // Return the content assistant
         return assistant;
     }
 
     public void setFile(IFile file) {
-        if (_processor != null) {
-            _processor.setFile(file);
+        if (processor != null) {
+            processor.setFile(file);
         }
-        _file = file;
+        this.file = file;
     }
 }