ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r817234 - in /ant/ivy/ivyde/trunk: ./ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferen...
Date Mon, 21 Sep 2009 12:58:52 GMT
Author: hibou
Date: Mon Sep 21 12:58:51 2009
New Revision: 817234

URL: http://svn.apache.org/viewvc?rev=817234&view=rev
Log:
Add an option in the container to automatically laucnh a resolve before each launch (IVYDE-204)

Modified:
    ant/ivy/ivyde/trunk/CHANGES.txt
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
    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/ClasspathPreferencePage.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

Modified: ant/ivy/ivyde/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/CHANGES.txt?rev=817234&r1=817233&r2=817234&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/CHANGES.txt Mon Sep 21 12:58:51 2009
@@ -7,6 +7,7 @@
 - NEW: Add "Resolve Dependencies" extension to Java Project in the Package Explorer (IVYDE-153)
(thanks to Jon Schneider and Troy Gaines)
 - NEW: Add option to not launch a resolve after saving a file with the IvyEditor (IVYDE-197)
(thanks to Jon Schneider)
 - NEW: File resource listener on Ivy files launches resolve when it detects modifications
(IVYDE-199) (thanks to Jon Schneider)
+- NEW: Add an option in the container to automatically laucnh a resolve before each launch
(IVYDE-204)
 
 - FIX: "Ivy Settings Path" Browse button results in an incorrectly formatted URL (IVYDE-191)
(thanks to Jon Schneider)
 - FIX: Workspace Resolver Prevents Source Download (IVYDE-188) (thanks to Phillip Webb)

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java?rev=817234&r1=817233&r2=817234&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
Mon Sep 21 12:58:51 2009
@@ -70,8 +70,7 @@
             // execution will not reach here - exception will be thrown
         }
         IvyClasspathContainer ivycp = (IvyClasspathContainer) container;
-        if (FakeProjectManager.isFake(ivycp.getConf().getJavaProject())) {
-            // only launch a resolve if the container is standalone in a launch configuration
+        if (ivycp.getConf().isInheritedResolveBeforeLaunch()) {
             ivycp.launchResolve(false, false, new NullProgressMonitor());
         }
         IClasspathEntry[] cpes = container.getClasspathEntries();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java?rev=817234&r1=817233&r2=817234&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
Mon Sep 21 12:58:51 2009
@@ -162,6 +162,9 @@
             } else if (parameter[0].equals("resolveInWorkspace")) {
                 conf.setResolveInWorkspace(Boolean.valueOf(value).booleanValue());
                 conf.setAdvancedProjectSpecific(true);
+            } else if (parameter[0].equals("resolveBeforeLaunch")) {
+                conf.setResolveBeforeLaunch(Boolean.valueOf(value).booleanValue());
+                conf.setAdvancedProjectSpecific(true);
             }
         }
         if (conf.isAdvancedProjectSpecific()) {
@@ -262,6 +265,7 @@
                 append(path, "javadocSuffixes", setup.getJavadocSuffixes());
                 append(path, "alphaOrder", conf.isAlphaOrder());
                 append(path, "resolveInWorkspace", conf.isResolveInWorkspace());
+                append(path, "resolveBeforeLaunch", conf.isResolveBeforeLaunch());
             }
         } catch (UnsupportedEncodingException e) {
             IvyPlugin.log(IStatus.ERROR, UTF8_ERROR, e);

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=817234&r1=817233&r2=817234&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
Mon Sep 21 12:58:51 2009
@@ -54,6 +54,8 @@
 
     private boolean isSettingsProjectSpecific;
 
+    private boolean resolveBeforeLaunch;
+
     /**
      * attributes attached to the container but not IvyDE related (Webtools or AspectJfor
instance)
      */
@@ -178,6 +180,14 @@
         this.isSettingsProjectSpecific = isSettingsProjectSpecific;
     }
 
+    public boolean isResolveBeforeLaunch() {
+        return resolveBeforeLaunch;
+    }
+
+    public void setResolveBeforeLaunch(boolean resolveBeforeLaunch) {
+        this.resolveBeforeLaunch = resolveBeforeLaunch;
+    }
+
     public IJavaProject getJavaProject() {
         return javaProject;
     }
@@ -309,6 +319,13 @@
         return resolveInWorkspace;
     }
 
