Eclipse PDT: put my workspace under htdocs or is there a "move files" build directive? - eclipse

I am using Eclipse PDT with the Zend community server to develop PHP.
If I write some code and hit Run As...PHP Web Page, I get "Page cannot be found". This makes sense since my workspace is off in my documents folder, not in the Zend/Apache's htdocs tree.
So one option would be to move my workspace to a folder under the Apache htdocs. But that just seems wrong ;-) Also, I keep my workspace in a Dropbox folder.
Is there an alternative directive/configuration setting for Eclipse PDT that says "when I say Run or Build, I want you to copy the project to folder X and run it as a web page from there". Or perhaps something else I'm missing about Eclipse PDT?

I found a method, using Ant: http://www.tellingmachine.com/post/Configuring-Eclipse-PDT-to-work-with-Ant-build-tasks.aspx
Here is my method for developing PHP on Windows in Eclipse:
Download the Zend all-in-one Eclipse environment
Download the Zend Server CE
Install Zend into someplace like c:\Zend. If you put it in Program Files, you'll need to do extra security configuration or else your build directives will fail.
Using the link above to setup Ant and a build directive
Wah-lah. You can setup a Run Configuration and then Run As... and view your php script in a web browser.
You could also use the stock Eclipse PDT and WAMP and achieve the same effect. The key is (1) putting your htdocs outside of Program Files, and (2) using Ant to automate the build copy.

http://ventralnet.blogspot.com/2011/03/eclipse-pdt-auto-deploy-webapp-to.html
You can use a combination of ANT and custom builders in eclipse to auto copy your web app to your web root

Related

make folder netbeans project and ftp upload

I've just downloaded netBeans 7.2 and an ftp plugin. I would like to be able to make a folder (html, css, javascript, php) on my computer (which I made in eclipse) a NetBeans 'project' (at least that's what I think I want to do). Then, on save, upload to the remote directory online. Is there a way to do this?
Thanks!
Thomas
Go to Run - Set Project Configuration - Customize
Click Manage next to Remote Connection..
I guess you can figure out the rest..

Eclipse project backup

I'm using Eclipse Java EE IDE for Web Developers and want something like that:
Eclipse should add current project (or open projects) to archive and copy the archive to specified folder on its (Eclipse) exit.
Is it possible with Eclipse built-in functionality - scripting, or plugin?
I don't want to use bat-files, Script Host or other external tools.
The global idea is to realize on-exit backup of my project between home and workplace using Dropbox, e.g. automated sending project backup to dropbox folder.
But current task is to realize local backup.
Why not keep your Project folder in Dropbox itself?

How to manually install software/plugin to Eclipse IDE?

