Missing class after migrating to 2.0.7

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Missing class after migrating to 2.0.7

Re: Missing class after migrating to 2.0.7

Post by robert » Fri Jul 26, 2013 2:55 am

In 2.0.7, "Token" is a concrete class, and is what your .flex file should use. Sorry for the API change.

And unfortunately, in the next release, it will change again. "Token" will become an interface, and "TokenImpl" will be the implementation you should use in scenarios like yours. That's why you're seeing TokenImpl in SVN, but the commit comment you found talks only about a concrete "Token" class.

I'll document this change better in the next release, as it will probably be "major" (bumping the required JVM version to 5.0 from 1.4). Again, I'm sorry about that!

Missing class after migrating to 2.0.7

Post by preditcon » Wed Jul 24, 2013 12:38 pm

Our .flex file contains a reference to org.fife.ui.rsyntaxtextarea.DefaultToken which is missing in newer versions of RSyntaxArea jars. When we upgrade to newer jars, we obviously get syntax errors as a result.

The only place with a reference to this class is in exception handling code of getTokenList(Segment text, int initialTokenType, int startOffset). I did not write this flex file, but it's obviously tailored towards RSytaxTextArea, perhaps even based on some template.

What happened to the mentioned class? I assume it has been deprecated in favor of something else?

java code:

catch (IOException ioe) {
ioe.printStackTrace();
return new DefaultToken();
}


Edit:
While writing this, I browsed some source code and found out that org.fife.ui.rsyntaxtextarea.TokenImpl is what I'm looking for. Still posting for future reference. BTW, should I keep my eyes peeled for anything similar?

Edit2
Yeah. That didn't work... TokenImpl is only present in svn repo, not within distro jars.

Edit3
Code: Select all
Revision 769 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 16 05:02:29 2013 UTC (4 months, 1 week ago) by bobby_light
File length: 8196 byte(s)
Diff to previous 731

RSTA: Tokens no longer render themselves; painting is now handled by TokenPainter implementations.  Thus our silly "DefaultToken" and "VisibleWhitespaceToken" classes are replaced by just a "Token" class, and we have a "DefaultTokenPainter" and "VisibleWhitespaceTokenPainter" class instead.  This does mean that any user-created TokenMakers (e.g. by TMM or by hand) will not work without replacing references to "DefaultToken" with "Token".

Top

cron