Community
Participate
Working Groups
Created attachment 274963 [details] Auto completion works I have a strange behavior because the completion works when I write: $fieldDefinition->getRuleDefinition()->| But not if I write: $ruleDefinition = $fieldDefinition->getRuleDefinition(); $ruleDefinition->| But it's only the case when those statements are in an anonymous function. Do you know what could be wrong?
Created attachment 274964 [details] Alternative auto completion works
Created attachment 274965 [details] Auto completion doesn't works (in anonymous function)
Could you provide working example? zipped project or couple PHP classes? I'm afraid this can be another design error (similar to traits madness :P) :/
I will try to do it next week.
Please find here a very simple example that reproduce the issue: http://sandbox.onlinephpfunctions.com/code/6acfcb1148c21ba637a36eea821e8ed830388cf5 In this case we don't have auto completion on the $formDefinition object in $configCallback anonymous function: $formDefinition->| <- No default proposal Note that when we replace: public function configureFields() { $configCallback = function () { $formDefinition = new FormDefinition(); return $formDefinition->getFields(); }; return [ 'fields' => $configCallback, ]; } With: public function configureFields() { return [ 'fields' => function () { $formDefinition = new FormDefinition(); return $formDefinition->getFields(); }, ]; } $formDefinition->| <- getFields() // Works as expected http://sandbox.onlinephpfunctions.com/code/cdf6f9d422405ad9e868e6f087bc426a57ba60d1
With this example forks fine for me in both cases :/ Even if I split into file per-class. Have you something in logs?
I just have this: !ENTRY org.eclipse.equinox.p2.metadata.repository 2 0 2018-07-18 16:29:41.061 !MESSAGE Error parsing metadata repository !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 46, column 62: Missing required attribute in "property": value !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 611, column 62: Missing required attribute in "property": value !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 1051, column 62: Missing required attribute in "property": value !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 1065, column 62: Missing required attribute in "property": value !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 2441, column 62: Missing required attribute in "property": value !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 2657, column 62: Missing required attribute in "property": value !SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-07-18 16:29:41.061 !MESSAGE Error in file:/home/lallement/opt/eclipse-photon/p2/org.eclipse.equinox.p2.repository/cache/content321157045.jar at line 3951, column 62: Missing required attribute in "property": value !ENTRY org.eclipse.jface 2 0 2018-07-18 16:39:17.772 !MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation. !SUBENTRY 1 org.eclipse.jface 2 0 2018-07-18 16:39:17.772 !MESSAGE A conflict occurred for CTRL+SHIFT+N: Binding(CTRL+SHIFT+N, ParameterizedCommand(Command(org.eclipse.jdt.debug.ui.commands.AllInstances,All Instances, View all instances of the selected type loaded in the target VM, Category(org.eclipse.debug.ui.category.run,Run/Debug,Run/Debug command category,true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@2347ca7a, ,,true),null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.ui.contexts.window,,,system) Binding(CTRL+SHIFT+N, ParameterizedCommand(Command(org.pdtextensions.core.ui.command.phpcsfixer,Run PHP-CS-Fixer, Run PHP-CS-Fixer on files and folders, Category(org.eclipse.core.commands.categories.autogenerated,Uncategorized,Commands that were either auto-generated or have no category,true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@5b7bd551, ,,true),null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.php.core.phpsource,,,system) Binding(CTRL+SHIFT+N, ParameterizedCommand(Command(org.eclipse.php.debug.ui.commands.InspectDelegate,Inspect, Inspect result of evaluating selected text, Category(org.eclipse.debug.ui.category.run,Run/Debug,Run/Debug command category,true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@54c543a5, ,,true),null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.php.ui.phpEditorScope,,,system)
Created attachment 275040 [details] Installed Software
It's a bit strange because when I check for available updates this morning, Eclipse show me: PDT 6.0.0.20180612250. But I already have the release 6.1.0.201807152250
Created attachment 275042 [details] Error after fresh install (Eclipse IDE for PHP Developers 4.8.0)
(In reply to Thomas Lallement from comment #10) > Created attachment 275042 [details] > Error after fresh install (Eclipse IDE for PHP Developers 4.8.0) You can ignore this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=535954 ;)
Ok so I see nothing special but the auto completion doesn't works for me with the fresh install.
OK I see this now. You shared working version ;)
I shared both not working: http://sandbox.onlinephpfunctions.com/code/6acfcb1148c21ba637a36eea821e8ed830388cf5 And working one: http://sandbox.onlinephpfunctions.com/code/cdf6f9d422405ad9e868e6f087bc426a57ba60d1
New Gerrit change created: https://git.eclipse.org/r/126335
Gerrit change https://git.eclipse.org/r/126335 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=f19e5baff96f584388429216b248180bd7dc4c7c
Thanks. It works like a charm!