Skip to content
Browse files

closes #22: Prevent default settings from displaying "Could Not Accept

  • Loading branch information...
1 parent b04de14 commit 3722c0ba5e5548ad5a3a4041a65cf3457e63f2e8 @denuno denuno committed Feb 9, 2014
View
4 org.cfeclipse.cfml/src/org/cfeclipse/cfml/preferences/BrowserPreferenceConstants.java
@@ -8,8 +8,8 @@
public static final String P_TESTCASE_QUERYSTRING = "testCaseQueryString";
public static void setDefaults(IPreferenceStore store) {
- store.setDefault(P_PRIMARY_BROWSER_PATH,"C:\\Program Files\\Mozilla Firefox\\firefox.exe");
- store.setDefault(P_SECONDARY_BROWSER_PATH,"C:\\Program Files\\Internet Explorer\\iexplore.exe");
+ store.setDefault(P_PRIMARY_BROWSER_PATH, "");
+ store.setDefault(P_SECONDARY_BROWSER_PATH, "");
store.setDefault(P_TESTCASE_QUERYSTRING,"?method=RunTestRemote");
}
}
View
5 org.cfeclipse.cfml/src/org/cfeclipse/cfml/preferences/BrowserPreferencePage.java
@@ -78,7 +78,10 @@ protected boolean checkState() {
}
public boolean isValid() {
- if (new File(getStringValue()).exists()) {
+
+ if (getStringValue().length() == 0) {
+ return true;
+ } else if (new File(getStringValue()).exists()) {
clearErrorMessage();
return true;
}
View
12 org.cfeclipse.cfml/src/org/cfeclipse/cfml/preferences/FtpConnectionDialog.java
@@ -6,23 +6,14 @@
*/
package org.cfeclipse.cfml.preferences;
-import java.io.File;
import java.util.Arrays;
-import org.cfeclipse.cfml.CFMLPlugin;
import org.cfeclipse.cfml.net.FTPConnectionProperties;
import org.cfeclipse.cfml.net.ftp.FTPConnection;
-import org.cfeclipse.cfml.views.explorer.vfs.view.VFSView;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
@@ -42,7 +33,6 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
@@ -240,7 +230,7 @@ private void redraw() {
@Override
public boolean isValid() {
- if(connectionProperties.getConnectionid() == "") {
+ if (connectionProperties.getConnectionid() != "") {
validateInput();
if(errorMessageLabel.getText().length() > 0)
return false;

1 comment on commit 3722c0b

@am2605
CFEclipse member
am2605 commented on 3722c0b Feb 9, 2014

Awesome! This has bugged me for ages!

Please sign in to comment.
Something went wrong with that request. Please try again.