+    public boolean isInheritedResolveBeforeLaunch() {
+        if (!isAdvancedProjectSpecific) {
+            return IvyPlugin.getPreferenceStoreHelper().isResolveBeforeLaunch();
+        }
+        return resolveBeforeLaunch;
+    }
+
     public String toString() {
         return ivyXmlPath
                 + (javaProject == null ? "" : " in '" + javaProject.getProject().getName()
+ "'");

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=817234&r1=817233&r2=817234&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
Mon Sep 21 12:58:51 2009
@@ -84,6 +84,8 @@
 
     private Button resolveInWorkspaceCheck;
 
+    private Button resolveBeforeLaunchCheck;
+
     private Button settingsProjectSpecificButton;
 
     private Button advancedProjectSpecificButton;
@@ -221,6 +223,7 @@
                             .getContainerMappingSetup());
             conf.setAlphaOrder(alphaOrderCheck.getSelectionIndex() == 1);
             conf.setResolveInWorkspace(resolveInWorkspaceCheck.getSelection());
+            conf.setResolveBeforeLaunch(resolveBeforeLaunchCheck.getSelection());
         } else {
             conf.setAdvancedProjectSpecific(false);
         }
@@ -496,6 +499,13 @@
         resolveInWorkspaceCheck
                 .setToolTipText("Will replace jars on the classpath with workspace projects");
 
+        resolveBeforeLaunchCheck = new Button(configComposite, SWT.CHECK);
+        resolveBeforeLaunchCheck.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true,
+                false, 3, 1));
+        resolveBeforeLaunchCheck.setText("Resolve before launch");
+        resolveBeforeLaunchCheck
+                .setToolTipText("Trigger a resolve before each run of any kind of java launch
configuration");
+
         Label label = new Label(configComposite, SWT.NONE);
         label.setText("Order of the classpath entries:");
 
@@ -552,11 +562,13 @@
             acceptedSuffixesTypesComposite.init(conf.getContainerMappingSetup());
             alphaOrderCheck.select(conf.isAlphaOrder() ? 1 : 0);
             resolveInWorkspaceCheck.setSelection(conf.isResolveInWorkspace());
+            resolveBeforeLaunchCheck.setSelection(conf.isResolveBeforeLaunch());
         } else {
             advancedProjectSpecificButton.setSelection(false);
             acceptedSuffixesTypesComposite.init(helper.getContainerMappingSetup());
             alphaOrderCheck.select(helper.isAlphOrder() ? 1 : 0);
             resolveInWorkspaceCheck.setSelection(helper.isResolveInWorkspace());
+            resolveBeforeLaunchCheck.setSelection(helper.isResolveBeforeLaunch());
         }
 
         updateFieldsStatusSettings();
@@ -582,6 +594,7 @@
         acceptedSuffixesTypesComposite.setEnabled(projectSpecific);
         alphaOrderCheck.setEnabled(projectSpecific);
         resolveInWorkspaceCheck.setEnabled(projectSpecific);
+        resolveBeforeLaunchCheck.setEnabled(projectSpecific);
     }
 
     public void initialize(IJavaProject p, IClasspathEntry[] currentEntries) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java?rev=817234&r1=817233&r2=817234&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/ClasspathPreferencePage.java
Mon Sep 21 12:58:51 2009
@@ -39,6 +39,8 @@
 
     private Button resolveInWorkspaceCheck;
 
+    private Button resolveBeforeLaunchCheck;
+
     private Combo alphaOrderCheck;
 
     private AcceptedSuffixesTypesComposite acceptedSuffixesTypesComposite;
@@ -64,6 +66,13 @@
         resolveInWorkspaceCheck
                 .setToolTipText("Will replace jars on the classpath with workspace projects");
 
