~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/PackageWordDetector.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2007 Alphonse Van Assche
 
3
 * All rights reserved. This program and the accompanying materials
 
4
 * are made available under the terms of the Eclipse Public License v1.0
 
5
 * which accompanies this distribution, and is available at
 
6
 * http://www.eclipse.org/legal/epl-v10.html
 
7
 *
 
8
 * Contributors:
 
9
 *    Alphonse Van Assche - initial API and implementation
 
10
 *******************************************************************************/
 
11
 
 
12
package org.eclipse.linuxtools.internal.rpm.ui.editor.detectors;
 
13
 
 
14
import org.eclipse.jface.text.rules.IWordDetector;
 
15
 
 
16
public class PackageWordDetector implements IWordDetector {
 
17
 
 
18
        public boolean isWordPart(char c) {
 
19
                return Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '+');
 
20
        }
 
21
 
 
22
        public boolean isWordStart(char c) {
 
23
                return (c == ' ') || (c == ',') || (c == '\t') || (c == ':');
 
24
        }
 
25
}