Skip to content

Commit

Permalink
No longer allowing the user to save the block preferences with no cha…
Browse files Browse the repository at this point in the history
…rs or more than 1 char.
  • Loading branch information
fabioz committed Sep 30, 2010
1 parent 1274970 commit 34e5906
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -10,6 +10,7 @@
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.python.pydev.core.structure.FastStringBuffer;
Expand Down Expand Up @@ -51,6 +52,8 @@ public CommentBlocksPreferences() {
protected void createFieldEditors() {
final Composite p = getFieldEditorParent();
multiBlock = new StringFieldEditor(MULTI_BLOCK_COMMENT_CHAR, "Multi-block char (ctrl+4):", 2, p);
multiBlock.getTextControl(p).setTextLimit(1);
multiBlock.setEmptyStringAllowed(false);
addField(multiBlock);

addField(new BooleanFieldEditor(MULTI_BLOCK_COMMENT_SHOW_ONLY_CLASS_NAME, "In a class name, create block only with class name above of class?", p));
Expand All @@ -59,6 +62,8 @@ protected void createFieldEditors() {
labelMulti = new Label(p, SWT.NONE);

singleBlock = new StringFieldEditor(SINGLE_BLOCK_COMMENT_CHAR, "Single-block char (ctrl+shift+4):", 2, p);
singleBlock.setEmptyStringAllowed(false);
singleBlock.getTextControl(p).setTextLimit(1);
addField(singleBlock);

alignSingle = new BooleanFieldEditor(SINGLE_BLOCK_COMMENT_ALIGN_RIGHT, "Align text in single-block to the right?", p);
Expand Down

0 comments on commit 34e5906

Please sign in to comment.