Hi,
my answer below. § 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
|