Scala Plugin for NetBeans - Rewrite in Scala #5: Refactoring Step One - Finding usages

I'm working on Refactoring features for NetBeans' Scala plugin, the first step is finding usages of class/method/val etc across project's source files, it works now. The next step will be renaming them.

Following snapshot shows class "ScalaDfn?" are used in 19 places, across 6 Scala sources

ScalaEditor-090902.png

  • Posted: 2009-09-02 09:00 (Updated: 2009-12-30 03:29)
  • Author: dcaoyuan
  • Categories: NetBeans

Comments

1. Andrew -- 2009-09-02 09:00

Awesome!

Caoyuan, you are reading my thoughts (I mean RFE in GG).

2. Blair -- 2009-09-02 09:00

Its all good its being stable and working really nicely here.

I've found a couple of bugs though, is there a place to report them?

Anyway, I was just popping on mainly to say thanks! Your work is making a huge difference to a lot of people, myself included. We are very much in awe of what you have got going.

3. Caoyuan -- 2009-09-02 09:00

@Blair, the official issue tracking is at:  http://www.netbeans.org/issues/buglist.cgi?Submit+query=Submit+query&component=languages&subcomponent=scala

Thanks for reporting bugs.

@Andrew, I've found more potential issues of Scala's runtime libs by watching output from NetBeans' console window/logs

4. Andrew -- 2009-09-02 09:00

Caoyuan,

I'm ready to track NB console and report anything interesting for you - just give me an idea what is interesting at current context :-)

Say, I saw sych thing:

WARNING [org.netbeans.modules.editor.bracesmatching.MasterMatcher?]: Origin offsets out of range, origin = [562, 563], caretOffset = 561, lookahead = 1, searching backwards. Offending BracesMatcher?: org.netbeans.modules.scala.editor.ScalaBracesMatcher@22?1a191b

except for reported exception wrt negative array size. As for

BinaryAnalyser?: Cannot read type: <A:Ljava/lang/Object;>Ljava/lang/Object;Lscala/collection/mutable/Vector...

- I still see it.

BTW,

 https://lampsvn.epfl.ch/trac/scala/ticket/2323

5. Andrew -- 2009-09-04 09:00

Caoyuan, have got:

java.lang.AssertionError?: assertion failed: This generic node: Token is a void node, this should happen only on EOF. Check you rats file.

at scala.Predef$.assert(Predef.scala:107) at org.netbeans.modules.scala.editor.lexer.ScalaLexer?.flattenToTokenStream(ScalaLexer?.scala:188) at org.netbeans.modules.scala.editor.lexer.ScalaLexer?.scanTokens(ScalaLexer?.scala:166) at org.netbeans.modules.scala.editor.lexer.ScalaLexer?.nextToken(ScalaLexer?.scala:94) at org.netbeans.lib.lexer.LexerInputOperation?.nextToken(LexerInputOperation?.java:190) at org.netbeans.lib.lexer.BatchTokenList?.tokenOrEmbeddingImpl(BatchTokenList?.java:175) at org.netbeans.lib.lexer.BatchTokenList?.tokenOrEmbedding(BatchTokenList?.java:170) at org.netbeans.api.lexer.TokenSequence?.moveNext(TokenSequence?.java:454) at org.netbeans.modules.scala.editor.refactoring.RetoucheUtils?$.getHtml(RetoucheUtils?.scala:167) at org.netbeans.modules.scala.editor.refactoring.WhereUsedElement?$.apply(WhereUsedElement?.scala:142) at org.netbeans.modules.scala.editor.refactoring.WhereUsedElement?$.apply(WhereUsedElement?.scala:79) at org.netbeans.modules.scala.editor.refactoring.WhereUsedQueryPlugin?$FindTask?$$anonfun$1$$anonfun$apply$3.apply(WhereUsedQueryPlugin?.scala:408) at org.netbeans.modules.scala.editor.refactoring.WhereUsedQueryPlugin?$FindTask?$$anonfun$1$$anonfun$apply$3.apply(WhereUsedQueryPlugin?.scala:404) at scala.collection.generic.LinearSequenceTemplate?$class.foreach(LinearSequenceTemplate?.scala:82) at scala.collection.immutable.List.foreach(List.scala:27) at org.netbeans.modules.scala.editor.refactoring.WhereUsedQueryPlugin?$FindTask?$$anonfun$1.apply(WhereUsedQueryPlugin?.scala:404)