I normally use PHPStorm for development, however I have noticed http://symfony.dubture.com/ plugin for eclipse that looks like it would make symfony2 development much more easy. So I wanted to give it a try.
However I for the life of me cannot get it working.
I have never used eclipse before, but here is the entire process I have gone through
Download eclipse (latest version of eclipse classic juno)
Install the symfony2 plugin (p2.dubture.com)
install eclipse web development plugin
Switch to PHP Perspective
Create symfony project at existing location
Enable javascript support
Enable twig support
Enable doctrine support
PHP Build path is correctly set as according to the FAQ on the site
I let the DLTK finish indexing my project.
I open one of my twig views, and no code assist at all. {{path(' brings up nothing {% block brings up nothing {% extends brings up nothing, etc. I do have twig syntax highlighting so I know part of it is there.
Now, I go to one of my controllers
and type in
$product = $this->getDoctrine()->getRepository("
This does bring up code assitance and lists all the available bundles. So I select my bundles, but none of my entities appear, all it says is "No default proposals"
I do get code assist for $this->get("
If I rightclick on my project, go to properties, go to builders Doctrine, Symfony, Validation, Script Builder are all present and checked.. Do not see an entry for twig though.
Here is a pastebin of my eclipse log http://pastebin.com/CA76YvKf
I have tried cleaning the projects, repeatedly starting my entire process over and over again, even on different machines and always this exact same results
I know a lot of people are using it, so I must just be doing something wrong.. If anyone here has any suggestions that would be great.
The way I do:
download eclipse (juno)
install pdt for eclipse (http://wiki.eclipse.org/PDT/Installation_3.1.x) // as you can see: 'PHP Development Tools (PDT) Runtime Feature' under 'PHP Development Tools'
create php project
contextual menu on the project > configure > add php support
install the symfony2 plugin (p2.dubture.com)
contextual menu on the project > configure > convert to symfony project
hope this helps.
Related
I'm a newbie with IDEs, I used Eclipse so far but more like an fancy text editor. I now switched to Netbeans and set it up for Joomla extension development, for which I followed the steps in various tutorials.
Everything works great except debugging. I set up xdebug and it works if I have breakpoints in the Joomla index.php file, but breakpoints in the php files of my component (for example in on e of the model functions) were just ignored.
My setup:
Joomla 2.5
Netbeans 7.4
XAMPP 3.1
xdebug
In both eclipse and netbeans, a prerequisite for debugging is that the project is built.
"Building" doesn't do anything real: php code is not compiled. But it allows the IDE to build a dependency tree, validate the code, allow code completion and follow execution flow from one class to the next.
To build, in eclipse either right click on the project or choose Project/Build from the menu. I have set Build automatically so the resources stay in sync while I work:
I encountered with the same problem, but solution is rather tricky. Actually netbeans stops on breakpoints but no all lines are eligible for breaking. When you put breakpoint wait a little, if beside green square there appears black arrow pointing down then it is OK, otherwise try some other line.
I have the source code for the VersionOne plugin. I am wanting to modify the code because I am getting a NullPointerException when I click a specific button on the plugin which crashes eclipse. I was wondering what steps I need to take in eclipse to import the source code, modify it, and get it to run. I have read over how to create a new plugin project, but I have never tried importing a plugin before. Plugin Source
Once you have imported the project and that seems to work fine, just run it like any other plugin.
I.e:
Set the breakpoints you want in the code
Click the "Run as..."
In the run dialog start up a new Eclipse instance
On the tab "plugins" make sure your imported plugin is selected
If you are using the plugin at the same time, make sure that the non-workspace is not selected
In the new Eclipse instance, set up a situation that will provoke the bug
You need the following things to do that:
From Eclipse download a distro with PDE (Plugin Development) included.
The source pages
Some configuration management tool like Git or Subversion.
You do then the following steps:
Unzip your sources locally somewhere and add them to the CM system.
Create an eclipse plugin project from that source location (depending on Git or SVN different steps).
Create a run configuration for Eclipse that includes that plugin. That is similar to creating a run configuration for Java, but your Java application is then eclipse (see the Help on Eclipse Application Launcher). You have to ensure that in the "Plug-ins Tab", your new plugin is included. After you have started it, you should see the new feature implemented in the new running eclipse. To debug it, you just have to press the debug button instead of the run button. You may then add breakpoints to the source code of your plugin to see how it is working.
You are then able to start a new eclipse application which includes the plugin and make your tests there. You are able to set breakpoints, debug the code and so on. If you find the error, you can change the code, test it, and as a result have a difference to the source you had initially. The best would be then to make a patch and send it back to the originator.
To deploy it then to others is a different story, and is well documented.
I've followed this tutorial:
Eclipse Plugin
This tutorial explain why create a HTML Editor.
I need a Text editor,just for auto-highlight some words, anyway I thought this tuto should be a good one to start with.
The thing is that I created the Plugin project and the only thing that I changed it was the extension "pat" instead "html, htm", just that. After that I created a .pat file, but eclipse doesn't open it with my plugin, and my text editor is not in the editor's list.
Any suggestion??
Let me know if you need more information.
My guess is that you have just created the plugin, but aren't running it in your current Eclipse instance. That can be verified by opening the view "Plugin registry". That will show a list of all plugins, see if the plugin you have created is in that list.
If you click on the run button in Eclipse you will open a run configuration dialog. In one of the tabs, you get to choose what plugins should be available. Make sure your plug-in is selected. This will start up a new Eclipse instance that will run your plugin.
To make your plugin be a part of your ordinary Eclipse installation, you will need to export it to a jar and copy that jar to the dropins catalog.
I'm new to Eclipse and downloaded the following version:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
[edit] Eclipse Platform Version 3.7
I have edited Java > Editor > Save Actions to do the following: Remove trailing white spaces on all lines, Correct indentation
When I save the .java file, those actions are not applied... is this a bug?
Found this that might be related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350475
Assuming that this relates to JavaScript files, then the related Eclipse bug could be helpful.
The problem (as I've just experienced) is that you can edit the JavaScript -> Save Actions preferences via the context menu when editing a JavaScript file, but the actions will not be run.
The solution is to right click on the project containing the .js file, and select Configure -> Convert to JavaScript project.
The bad news is that this will then will also enable Eclipse's not-so-great JavaScript validation, therefore telling you that libraries such as moment.min.js are broken.
Well for those of you who have found this topic... I did find 2 solutions, no thanks to Eclipse, other than the fact that it is open source and people can write plugins.
Eclipse Platform Version 3.7
AnyEdit - plugin that does it for you when you Save file (I believe this is what eclipse SHOULD be doing)
Go to: Window > Preferences. Then under General > Keys. Make sure drop down for Scheme: is Default and enter 'remove trailing' in the filter. You should then see "Remove Trailing Whitespace" under the command column. Bind it to your own key command.
The only drawback to #2 is that you have to actually press the key binding while editing the file, kindof like a cleanup action.
Too bad Eclipse hasn't taken the approach that ALL file types should be configurable in this way... sometimes I miss TextPad.
Old question, but at least for newer Eclipse versions there's a better solution: Go to the project properties, then to Project Facets. If it tells you that your project isn't in faceted form yet, then convert it. Afterwards (or if it already was faceted), just enable the JavaScript checkbox.
I had the same issue with Eclipse 4.4 (Luna) and this fixed it for me, the save actions are now executed on save.
Adding to jlh's answer, I also had to configure the JavaScript include path of the project to enable save actions. Before that even a manual "Clean Up ..." from the source menu wouldn't work.
Is there a way to get PHPUnit auto-completion to work in Eclipse PDT without including the libraries in your project?
Have you tried putting the PHPUnit code on your project's include path?
How do you add a PHP framework to code completion/assist in Eclipse PDT and can the framework be added as default for all projects?
Generally speaking in Eclipse, you can add a library or framework to code assist/completion by:
Going into Project > Properties
Under PHP Include Path, pick the "Libaries" tab.
Add an "external folder" with the path to where your framework is
located.
You need to enable it.
Go to menu: Window -> Preferences. Then under PHP -> Editor -> Code Assist. From under auto activation check the enable auto activation check box (note: 200 ms default is a bit slow). You can adjust the timing.