Changeset 349
- Timestamp:
- 09/14/08 05:52:40 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
jasko.tim.lisp/src/jasko/tim/lisp/editors/autoedits/CustomAutoEdit.java
r274 r349 3 3 import java.util.HashMap; 4 4 5 import jasko.tim.lisp.LispPlugin; 5 6 import jasko.tim.lisp.editors.LispPartitionScanner; 7 import jasko.tim.lisp.preferences.PreferenceConstants; 6 8 import jasko.tim.lisp.preferences.PreferenceInitializer; 7 9 import org.eclipse.jface.text.BadLocationException; … … 9 11 import org.eclipse.jface.text.IAutoEditStrategy; 10 12 import org.eclipse.jface.text.IDocument; 13 import org.eclipse.jface.util.IPropertyChangeListener; 14 import org.eclipse.jface.util.PropertyChangeEvent; 11 15 12 16 /* autoedit snippets, like (let) (progn) etc */ … … 145 149 public CustomAutoEdit(){ 146 150 initAutoEditTree(); 151 //FIXME: also need to properly dispose listener 152 LispPlugin.getDefault().getPreferenceStore() 153 .addPropertyChangeListener(new IPropertyChangeListener(){ 154 public void propertyChange(PropertyChangeEvent event) { 155 if(event.getProperty().equals(PreferenceConstants.CUSTOM_AUTO_EDITS)){ 156 initAutoEditTree(); 157 } 158 } 159 }); 147 160 } 148 161 jasko.tim.lisp/src/jasko/tim/lisp/preferences/AutoEditsPreferencePage.java
r268 r349 85 85 data.horizontalSpan = 2; 86 86 removeButton.setLayoutData(data); 87 87 88 Label helpLbl = new Label(entryTable, SWT.BORDER); 89 helpLbl.setText("AutoEdits allows automatic substituion as you type.\n" + 90 "They consist of two parts: trigger and substitution.\n" + 91 "In an AutoEdit specification these parts are seperated by ';'.\n" + 92 "Position of the caret after substitution is specified by '|'.\n" + 93 "\n" + 94 "Example: 'let ;let ((|))'. When you type 'let ' you'll get\n" + 95 "'let (())' with caret placed inside inner brackers.\n" + 96 "\n" + 97 "Note: AutoEdits work only in lisp code and are not triggered\n" + 98 "in comments or strings."); 99 data = new GridData(GridData.FILL_BOTH); 100 helpLbl.setLayoutData(data); 101 102 88 103 return entryTable; 89 104 }
