Definition Hyperlinking doesn't work sometimes (often)
Definition hyperlinking often doesn't work. Still not in 3.0 RC1 for me.
What happens is that when I hold down ctrl/cmd and hover an underscore appears, but when I click I don't navigate to the definition but stay some apparantly random text is selected. See attached image. Here I ctrl-clicked "StringField".
MINIMIZED:
The tree for the parent (`StringField`) gets an `OffsetPosition` instead of a `RangePosition`, confusing the hyperlink detector.
What happens is that when I hold down ctrl/cmd and hover an underscore appears, but when I click I don't navigate to the definition but stay some apparantly random text is selected. See attached image. Here I ctrl-clicked "StringField".
MINIMIZED:
class StringField[A](a: A)
class LogEntry1 {
object sessionId extends StringField(this)
}
The tree for the parent (`StringField`) gets an `OffsetPosition` instead of a `RangePosition`, confusing the hyperlink detector.
Leave a comment
on 2013-03-01 16:34 *
By Iulian Dragos
Can you include the faulty code? Unfortunately, the screenshot does not include enough context to attempt a fix. I understand your frustration, but you don't give us much to work with.
Sure thing, and sorry, for late reply - something wrong with my notification settings.
import net.liftweb.mongodb.record.BsonMetaRecord
import net.liftweb.mongodb.record.BsonRecord
import net.liftweb.record.field.StringField
import net.liftweb.mongodb.record.field.DateField
class LogEntry private () extends BsonRecord[LogEntry] {
def meta = LogEntry
object sessionId extends StringField(this, 100)
object ip extends StringField(this, 100)
object timeStamp extends DateField(this)
object inputText extends StringField(this, 300)
}
object LogEntry extends LogEntry with BsonMetaRecord[LogEntry] {
}
on 2013-03-07 15:47 *
By Iulian Dragos
Thank you, I can reproduce it (unfortunately, I couldn't reduce it to a smaller example, so right now I'm dragging the whole Lift dependency graph). I hope we can fix it soon.
on 2013-03-07 15:59 *
By Iulian Dragos
Description changed from Definition hyperlinking oft... to Definition hyperlinking oft...
The problem is in the presentation compiler, so unfortunately the fix will be available only in the 2.10 series. I know this won't help much, Lift is still on 2.9, but thanks a lot for taking the time to report this. I'll think about a workaround on the IDE side, but it seems hard.
on 2013-03-07 16:10 *
By Iulian Dragos
Compiler ticket: https://issues.scala-lang.org/browse/SI-7224