Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

How to configure a IDE with Auto Completion and Code Highlighting


Go to End
Reply


11 Posts   1796 Views

Avatar
Xazen

Community Member, 18 Posts

18 October 2011 at 11:38am

Hello,

I am searching a stable and free IDE with auto completion and code highlighting, which works with the SilverStripe Framework. The only topics I found were pretty old. So I wonder wether there is a better solution now. I tried Aptana 3.0. The code highlighting is ok. But it only shows autocompleting when I create page types. And it only displays when I am typing in the superclass.

I also tried the latest Eclipse classic version + PDT but I am not sure how to configure it.

Thanks in advance!

Avatar
Invader_Zim

Community Member, 141 Posts

18 October 2011 at 10:36pm

Hi,

my weapon of choice is [url=http://netbeans.org]Netbeans[/url].
It's free, stable and quite powerful, so give it a try :-)

If I recall right, Php autocomplete for SilverStripe projects worked without any configuration, but you'll have to "teach" the IDE how to handle .ss files...

Cheers

Avatar
swaiba

Forum Moderator, 1808 Posts

18 October 2011 at 11:10pm

Previous discussion here...
http://www.silverstripe.org/general-questions/show/7116

and I have reverted to using TextPad (and vi) but whenever I need to debug something (above and beyond a couple of debug show / log messages) I still use netbeans.

Avatar
Xazen

Community Member, 18 Posts

18 October 2011 at 11:54pm

Thanks for the help.

It works better now (in Aptana and NetBeans). But I still won't get code completion in the *.ss files. Is it possible to get code completion for $Layout $Content etc. and <% include Menu(2) %> <& end_control &> etc. ?

Avatar
Invader_Zim

Community Member, 141 Posts

19 October 2011 at 1:17am

All you can do for .ss files is to associate them to HTML files...

But code completion for SilverStripe's template language is not possible without a plugin.
And as far as I know, there is none unfortunately.

Some time ago, I tried to write a netbeans plugin for ss-templates, based on the [url=http://plugins.netbeans.org/plugin/37069/php-twig]Php-Twig[/url] plugin, but I failed miserably on the parser/lexer stuff... *sigh*

Cheers

Avatar
Xazen

Community Member, 18 Posts

19 October 2011 at 1:25am

Too bad. However thanks a lot. It seems you are Netbeans user right? But I am used to Eclipse shortcuts because of Android development. So I actually prefer Aptana 3.0. And the only thing that won't work at the moment code completion at a certain point. It's just optimization, but it would be great if it works. I posted the problem I have in stackoverflow.

http://stackoverflow.com/questions/7806907/no-code-completion-in-aptana-3-0-after-returning-fieldset-through-parent-static

In a few sentences:

I initialize a variable with:
$fields = parent::getCMSFields();

and won't get code completion for $fields afterwards. But if I initialize a variable this way:
$fields = new FieldSet;

it works perfectly.

Avatar
Invader_Zim

Community Member, 141 Posts

19 October 2011 at 1:41am

Edited: 19/10/2011 1:43am

Yepp, I'm a NetBeans nut...

But right know i sit in front of a machine with eclipse+Aptana Studio 3.0 plugin, so I'll mess around a bit and maybe I can find something :-)

[Edit] well, and I have the same results like you...

Avatar
Xazen

Community Member, 18 Posts

19 October 2011 at 1:46am

Thanks, at least I know I am not the only one with the problem. I don't think we both mess up the Aptana installation. I hope there will be an update soon.

Go to Top