[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Shaving of keystrokes: extension points?


my answer below.

Dawid PakuÅa

From:ÂEenhuis <exceptione@xxxxxxxxxxx>
Reply:ÂPDT Developers <pdt-dev@xxxxxxxxxxx>
Date:Â9 August 2016 at 10:22:11
To:Âpdt-dev <pdt-dev@xxxxxxxxxxx>
Subject:Â [pdt-dev] Shaving of keystrokes: extension points?

 1. Is the documentation on pdt extension points outdated? Â

AD: Yes ;(


I tried to implement the sample Code assist strategy [1]. I have the following observations:Â

1. The code contains an error (XYZCompletionContext contains superflous brace).Â
2. The last modification date of the extension help [1] is 2 May 2014Â
3. I get a lot of warnings likeÂ

ÂÂÂ Discouraged access: The type 'CodeCompletionRequestor' is not APIÂ
ÂÂÂÂÂÂÂ (restriction on required library '/home/xyz/eclipse/agents/standaard/pool/Â
ÂÂÂÂÂÂÂ plugins/org.eclipse.php.core_4.0.1.201606232253.jar')Â

Most of current extension points require you to use *.internal classes so itâs not API in Eclipse mean. We working to clean this up, but for now you can just ignore such errors.

4. The XYZCompletionContext sample [1] doesn work correctly as it breaks the auto-completionÂ

 2. What I want to achieveÂ

In php-method context I want to automatically rewriteÂ

ÂÂÂ var =Â


ÂÂÂ $var =Â

I also want to give autocompletion for "var" as variable, eventhough it is not prefixed yet with a dollar.Â

What extension points would I need to achieve this?Â

AD: It depends when should this happen? After ctr+space as a suggestion, as quick fix/quick assist (ctrl +1), during. For ctrl+space or ctr+1 suggestions you should use one of PDT extension point, to force autochange on enter/space directly, WTP SSE autoedit extension point will be requiredand PDT >= 3.5 :Âhttps://bugs.eclipse.org/bugs/show_bug.cgi?id=460546

1. https://wiki.eclipse.org/Extending_PDT#Code_assist_strategiesÂ

pdt-dev mailing listÂ
To change your delivery options, retrieve your password, or unsubscribe from this list, visitÂ