finalizing preferred refactoring
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / editor / ParseListener.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.editor;
10
11 import org.eclipse.swt.custom.StyledText;
12 import org.eclipse.swt.events.ModifyEvent;
13 import org.eclipse.swt.events.ModifyListener;
14
15 /**
16 * Passes modified text to the method <code>parse</code>.
17 *
18 * @author p.ciardelli
19 * @created 02.06.2008
20 * @version 1.0
21 */
22 public abstract class ParseListener implements ModifyListener {
23
24 public void modifyText(ModifyEvent e) {
25 StyledText widget = (StyledText) e.widget;
26 String text = widget.getText();
27 parse(text);
28 }
29
30 abstract public void parse(String text);
31 }