Hi,

my answer below.

-- 
Dawid Pakuła

From: Eenhuis <excepti...@hotmail.com> <excepti...@hotmail.com>
Reply: PDT Developers <pdt-dev@eclipse.org> <pdt-dev@eclipse.org>
Date: 9 August 2016 at 10:22:11
To: pdt-dev <pdt-dev@eclipse.org> <pdt-dev@eclipse.org>
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 =

into

    $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




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

_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev
_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

Reply via email to