Author: hibou
Date: Sat Oct 15 13:52:19 2011
New Revision: 1183639
URL: http://svn.apache.org/viewvc?rev=1183639&view=rev
Log:
fix the default extension
Modified:
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/SettingsEditor.java
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=1183639&r1=1183638&r2=1183639&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
Sat Oct 15 13:52:19 2011
@@ -53,9 +53,12 @@ public abstract class PathEditor extends
private final IJavaProject project;
- public PathEditor(Composite parent, int style, String label, IJavaProject
project) {
+ private final String defaultExtension;
+
+ public PathEditor(Composite parent, int style, String label, IJavaProject
project, String defaultExtension) {
super(parent, style);
this.project = project;
+ this.defaultExtension = defaultExtension;
GridLayout layout = new GridLayout(2, false);
setLayout(layout);
@@ -145,7 +148,7 @@ public abstract class PathEditor extends
if (text != null) {
dialog.setFileName(text.getText());
}
- dialog.setFilterExtensions(new String[] {"*.xml", "*"});
+ dialog.setFilterExtensions(new String[] {defaultExtension, "*"});
String file = dialog.open();
if (file != null) {
setFile(file);
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java?rev=1183639&r1=1183638&r2=1183639&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/SettingsEditor.java
Sat Oct 15 13:52:19 2011
@@ -78,7 +78,7 @@ public class SettingsEditor extends Comp
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) {
+ settingsEditor = new PathEditor(this, SWT.NONE, "Ivy settings path:",
null, "*.xml") {
protected Text createText(Composite parent) {
errorDecoration =
FieldDecorationRegistry.getDefault().getFieldDecoration(
@@ -145,7 +145,7 @@ public class SettingsEditor extends Comp
};
settingsEditor.setLayoutData(new GridData(GridData.FILL,
GridData.FILL, true, false));
- propFilesEditor = new PathEditor(this, SWT.NONE, "Property files:",
null) {
+ propFilesEditor = new PathEditor(this, SWT.NONE, "Property files:",
null, "*.properties") {
protected void textUpdated() {
settingsPathUpdated();