From 65a82c4359367349faf635f6eeb65e4483973af5 Mon Sep 17 00:00:00 2001 From: axelcl Date: Sun, 6 Feb 2005 17:21:05 +0000 Subject: [PATCH 1/1] Enable word wrapping with preference key editor.wrap.words (false by default) --- .../prefs/default_linux.properties | 1 + .../prefs/default_macosx.properties | 1 + .../prefs/default_win32.properties | 1 + .../actions/CreateFilesFromLinksEditorAction.java | 5 ++- .../phpeclipse/wiki/editor/WikiEditorPlugin.java | 2 +- .../phpeclipse/wiki/internal/Configuration.java | 6 ++-- .../wiki/preferences/UserValidationDialog.java | 32 ++++++++++---------- .../phpeclipse/wiki/sql/WikipediaDB.java | 2 +- 8 files changed, 27 insertions(+), 23 deletions(-) diff --git a/archive/net.sourceforge.phpeclipse.wiki/prefs/default_linux.properties b/archive/net.sourceforge.phpeclipse.wiki/prefs/default_linux.properties index 858fde4..e1ba50a 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/prefs/default_linux.properties +++ b/archive/net.sourceforge.phpeclipse.wiki/prefs/default_linux.properties @@ -1,3 +1,4 @@ +editor.wrap.words=false http.timeout=30 http.proxyHost= http.proxyPort= diff --git a/archive/net.sourceforge.phpeclipse.wiki/prefs/default_macosx.properties b/archive/net.sourceforge.phpeclipse.wiki/prefs/default_macosx.properties index 858fde4..e1ba50a 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/prefs/default_macosx.properties +++ b/archive/net.sourceforge.phpeclipse.wiki/prefs/default_macosx.properties @@ -1,3 +1,4 @@ +editor.wrap.words=false http.timeout=30 http.proxyHost= http.proxyPort= diff --git a/archive/net.sourceforge.phpeclipse.wiki/prefs/default_win32.properties b/archive/net.sourceforge.phpeclipse.wiki/prefs/default_win32.properties index 858fde4..e1ba50a 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/prefs/default_win32.properties +++ b/archive/net.sourceforge.phpeclipse.wiki/prefs/default_win32.properties @@ -1,3 +1,4 @@ +editor.wrap.words=false http.timeout=30 http.proxyHost= http.proxyPort= diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/CreateFilesFromLinksEditorAction.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/CreateFilesFromLinksEditorAction.java index 32a6ae0..c42f1ca 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/CreateFilesFromLinksEditorAction.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/CreateFilesFromLinksEditorAction.java @@ -61,8 +61,9 @@ public final class CreateFilesFromLinksEditorAction extends OpenWikiLinkEditorAc if (wikiTitle != null && !wikiTitle.equals("")) { if (!wikiNames.contains(wikiTitle)) { IFile file = getWikiFile(currentFile, wikiTitle); - filesList.add(new WikiFile(file, wikiTitle)); -// wikiList.add(wikiTitle); + if (!file.exists()) { + filesList.add(new WikiFile(file, wikiTitle)); + } wikiNames.add(wikiTitle); } } diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/editor/WikiEditorPlugin.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/editor/WikiEditorPlugin.java index 558759e..67f3451 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/editor/WikiEditorPlugin.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/editor/WikiEditorPlugin.java @@ -385,7 +385,7 @@ public class WikiEditorPlugin extends AbstractUIPlugin { store.setDefault(key, "false"); } } catch (Exception e) { - store.setDefault(key, "true"); + store.setDefault(key, "false"); } key = HTTP_TIMEOUT; diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/internal/Configuration.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/internal/Configuration.java index d3b5875..4740154 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/internal/Configuration.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/internal/Configuration.java @@ -461,13 +461,13 @@ public class Configuration implements IConfiguration, Comparable { } /** - * Asks the user to enter a password. Places the results in the supplied string[]. result[0] must contain the username, result[1] + * Asks the user to enter a password. Places the results in the supplied string[]. result[0] must contain the category, result[1] * must contain the fPassword. If the user canceled, both values must be zero. * * @param location * the location to obtain the fPassword for - * @param username - * the username + * @param category + * the category * @param message * a message to display to the fUser * @param userMutable diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/UserValidationDialog.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/UserValidationDialog.java index 5ffc1fc..38e00e6 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/UserValidationDialog.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/UserValidationDialog.java @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; /** - * A dialog for prompting for a username and fPassword + * A dialog for prompting for a category and fPassword */ public class UserValidationDialog extends Dialog { // widgets @@ -47,7 +47,7 @@ public class UserValidationDialog extends Dialog { protected Image keyLockImage; - // whether or not the username can be changed + // whether or not the category can be changed protected boolean isUsernameMutable = true; protected boolean showAllowCachingButton = true; @@ -57,7 +57,7 @@ public class UserValidationDialog extends Dialog { protected String message = null; /** - * Creates a new UserValidationDialog. + * Creates a new CategoryDialog. * * @param parentShell * the parent shell @@ -80,7 +80,7 @@ public class UserValidationDialog extends Dialog { */ protected void configureShell(Shell newShell) { super.configureShell(newShell); - newShell.setText(Messages.getString("UserValidationDialog.required")); //$NON-NLS-1$ + newShell.setText(Messages.getString("CategoryDialog.required")); //$NON-NLS-1$ // set F1 help // WorkbenchHelp.setHelp(newShell, IHelpContextIds.USER_VALIDATION_DIALOG); } @@ -94,7 +94,7 @@ public class UserValidationDialog extends Dialog { usernameField.setText(defaultUsername); if (isUsernameMutable) { - // give focus to username field + // give focus to category field usernameField.selectAll(); usernameField.setFocus(); } else { @@ -141,14 +141,14 @@ public class UserValidationDialog extends Dialog { } if (domain != null) { Label d = new Label(main, SWT.WRAP); - d.setText(Messages.getString("UserValidationDialog.5")); //$NON-NLS-1$ + d.setText(Messages.getString("CategoryDialog.5")); //$NON-NLS-1$ data = new GridData(); d.setLayoutData(data); Label label = new Label(main, SWT.WRAP); if (isUsernameMutable) { - label.setText(Messages.bind("UserValidationDialog.labelUser", domain)); //$NON-NLS-1$ + label.setText(Messages.bind("CategoryDialog.labelUser", domain)); //$NON-NLS-1$ } else { - label.setText(Messages.bind("UserValidationDialog.labelPassword", new Object[] { defaultUsername, domain })); //$NON-NLS-1$ + label.setText(Messages.bind("CategoryDialog.labelPassword", new Object[] { defaultUsername, domain })); //$NON-NLS-1$ } data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); data.horizontalSpan = 2; @@ -160,7 +160,7 @@ public class UserValidationDialog extends Dialog { if (domain != null && showAllowCachingButton) { allowCachingButton = new Button(main, SWT.CHECK); - allowCachingButton.setText(Messages.getString("UserValidationDialog.6")); //$NON-NLS-1$ + allowCachingButton.setText(Messages.getString("CategoryDialog.6")); //$NON-NLS-1$ data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); data.horizontalSpan = 3; allowCachingButton.setLayoutData(data); @@ -182,7 +182,7 @@ public class UserValidationDialog extends Dialog { warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING)); warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING)); Label warningText = new Label(warningComposite, SWT.WRAP); - warningText.setText(Messages.getString("UserValidationDialog.7")); //$NON-NLS-1$ + warningText.setText(Messages.getString("CategoryDialog.7")); //$NON-NLS-1$ data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = 300; warningText.setLayoutData(data); @@ -211,7 +211,7 @@ public class UserValidationDialog extends Dialog { * the parent of the widgets */ protected void createPasswordFields(Composite parent) { - new Label(parent, SWT.NONE).setText(Messages.getString("UserValidationDialog.password")); //$NON-NLS-1$ + new Label(parent, SWT.NONE).setText(Messages.getString("CategoryDialog.password")); //$NON-NLS-1$ passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD); GridData data = new GridData(GridData.FILL_HORIZONTAL); @@ -227,7 +227,7 @@ public class UserValidationDialog extends Dialog { * the parent of the widgets */ protected void createUsernameFields(Composite parent) { - new Label(parent, SWT.NONE).setText(Messages.getString("UserValidationDialog.user")); //$NON-NLS-1$ + new Label(parent, SWT.NONE).setText(Messages.getString("CategoryDialog.user")); //$NON-NLS-1$ usernameField = new Text(parent, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); @@ -246,9 +246,9 @@ public class UserValidationDialog extends Dialog { } /** - * Returns the username entered by the fUser, or null if the fUser canceled. + * Returns the category entered by the fUser, or null if the fUser canceled. * - * @return the entered username + * @return the entered category */ public String getUsername() { return username; @@ -278,11 +278,11 @@ public class UserValidationDialog extends Dialog { } /** - * Sets whether or not the username field should be mutable. This method must be called before create(), otherwise it will be + * Sets whether or not the category field should be mutable. This method must be called before create(), otherwise it will be * ignored. * * @param value - * whether the username is mutable + * whether the category is mutable */ public void setUsernameMutable(boolean value) { isUsernameMutable = value; diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/sql/WikipediaDB.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/sql/WikipediaDB.java index 4ae5980..753536c 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/sql/WikipediaDB.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/sql/WikipediaDB.java @@ -191,7 +191,7 @@ public class WikipediaDB { } else { // default configuration for XAMPP distribution conn = DriverManager.getConnection("jdbc:mysql://localhost/wikidb", // filenames - "root", // username + "root", // category ""); // password } fGetPrefixTitles = conn.prepareStatement("SELECT cur_title FROM cur WHERE LOWER( cur_title ) like ?"); -- 1.7.1