Last change
on this file since 13 was
13,
checked in by jbochenski, 15 years ago
|
|
-
Property svn:mime-type set to
text/plain
|
File size:
737 bytes
|
Rev | Line | |
---|
[13] | 1 | package com.framsticks.framclipse.syntaxColoring;
|
---|
| 2 |
|
---|
| 3 | import org.eclipse.jface.text.rules.IWordDetector;
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * A Framscript aware word detector.
|
---|
| 7 | */
|
---|
| 8 | public class FramscriptOperatorDetector implements IWordDetector {
|
---|
| 9 |
|
---|
| 10 | /*
|
---|
| 11 | * (non-Javadoc) Method declared on IWordDetector.
|
---|
| 12 | */
|
---|
| 13 | public boolean isWordPart(char character) {
|
---|
| 14 | for (String s : FramscriptCodeScanner.operators) {
|
---|
| 15 | if (s.indexOf(character) >= 0) {
|
---|
| 16 | return true;
|
---|
| 17 | }
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | return false;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | /*
|
---|
| 24 | * (non-Javadoc) Method declared on IWordDetector.
|
---|
| 25 | */
|
---|
| 26 | public boolean isWordStart(char character) {
|
---|
| 27 | for (String s : FramscriptCodeScanner.operators) {
|
---|
| 28 | if (s.indexOf(character) >= 0) {
|
---|
| 29 | return true;
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | return false;
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.