Community
Participate
Working Groups
AK (6/5/01 2:35:19 PM) you can put an empty string as a bookmark name - but the action does nothing then. emoty string should not be allowed. NOTES: GDA (6/5/01 12:08:06 PM) Defer. Not clear this is a JUI issue? Move to ui for kh to handle.
PRODUCT VERSION: 118
Add Task dialog had the same problem. Both now disable the ok button unless text is entered.
Created attachment 293 [details] Proposed fix
Verified and released into HEAD stream
The same IInputValidator needs to be added to the InputDialog in AddMarkerAction.askForLabel That method is called when adding a marker on the text selection in an editor. Also, please remove the final I added to "String message" in MarkerRulerAction.askForLabel as well as add //$NON-NLS-1$ behind the return " " (as shown below). The intent here is to disable the OK button by return a message/non-empty string. An actual error message should not be necessary as the input dialog is very simple and straightforward. IInputValidator inputValidator = new IInputValidator() { public String isValid(String newText) { if (newText == null || newText.length() == 0) { return " "; //$NON-NLS-1$ } return null; } };
Sent mail to Kai asking him to incorporate the changes I outline above.
Integrated changes into MarkerRulerAction & AddMarkerAction.