+        resolveBeforeLaunchCheck = new Button(composite, SWT.CHECK);
+        resolveBeforeLaunchCheck.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true,
+                false, 3, 1));
+        resolveBeforeLaunchCheck.setText("Resolve before launch");
+        resolveBeforeLaunchCheck
+                .setToolTipText("Trigger a resolve before each run of any kind of java launch
configuration");
+
         Label label = new Label(composite, SWT.NONE);
         label.setText("Order of the classpath entries:");
 
@@ -88,6 +97,7 @@
     private void initPreferences() {
         IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
         resolveInWorkspaceCheck.setSelection(helper.isResolveInWorkspace());
+        resolveBeforeLaunchCheck.setSelection(helper.isResolveBeforeLaunch());
         alphaOrderCheck.select(helper.isAlphOrder() ? 1 : 0);
         acceptedSuffixesTypesComposite.init(helper.getContainerMappingSetup());
     }
@@ -95,6 +105,7 @@
     public boolean performOk() {
         IvyDEPreferenceStoreHelper helper = IvyPlugin.getPreferenceStoreHelper();
         helper.setResolveInWorkspace(resolveInWorkspaceCheck.getSelection());
+        helper.setResolveBeforeLaunch(resolveBeforeLaunchCheck.getSelection());
         helper.setAlphOrder(alphaOrderCheck.getSelectionIndex() == 1);
         helper.setContainerMappingSetup(acceptedSuffixesTypesComposite.getContainerMappingSetup());
         return true;
@@ -102,6 +113,7 @@
 
     protected void performDefaults() {
         resolveInWorkspaceCheck.setSelection(PreferenceInitializer.DEFAULT_RESOLVE_IN_WORKSPACE);
+        resolveBeforeLaunchCheck.setSelection(PreferenceInitializer.DEFAULT_RESOLVE_BEFORE_LAUNCH);
         alphaOrderCheck.select(PreferenceInitializer.DEFAULT_ALPHABETICAL_ORDER ? 1 : 0);
         acceptedSuffixesTypesComposite.init(PreferenceInitializer.DEFAULT_CONTAINER_MAPPING_SETUP);
     }

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=817234&r1=817233&r2=817234&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 Sep 21 12:58:51 2009
@@ -127,6 +127,14 @@
         prefStore.setValue(PreferenceConstants.RESOLVE_IN_WORKSPACE, inWorkspace);
     }
 
+    public boolean isResolveBeforeLaunch() {
+        return prefStore.getBoolean(PreferenceConstants.RESOLVE_BEFORE_LAUNCH);
+    }
+
+    public void setResolveBeforeLaunch(boolean resolveBeforeLaunch) {
+        prefStore.setValue(PreferenceConstants.RESOLVE_BEFORE_LAUNCH, resolveBeforeLaunch);
+    }
+
     public String getOrganization() {
         return prefStore.getString(PreferenceConstants.ORGANISATION);
     }

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=817234&r1=817233&r2=817234&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 Sep 21 12:58:51 2009
@@ -66,6 +66,8 @@
 
     public static final String RESOLVE_IN_WORKSPACE = "resolveInWorkspace";
 
+    public static final String RESOLVE_BEFORE_LAUNCH = "resolveBeforeLaunch";
+
     public static final String PROPERTY_FILES = "propertyFiles";
 
     public static final String LOAD_SETTINGS_ON_DEMAND = "loadSettingsOnDemand";

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=817234&r1=817233&r2=817234&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 Sep 21 12:58:51 2009
@@ -98,6 +98,8 @@
 
     public static final boolean DEFAULT_RESOLVE_IN_WORKSPACE = false;
 
+    public static final boolean DEFAULT_RESOLVE_BEFORE_LAUNCH = false;
+
     public static final int DEFAULT_RESOLVE_ON_STARTUP = 1;
 
     public static final boolean DEFAULT_AUTO_RESOLVE_ON_CLOSE = true;
@@ -144,6 +146,7 @@
         store.setDefault(PreferenceConstants.RETRIEVE_SYNC, DEFAULT_RETRIEVE_SYNC);
         store.setDefault(PreferenceConstants.ALPHABETICAL_ORDER, DEFAULT_ALPHABETICAL_ORDER);
         store.setDefault(PreferenceConstants.RESOLVE_IN_WORKSPACE, DEFAULT_RESOLVE_IN_WORKSPACE);
+        store.setDefault(PreferenceConstants.RESOLVE_BEFORE_LAUNCH, DEFAULT_RESOLVE_BEFORE_LAUNCH);
         store.setDefault(PreferenceConstants.PROPERTY_FILES, DEFAULT_PROPERTY_FILES);
         store.setDefault(PreferenceConstants.LOAD_SETTINGS_ON_DEMAND,
             DEFAULT_LOAD_SETTINGS_ON_DEMAND);



Mime
View raw message