You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2012/07/16 00:15:28 UTC

svn commit: r1361822 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: cpcontainer/ ui/ ui/preferences/

Author: hibou
Date: Sun Jul 15 22:15:27 2012
New Revision: 1361822

URL: http://svn.apache.org/viewvc?rev=1361822&view=rev
Log:
IVYDE-304: add a button to browse the local project

Modified:
    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/AbstractSetupTab.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AdvancedSetupTab.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/ClasspathSetupTab.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/FileListEditor.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/IvyFilePathText.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/MappingSetupTab.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditorDialog.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupEditor.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupTab.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/EditStandaloneRetrieveDialog.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsSetupPreferencePage.java

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=1361822&r1=1361821&r2=1361822&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 Sun Jul 15 22:15:27 2012
@@ -35,6 +35,7 @@ import org.apache.ivyde.eclipse.ui.IvyFi
 import org.apache.ivyde.eclipse.ui.MappingSetupTab;
 import org.apache.ivyde.eclipse.ui.SettingsSetupTab;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
@@ -287,7 +288,8 @@ public class IvydeContainerPage extends 
         mainTab.setText("Main");
         mainTab.setControl(createMainTab(tabs));
 
-        settingsSetupTab = new SettingsSetupTab(tabs) {
+        IProject p = project == null ? null : project.getProject();
+        settingsSetupTab = new SettingsSetupTab(tabs, p) {
             protected void settingsUpdated() {
                 try {
                     conf.setSettingsProjectSpecific(isProjectSpecific());
@@ -302,11 +304,11 @@ public class IvydeContainerPage extends 
             }
         };
 
-        classpathSetupTab = new ClasspathSetupTab(tabs);
+        classpathSetupTab = new ClasspathSetupTab(tabs, p);
 
-        mappingSetupTab = new MappingSetupTab(tabs);
+        mappingSetupTab = new MappingSetupTab(tabs, p);
 
-        advancedSetupTab = new AdvancedSetupTab(tabs);
+        advancedSetupTab = new AdvancedSetupTab(tabs, p);
 
         tabs.addSelectionListener(new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
@@ -332,14 +334,16 @@ public class IvydeContainerPage extends 
         configComposite.setLayout(new GridLayout(2, false));
         configComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
 
-        ivyFilePathText = new IvyFilePathText(configComposite, SWT.NONE);
+        ivyFilePathText = new IvyFilePathText(configComposite, SWT.NONE, project == null ? null
+                : project.getProject());
         ivyFilePathText.addListener(new IvyXmlPathListener() {
             public void ivyXmlPathUpdated(String path) {
                 conf.setIvyXmlPath(path);
                 checkIvyXmlPath();
             }
         });
-        ivyFilePathText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
+        ivyFilePathText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2,
+                1));
 
         // Label for ivy configurations field
         Label confLabel = new Label(configComposite, SWT.NONE);
@@ -383,7 +387,8 @@ public class IvydeContainerPage extends 
         classpathSetupTab.init(conf.isClassthProjectSpecific(), conf.getClasspathSetup());
         mappingSetupTab.init(conf.isMappingProjectSpecific(), conf.getMappingSetup());
         // project == null <==> container in a launch config: always resolve before launch
-        advancedSetupTab.init(conf.isAdvancedProjectSpecific(), conf.getAdvancedSetup(), project == null);
+        advancedSetupTab.init(conf.isAdvancedProjectSpecific(), conf.getAdvancedSetup(),
+            project == null);
 
         settingsSetupTab.projectSpecificChanged();
         classpathSetupTab.projectSpecificChanged();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AbstractSetupTab.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AbstractSetupTab.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AbstractSetupTab.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AbstractSetupTab.java Sun Jul 15 22:15:27 2012
@@ -17,6 +17,7 @@
  */
 package org.apache.ivyde.eclipse.ui;
 
+import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.preference.PreferenceDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -39,7 +40,7 @@ public abstract class AbstractSetupTab {
 
     private Composite setupEditor;
 
-    public AbstractSetupTab(final TabFolder tabs, String title, final String preferencePageId) {
+    public AbstractSetupTab(final TabFolder tabs, String title, final String preferencePageId, IProject project) {
         TabItem tab = new TabItem(tabs, SWT.NONE);
         tab.setText(title);
 
@@ -79,12 +80,12 @@ public abstract class AbstractSetupTab {
         configComposite.setLayout(new GridLayout());
         configComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
 
-        setupEditor = createSetupEditor(configComposite);
+        setupEditor = createSetupEditor(configComposite, project);
 
         tab.setControl(composite);
     }
 
-    abstract protected Composite createSetupEditor(Composite configComposite);
+    abstract protected Composite createSetupEditor(Composite configComposite, IProject project);
 
     public void init(boolean isProjectSpecific) {
         if (isProjectSpecific) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AdvancedSetupTab.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AdvancedSetupTab.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AdvancedSetupTab.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/AdvancedSetupTab.java Sun Jul 15 22:15:27 2012
@@ -20,6 +20,7 @@ package org.apache.ivyde.eclipse.ui;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.cpcontainer.AdvancedSetup;
 import org.apache.ivyde.eclipse.ui.preferences.AdvancedSetupPreferencePage;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
@@ -29,11 +30,11 @@ public class AdvancedSetupTab extends Ab
 
     private AdvancedSetupEditor advancedSetupEditor;
 
-    public AdvancedSetupTab(TabFolder tabs) {
-        super(tabs, "Advanced", AdvancedSetupPreferencePage.PEREFERENCE_PAGE_ID);
+    public AdvancedSetupTab(TabFolder tabs, IProject project) {
+        super(tabs, "Advanced", AdvancedSetupPreferencePage.PEREFERENCE_PAGE_ID, project);
     }
 
-    protected Composite createSetupEditor(Composite configComposite) {
+    protected Composite createSetupEditor(Composite configComposite, IProject project) {
         advancedSetupEditor = new AdvancedSetupEditor(configComposite, SWT.NONE);
         advancedSetupEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
         return advancedSetupEditor;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/ClasspathSetupTab.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/ClasspathSetupTab.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/ClasspathSetupTab.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/ClasspathSetupTab.java Sun Jul 15 22:15:27 2012
@@ -20,6 +20,7 @@ package org.apache.ivyde.eclipse.ui;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.cpcontainer.ClasspathSetup;
 import org.apache.ivyde.eclipse.ui.preferences.ClasspathSetupPreferencePage;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
@@ -29,11 +30,11 @@ public class ClasspathSetupTab extends A
 
     private ClasspathSetupEditor classpathSetupEditor;
 
-    public ClasspathSetupTab(TabFolder tabs) {
-        super(tabs, "Classpath", ClasspathSetupPreferencePage.PEREFERENCE_PAGE_ID);
+    public ClasspathSetupTab(TabFolder tabs, IProject project) {
+        super(tabs, "Classpath", ClasspathSetupPreferencePage.PEREFERENCE_PAGE_ID, project);
     }
 
-    protected Composite createSetupEditor(Composite configComposite) {
+    protected Composite createSetupEditor(Composite configComposite, IProject project) {
         classpathSetupEditor = new ClasspathSetupEditor(configComposite, SWT.NONE);
         classpathSetupEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
         return classpathSetupEditor;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/FileListEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/FileListEditor.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/FileListEditor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/FileListEditor.java Sun Jul 15 22:15:27 2012
@@ -20,7 +20,7 @@ package org.apache.ivyde.eclipse.ui;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -52,7 +52,7 @@ public class FileListEditor extends Comp
     private Button down;
 
     public FileListEditor(Composite parent, int style,  String label, final String labelPopup,
-            final IJavaProject project, final String defaultExtension) {
+            final IProject project, final String defaultExtension) {
         super(parent, style);
         setLayout(new GridLayout(3, false));
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/IvyFilePathText.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/IvyFilePathText.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/IvyFilePathText.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/IvyFilePathText.java Sun Jul 15 22:15:27 2012
@@ -54,8 +54,8 @@ public class IvyFilePathText extends Pat
 
     private Button defaultButton;
 
-    public IvyFilePathText(Composite parent, int style) {
-        super(parent, SWT.NONE, "Ivy File:", null, "*.xml");
+    public IvyFilePathText(Composite parent, int style, IProject project) {
+        super(parent, SWT.NONE, "Ivy File:", project, "*.xml");
     }
 
     protected Text createText(Composite parent) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/MappingSetupTab.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/MappingSetupTab.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/MappingSetupTab.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/MappingSetupTab.java Sun Jul 15 22:15:27 2012
@@ -20,6 +20,7 @@ package org.apache.ivyde.eclipse.ui;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.cpcontainer.MappingSetup;
 import org.apache.ivyde.eclipse.ui.preferences.MappingSetupPreferencePage;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
@@ -29,11 +30,11 @@ public class MappingSetupTab extends Abs
 
     private MappingSetupEditor mappingSetupEditor;
 
-    public MappingSetupTab(TabFolder tabs) {
-        super(tabs, "Source/Javadoc", MappingSetupPreferencePage.PEREFERENCE_PAGE_ID);
+    public MappingSetupTab(TabFolder tabs, IProject project) {
+        super(tabs, "Source/Javadoc", MappingSetupPreferencePage.PEREFERENCE_PAGE_ID, project);
     }
 
-    protected Composite createSetupEditor(Composite configComposite) {
+    protected Composite createSetupEditor(Composite configComposite, IProject project) {
         mappingSetupEditor = new MappingSetupEditor(configComposite, SWT.NONE);
         mappingSetupEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
         return mappingSetupEditor;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java Sun Jul 15 22:15:27 2012
@@ -22,7 +22,6 @@ import org.eclipse.core.resources.IProje
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.debug.ui.StringVariableSelectionDialog;
-import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.swt.SWT;
@@ -51,11 +50,13 @@ public class PathEditor extends Composit
 
     private Button browseWorkspace;
 
-    private final IJavaProject project;
+    private final IProject project;
 
     private final String defaultExtension;
 
-    public PathEditor(Composite parent, int style, String label, IJavaProject project, String defaultExtension) {
+    private Button browseProject;
+
+    public PathEditor(Composite parent, int style, String label, IProject project, String defaultExtension) {
         super(parent, style);
         this.project = project;
         this.defaultExtension = defaultExtension;
@@ -76,7 +77,7 @@ public class PathEditor extends Composit
         Composite buttons = new Composite(this, SWT.NONE);
         buttons.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, true, 2, 1));
         // CheckStyle:MagicNumber| OFF
-        layout = new GridLayout(4, false);
+        layout = new GridLayout(project == null ? 4 : 5, false);
         // CheckStyle:MagicNumber| ON
         layout.marginHeight = 0;
         layout.marginWidth = 0;
@@ -84,6 +85,17 @@ public class PathEditor extends Composit
 
         boolean added = addButtons(buttons);
 
+        if (project != null) {
+            browseProject = new Button(buttons, SWT.NONE);
+            browseProject.setLayoutData(new GridData(GridData.END, GridData.CENTER, !added, false));
+            browseProject.setText("Project...");
+            browseProject.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent e) {
+                    selectInProject();
+                }
+            });
+        }
+
         browseWorkspace = new Button(buttons, SWT.NONE);
         browseWorkspace.setLayoutData(new GridData(GridData.END, GridData.CENTER, !added, false));
         browseWorkspace.setText("Workspace...");
@@ -113,16 +125,16 @@ public class PathEditor extends Composit
         });
     }
 
-    private void selectInWorkspace() {
+    private void selectInProject() {
         ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),
                 new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
-        dialog.setTitle("Select a workspace relative file:");
-        dialog.setMessage("Select a workspace relative file:");
-        // Filter closed projects
+        dialog.setTitle("Select a file in the project:");
+        dialog.setMessage("Select a file in the project:");
+        // Filter to the project
         dialog.addFilter(new ViewerFilter() {
             public boolean select(Viewer viewer, Object parentElement, Object element) {
                 if (element instanceof IProject) {
-                    return ((IProject) element).isAccessible();
+                    return ((IProject) element).getName().equals(project.getName());
                 }
 
                 return true;
@@ -135,7 +147,7 @@ public class PathEditor extends Composit
         if ((results != null) && (results.length > 0) && (results[0] instanceof IFile)) {
             IPath path = ((IFile) results[0]).getFullPath();
             if (project != null && path.segment(0).equals(project.getProject().getName())) {
-                setWorkspaceLoc(path.removeFirstSegments(1).makeRelative().toString());
+                setProjectLoc(path.removeFirstSegments(1).makeRelative().toString());
             } else {
                 String containerName = path.makeRelative().toString();
                 setWorkspaceLoc("${workspace_loc:" + containerName + "}");
@@ -143,6 +155,31 @@ public class PathEditor extends Composit
         }
     }
 
+    private void selectInWorkspace() {
+        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),
+                new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
+        dialog.setTitle("Select a file in the workspace:");
+        dialog.setMessage("Select a file in the workspace:");
+        // Filter closed projects
+        dialog.addFilter(new ViewerFilter() {
+            public boolean select(Viewer viewer, Object parentElement, Object element) {
+                if (element instanceof IProject) {
+                    return ((IProject) element).isAccessible();
+                }
+
+                return true;
+            }
+        });
+        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+        // TODO try to preselect the current file
+        dialog.open();
+        Object[] results = dialog.getResult();
+        if ((results != null) && (results.length > 0) && (results[0] instanceof IFile)) {
+            IPath path = ((IFile) results[0]).getFullPath();
+            setProjectLoc(path.removeFirstSegments(1).makeRelative().toString());
+        }
+    }
+
     private void selectInFileSystem() {
         FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
         if (text != null) {
@@ -174,6 +211,11 @@ public class PathEditor extends Composit
         textUpdated();
     }
 
+    protected void setProjectLoc(String projectLoc) {
+        text.setText(projectLoc);
+        textUpdated();
+    }
+
     protected void setWorkspaceLoc(String workspaceLoc) {
         text.setText(workspaceLoc);
         textUpdated();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditorDialog.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditorDialog.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditorDialog.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditorDialog.java Sun Jul 15 22:15:27 2012
@@ -17,7 +17,7 @@
  */
 package org.apache.ivyde.eclipse.ui;
 
-import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -29,7 +29,7 @@ public class PathEditorDialog extends Di
 
     private String label;
 
-    private IJavaProject project;
+    private IProject project;
 
     private String defaultExtension;
 
@@ -37,7 +37,7 @@ public class PathEditorDialog extends Di
 
     private String file;
 
-    protected PathEditorDialog(Shell parentShell, String label, IJavaProject project,
+    protected PathEditorDialog(Shell parentShell, String label, IProject project,
             String defaultExtension) {
         super(parentShell);
         setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupEditor.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupEditor.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupEditor.java Sun Jul 15 22:15:27 2012
@@ -26,6 +26,7 @@ import java.util.List;
 import org.apache.ivyde.eclipse.IvyDEException;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.cpcontainer.SettingsSetup;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.fieldassist.DecoratedField;
 import org.eclipse.jface.fieldassist.FieldDecoration;
@@ -67,7 +68,7 @@ public class SettingsSetupEditor extends
 
     private Button defaultButton;
 
-    public SettingsSetupEditor(Composite parent, int style) {
+    public SettingsSetupEditor(Composite parent, int style, IProject project) {
         super(parent, style);
 
         GridLayout layout = new GridLayout();
@@ -77,7 +78,7 @@ public class SettingsSetupEditor extends
         loadOnDemandButton.setText("reload the settings only on demand");
         loadOnDemandButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
 
-        settingsEditor = new PathEditor(this, SWT.NONE, "Ivy settings path:", null, "*.xml") {
+        settingsEditor = new PathEditor(this, SWT.NONE, "Ivy settings path:", project, "*.xml") {
 
             protected Text createText(Composite parent) {
                 errorDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
@@ -144,7 +145,7 @@ public class SettingsSetupEditor extends
         };
         settingsEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
 
-        propFilesEditor = new FileListEditor(this, SWT.NONE, "Property files:", "Property file:", null, "*.properties");
+        propFilesEditor = new FileListEditor(this, SWT.NONE, "Property files:", "Property file:", project, "*.properties");
         propFilesEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
     }
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupTab.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupTab.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupTab.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsSetupTab.java Sun Jul 15 22:15:27 2012
@@ -21,6 +21,7 @@ import org.apache.ivyde.eclipse.IvyPlugi
 import org.apache.ivyde.eclipse.cpcontainer.SettingsSetup;
 import org.apache.ivyde.eclipse.ui.SettingsSetupEditor.SettingsEditorListener;
 import org.apache.ivyde.eclipse.ui.preferences.SettingsSetupPreferencePage;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
@@ -30,12 +31,12 @@ public class SettingsSetupTab extends Ab
 
     private SettingsSetupEditor settingsEditor;
 
-    public SettingsSetupTab(TabFolder tabs) {
-        super(tabs, "Settings", SettingsSetupPreferencePage.PEREFERENCE_PAGE_ID);
+    public SettingsSetupTab(TabFolder tabs, IProject project) {
+        super(tabs, "Settings", SettingsSetupPreferencePage.PEREFERENCE_PAGE_ID, project);
     }
 
-    protected Composite createSetupEditor(Composite configComposite) {
-        settingsEditor = new SettingsSetupEditor(configComposite, SWT.NONE);
+    protected Composite createSetupEditor(Composite configComposite, IProject project) {
+        settingsEditor = new SettingsSetupEditor(configComposite, SWT.NONE, project);
         settingsEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
         settingsEditor.addListener(new SettingsEditorListener() {
             public void settingsEditorUpdated(SettingsSetup setup) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/EditStandaloneRetrieveDialog.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/EditStandaloneRetrieveDialog.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/EditStandaloneRetrieveDialog.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/EditStandaloneRetrieveDialog.java Sun Jul 15 22:15:27 2012
@@ -64,7 +64,7 @@ public class EditStandaloneRetrieveDialo
         mainTab.setText("Main");
         mainTab.setControl(createMainTab(tabs));
 
-        settingsTab = new SettingsSetupTab(tabs) {
+        settingsTab = new SettingsSetupTab(tabs, project) {
             protected void settingsUpdated() {
                 super.settingsUpdated();
             }
@@ -98,7 +98,7 @@ public class EditStandaloneRetrieveDialo
         ivyFileComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
         ivyFileComposite.setLayout(new GridLayout(2, false));
 
-        ivyFilePathText = new IvyFilePathText(ivyFileComposite, SWT.NONE);
+        ivyFilePathText = new IvyFilePathText(ivyFileComposite, SWT.NONE, project);
         ivyFilePathText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
 
         retrieveComposite = new RetrieveComposite(body, SWT.NONE, true);

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsSetupPreferencePage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsSetupPreferencePage.java?rev=1361822&r1=1361821&r2=1361822&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsSetupPreferencePage.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/SettingsSetupPreferencePage.java Sun Jul 15 22:15:27 2012
@@ -43,7 +43,7 @@ public class SettingsSetupPreferencePage
     }
 
     protected Control createContents(Composite parent) {
-        settingsEditor = new SettingsSetupEditor(parent, SWT.NONE);
+        settingsEditor = new SettingsSetupEditor(parent, SWT.NONE, null);
         settingsEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
 
         settingsEditor.init(IvyPlugin.getPreferenceStoreHelper().getSettingsSetup());