Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java')
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java
new file mode 100644
index 0000000000..3008721743
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class MakefileWordDetector implements IWordDetector {
+
+ private static final String correctStartSpecChars = "%*().><"; //$NON-NLS-1$
+ private static final String correctSpecChars = "@$/\\"; //$NON-NLS-1$
+
+ /**
+ * @see IWordDetector#isWordPart(character)
+ */
+ public boolean isWordPart(char character) {
+ return Character.isLetterOrDigit(character) || (correctSpecChars.indexOf(character) >= 0);
+ }
+
+ /**
+ * @see IWordDetector#isWordStart(char)
+ */
+ public boolean isWordStart(char character) {
+ return Character.isLetterOrDigit(character) || (correctStartSpecChars.indexOf(character) >= 0);
+ }
+
+}

Back to the top