I have downloaded a RAR file from the following location, to be (manually) installed to Eclipse (Helios). How can I perform the manual installation?
http://sourceforge.net/projects/eclipsesql/files/SQL%20Explorer%20RCP%20%28exc%20JRE%29/3.6.1/sqlexplorer_rcp-3.6.1.macosx.cocoa.x86.tgz/download
Instead of putting it directly into the plugins directory, it's better to use the dropins directory as this was created just for this purpose. Have a look here: http://wiki.eclipse.org/Equinox_p2_Getting_Started#Dropins
For sqlexplorer: do not download the full RCP version (as your link does), this one is standalone. Get this one instead: http://sourceforge.net/projects/eclipsesql/files/SQL%20Explorer%20Plugin/3.6.1/sqlexplorer_plugin-3.6.1_SR2.zip/download
Extract this to $eclipse_home$\dropins\sqlexplorer and restart Eclipse.
BUT: Using the SqlExplorer Update Site (http://eclipsesql.sourceforge.net/) would be an even better option (Help>Install new Software)
I have tried the installation with the explanation about the dropins folder and had to tweak it like that:
Unzip the distribution into your eclipse installation directory under the folder dropins. Your structure should be:
eclipse/
dropins/
eclipse/
features/
plugins/
Remove all other files and directories. There is some missing piece (file contents.xml), so that the distribution is no real p2 repository which leads to an error. The directories plugins and features are sufficient.
Restart your eclipse (I have done it with option -clean, not sure if that is necessary).
SQLExplorer is then installed and visible in the help, in different menus and with a new perspective.
I even was able to use it to have a look at my SQLite3 database of a rails3 application. Wow!! So I will give it a try.
From their website (http://www.sqlexplorer.org/):
Eclipse Plugin
Download
Download the Eclipse SQL Explorer plugin and extract the zip file in your eclipse directory (requires Eclipse 3.3 or better).
After restarting eclipse with the -clean option, a new SQL Explorer perspective should be available.
Eclipse Update Site
You can install and update Eclipse SQL Explorer via the eclipse update mechanism. The update site for Eclipse SQL Explorer is http://eclipsesql.sourceforge.net/
I always go for the update site option if they present it, it's easier and lets you do updates easily. To use the update mechanism just select Help > Insall New Software... then enter the update site, press Add and go through the wizard.

netbeans 6.8 and zend framework

I installed Netbeans 6.8 but in the PHP framework list it does not show Zend framework. Do I need to configure it? How do I do that?
Same this one : http://blogs.oracle.com/netbeansphp/entry/zend_framework_support_added
This feature will be in the next release (AFAIK 6.9 is planned at the beginning of the summer). You can already download (or compile by yourself) dev build and try it out.
For now, ZF support in Netbeans it is just a wrapper for command line Zend
_Tool. You just configure your zf.bat path and that's it.
There is a great plugin named "Path Tools" (get it from the netbeans plugins page). This will allow you to open a command window in your project directory. Then, creating a new project is really easy(ofcourse, you need to have zf.bat and php.exe in your path). Simply open command window..
. zf create project
. (you will be prompted for directory.. enter '.' for current dir)
Netbeans does not create ZF projects. So first you need to create ZF project yourself using Zend_Tool, and than in NetBeans create New Project (File->New Project) and select PHP category with 'PHP Application with Existing Sources' and off course point to your newly created ZF project.

Migrating From NetBeans to Eclipse

My company wants to migrate to Eclipse, I was wondering what options besides an Ant build are there to move our projects from Netbeans to Eclipse.
Tooooo ... oooo .... oooo late to answer but this works
http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
i was looking for an answer my self and saw this question :)
Quoting:
Here is a little tutorial on "Importing projects from NetBeans to Eclipse".
Please try this:
PART I - NETBEANS
Open NebBeans.
Create a java project named "ToEclipse".
Build this project.
Then, NetBeans has created several folders. The important folders to us are (in my computer):
c:\User\Almir\NetBeans\ToEclipse\dist
c:\User\Almir\NetBeans\ToEclipse\src
PART II - ECLIPSE
Go to Eclipse.
Create a java project in Eclipse named "ToEclipse".
Then, Eclipse has created several folders. The important folders to us are (in my computer):
c:\Users\Almir\Eclipse\ToEclipse\bin
c:\Users\Almir\Eclipse\ToEclipse\src
PART III - WINDOWS EXPLORER
Go to Windows Explorer.
Copy the FILE "ToEclipse.jar" at c:\Users\Almir\Eclipse\ToEclipse\bin folder.
Past it in c:\Users\Almir\Eclipse\ToEclipse\bin
Copy the FOLDER "toeclipse" at c:\User\Almir\NetBeans\ToEclipse\src folder.
Past it in b) c:\Users\Almir\Eclipse\ToEclipse\src folder.
PART IV - ECLIPSE
Go to Eclipse.
Press F5 to refresh the view.
Verify that your project is there (under ToEclipse/src/toeclipse).
Say "Oh! Yes! It works!".
Run the project.
Return to 3) how many times you want!
I hope that helps you!
Kind regards,
Almir Campos
São Paulo, Brazil.
I found another easier way that worked for me at least since I had problems importing the Ant build script due to a missing javac.
Say you have your Netbeans project (src, build, dist etc) in D:/blah/
In Eclipse go to File->New->Java Project
Uncheck 'Use default location' and instead use the path where the Netbeans project is (D:/blah/) Eclipse should automatically populate everything else and link to the files as well.
I have recently 'migrated' from Netbeans to Eclipse and found it amazingly easy. The reason it was easy though is that all of our projects are IDE independent standard ant and ivy build scripts that most modern IDE's can understand. This way, we all get to use the IDE we like (yes - emacs and vi too) and their are no 'migration' issues.
The reason that I am pointing that out is that, if it is not already that way, I would recommend that you take that same path on your migration. Just create some standard ant (and ivy) build scripts. Eclipse knows how to slurp those in and there will be no future migration issues.
in MY PERSONAL experience, it was easy. I was migrating a java desktop app from netbeans to eclipse. Just copy my projects into the workspace, create the project in eclipse as a new java project and put the same name of the project in netbeans (use your workspace as location). It will recognize the project structure ( Eclipse Helios, Netbeans 6.8 )
Hope this helps. I don't know how hard it turns if you have another kind of project.
I just migrated a Netbeans 7.0 JSF web project to Eclipse. And it was easier than i would have imagined.
What i did was:
List item
Clean and build my JSF application in netbeans
Close netbeans and open Eclipse(i use galileo)
Create a new Dynamic Web Application.
Right click on the new web application in project explorer and go to import then to .WAR file
It then ask whether i want to import any of the jar files(libraries) as projects and i do not select any and just click finish.
Copied my netbeans src(source) folder /src/java/ to
the Eclipse src folder. e.g netbeansproject/medman/src/java/com to eclipseSpace/medman/src/
Next setup your server in Eclipse(i use tomcat 6.0).
And voila! it is done.
You can also check out this link. http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
At my company people pretty much use either eclipse or Netbeans. I myself use both of them for various tasks. We write our own ant scripts to build and package our source so it does not matter what IDE a person uses. I would suggest that you create your own ant script to build your source, that way you won't have to depend on an IDE specific build script.