~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskInputDialog.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2013-10-03 20:30:16 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131003203016-d4ug6l0xgosasumq
Tags: 8.2.1-1
* New upstream release.
* Updated autotools documentation sources.

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        private void doValidation() {
144
144
                StatusInfo status = new StatusInfo();
145
145
                String newText = fNameDialogField.getText();
146
 
                if (newText.length() == 0) {
 
146
                if (newText.isEmpty()) {
147
147
                        status.setError(PreferencesMessages.TodoTaskInputDialog_error_enterName); 
148
148
                } else {
149
149
                        if (newText.indexOf(',') != -1) {
150
150
                                status.setError(PreferencesMessages.TodoTaskInputDialog_error_comma); 
151
151
                        } else if (fExistingNames.contains(newText)) {
152
152
                                status.setError(PreferencesMessages.TodoTaskInputDialog_error_entryExists); 
153
 
                        } else if (Character.isWhitespace(newText.charAt(0)) ||  Character.isWhitespace(newText.charAt(newText.length() - 1))) {
 
153
                        } else if (Character.isWhitespace(newText.charAt(0)) || Character.isWhitespace(newText.charAt(newText.length() - 1))) {
154
154
                                status.setError(PreferencesMessages.TodoTaskInputDialog_error_noSpace); 
155
155
                        }
156
156
                }
157
157
                updateStatus(status);
158
158
        }
159
159
 
160
 
        /*
161
 
         * @see org.eclipse.jface.window.Window#configureShell(Shell)
162
 
         */
163
160
        @Override
164
161
        protected void configureShell(Shell newShell) {
165
162
                super.configureShell(newShell);