aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack2013-01-26 08:11:49 (EST)
committerJack2013-01-26 08:11:49 (EST)
commit5a03289ef3b1cfa605a985233378611bb0ee1d15 (patch)
tree080f18d2def4423646f6ca1deed23254a1d2ff7a
parent0edfa9308243b38ae51e89c36445c3733bf1447c (diff)
downloadorg.eclipse.vjet.all-5a03289ef3b1cfa605a985233378611bb0ee1d15.zip
org.eclipse.vjet.all-5a03289ef3b1cfa605a985233378611bb0ee1d15.tar.gz
org.eclipse.vjet.all-5a03289ef3b1cfa605a985233378611bb0ee1d15.tar.bz2
Fix bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=397711
-rw-r--r--core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/internal/ui/preferences/PropertyAndPreferencePage.java17
-rw-r--r--core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/AbstractConfigurationBlock.java53
-rw-r--r--core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/EditorConfigurationBlock.java13
3 files changed, 36 insertions, 47 deletions
diff --git a/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/internal/ui/preferences/PropertyAndPreferencePage.java b/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/internal/ui/preferences/PropertyAndPreferencePage.java
index 65c19d3..58685a9 100644
--- a/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/internal/ui/preferences/PropertyAndPreferencePage.java
+++ b/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/internal/ui/preferences/PropertyAndPreferencePage.java
@@ -141,8 +141,8 @@ public abstract class PropertyAndPreferencePage extends PreferencePage
fChangeWorkspaceSettings.setLayoutData(new GridData(SWT.END,
SWT.CENTER, false, false));
} else {
- LayoutUtil.setHorizontalSpan(fUseProjectSettings
- .getSelectionButton(null), 2);
+ LayoutUtil.setHorizontalSpan(
+ fUseProjectSettings.getSelectionButton(null), 2);
}
Label horizontalLine = new Label(composite, SWT.SEPARATOR
@@ -162,7 +162,8 @@ public abstract class PropertyAndPreferencePage extends PreferencePage
}
/*
- * @see org.eclipse.jface.preference.IPreferencePage#createContents(Composite)
+ * @see
+ * org.eclipse.jface.preference.IPreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
@@ -341,7 +342,8 @@ public abstract class PropertyAndPreferencePage extends PreferencePage
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ * @see
+ * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
public void init(IWorkbench workbench) {
}
@@ -358,7 +360,9 @@ public abstract class PropertyAndPreferencePage extends PreferencePage
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
+ * @see
+ * org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime
+ * .IAdaptable)
*/
public void setElement(IAdaptable element) {
fProject = (IProject) element.getAdapter(IResource.class);
@@ -367,7 +371,8 @@ public abstract class PropertyAndPreferencePage extends PreferencePage
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.preference.PreferencePage#applyData(java.lang.Object)
+ * @see
+ * org.eclipse.jface.preference.PreferencePage#applyData(java.lang.Object)
*/
public void applyData(Object data) {
if (data instanceof Map) {
diff --git a/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/AbstractConfigurationBlock.java b/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/AbstractConfigurationBlock.java
index 7275d24..bf862be 100644
--- a/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/AbstractConfigurationBlock.java
+++ b/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/AbstractConfigurationBlock.java
@@ -125,8 +125,8 @@ public abstract class AbstractConfigurationBlock implements
fIsBeingManaged = false;
}
if (fLastOpenKey != null && fDialogSettingsStore != null)
- fDialogSettingsStore.setValue(fLastOpenKey, source
- .getText());
+ fDialogSettingsStore.setValue(fLastOpenKey,
+ source.getText());
} else {
if (!fIsBeingManaged && fLastOpenKey != null
&& fDialogSettingsStore != null)
@@ -180,8 +180,8 @@ public abstract class AbstractConfigurationBlock implements
* composite within that, to ensure that expanding the sections will
* always have enough space, unless there already is a
* <code>ScrolledComposite</code> along the parent chain of
- * <code>parent</code>, in which case a normal <code>Composite</code>
- * is created.
+ * <code>parent</code>, in which case a normal <code>Composite</code> is
+ * created.
* <p>
* The receiver keeps a reference to the inner body composite, so that
* new sections can be added via <code>createSection</code>.
@@ -267,8 +267,8 @@ public abstract class AbstractConfigurationBlock implements
public void widgetSelected(SelectionEvent e) {
Button button = (Button) e.widget;
- fStore.setValue((String) fCheckBoxes.get(button), button
- .getSelection());
+ fStore.setValue((String) fCheckBoxes.get(button),
+ button.getSelection());
}
};
@@ -282,17 +282,6 @@ public abstract class AbstractConfigurationBlock implements
String key = (String) combo.getData();
String value = (String) data.get(combo.getText());
fStore.setValue(key, value);
-
- // Add by Oliver. 2009-05-05. If we select the 'Tab only' in the
- // Combo, will disable the 'tab size' textbox.
- Set texts = fTextFields.keySet();
- if (texts.size() > 0) {
- Text t = (Text) texts.toArray()[0];
- t.setEnabled(!value.equals("space"));
- t.setText("4");
-
- // fStore.setValue("formatter.tabulation.char", "4");
- }
}
};
@@ -481,10 +470,10 @@ public abstract class AbstractConfigurationBlock implements
}
/**
- * Returns an array of size 2: - first element is of type <code>Label</code> -
- * second element is of type <code>Text</code> Use
- * <code>getLabelControl</code> and <code>getTextControl</code> to get
- * the 2 controls.
+ * Returns an array of size 2: - first element is of type <code>Label</code>
+ * - second element is of type <code>Text</code> Use
+ * <code>getLabelControl</code> and <code>getTextControl</code> to get the 2
+ * controls.
*
* @param composite
* the parent composite
@@ -497,8 +486,7 @@ public abstract class AbstractConfigurationBlock implements
* @param indentation
* the field's indentation
* @param isNumber
- * <code>true</code> iff this text field is used to edit a
- * number
+ * <code>true</code> iff this text field is used to edit a number
* @return the controls added
*/
protected Control[] addLabelledTextField(Composite composite, String label,
@@ -671,23 +659,18 @@ public abstract class AbstractConfigurationBlock implements
private IStatus validatePositiveNumber(String number) {
StatusInfo status = new StatusInfo();
if (number.length() == 0) {
- status
- .setError(PreferencesMessages.DLTKEditorPreferencePage_empty_input);
+ status.setError(PreferencesMessages.DLTKEditorPreferencePage_empty_input);
} else {
try {
int value = Integer.parseInt(number);
if (value < 0)
- status
- .setError(Messages
- .format(
- PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
- number));
+ status.setError(Messages
+ .format(PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
+ number));
} catch (NumberFormatException e) {
- status
- .setError(Messages
- .format(
- PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
- number));
+ status.setError(Messages
+ .format(PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
+ number));
}
}
return status;
diff --git a/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/EditorConfigurationBlock.java b/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/EditorConfigurationBlock.java
index 0aac93f..2c1dd12 100644
--- a/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/EditorConfigurationBlock.java
+++ b/core/org.eclipse.dltk.mod.ui/src/org/eclipse/dltk/mod/ui/preferences/EditorConfigurationBlock.java
@@ -155,16 +155,17 @@ public class EditorConfigurationBlock extends AbstractConfigurationBlock {
CodeFormatterConstants.FORMATTER_TAB_CHAR, tabPolicyLabels,
tabPolicyValues);
- // addLabelledTextField(
- // generalGroup,
- // FormatterMessages.IndentationTabPage_general_group_option_indent_size,
- // CodeFormatterConstants.FORMATTER_INDENTATION_SIZE, 2, 1,
- // true);
+ addLabelledTextField(
+ generalGroup,
+ FormatterMessages.IndentationTabPage_general_group_option_tab_size,
+ CodeFormatterConstants.FORMATTER_TAB_SIZE, 2, 1, true);
addLabelledTextField(
generalGroup,
FormatterMessages.IndentationTabPage_general_group_option_indent_size,
- CodeFormatterConstants.FORMATTER_TAB_SIZE, 2, 1, true);
+ CodeFormatterConstants.FORMATTER_INDENTATION_SIZE, 2, 1,
+ true);
+
}
if ((flags & FLAG_TAB_ALWAYS_INDENT) != 0) {