1 11 package org.eclipse.ui.internal.editors.text; 12 13 import org.eclipse.core.runtime.IStatus; 14 15 import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds; 16 import org.eclipse.ui.texteditor.spelling.IPreferenceStatusMonitor; 17 18 19 27 public class SpellingPreferencePage extends AbstractConfigurationBlockPreferencePage { 28 29 32 private class StatusMonitor implements IPreferenceStatusMonitor { 33 34 37 public void statusChanged(IStatus status) { 38 handleStatusChanged(status); 39 } 40 } 41 42 47 protected void handleStatusChanged(IStatus status) { 48 setValid(!status.matches(IStatus.ERROR)); 49 StatusUtil.applyToStatusLine(this, status); 50 } 51 52 55 protected String getHelpId() { 56 return IAbstractTextEditorHelpContextIds.PREFIX + "spelling_preference_page_context"; } 59 60 63 protected void setDescription() { 64 } 65 66 69 protected void setPreferenceStore() { 70 setPreferenceStore(EditorsPlugin.getDefault().getPreferenceStore()); 71 } 72 73 76 protected IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore) { 77 return new SpellingConfigurationBlock(overlayPreferenceStore, new StatusMonitor()); 78 } 79 } 80 | Popular Tags |