Page 1 of 1

Java Syntax File Cannot Identify this.

Posted: Sun Mar 18, 2012 9:59 pm
by diek
I have searched the help file and the forum. I cannot figure out why my modified java.syn file is not picking up the word this, e.g. this.lobstertail. It will identify this, but as soon as I add the period game over.

Any guidance or help would be appreciated.

Posted: Mon Mar 19, 2012 6:22 am
by MudGuard
is the dot in the "other characters in words" (in Configure - Preferences - Document Classes - Java - Syntax)?

this dot

Posted: Mon Mar 19, 2012 1:47 pm
by diek
I have tried both this and this. In the case of this, it will add the color but as soon as I add the character ., it reverts. When I add this., again when I type the next character this.l, it reverts.

Cancel Last

Posted: Mon Mar 19, 2012 1:49 pm
by diek
I think I misunderstood. I will check what you said. I have a hardware test in a few hours so I have to keep prepping. I will be back.

The dot

Posted: Mon Mar 19, 2012 3:25 pm
by diek
Class was cancelled, along with the test...darn.

I tried to add the . but it generated an error, "Character Number 2 is invalid". But that was my dumb mistake, I added a space.

I tried the . and nope, next character reverts it.

Posted: Mon Mar 19, 2012 4:10 pm
by ben_josephs
The dot should not be amongst the Other characters in words.

What does "next character reverts it" mean?

next character

Posted: Mon Mar 19, 2012 4:53 pm
by diek
As soon as I type any alpha char after the dot, the syntax is no longer recognized and this goes from orange back to white.

this. highlighted
this.l not highlighted.

Posted: Mon Mar 19, 2012 5:46 pm
by ben_josephs
Which characters are in
Configure | Preferences | Document Classes | Java | Syntax | Other characters in words
and in
View | Document Properties | Syntax | Other characters in words
?

Other Characters

Posted: Mon Mar 19, 2012 6:08 pm
by diek
_. for both

Posted: Mon Mar 19, 2012 9:28 pm
by ben_josephs
Take out the dot.

Done

Posted: Tue Mar 20, 2012 12:26 am
by diek
Done, dot removed.

Posted: Tue Mar 20, 2012 7:13 am
by ben_josephs
And...?

Dot Removed = No Difference (Not Working)

Posted: Tue Mar 20, 2012 2:49 pm
by diek
Sorry I should have explained that I added the dot after the suggestion above. It was not working before, and it is still not working.

Posted: Tue Mar 20, 2012 3:12 pm
by ben_josephs
Neither MudGuard nor I made any such suggestion.
ben_josephs wrote:The dot should not be amongst the Other characters in words.
and
ben_josephs wrote:Take out the dot.
If, in View | Document Properties | Syntax,
  Enable syntax highlighting  is selected, and
  Syntax definition file  is java.syn, and
  Other characters in words  does not contain a dot,
then I don't know what the problem is.