ElkArte Community

General => Chit Chat => Topic started by: [SiNaN] on October 06, 2014, 11:26:08 am

Title: Eclipse PDT
Post by: [SiNaN] on October 06, 2014, 11:26:08 am
Although I don't really want to, I'm using Eclipse with PDT plugin for a project I'm working on. Everything seem fine except for the useless auto indentation. Not being used to it, it really throws me off while I'm typing and the feature not working correctly, at least according to my style, makes it even worse. So I have been trying to find a way to disable the auto indentation completely, unfortunately, to no avail. Any ideas about it?
Title: Re: Eclipse PDT
Post by: Spuds on October 06, 2014, 12:24:00 pm
I have not used Eclipse but most IDE's have some form of formatting profile that follows some convention like PSR-2 or whatever.  They also allow you to define your own standard, so you should be able to do that?  I use netbeans and was able to define a formatting that suited my taste (of course it still does some "auto" things which annoy me to no end !)
Title: Re: Eclipse PDT
Post by: emanuele on October 06, 2014, 01:03:07 pm
I think in theory you should create a new formatter (window > preferences > PHP > formatter) and then remove the indentation (as much as possible).
But from what I can see it doesn't work. Not sure if it is a problem with my install or what...
Title: Re: Eclipse PDT
Post by: forumsearch0r2 on October 06, 2014, 03:20:44 pm
Don't use Eclipse. Ever. Its editor features are FUBAR.

Or use eclim (http://eclim.org/) at least.
Title: Re: Eclipse PDT
Post by: [SiNaN] on October 06, 2014, 04:58:29 pm
Quote from: Spuds – I have not used Eclipse but most IDE's have some form of formatting profile that follows some convention like PSR-2 or whatever.  They also allow you to define your own standard, so you should be able to do that?  I use netbeans and was able to define a formatting that suited my taste (of course it still does some "auto" things which annoy me to no end !)
The formatter, from my understanding, cleans things up once you close the file or something. I'm not sure if it directly affects typing. Java plugin seems to have more options for typing and even something closer to what I have but not the PHP plugin.

Quote from: emanuele – I think in theory you should create a new formatter (window > preferences > PHP > formatter) and then remove the indentation (as much as possible).
But from what I can see it doesn't work. Not sure if it is a problem with my install or what...
I had checked that too but it was the same here as well. However, there was this setting about arrays and changing that seems to have calmed things down a bit - my main problems were with the array syntax it was forcing. The rest is still annoying but I guess I can live with it for now.

As I said, I'm not really happy with it, but I have to use it. If I could choose, it would be Notepad. Having directory find/replace with regex option, which comes in very handy in some cases, and code highlighting, which makes things easier for the eye, are the only reason I use Dreamweaver, with almost everything else disabled.
Title: Re: Eclipse PDT
Post by: Joshua Dickerson on October 06, 2014, 05:38:19 pm
I could never go back to a basic editor. It's too hard and time consuming to track things down.
Title: Re: Eclipse PDT
Post by: [SiNaN] on October 06, 2014, 06:45:35 pm
I have always worked on smaller codebases I was very familiar with, so never felt the need for the editor to think for me. Now that I'm working on bigger, unfamiliar projects, I can understand why people may want to use IDEs.
Title: Re: Eclipse PDT
Post by: emanuele on October 07, 2014, 02:48:21 am
Quote from: groundup – I could never go back to a basic editor. It's too hard and time consuming to track things down.
That's a difficult balance for me: I like very simple editors (I use Kate in my day to day breaking of working on Elk and similar code), I used IDE in the past (mainly visual studio), and I tend to like some of the things they do, though I also get bored quickly when the IDEs start trying to be smarter than they actually are and try to put around code or formatting I don't want... :-\
And I'm too lazy to think to configure them. :P
Title: Re: Eclipse PDT
Post by: Joshua Dickerson on October 07, 2014, 04:11:56 pm
Configuring the code samples is really easy in Netbeans. Took me like 5 minutes (including the time to find it) to get it to what I wanted.