Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-11-30 13:23:07 -0500
committerMichael Valenta2004-11-30 13:23:07 -0500
commit406fcbf9d92784dcdf6cf2bf1994db3d2b43618c (patch)
tree044417b7e25fbc9cf103cca68cf4f56cb1d2bbb1
parent76bd23b0aab0e8584d84c620ec2a6c1b739d94b8 (diff)
downloadeclipse.platform.team-406fcbf9d92784dcdf6cf2bf1994db3d2b43618c.tar.gz
eclipse.platform.team-406fcbf9d92784dcdf6cf2bf1994db3d2b43618c.tar.xz
eclipse.platform.team-406fcbf9d92784dcdf6cf2bf1994db3d2b43618c.zip
[77497] AIOOB exception showing Pessimistic example preference page
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java32
1 files changed, 20 insertions, 12 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java
index 81213bb8b..4bc37d635 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java
@@ -270,18 +270,26 @@ public class PessimisticPreferencesPage
public boolean performOk() {
IPreferenceStore store = getPreferenceStore();
- store.setValue(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED,
- EDIT_OPTION_KEYS[filesAreEditedCombo.getSelectionIndex()]);
- store.setValue(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT,
- SAVE_OPTION_KEYS[filesAreEditedNoPromptCombo.getSelectionIndex()]);
- store.setValue(
- IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED,
- SAVE_OPTION_KEYS[filesAreSavedCombo.getSelectionIndex()]);
- store.setValue(
- IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL,
- ADD_TO_CONTROL_OPTION_KEYS[addToControlCombo.getSelectionIndex()]);
+ int selectionIndex = filesAreEditedCombo.getSelectionIndex();
+ if (selectionIndex != -1)
+ store.setValue(
+ IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED,
+ EDIT_OPTION_KEYS[selectionIndex]);
+ selectionIndex = filesAreEditedNoPromptCombo.getSelectionIndex();
+ if (selectionIndex != -1)
+ store.setValue(
+ IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT,
+ SAVE_OPTION_KEYS[selectionIndex]);
+ selectionIndex = filesAreSavedCombo.getSelectionIndex();
+ if (selectionIndex != -1)
+ store.setValue(
+ IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED,
+ SAVE_OPTION_KEYS[selectionIndex]);
+ selectionIndex = addToControlCombo.getSelectionIndex();
+ if (selectionIndex != -1)
+ store.setValue(
+ IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL,
+ ADD_TO_CONTROL_OPTION_KEYS[selectionIndex]);
store.setValue(
IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT,
failValidateEdit.getSelection());

Back to the top