Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Autocompletion triggers and function navigation(A few issues with Eclipse for PHP Development)
icon5.gif  Autocompletion triggers and function navigation [message #493946] Wed, 28 October 2009 15:14 Go to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 13
Registered: October 2009
Junior Member
Hi there

I'm using PHP Galileo for PHP Development and I have a project with existing files. I wan to use the functions defined in thoses files in other new files....

I've used Eclipse from 3.2 with PHPEclipse plugin and it let me define the triggers that launch code completion editing a file on the workspace.

On eclipse 3.5 with PDT I can't define triggers for autocompletion, lets say that I have a function outside of a Class in a file called TheClass.class.php
//TheClass.class.php

public class TheClass{
       --Body
}//Class End

//THE FUNCTION
function shouldBeUsedEverywhere(){
      echo 'I must print wherever they call me';
}


//theIncluder.php
include('TheClass.class.php');

//I want to do this (but the editor doesn't give me hints about function name)
shouldBeUsedEverywhere()

The thing is that if I start typing s-h-o-u...... I don't have any hint completion, so I have to look in the file for the correct sintaxys of the function.

The file I edited on Eclipse 3.2 to 3.4 was (workspace/.metadata/.plugins/org.eclipse.core.runtime/.sett ings/net.sourceforge.phpeclipse.prefs) to get the autocompletion with every character typed. This is the content of that file:
net.sourceforge.phpdt.ui.text.custom_code_templates=
formatJavaDocs=true
net.sourceforge.phpdt.ui.text.custom_templates=
editor_p_trim_on_save=true
org.eclipse.jface.textfont=1|Monospace|10|0|GTK|1|;
content_assist_autoactivation_triggers_php=abcdefghilmnopqrstuvzkjxyw
spacesForTabs=true
eclipse.preferences.version=1
content_assist_autoactivation_delay=0
fontPropagated=true
spelling_check_spelling=true

Looking for that file on Eclipse for PHP Development I found this:
workspace/.metadata/.plugins/org.eclipse.core.runtime/.setti ngs/org.eclipse.php.core.prefs

And its content: (last line is what i tried to do to get any character autocompletion)
#Tue Oct 27 16:21:25 COT 2009
org.eclipse.php.core.taskPriorities=NORMAL,HIGH,NORMAL,NORMAL
eclipse.preferences.version=1
org.eclipse.php.core.taskTags=TODO,FIXME,XXX,@todo
org.eclipse.php.core.taskCaseSensitive=enabled
contentAssistAutoactivation=true
contentAssistAutoactivationDelay=50

## Set autocompletion triggers
contentAssistAutoactivationTriggers=abcdefghilmnopqrstuvzkjxyw_$ABCDEFGHIJKLMNOPQRSTUVWXYZ


Another issue I face is that if I have a function call (i.e shouldBeUsedEverywhere() ) and I do Ctrl+Left Click to go to the function definition it doesn't work.

Thanks for your help
Re: Autocompletion triggers and function navigation [message #493960 is a reply to message #493946] Wed, 28 October 2009 15:34 Go to previous messageGo to next message
Michael Spector is currently offline Michael SpectorFriend
Messages: 110
Registered: July 2009
Senior Member

Hi,

Please provide the following information:

1. PDT version and build ID.
2. Project structure (only for two files you mentioned).
3. Contents of file ".buildpath" placed in your project.
4. Are there any exceptions in the .log file?

Thanks,
Michael
Re: Autocompletion triggers and function navigation [message #495275 is a reply to message #493960] Wed, 04 November 2009 13:11 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 13
Registered: October 2009
Junior Member
Michael Spector wrote on Wed, 28 October 2009 11:34
Hi,

Please provide the following information:

1. PDT version and build ID.
2. Project structure (only for two files you mentioned).
3. Contents of file ".buildpath" placed in your project.
4. Are there any exceptions in the .log file?

Thanks,
Michael
Thanks for the answer Michael...I'm sorry I can't post soon but here I am Razz
When I see what you ask me to put here, I realize that because I was working with the EclipsePHP plugin before, there wasn't a .buildpath file on the project folder. So first thing I did was create a new project setting the folder where the previous project was as the project folder and then I had autocompletion just as I want. But I'm experiencing now constant hungs in the platform (saving a file, refreshing workspace, and so on). As soon as I experienced one of them (today I'll work all day long on Eclipse+PDT to test) I'll be posting back.
Re: Autocompletion triggers and function navigation [message #495283 is a reply to message #495275] Wed, 04 November 2009 13:41 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 13
Registered: October 2009
Junior Member
I'm not so glad I had to post already. But I experienced a hung when I was doing something as simple as puting a $ sign to create a variable (line 64 on the image) and Eclipse hungs with the message that you can see on the image [1] :S. It happens a lot to me and the autocompletion takes so long even if I have a 10 ms autoactivation delay.
This is my .buildpath file content:
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
	<buildpathentry kind="src" path=""/>
	<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
And the version of PDT I have is 2.1.1.v20090707-1108-51584QACJCRCUeNRkNWY_JenZS9O on Eclipse for PHP Developers

Build id: 20090920-1017

The other image [2] is a screenshot of my project structure (about 6000 files on 790 folders) where we have JS libraries, PHP libraries and our clases and forms

[1] http://img62.imageshack.us/img62/1249/errorl.png
[2] http://img267.imageshack.us/img267/9995/seccionesw.png

Thanks for your help
Re: Autocompletion triggers and function navigation [message #495284 is a reply to message #495283] Wed, 04 November 2009 13:44 Go to previous messageGo to next message
Michael Spector is currently offline Michael SpectorFriend
Messages: 110
Registered: July 2009
Senior Member

Hi,

Most of hung issues were fixed for 2.2.0. Please upgrade to a newer integration build if you can.

Michael
Re: Autocompletion triggers and function navigation [message #495305 is a reply to message #495284] Wed, 04 November 2009 14:36 Go to previous message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 13
Registered: October 2009
Junior Member
Michael Spector wrote on Wed, 04 November 2009 08:44
Hi,

Most of hung issues were fixed for 2.2.0. Please upgrade to a newer integration build if you can.

Michael
Thanks Michael, I just did the update, I let you know If I have another issues...

Thanks
Previous Topic:debug: not a valid exe
Next Topic:Zend Debugger and PDT - 404 errors
Goto Forum:
  


Current Time: Tue Apr 23 07:30:27 GMT 2024

Powered by FUDForum. Page generated in 0.03161 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top