refactory: added UI removed from core plugin.
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / xml / ui / internal / text / WhitespaceDetector.java
1 /*
2  * Copyright (c) 2002-2004 Widespace, OU and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  *     Igor Malinin - initial contribution
10  *
11  * $Id: WhitespaceDetector.java,v 1.2 2006-10-21 23:14:13 pombredanne Exp $
12  */
13
14 package net.sourceforge.phpeclipse.xml.ui.internal.text;
15
16 import org.eclipse.jface.text.rules.IWhitespaceDetector;
17
18 /**
19  * XML white-space detector.
20  * 
21  * @author Igor Malinin
22  */
23 public class WhitespaceDetector implements IWhitespaceDetector {
24
25         /**
26          * @see IWhitespaceDetector#isWhitespace(char)
27          */
28         public boolean isWhitespace(char ch) {
29                 switch (ch) {
30                 case 0x09:
31                 case 0x0A:
32                 case 0x0D:
33                 case 0x20:
34                         return true;
35
36                 default:
37                         return false;
38                 }
39         }
40 }