p2izing the editor
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / 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.apache.log4j.Logger;
12 import org.eclipse.swt.custom.StyledText;
13 import org.eclipse.swt.events.ModifyEvent;
14 import org.eclipse.swt.events.ModifyListener;
15
16 /**
17 * Passes modified text to the method <code>parse</code>.
18 *
19 * @author p.ciardelli
20 * @created 02.06.2008
21 * @version 1.0
22 */
23 public abstract class ParseListener implements ModifyListener {
24 private static final Logger logger = Logger
25 .getLogger(ParseListener.class);
26
27 public void modifyText(ModifyEvent e) {
28 StyledText widget = (StyledText) e.widget;
29 String text = widget.getText();
30 parse(text);
31 }
32
33 abstract public void parse(String text);
34 }