debug info, annotations, editing

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: debug info, annotations, editing

Re: debug info, annotations, editing

Post by robert » Sun Feb 02, 2014 3:15 pm

Hi ebbp,

For your first question, how have you configured the library to point to your JDK?

I assume the location it's complaining about is the @Before annotation, not the @Operator one, correct? If so, sounds like a bug. Please [url=https://github.com/bobbylight/RSTALanguageSupportreport it on GitHub[/url].

As for preventing the editing of Java constructors, do you mean actually making that part of the editor read-only? If so then that would be tricky. You'd probably want to install a custom [url=http://docs.oracle.com/javase/7/docs/api/javax/swing/text/DocumentFilter.html]DocumentFilter[/url], and on all edits, check whether the caret position, or any part of the selected text range, is in the constructor. If so, prevent the edit. You'd probably have to reach into RSTALanguageSupport's AST (or do your own parsing) to know what parts of the document are parts of the constructor.

debug info, annotations, editing

Post by ebbp » Sat Feb 01, 2014 9:12 pm

Hello,

I have couple of questions so I will try to ask them all in one topic (hope it's not a problem):
1. I am trying to use language support for java but even if I am following your guide I am always getting the same debug info > "[DEBUG]: Couldn't find ClassFile for: java.lang.Object" (or another class). It does not even basic keywords.

2. Another problem I have encountered is with annotations. In the following code snippet I always get this error: "java.io.IOException: Expected identifier, found: [TokenImpl: type=67108864; lexeme="@"; line=7; col=39; offs=227; invalid=false]". Is there a way to fix it?

Code: Select all
public final class Mul extends BinaryOperation {
    @Operator(priority = 2)
    public Mul(Expression expression1, @Before("STAR") Expression expression2) {
        super(expression1, expression2);
    }}

3. My last question is rather strange. I would like to ask if it is possible to disable editing of some parts of the code. In my case I would like to disable editing of java constructors. Is it possible?

Thanks :)

Top