ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1059850 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: resolve/ ui/preferences/
Date Mon, 17 Jan 2011 10:29:23 GMT
Author: hibou
Date: Mon Jan 17 10:29:23 2011
New Revision: 1059850

URL: http://svn.apache.org/viewvc?rev=1059850&view=rev
Log:
IVYDE-268: add an option to not show the error popup

Modified:
    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/ui/preferences/IvyDEPreferenceStoreHelper.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.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

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=1059850&r1=1059849&r2=1059850&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
Mon Jan 17 10:29:23 2011
@@ -36,6 +36,7 @@ import org.apache.ivyde.eclipse.FakeProj
 import org.apache.ivyde.eclipse.IvyDEException;
 import org.apache.ivyde.eclipse.IvyMarkerManager;
 import org.apache.ivyde.eclipse.IvyPlugin;
+import org.apache.ivyde.eclipse.ui.preferences.IvyPreferencePage;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -213,7 +214,8 @@ public class IvyResolveJob extends Job {
             monitor.worked(step);
         }
 
-        if (errorsStatus.getChildren().length != 0) {
+        if (IvyPlugin.getPreferenceStoreHelper().isErrorPopup()
+                && errorsStatus.getChildren().length != 0) {
             return errorsStatus;
         }
 

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=1059850&r1=1059849&r2=1059850&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
Mon Jan 17 10:29:23 2011
@@ -279,4 +279,12 @@ public class IvyDEPreferenceStoreHelper 
         prefStore.setValue(PreferenceConstants.OFFLINE, offline);
     }
 
+    public boolean isErrorPopup() {
+        return prefStore.getBoolean(PreferenceConstants.ERROR_POPUP);
+    }
+
+    public void setErrorPopup(boolean errorPopup) {
+        prefStore.setValue(PreferenceConstants.ERROR_POPUP, errorPopup);
+    }
+
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java?rev=1059850&r1=1059849&r2=1059850&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java
Mon Jan 17 10:29:23 2011
@@ -67,6 +67,8 @@ public class IvyPreferencePage extends P
 
     private Button offlineButton;
 
+    private Button errorPopupButton;
+
     public IvyPreferencePage() {
         setPreferenceStore(IvyPlugin.getDefault().getPreferenceStore());
         Object ivydeVersion = IvyPlugin.getDefault().getBundle().getHeaders().get(
@@ -144,6 +146,11 @@ public class IvyPreferencePage extends P
         organizationUrlText = new Text(editorGroup, SWT.SINGLE | SWT.BORDER);
         organizationUrlText.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING,
true,
                 false));
+
+        errorPopupButton = new Button(composite, SWT.CHECK);
+        errorPopupButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false,
3, 1));
+        errorPopupButton.setText("Open a popup on each failed resolve");
+
         // CheckStyle:MagicNumber| ON
 
         initPreferences();
@@ -178,6 +185,7 @@ public class IvyPreferencePage extends P
         organizationUrlText.setText(helper.getIvyOrgUrl());
 
         offlineButton.setSelection(helper.isOffline());
+        errorPopupButton.setSelection(helper.isErrorPopup());
     }
 
     public boolean performOk() {
@@ -199,8 +207,9 @@ public class IvyPreferencePage extends P
 
         helper.setOrganization(organizationText.getText());
         helper.setOrganizationUrl(organizationUrlText.getText());
-        
+
         helper.setOffline(offlineButton.getSelection());
+        helper.setErrorPopup(errorPopupButton.getSelection());
         return true;
     }
 
@@ -230,5 +239,6 @@ public class IvyPreferencePage extends P
         organizationUrlText.setText(PreferenceInitializer.DEFAULT_ORGANISATION_URL);
 
         offlineButton.setSelection(PreferenceInitializer.DEFAULT_OFFLINE);
+        errorPopupButton.setSelection(PreferenceInitializer.DEFAULT_ERROR_POPUP);
     }
 }

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=1059850&r1=1059849&r2=1059850&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
Mon Jan 17 10:29:23 2011
@@ -112,4 +112,6 @@ public final class PreferenceConstants {
 
     public static final String OFFLINE = "offline";
 
+    public static final String ERROR_POPUP = "error.popup";
+
 }

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=1059850&r1=1059849&r2=1059850&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
Mon Jan 17 10:29:23 2011
@@ -122,6 +122,8 @@ public class PreferenceInitializer exten
 
     public static final boolean DEFAULT_OFFLINE = false;
 
+    public static final boolean DEFAULT_ERROR_POPUP = true;
+
     public void initializeDefaultPreferences() {
         IPreferenceStore store = IvyPlugin.getDefault().getPreferenceStore();
         store.setDefault(PreferenceConstants.P_BOOLEAN, true);
@@ -183,6 +185,7 @@ public class PreferenceInitializer exten
             DEFAULT_RETRIEVED_CLASSPATH_TYPES);
 
         store.setDefault(PreferenceConstants.OFFLINE, DEFAULT_OFFLINE);
+        store.setDefault(PreferenceConstants.ERROR_POPUP, DEFAULT_ERROR_POPUP);
     }
 
 }



Mime
View raw message