1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor.textEditor.policies;
13
14 import org.eclipse.gef.Request;
15 import org.eclipse.gef.editpolicies.AbstractEditPolicy;
16
17 import sk.uniba.euromath.editor.textEditor.requests.RequestConstants;
18
19 /***
20 * Policy for basic text edit functionality - insertion and deletion of text +
21 * activation of editing(discutable).
22 *
23 * @author Tomáš Studva 30.1.2006
24 */
25 public abstract class AbstractTextEditPolicy extends AbstractEditPolicy {
26
27 /***
28 * Be careful when overriding.
29 */
30 @Override
31 final public boolean understandsRequest(Request req) {
32 if (req.getType() == RequestConstants.EDIT_TEXT_REQUEST)
33 return true;
34 return false;
35 }
36
37 }