PHPEclipse - via Ninja recommendation

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

PHPEclipse - via Ninja recommendation

Post by seodevhead »

Based on a recommendation from Ninja Space Goat, I went ahead and downloaded Eclipse 3.2 w/ the PHP IDE last night... and so far, I am very impressed with the code editing. However, I am having a bit of a difficult time understanding all this "workspace" and "project" mumbo and thought I would seek advice from some of you guys that are using this, since their online documentation left me even more clueless.

Right now I have everything setup so my individual websites are running on my WAMP locally, and I edited by httpd.conf to create an alias and virtualhost for each website so I can call each development website in my browser like so:

http://www.myfirstsite.dev
http://www.mysecondsite.dev
etc.

I have my apache configuration setup so my websites can reside on a seperate harddrive (D:\) but still think it is under document root using the alias and directory declaration in httpd.conf.

For instance, for my 'myfirstsite.dev', the 'web document root' file path is like so:

D:\mysites\myfirstsite\public_html

Which can be accessed in the browser by going to:
http://www.myfirstsite.dev/

So here is the problem I am running into with Eclipse. It keeps asking me to create a "workspace" directory?? I really don't want to create a workspace directory because I already have all my directory structures laid out perfectly. My website is already created, so it isn't like I want to create a whole new website/project. But just to appease Eclipse, I went ahead and created a 'workspace' and it created a folder called 'workspace' at:

D:\mysites\myfirstsite\workspace

Then I tried to import all my existing files and folders for this website into that folder... but I can't. It said I have to create a "New Project", but that requires a new folder for that as well. So I put in 'myfirstsite' as the project name and it created:

D:\mysites\myfirstsite\workspace\myfirstsite

As you can see, this screws up my whole apache configuration that points to the folder system I originially had before. What's the deal with all this "project" and "workspace" stuff? Is there anyway to just use it to edit my files without creating all this extra stuff? And just from some fool around testing I am doing with it, it seems to not like me editing/deleting/moving files that are part of any project/workspace outside of Eclipse. For instance, I deleted some folders/files in Windows Explorer and when I went back into Eclipse, it was still showing them in the document structure.

Any advice on how I can get by all this project/workspace stuff? Or at least make sense of it? The documentation has left me confused as to how this all works and how controlling eclipse is over my files and folders. Thanks for your help. Looks like a great editor, but I just want to make sure I can use it under my current configurations. Thanks! :)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

You have confused workspaces with projects. Workspace contains 1..* projects, not the other way around.

Personally, I have two workspaces, one for my daily job and another for freelance projects.

So you will need to create a workspace (not under the existing project root) and then create several projects (one for every site of yours). When creating a project you will be allowed to choose the project's directory. Select the directory containing existing site, and Eclipse will import the source tree automatically.

This way you can keep your existing file structure (though a single .project file will be added into the project's folder).
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Weirdan,

God bless you. I feel like sending your post to Eclipse with the email subject reading 'Add This To Your Documentation'...lol. I am so glad I don't have to have Eclipse mess with my directory structures.

Now that I will be spending the better part of tonight fooling around with my new toy ( thanks Ninja and Weridan! :) )... keep this thread open for me because I'm sure I'll be back with a few more questions. But I just wanted to write back quickly and thank you for your clear explanation on how to get it working for my particular situation.

Real quick question... I'm not seeing any line numbers in the code editor... even though the "Show Line Numbers" option is checked in the preferences. What am I missing here? Thanks so much again for your help.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Real quick question... I'm not seeing any line numbers in the code editor... even though the "Show Line Numbers" option is checked in the preferences. What am I missing here? Thanks so much again for your help.
Settings for the PHP editor are separate from those for other editors. Look for 'Show line numbers' under the PHPEclipse Web Development/PHP settings 'folder'
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Thanks again Wierdan.... one more quick question as I am getting used to the in's and out's...

I really like the code completion it has, but I am unable how to figure out how to easily get my cursor to skip the 'auto-parenthesis' it creates for function calls.. example:

I type:

$string = strtolower(

and it then creates:

$string = strtolower()

..so I continue to type the function parameters...

$string = strtolower($string)

..now what do I do to easily get the cursor to the end of the line so I can type the semi-colon? The cursor ('|') is at:

$string = strtolower($string|)

Do I have to use the Right Arrow to move it past that closing parenthesis Eclipse made? Gotta be an easier way... thanks guys for any help.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Typically I just use 'end'.

Did you install the PHPEclipse plugin or dis you install the ZendPHPIDE plugin?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

I just tap the right arrow.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

code completion always freaked me out.. I turn it off if I ever see it.
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Everah wrote:Typically I just use 'end'.

Did you install the PHPEclipse plugin or dis you install the ZendPHPIDE plugin?
Ehhh... End and Right Arrow are too far right for my taste. It would be quicker to not have it complete the closing parenthesis in that case.

Hmmm... I think what I have is the PHPEclipse plugin... not sure about the ZendPHPIDE plugin. What is that and should I get it?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Nope. If you have the PHPEclipse plugin, stay with that. You can always turn off bracket matching if it is not your bag.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I like Zend's plugin better. Maybe it's just PHPEclipse on linux I don't like. I Remember I had PHPEclipse on my windows machine at work and didn't have a problem with it, but on my laptop (ubuntu) it sucks.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I use it on Windows. I absolutely love it (way more than Zend Studio). It is just plain better in my opinion.
Post Reply