ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r696407 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse: CHANGES.txt src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java
Date Wed, 17 Sep 2008 19:26:04 GMT
Author: hibou
Date: Wed Sep 17 12:26:03 2008
New Revision: 696407

URL: http://svn.apache.org/viewvc?rev=696407&view=rev
Log:
IVYDE-104: use combo boxes instead of some check boxes

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyPreferencePage.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt?rev=696407&r1=696406&r2=696407&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/CHANGES.txt Wed Sep 17 12:26:03 2008
@@ -9,6 +9,7 @@
 - NEW: Handle a project: scheme for the path of the ivysettings.xml (IVYDE-94)
 - NEW: Need CleanCache task in context menu (IVYDE-114)
 
+- IMPROVE: Make the classpath entries order configuration UI more intuitive (IVYDE-104)
 - IMPROVE: Retrieve after resolve feature does not clean target directory first (IVYDE-105)
 
 - FIX: Resolve in workspace does not pick up all projects in workspace (IVYDE-118) (thanks
to Matt Goldspink)

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=696407&r1=696406&r2=696407&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
Wed Sep 17 12:26:03 2008
@@ -59,6 +59,7 @@
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
@@ -101,7 +102,7 @@
 
     private Text retrievePatternText;
 
-    private Button alphaOrderCheck;
+    private Combo alphaOrderCheck;
 
     private Button resolveInWorkspaceCheck;
 
@@ -167,7 +168,7 @@
             conf.doRetrieve = doRetrieveButton.getSelection();
             conf.retrievePattern = retrievePatternText.getText();
             conf.retrieveSync = retrieveSyncButton.getSelection();
-            conf.alphaOrder = alphaOrderCheck.getSelection();
+            conf.alphaOrder = alphaOrderCheck.getSelectionIndex() == 1;
             conf.resolveInWorkspace = resolveInWorkspaceCheck.getSelection();
         } else {
             conf.ivySettingsPath = null;
@@ -561,7 +562,7 @@
                 1));
 
         label = new Label(configComposite, SWT.NONE);
-        label.setText("Retrive pattern:");
+        label.setText("Retrieve pattern:");
 
         retrievePatternText = new Text(configComposite, SWT.SINGLE | SWT.BORDER);
         retrievePatternText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true,
false,
@@ -574,7 +575,7 @@
         retrieveSyncButton = new Button(configComposite, SWT.CHECK);
         retrieveSyncButton.setText("Delete old retrieved artifacts");
         retrieveSyncButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false,
false,
-                2, 1));
+                3, 1));
         retrieveSyncButton.setEnabled(doRetrieveButton.getSelection());
 
         doRetrieveButton.addSelectionListener(new SelectionAdapter() {
@@ -584,12 +585,16 @@
             }
         });
 
-        alphaOrderCheck = new Button(configComposite, SWT.CHECK);
+        label = new Label(configComposite, SWT.NONE);
+        label.setText("Order of the classpath entries:");
+
+        alphaOrderCheck = new Combo(configComposite, SWT.READ_ONLY);
         alphaOrderCheck
                 .setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2,
1));
-        alphaOrderCheck.setText("Order alphabetically the classpath entries");
         alphaOrderCheck
-                .setToolTipText("Order alphabetically the artifacts in the classpath container");
+                .setToolTipText("Order of the artifacts in the classpath container");
+        alphaOrderCheck.add("From the ivy.xml");
+        alphaOrderCheck.add("Lexical");
 
         resolveInWorkspaceCheck = new Button(this.configComposite, SWT.CHECK);
         resolveInWorkspaceCheck.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true,
@@ -644,7 +649,7 @@
             doRetrieveButton.setSelection(conf.doRetrieve);
             retrievePatternText.setText(conf.retrievePattern);
             retrieveSyncButton.setSelection(conf.retrieveSync);
-            alphaOrderCheck.setSelection(conf.alphaOrder);
+            alphaOrderCheck.select(conf.alphaOrder ? 1 : 0);
             resolveInWorkspaceCheck.setSelection(this.conf.resolveInWorkspace);
         } else {
             projectSpecificButton.setSelection(false);
@@ -658,7 +663,7 @@
             doRetrieveButton.setSelection(helper.getDoRetrieve());
             retrievePatternText.setText(helper.getRetrievePattern());
             retrieveSyncButton.setSelection(helper.getRetrieveSync());
-            alphaOrderCheck.setSelection(helper.isAlphOrder());
+            alphaOrderCheck.select(helper.isAlphOrder() ? 1 : 0);
             resolveInWorkspaceCheck.setSelection(helper.isResolveInWorkspace());
         }
 

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=696407&r1=696406&r2=696407&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
Wed Sep 17 12:26:03 2008
@@ -24,6 +24,7 @@
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.ComboFieldEditor;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.jface.preference.FileFieldEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
@@ -39,9 +40,8 @@
 
 /**
  * This class represents a preference page that is contributed to the Preferences dialog.
By
- * subclassing <samp>FieldEditorPreferencePage</samp>, we can use the field support
built into
- * JFace that allows us to create a page that is small and knows how to save, restore and
apply
- * itself.
+ * subclassing <samp>FieldEditorPreferencePage</samp>, we can use the field support
built into JFace
+ * that allows us to create a page that is small and knows how to save, restore and apply
itself.
  * <p>
  * This page is used to modify preferences only. They are stored in the preference store
that
  * belongs to the main plug-in class. That way, preferences can be accessed directly via
the
@@ -77,7 +77,7 @@
         final Composite fieldParent = getFieldEditorParent();
 
         Label info = new Label(fieldParent, SWT.NONE);
-        //CheckStyle:MagicNumber| OFF
+        // CheckStyle:MagicNumber| OFF
         info.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false,
3, 1));
         info.setText("Apache Ivy version " + Ivy.getIvyVersion() + " - " + Ivy.getIvyDate());
         new Label(fieldParent, SWT.NONE).setLayoutData(new GridData(GridData.FILL,
@@ -211,9 +211,9 @@
         spacerData.horizontalSpan = 3;
         spacer.setLayoutData(spacerData);
 
-        BooleanFieldEditor alphaOrder = new BooleanFieldEditor(
-                PreferenceConstants.ALPHABETICAL_ORDER,
-                "Order alphabetically the artifacts in the classpath container", fieldParent);
+        ComboFieldEditor alphaOrder = new ComboFieldEditor(PreferenceConstants.ALPHABETICAL_ORDER,
+                "Order in the classpath container", new String[][] {
+                        {"From the ivy.xml", "false"}, {"Lexical", "true"}}, fieldParent);
         addField(alphaOrder);
 
         spacer = new Label(fieldParent, SWT.NONE);
@@ -223,8 +223,7 @@
 
         BooleanFieldEditor resolveInWorkspace = new BooleanFieldEditor(
                 PreferenceConstants.RESOLVE_IN_WORKSPACE,
-                "Resolve dependencies to workspace projects",
-                fieldParent);
+                "Resolve dependencies to workspace projects", fieldParent);
         addField(resolveInWorkspace);
 
         spacer = new Label(fieldParent, SWT.NONE);
@@ -243,7 +242,7 @@
                 fieldParent));
         addField(new StringFieldEditor(PreferenceConstants.ORGANISATION_URL, "Organisation
&URL:",
                 fieldParent));
-        //CheckStyle:MagicNumber| ON
+        // CheckStyle:MagicNumber| ON
     }
 
 }



Mime
View raw message