viewer.getTextWidget().addKeyListener(new KeyListener() { public void keyPressed(KeyEvent e) { handleKeyPressed(e); }  public void keyReleased(KeyEvent e) {} });
public void keyReleased(KeyEvent e) {} }); }
	private SourceViewer createEditor(Composite parent) {		SourceViewer viewer= new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);		JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();		viewer.configure(new SimpleJavaSourceViewerConfiguration(tools, null, fProcessor));		viewer.setEditable(true);		viewer.setDocument(new Document(fTemplate.getPattern()));				Font font= JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT);		viewer.getTextWidget().setFont(font);				Control control= viewer.getControl();		GridData data= new GridData(GridData.FILL_BOTH);		data.widthHint= convertWidthInCharsToPixels(60);		data.heightHint= convertHeightInCharsToPixels(5);		control.setLayoutData(data);				viewer.addTextListener(new ITextListener() {			public void textChanged(TextEvent event) {			    try {					fTranslator.translate(event.getDocumentEvent().getDocument().get());			    } catch (CoreException e) {			     	JavaPlugin.log(e);			     	// XXX dialog   			    }								updateUndoAction();				updateButtons();			}		});		viewer.addSelectionChangedListener(new ISelectionChangedListener() {						public void selectionChanged(SelectionChangedEvent event) {				updateSelectionDependentActions();			}		});			viewer.getTextWidget().addKeyListener(new KeyListener() {			public void keyPressed(KeyEvent e) {				handleKeyPressed(e);			}			public void keyReleased(KeyEvent e) {}		});				return viewer;	}