ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1406849 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: ./ cpcontainer/ resolve/ ui/console/ ui/menu/ ui/preferences/ ui/views/ workspaceresolver/
Date Wed, 07 Nov 2012 22:48:12 GMT
Author: hibou
Date: Wed Nov  7 22:48:10 2012
New Revision: 1406849

URL: http://svn.apache.org/viewvc?rev=1406849&view=rev
Log:
Separate Ivy messages from IvyDE ones

Added:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java   (with props)
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java   (with props)
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java   (with props)
Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEException.java
    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/ClasspathEntriesResolver.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyAttachementManager.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsole.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFilterAction.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/CleanCacheAction.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java Wed Nov  7 22:48:10 2012
@@ -33,7 +33,6 @@ import org.apache.ivy.core.cache.Default
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.settings.IvySettings;
 import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;
-import org.apache.ivy.util.Message;
 import org.apache.ivyde.eclipse.workspaceresolver.WorkspaceIvySettings;
 import org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver;
 import org.eclipse.core.resources.IProject;
@@ -133,7 +132,7 @@ public abstract class CachedIvy {
                             + settingsPath.getError().getMessage(), settingsPath.getError());
         }
         if (!settingsPath.isSet()) {
-            Message.debug("[IvyDE] No settings specified, so take the default one");
+            IvyDEMessage.debug("No settings specified, so take the default one");
             if (ivy == null) {
                 IvySettings ivySettings = createIvySettings();
                 ivy = Ivy.newInstance(ivySettings);
@@ -184,7 +183,7 @@ public abstract class CachedIvy {
 
     private Ivy getIvyFromFile(ResolvedPath ivySettingsPath) throws IvyDEException {
         File file = ivySettingsPath.getFile();
-        Message.debug("[IvyDE] Loading settings from local file " + file);
+        IvyDEMessage.debug("Loading settings from local file " + file);
         if (!file.exists()) {
             throw new IvyDEException("Ivy settings file not found", "The Ivy settings file '"
                     + ivySettingsPath.getResolvedPath() + "' cannot be found", null);
@@ -193,7 +192,7 @@ public abstract class CachedIvy {
         if (file.lastModified() != ivySettingsLastModified || !isLoadSettingsOnDemandPath()) {
             IvySettings ivySettings = createIvySettings();
             if (ivySettingsLastModified != -1) {
-                Message.info("[IvyDE] Settings has changed, configuring Ivy again");
+                IvyDEMessage.info("Settings has changed, configuring Ivy again");
             }
             ivy = Ivy.newInstance(ivySettings);
             try {
@@ -211,7 +210,7 @@ public abstract class CachedIvy {
             }
             ivySettingsLastModified = file.lastModified();
         } else {
-            Message.verbose("[IvyDE] No change detected: using cached version of the settings");
+            IvyDEMessage.verbose("No change detected: using cached version of the settings");
         }
         return ivy;
     }
@@ -219,7 +218,7 @@ public abstract class CachedIvy {
     private IvySettings createIvySettings() throws IvyDEException {
         IvySettings ivySettings;
         if (isResolveInWorkspace()) {
-            Message.verbose("[IvyDE] Adding the workspace resolver to the settings");
+            IvyDEMessage.verbose("Adding the workspace resolver to the settings");
             ivySettings = new WorkspaceIvySettings(getProject());
             DefaultRepositoryCacheManager cacheManager = new DefaultRepositoryCacheManager();
             BundleContext bundleContext = IvyPlugin.getDefault().getBundleContext();
@@ -248,13 +247,13 @@ public abstract class CachedIvy {
         }
         Collection propFiles = getPropertyFiles();
         if (propFiles != null) {
-            Message.verbose("[IvyDE] Loading property files");
+            IvyDEMessage.verbose("Loading property files");
             Iterator iter = propFiles.iterator();
             while (iter.hasNext()) {
                 String file = (String) iter.next();
                 InputStream is;
                 Path p = new Path(file);
-                Message.debug("[IvyDE] Loading property file " + p);
+                IvyDEMessage.debug("Loading property file " + p);
                 if (getProject() != null && !p.isAbsolute()) {
                     try {
                         is = new FileInputStream(getProject().getLocation().append(file).toFile());

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEException.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEException.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEException.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEException.java Wed Nov  7 22:48:10 2012
@@ -17,7 +17,6 @@
  */
 package org.apache.ivyde.eclipse;
 
-import org.apache.ivy.util.Message;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -134,15 +133,15 @@ public class IvyDEException extends Exce
         String msg = (preMsg == null ? "" : preMsg) + getMessage();
         switch (status) {
             case IStatus.ERROR:
-                Message.error("[IvyDE] " + msg);
+                IvyDEMessage.error(msg);
                 return;
             case IStatus.CANCEL:
             case IStatus.WARNING:
-                Message.warn("[IvyDE] " + msg);
+                IvyDEMessage.warn(msg);
                 return;
             case IStatus.OK:
             case IStatus.INFO:
-                Message.info("[IvyDE] " + msg);
+                IvyDEMessage.info(msg);
                 return;
             default:
                 IvyPlugin.logWarn("Unsupported IvyDE error status: " + status);

Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java?rev=1406849&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java Wed Nov  7 22:48:10 2012
@@ -0,0 +1,168 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse;
+
+import java.util.List;
+
+import org.apache.ivy.util.Message;
+import org.apache.ivy.util.MessageLogger;
+import org.apache.ivy.util.StringUtils;
+import org.apache.ivyde.eclipse.ui.console.IvyConsole;
+
+public class IvyDEMessage {
+
+    public static void debug(String msg) {
+        getLogger().debug(msg);
+    }
+
+    private static MessageLogger getLogger() {
+        IvyPlugin plugin = IvyPlugin.getDefault();
+        if (plugin == null) {
+            return NopMessageLogger.INSTANCE;
+        }
+        IvyConsole console = plugin.getConsole();
+        if (console == null) {
+            return NopMessageLogger.INSTANCE;
+        }
+        return console.getIvyDEMessageLogger();
+    }
+
+    public static void verbose(String msg) {
+        getLogger().verbose(msg);
+    }
+
+    public static void info(String msg) {
+        getLogger().info(msg);
+    }
+
+    public static void rawinfo(String msg) {
+        getLogger().rawinfo(msg);
+    }
+
+    public static void deprecated(String msg) {
+        getLogger().deprecated(msg);
+    }
+
+    public static void warn(String msg) {
+        getLogger().warn(msg);
+    }
+
+    public static void error(String msg) {
+        getLogger().error(msg);
+    }
+
+    public static void log(int logLevel, String msg) {
+        switch (logLevel) {
+            case Message.MSG_DEBUG:
+                debug(msg);
+                break;
+            case Message.MSG_VERBOSE:
+                verbose(msg);
+                break;
+            case Message.MSG_INFO:
+                info(msg);
+                break;
+            case Message.MSG_WARN:
+                warn(msg);
+                break;
+            case Message.MSG_ERR:
+                error(msg);
+                break;
+            default:
+                throw new IllegalArgumentException("Unknown log level " + logLevel);
+        }
+    }
+
+    public static List getProblems() {
+        return getLogger().getProblems();
+    }
+
+    public static void sumupProblems() {
+        getLogger().sumupProblems();
+    }
+
+    public static void progress() {
+        getLogger().progress();
+    }
+
+    public static void endProgress() {
+        getLogger().endProgress();
+    }
+
+    public static void endProgress(String msg) {
+        getLogger().endProgress(msg);
+    }
+
+    public static boolean isShowProgress() {
+        return getLogger().isShowProgress();
+    }
+
+    public static void setShowProgress(boolean progress) {
+        getLogger().setShowProgress(progress);
+    }
+
+    public static void debug(String message, Throwable t) {
+        if (t == null) {
+            debug(message);
+        } else {
+            debug(message + " (" + t.getClass().getName() + ": " + t.getMessage() + ")");
+            debug(t);
+        }
+    }
+
+    public static void verbose(String message, Throwable t) {
+        if (t == null) {
+            verbose(message);
+        } else {
+            verbose(message + " (" + t.getClass().getName() + ": " + t.getMessage() + ")");
+            debug(t);
+        }
+    }
+
+    public static void info(String message, Throwable t) {
+        if (t == null) {
+            info(message);
+        } else {
+            info(message + " (" + t.getClass().getName() + ": " + t.getMessage() + ")");
+            debug(t);
+        }
+    }
+
+    public static void warn(String message, Throwable t) {
+        if (t == null) {
+            warn(message);
+        } else {
+            warn(message + " (" + t.getClass().getName() + ": " + t.getMessage() + ")");
+            debug(t);
+        }
+    }
+
+    public static void error(String message, Throwable t) {
+        if (t == null) {
+            error(message);
+        } else {
+            error(message + " (" + t.getClass().getName() + ": " + t.getMessage() + ")");
+            debug(t);
+        }
+    }
+
+    public static void debug(Throwable t) {
+        debug(StringUtils.getStackTrace(t));
+    }
+
+}

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java?rev=1406849&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java Wed Nov  7 22:48:10 2012
@@ -0,0 +1,61 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse;
+
+import org.apache.ivy.util.AbstractMessageLogger;
+import org.apache.ivyde.eclipse.ui.console.IvyConsole;
+
+public class IvyDEMessageLogger extends AbstractMessageLogger {
+
+    private IvyConsole console;
+
+    private int logLevel;
+
+    public IvyDEMessageLogger(IvyConsole console) {
+        this.console = console;
+        logLevel = IvyPlugin.getPreferenceStoreHelper().getIvyConsoleIvyDELogLevel();
+    }
+
+    public void setLogLevel(int logLevel) {
+        this.logLevel = logLevel;
+        IvyPlugin.getPreferenceStoreHelper().setIvyConsoleIvyDELogLevel(logLevel);
+    }
+
+    public int getLogLevel() {
+        return logLevel;
+    }
+
+    public void log(String msg, int level) {
+        if (level <= logLevel) {
+            console.doAppendLine(level, "[IvyDE] " + msg);
+        }
+    }
+
+    public void rawlog(String msg, int level) {
+        log(msg, level);
+    }
+
+    public void doProgress() {
+        // nothing
+    }
+
+    public void doEndProgress(String msg) {
+        // nothing
+    }
+
+}

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDEMessageLogger.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=1406849&r1=1406848&r2=1406849&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 Wed Nov  7 22:48:10 2012
@@ -25,7 +25,6 @@ import java.util.List;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
-import org.apache.ivy.util.Message;
 import org.apache.ivyde.common.ivyfile.IvyFileResourceListener;
 import org.apache.ivyde.eclipse.cpcontainer.IvyAttachementManager;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer;
@@ -246,15 +245,15 @@ public class IvyPlugin extends AbstractU
         getDefault().getLog().log(status);
         switch (status.getCode()) {
             case IStatus.ERROR:
-                Message.error("[IvyDE] " + status.getMessage());
+                IvyDEMessage.error(status.getMessage());
                 break;
             case IStatus.CANCEL:
             case IStatus.WARNING:
-                Message.warn("[IvyDE] "  + status.getMessage());
+                IvyDEMessage.warn(status.getMessage());
                 break;
             case IStatus.OK:
             case IStatus.INFO:
-                Message.info("[IvyDE] "  + status.getMessage());
+                IvyDEMessage.info(status.getMessage());
                 break;
         }
     }

Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java?rev=1406849&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java Wed Nov  7 22:48:10 2012
@@ -0,0 +1,105 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.ivy.util.MessageLogger;
+
+public class NopMessageLogger implements MessageLogger {
+
+    public static final NopMessageLogger INSTANCE = new NopMessageLogger();
+
+    public void log(String msg, int level) {
+        // no nothing
+    }
+
+    public void rawlog(String msg, int level) {
+        // no nothing
+    }
+
+    public void debug(String msg) {
+        // no nothing
+    }
+
+    public void verbose(String msg) {
+        // no nothing
+    }
+
+    public void deprecated(String msg) {
+        // no nothing
+    }
+
+    public void info(String msg) {
+        // no nothing
+    }
+
+    public void rawinfo(String msg) {
+        // no nothing
+    }
+
+    public void warn(String msg) {
+        // no nothing
+    }
+
+    public void error(String msg) {
+        // no nothing
+    }
+
+    public List getProblems() {
+        return Collections.emptyList();
+    }
+
+    public List getWarns() {
+        return Collections.emptyList();
+    }
+
+    public List getErrors() {
+        return Collections.emptyList();
+    }
+
+    public void clearProblems() {
+        // no nothing
+    }
+
+    public void sumupProblems() {
+        // no nothing
+    }
+
+    public void progress() {
+        // no nothing
+    }
+
+    public void endProgress() {
+        // no nothing
+    }
+
+    public void endProgress(String msg) {
+        // no nothing
+    }
+
+    public boolean isShowProgress() {
+        return false;
+    }
+
+    public void setShowProgress(boolean progress) {
+        // no nothing
+    }
+
+}

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/NopMessageLogger.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ClasspathEntriesResolver.java Wed Nov  7 22:48:10 2012
@@ -27,7 +27,7 @@ import org.apache.ivy.core.module.descri
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.report.ArtifactDownloadReport;
 import org.apache.ivy.core.report.ResolveReport;
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.resolve.IvyResolver;
 import org.apache.ivyde.eclipse.resolve.ResolveResult;
 import org.apache.ivyde.eclipse.retrieve.RetrieveSetup;
@@ -124,7 +124,7 @@ public class ClasspathEntriesResolver ex
                 buffer.append("\n  - ");
             }
         }
-        ivy.getLoggerEngine().log(buffer.toString(), Message.MSG_WARN);
+        IvyDEMessage.warn(buffer.toString());
     }
 
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyAttachementManager.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyAttachementManager.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyAttachementManager.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyAttachementManager.java Wed Nov  7 22:48:10 2012
@@ -25,7 +25,7 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Properties;
 
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
@@ -49,10 +49,10 @@ public class IvyAttachementManager {
     public IvyAttachementManager(File containersAttachementFile) {
         this.containersAttachementFile = containersAttachementFile;
         if (!containersAttachementFile.exists()) {
-            Message.verbose("[IvyDE] Attachement properties file not found: nothing to load");
+            IvyDEMessage.verbose("Attachement properties file not found: nothing to load");
             return;
         }
-        Message.verbose("[IvyDE] Reading attachement properties");
+        IvyDEMessage.verbose("Reading attachement properties");
         try {
             FileInputStream in = new FileInputStream(containersAttachementFile);
             try {
@@ -71,7 +71,7 @@ public class IvyAttachementManager {
 
     public void updateAttchements(IJavaProject project, IPath containerPath,
             IClasspathContainer containerSuggestion) {
-        Message.verbose("[IvyDE] Updating attachements on the container " + containerPath);
+        IvyDEMessage.verbose("Updating attachements on the container " + containerPath);
         
         Properties newProps = new Properties();
 
@@ -98,7 +98,7 @@ public class IvyAttachementManager {
         IvyClasspathContainer ivycp = IvyClasspathUtil.getIvyClasspathContainer(containerPath,
             project);
         if (ivycp == null) {
-            Message.error("[IvyDE] The IvyDE container could not be found. Aborting updating attachements.");
+            IvyDEMessage.error("The IvyDE container could not be found. Aborting updating attachements.");
             // something wrong happened, give up
             return;
         }
@@ -127,7 +127,7 @@ public class IvyAttachementManager {
         ivycp.updateClasspathEntries(newEntries);
 
         // store the global result
-        Message.verbose("[IvyDE] Saving attachement properties");
+        IvyDEMessage.verbose("Saving attachement properties");
         try {
             FileOutputStream out = new FileOutputStream(containersAttachementFile);
             try {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java Wed Nov  7 22:48:10 2012
@@ -26,6 +26,7 @@ import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.report.ResolveReport;
 import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.resolve.IvyResolveJob;
 import org.apache.ivyde.eclipse.resolve.ResolveRequest;
@@ -133,7 +134,7 @@ public class IvyClasspathContainer imple
     }
 
     void updateClasspathEntries(final IClasspathEntry[] newEntries) {
-        Message.verbose("[IvyDE] Updating the classpath container " + toString());
+        IvyDEMessage.verbose("Updating the classpath container " + toString());
         IClasspathEntry[] entries;
         if (newEntries != null) {
             entries = newEntries;
@@ -154,7 +155,9 @@ public class IvyClasspathContainer imple
                         }
                     });
                 }
-                Message.debug("[IvyDE] Setting the classpath container " + toString() + " with " + Arrays.toString(entries));
+                IvyDEMessage.debug("Setting the classpath container "
+                        + IvyClasspathContainer.this.toString() + " with "
+                        + Arrays.toString(entries));
                 classpathEntries = entries;
                 notifyUpdateClasspathEntries();
             }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java Wed Nov  7 22:48:10 2012
@@ -38,13 +38,12 @@ import org.apache.ivy.core.resolve.Downl
 import org.apache.ivy.osgi.core.BundleInfo;
 import org.apache.ivy.osgi.core.ExportPackage;
 import org.apache.ivy.osgi.core.ManifestParser;
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.resolve.ResolveResult;
 import org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.IAccessRule;
 import org.eclipse.jdt.core.IClasspathAttribute;
@@ -103,13 +102,13 @@ public class IvyClasspathContainerMapper
         IClasspathEntry[] classpathEntries;
         Collection paths = new LinkedHashSet();
 
-        Message.verbose("[IvyDE] Building classpath...");
+        IvyDEMessage.verbose("Building classpath...");
 
         for (Iterator iter = all.iterator(); iter.hasNext();) {
             ArtifactDownloadReport artifact = (ArtifactDownloadReport) iter.next();
 
             if (artifact.getType().equals(WorkspaceResolver.ECLIPSE_PROJECT_TYPE)) {
-                Message.verbose("[IvyDE] Found an workspace dependency on project " + artifact.getName());
+                IvyDEMessage.verbose("Found an workspace dependency on project " + artifact.getName());
                 // This is a java project in the workspace, add project path
                 // but only add it if it is not a self dependency
                 if (javaProject == null
@@ -118,10 +117,10 @@ public class IvyClasspathContainerMapper
                     paths.add(JavaCore.newProjectEntry(new Path(artifact.getName()), rules, true,
                         null, true));
                 } else {
-                    Message.verbose("[IvyDE] Skipping self dependency on project " + artifact.getName());
+                    IvyDEMessage.verbose("Skipping self dependency on project " + artifact.getName());
                 }
             } else if (artifact.getLocalFile() != null && accept(artifact.getArtifact())) {
-                Message.verbose("[IvyDE] Adding " + artifact.getName() + " to the classpath");
+                IvyDEMessage.verbose("Adding " + artifact.getName() + " to the classpath");
 
                 IPath classpathArtifact = getArtifactPath(artifact);
                 IPath sourcesArtifact = getArtifactPath(artifact, sourceArtifactMatcher,
@@ -136,13 +135,13 @@ public class IvyClasspathContainerMapper
                 IClasspathAttribute[] att = getExtraAttribute(classpathArtifact, javadocArtifact);
 
                 if (sources != null) {
-                    Message.debug("[IvyDE] Attaching sources " + sources + " to " + classpathArtifact);
+                    IvyDEMessage.debug("Attaching sources " + sources + " to " + classpathArtifact);
                 }
                 if (javadocArtifact != null) {
-                    Message.debug("[IvyDE] Attaching javadoc " + javadocArtifact + " to " + classpathArtifact);
+                    IvyDEMessage.debug("Attaching javadoc " + javadocArtifact + " to " + classpathArtifact);
                 }
                 if (rules != null) {
-                    Message.debug("[IvyDE] Setting OSGi access rules on  " + classpathArtifact);
+                    IvyDEMessage.debug("Setting OSGi access rules on  " + classpathArtifact);
                 }
                 paths.add(JavaCore.newLibraryEntry(classpathArtifact, sources, sourcesRoot, rules,
                     att, false));
@@ -174,11 +173,11 @@ public class IvyClasspathContainerMapper
             jar = new FileInputStream(artifact.toFile());
             bundleInfo = ManifestParser.parseJarManifest(jar);
         } catch (IOException e) {
-            Message.warn("OSGi metadata could not be extracted from " + artifact + ": "
+            IvyDEMessage.warn("OSGi metadata could not be extracted from " + artifact + ": "
                     + e.getMessage() + " (" + e.getClass().getName() + ")");
             return null;
         } catch (ParseException e) {
-            Message.warn("OSGi metadata could not be extracted from " + artifact + ": "
+            IvyDEMessage.warn("OSGi metadata could not be extracted from " + artifact + ": "
                     + e.getMessage() + " (" + e.getClass().getName() + ")");
             return null;
         } finally {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerSerializer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerSerializer.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerSerializer.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerSerializer.java Wed Nov  7 22:48:10 2012
@@ -39,7 +39,7 @@ import javax.xml.transform.TransformerFa
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -101,7 +101,7 @@ public class IvyClasspathContainerSerial
     }
 
     public void save(IJavaProject project) {
-        Message.verbose("[IvyDE] Saving the state of the containers of the project " + project.getProject().getName());
+        IvyDEMessage.verbose("Saving the state of the containers of the project " + project.getProject().getName());
         List/* <IvyClasspathContainer> */ivycps = IvyClasspathUtil
                 .getIvyClasspathContainers(project);
         try {
@@ -123,7 +123,7 @@ public class IvyClasspathContainerSerial
     }
 
     public Map/* <IPath, IvyClasspathContainer> */read(IJavaProject project) {
-        Message.verbose("[IvyDE] Loading the state of the containers of the project " + project.getProject().getName());
+        IvyDEMessage.verbose("Loading the state of the containers of the project " + project.getProject().getName());
         File file = new File(containersStateDir, project.getProject().getName() + ".xml");
         if (!file.exists()) {
             IvyPlugin.logWarn("IvyDE container states of the project "

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=1406849&r1=1406848&r2=1406849&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 Wed Nov  7 22:48:10 2012
@@ -22,7 +22,7 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -58,7 +58,7 @@ public class IvyClasspathInitializer ext
     public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
         if (IvyClasspathUtil.isIvyClasspathContainer(containerPath)) {
 
-            Message.info("[IvyDE] Initializing container " + containerPath);
+            IvyDEMessage.info("Initializing container " + containerPath);
 
             // try to get an existing one
             IClasspathContainer container = null;
@@ -86,21 +86,21 @@ public class IvyClasspathInitializer ext
                 }
 
                 if (container instanceof IvyClasspathContainer) {
-                    Message.debug("[IvyDE] Container already configured");
+                    IvyDEMessage.debug("Container already configured");
                     ivycp = (IvyClasspathContainer) container;
                 } else {
                     if (container == null) {
-                        Message.debug("[IvyDE] No saved container");
+                        IvyDEMessage.debug("No saved container");
                         // try what the IvyDE plugin saved
                         IvyClasspathContainerSerializer serializer = IvyPlugin.getDefault()
                                 .getIvyClasspathContainerSerializer();
                         Map ivycps = serializer.read(project);
                         if (ivycps != null) {
-                            Message.debug("[IvyDE] Found serialized containers");
+                            IvyDEMessage.debug("Found serialized containers");
                             ivycp = (IvyClasspathContainer) ivycps.get(containerPath);
                         }
                         if (ivycp == null) {
-                            Message.debug("[IvyDE] No serialized containers match the expected container path");
+                            IvyDEMessage.debug("No serialized containers match the expected container path");
                             // still bad luck or just a new classpath container
                             ivycp = new IvyClasspathContainer(project, containerPath,
                                     new IClasspathEntry[0], attributes);
@@ -108,7 +108,7 @@ public class IvyClasspathInitializer ext
                             refresh = true;
                         }
                     } else {
-                        Message.debug("[IvyDE] Loading from a saved container");
+                        IvyDEMessage.debug("Loading from a saved container");
                         // this might be the persisted one : reuse the persisted entries
                         ivycp = new IvyClasspathContainer(project, containerPath,
                                 container.getClasspathEntries(), attributes);
@@ -118,12 +118,12 @@ public class IvyClasspathInitializer ext
                 // recompute the path as it may have been "upgraded"
                 IPath updatedPath = IvyClasspathContainerConfAdapter.getPath(ivycp.getConf());
                 if (!updatedPath.equals(containerPath)) {
-                    Message.verbose("[IvyDE] Upgrading container path from " + containerPath + " to " + updatedPath);
+                    IvyDEMessage.verbose("Upgrading container path from " + containerPath + " to " + updatedPath);
                     updateIvyDEContainerPath(project, entry, attributes, exported, updatedPath);
                     return;
                 }
 
-                Message.verbose("[IvyDE] Setting container in JDT model");
+                IvyDEMessage.verbose("Setting container in JDT model");
 
                 JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project},
                     new IClasspathContainer[] {ivycp}, null);
@@ -131,7 +131,7 @@ public class IvyClasspathInitializer ext
                 int startupMode = IvyPlugin.getPreferenceStoreHelper().getResolveOnStartup();
                 if (startupMode == ON_STARTUP_NOTHING) {
                     if (!refresh) {
-                        Message.verbose("[IvyDE] Doing nothing on startup");
+                        IvyDEMessage.verbose("Doing nothing on startup");
                         // unless we force a refresh, actually do nothing
                         return;
                     }
@@ -140,9 +140,9 @@ public class IvyClasspathInitializer ext
                 }
 
                 if (refresh) {
-                    Message.info("[IvyDE] Scheduling a refresh of the container");
+                    IvyDEMessage.info("Scheduling a refresh of the container");
                 } else {
-                    Message.info("[IvyDE] Scheduling a resolve of the container");       
+                    IvyDEMessage.info("Scheduling a resolve of the container");       
                 }
                 // now refresh the container to be synchronized with the ivy.xml
                 ivycp.launchResolve(refresh, null);

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJob.java Wed Nov  7 22:48:10 2012
@@ -33,6 +33,7 @@ import org.apache.ivy.plugins.circular.W
 import org.apache.ivy.plugins.version.VersionMatcher;
 import org.apache.ivyde.eclipse.CachedIvy;
 import org.apache.ivyde.eclipse.IvyDEException;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyMarkerManager;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.resources.IProject;
@@ -80,6 +81,14 @@ public class IvyResolveJob extends Job {
     }
 
     protected IStatus run(IProgressMonitor monitor) {
+        try {
+            return doRun(monitor);
+        } finally {
+            IvyDEMessage.sumupProblems();
+        }
+    }
+
+    private IStatus doRun(IProgressMonitor monitor) {
         List toResolve;
         synchronized (resolveQueue) {
             toResolve = new ArrayList(resolveQueue);
@@ -120,12 +129,14 @@ public class IvyResolveJob extends Job {
                     monitor.worked(step);
                     continue;
                 }
+                IvyDEMessage.verbose("Loading ivysettings for " + request.toString());
                 CachedIvy cachedIvy = request.getCachedIvy();
                 Ivy ivy;
                 try {
                     ivy = cachedIvy.getIvy();
                 } catch (IvyDEException e) {
                     cachedIvy.setErrorMarker(e);
+                    IvyDEMessage.error("Failed to configure Ivy for " + request + ": " + e.getMessage());
                     errorsStatus.add(e.asStatus(IStatus.ERROR, "Failed to configure Ivy for "
                             + request));
                     monitor.worked(step);
@@ -141,6 +152,7 @@ public class IvyResolveJob extends Job {
                     md = cachedIvy.getModuleDescriptor(ivy);
                 } catch (IvyDEException e) {
                     cachedIvy.setErrorMarker(e);
+                    IvyDEMessage.error("Failed to load the descriptor for " + request + ": " + e.getMessage());
                     errorsStatus.add(e.asStatus(IStatus.ERROR, "Failed to load the descriptor for "
                             + request));
                     monitor.worked(step);
@@ -187,6 +199,7 @@ public class IvyResolveJob extends Job {
                 boolean canceled = launchResolveThread(request, monitor, step, errorsStatus, ivy,
                     md);
                 if (canceled) {
+                    IvyDEMessage.warn("Resolve job canceled");
                     return Status.CANCEL_STATUS;
                 }
             }
@@ -201,6 +214,7 @@ public class IvyResolveJob extends Job {
                 boolean canceled = launchResolveThread(request, monitor, step, errorsStatus, ivy,
                     md);
                 if (canceled) {
+                    IvyDEMessage.warn("Resolve job canceled");
                     return Status.CANCEL_STATUS;
                 }
             }
@@ -258,8 +272,11 @@ public class IvyResolveJob extends Job {
                 return true;
             case IStatus.OK:
             case IStatus.INFO:
+                IvyDEMessage.info("Successuful resolve of " + request);
                 break;
             case IStatus.ERROR:
+                IvyDEMessage.warn("Error on resolve of " + request + ": "
+                        + status[0].getMessage());
                 request.setResolveFailed(true);
                 errorsStatus.add(status[0]);
                 break;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolver.java Wed Nov  7 22:48:10 2012
@@ -41,8 +41,8 @@ import org.apache.ivy.core.resolve.Resol
 import org.apache.ivy.core.retrieve.RetrieveOptions;
 import org.apache.ivy.plugins.report.XmlReportParser;
 import org.apache.ivy.plugins.resolver.DependencyResolver;
-import org.apache.ivy.util.Message;
 import org.apache.ivy.util.filter.ArtifactTypeFilter;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
 import org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver;
@@ -117,7 +117,7 @@ public class IvyResolver {
         try {
             ivy.pushContext();
 
-            Message.info("[IvyDE] Resolving " + toString());
+            IvyDEMessage.info("Resolving " + toString());
 
             IvyResolveJobListener ivyResolveJobListener = new IvyResolveJobListener(monitor, step);
             ivy.getEventManager().addIvyListener(ivyResolveJobListener);
@@ -146,12 +146,12 @@ public class IvyResolver {
             } catch (ParseException e) {
                 String errorMsg = "Error while parsing the ivy file from " + this.toString() + "\n"
                         + e.getMessage();
-                Message.error(errorMsg);
+                IvyDEMessage.error(errorMsg);
                 return new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, errorMsg, e);
             } catch (Exception e) {
                 String errorMsg = "Error while resolving dependencies for " + this.toString()
                         + "\n" + e.getMessage();
-                Message.error(errorMsg);
+                IvyDEMessage.error(errorMsg);
                 return new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, errorMsg, e);
             } finally {
                 Thread.currentThread().setContextClassLoader(old);
@@ -195,13 +195,13 @@ public class IvyResolver {
 
     private ResolveResult resolveWithPrevious(Ivy ivy, ModuleDescriptor md) throws ParseException,
             IOException {
-        Message.verbose("[IvyDE] Trying to read previous resolve report");
+        IvyDEMessage.verbose("Trying to read previous resolve report");
 
         ResolveResult result = new ResolveResult();
 
         // we check if all required configurations have been resolved
         for (int i = 0; i < confs.length; i++) {
-            Message.verbose("[IvyDE] Fetching the resolve report for configuration " + confs[i]);
+            IvyDEMessage.verbose("Fetching the resolve report for configuration " + confs[i]);
 
             File report = ivy.getResolutionCacheManager().getConfigurationResolveReportInCache(
                 IvyClasspathUtil.buildResolveId(useExtendedResolveId, md), confs[i]);
@@ -213,7 +213,7 @@ public class IvyResolver {
                     result.addArtifactReports(parser.getArtifactReports());
                     findAllArtifactOnRefresh(ivy, parser, result);
                 } catch (ParseException e) {
-                    Message.info("[IvyDE] Error while parsing the report " + report
+                    IvyDEMessage.info("Error while parsing the report " + report
                             + ". Falling back by doing a resolve again.");
                     // it fails, so let's try resolving for all configuration
                     return doResolve(ivy, md);
@@ -302,7 +302,7 @@ public class IvyResolver {
 
         String pattern = project.getLocation().toPortableString() + "/" + retrievePattern;
 
-        Message.info("[IvyDE] Retrieving files into " + pattern);
+        IvyDEMessage.info("Retrieving files into " + pattern);
 
         monitor.setTaskName("retrieving dependencies in " + pattern);
         RetrieveOptions options = new RetrieveOptions();

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=1406849&r1=1406848&r2=1406849&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 Wed Nov  7 22:48:10 2012
@@ -23,6 +23,7 @@ import java.util.List;
 import org.apache.ivy.util.Message;
 import org.apache.ivy.util.MessageLogger;
 import org.apache.ivy.util.MessageLoggerHelper;
+import org.apache.ivyde.eclipse.IvyDEMessageLogger;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.swt.graphics.Color;
@@ -52,6 +53,7 @@ public class IvyConsole extends MessageC
 
     // CheckStyle:MagicNumber| OFF
     private MessageConsoleStream[] streams = new MessageConsoleStream[5];
+
     // CheckStyle:MagicNumber| ON
 
     private ConsoleDocument document;
@@ -66,12 +68,15 @@ public class IvyConsole extends MessageC
 
     private int logLevel;
 
+    private IvyDEMessageLogger ivyDEMessageLogger;
+
     public IvyConsole() {
         super("Ivy", IvyPlugin.getImageDescriptor("icons/logo16x16.gif")); //$NON-NLS-1$
         consoleManager = ConsolePlugin.getDefault().getConsoleManager();
         document = new ConsoleDocument();
         Message.setDefaultLogger(this);
         logLevel = IvyPlugin.getPreferenceStoreHelper().getIvyConsoleLogLevel();
+        ivyDEMessageLogger = new IvyDEMessageLogger(this);
     }
 
     public void setLogLevel(int logLevel) {
@@ -83,6 +88,10 @@ public class IvyConsole extends MessageC
         return logLevel;
     }
 
+    public IvyDEMessageLogger getIvyDEMessageLogger() {
+        return ivyDEMessageLogger;
+    }
+
     public void endProgress(String msg) {
         // nothing to log
     }
@@ -184,6 +193,10 @@ public class IvyConsole extends MessageC
             // log message filtered by its level
             return;
         }
+        doAppendLine(level, line);
+    }
+
+    public void doAppendLine(int level, String line) {
         showConsole();
         synchronized (document) {
             if (visible) {
@@ -325,4 +338,5 @@ public class IvyConsole extends MessageC
     public void setShowProgress(boolean progress) {
         showProgress = progress;
     }
+
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFilterAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFilterAction.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFilterAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/console/IvyConsoleFilterAction.java Wed Nov  7 22:48:10 2012
@@ -21,6 +21,7 @@ import org.apache.ivyde.eclipse.IvyPlugi
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.action.Separator;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Menu;
 
@@ -67,6 +68,17 @@ public class IvyConsoleFilterAction exte
             action.setChecked(console.getLogLevel() == i);
             addActionToMenu(fMenu, action);
         }
+        new Separator().fill(fMenu, -1);
+        for (int i = 0; i < LOG_LEVEL_MESSAGES.length; i++) {
+            final int logLevel = i;
+            Action action = new Action("IvyDE " + LOG_LEVEL_MESSAGES[i]) {
+                public void run() {
+                    console.getIvyDEMessageLogger().setLogLevel(logLevel);
+                }
+            };
+            action.setChecked(console.getIvyDEMessageLogger().getLogLevel() == i);
+            addActionToMenu(fMenu, action);
+        }
         return fMenu;
     }
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/CleanCacheAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/CleanCacheAction.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/CleanCacheAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/CleanCacheAction.java Wed Nov  7 22:48:10 2012
@@ -23,7 +23,7 @@ import java.util.Locale;
 
 import org.apache.ivy.core.cache.RepositoryCacheManager;
 import org.apache.ivy.core.cache.ResolutionCacheManager;
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -108,7 +108,7 @@ public class CleanCacheAction extends Ac
             while (itCleanable.hasNext()) {
                 Cleanable cleanable = (Cleanable) itCleanable.next();
                 cleanable.launchClean();
-                Message.info("Ivy cache cleaned: " + cleanable.getName());
+                IvyDEMessage.info("Ivy cache cleaned: " + cleanable.getName());
             }
         }
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java Wed Nov  7 22:48:10 2012
@@ -210,6 +210,14 @@ public class IvyDEPreferenceStoreHelper 
         prefStore.setValue(PreferenceConstants.IVY_CONSOLE_LOG_LEVEL, logLevel);
     }
 
+    public int getIvyConsoleIvyDELogLevel() {
+        return prefStore.getInt(PreferenceConstants.IVY_CONSOLE_IVYDE_LOG_LEVEL);
+    }
+
+    public void setIvyConsoleIvyDELogLevel(int ivyDElogLevel) {
+        prefStore.setValue(PreferenceConstants.IVY_CONSOLE_IVYDE_LOG_LEVEL, ivyDElogLevel);
+    }
+
     public boolean isOpenIvyConsoleOnStartup() {
         return prefStore.getBoolean(PreferenceConstants.OPEN_IVY_CONSOLE_ON_STARTUP);
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceConstants.java Wed Nov  7 22:48:10 2012
@@ -93,6 +93,8 @@ public final class PreferenceConstants {
 
     public static final String IVY_CONSOLE_LOG_LEVEL = "ivyConsole.logLevel";
 
+    public static final String IVY_CONSOLE_IVYDE_LOG_LEVEL = "ivyConsole.ivyDELogLevel";
+
     public static final String OPEN_IVY_CONSOLE_ON_STARTUP = "ivyConsole.openOnStartup";
 
     public static final String IGNORE_BRANCH_ON_WORKSPACE_PROJECTS

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java Wed Nov  7 22:48:10 2012
@@ -106,6 +106,8 @@ public class PreferenceInitializer exten
 
     public static final int DEFAULT_IVY_CONSOLE_LOG_MESSAGE = Message.MSG_INFO;
 
+    public static final int DEFAULT_IVY_CONSOLE_IVYDE_LOG_MESSAGE = Message.MSG_INFO;
+
     public static final boolean DEFAULT_OPEN_IVY_CONSOLE_ON_STARTUP = false;
 
     public static final MappingSetup DEFAULT_MAPPING_SETUP = new MappingSetup();
@@ -179,6 +181,7 @@ public class PreferenceInitializer exten
         store.setDefault(PreferenceConstants.AUTO_RESOLVE_ON_CHANGE, DEFAULT_AUTO_RESOLVE_ON_CHANGE);
 
         store.setDefault(PreferenceConstants.IVY_CONSOLE_LOG_LEVEL, DEFAULT_IVY_CONSOLE_LOG_MESSAGE);
+        store.setDefault(PreferenceConstants.IVY_CONSOLE_IVYDE_LOG_LEVEL, DEFAULT_IVY_CONSOLE_IVYDE_LOG_MESSAGE);
         store.setDefault(PreferenceConstants.OPEN_IVY_CONSOLE_ON_STARTUP, DEFAULT_OPEN_IVY_CONSOLE_ON_STARTUP);
 
         store.setDefault(PreferenceConstants.IGNORE_BRANCH_ON_WORKSPACE_PROJECTS,

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/views/ReportView.java Wed Nov  7 22:48:10 2012
@@ -19,7 +19,7 @@ package org.apache.ivyde.eclipse.ui.view
 
 import java.net.URL;
 
-import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
 import org.eclipse.jface.viewers.ISelection;
@@ -62,7 +62,7 @@ public class ReportView extends ViewPart
                 URL report = ivycp.getReportUrl();
                 if (report == null || !browser.setUrl(report.toExternalForm())) {
                     browser.setText("<html></html>");
-                    Message.warn("impossible to set report view url to " + report.toExternalForm());
+                    IvyDEMessage.warn("Impossible to set report view url to " + report.toExternalForm());
                 }
             }
         }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java?rev=1406849&r1=1406848&r2=1406849&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/workspaceresolver/WorkspaceResolver.java Wed Nov  7 22:48:10 2012
@@ -52,6 +52,7 @@ import org.apache.ivy.plugins.resolver.A
 import org.apache.ivy.plugins.resolver.util.ResolvedResource;
 import org.apache.ivy.plugins.version.VersionMatcher;
 import org.apache.ivy.util.Message;
+import org.apache.ivyde.eclipse.IvyDEMessage;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
@@ -208,7 +209,7 @@ public class WorkspaceResolver extends A
                     continue;
                 }
 
-                Message.verbose("[IvyDE] Workspace resolver found potential matching project "
+                IvyDEMessage.verbose("Workspace resolver found potential matching project "
                         + p.getName() + " with module " + candidateMrid + " for module "
                         + dependencyMrid);
 
@@ -226,11 +227,11 @@ public class WorkspaceResolver extends A
                     if (dependencyBranch != candidateBranch) {
                         // Both cannot be null
                         if (dependencyBranch == null || candidateBranch == null) {
-                            Message.verbose("[IvyDE] \t\trejected since branches doesn't match (one is set, the other isn't)");
+                            IvyDEMessage.verbose("\t\trejected since branches doesn't match (one is set, the other isn't)");
                             continue;
                         }
                         if (!dependencyBranch.equals(candidateBranch)) {
-                            Message.verbose("[IvyDE] \t\trejected since branches doesn't match");
+                            IvyDEMessage.verbose("\t\trejected since branches doesn't match");
                             continue;
                         }
                     }
@@ -242,9 +243,9 @@ public class WorkspaceResolver extends A
                         || versionMatcher.accept(dd.getDependencyRevisionId(), md)) {
 
                     if (ignoreVersionOnWorkspaceProjects) {
-                        Message.verbose("[IvyDE] \t\tmatched (version are ignored)");
+                        IvyDEMessage.verbose("\t\tmatched (version are ignored)");
                     } else {
-                        Message.verbose("[IvyDE] \t\tversion matched");
+                        IvyDEMessage.verbose("\t\tversion matched");
                     }
 
                     Artifact af = new DefaultArtifact(md.getModuleRevisionId(),
@@ -288,7 +289,7 @@ public class WorkspaceResolver extends A
 
                     return new ResolvedModuleRevision(this, this, workspaceMd, madr);
                 } else {
-                    Message.verbose("[IvyDE] \t\treject as version didn't match");
+                    IvyDEMessage.verbose("\t\treject as version didn't match");
                 }
             }
         }



Mime
View raw message