Hi (cześć) and welcome, now we have little mess in formatter: org.eclipse.php.core: 1. Indentation strategies 2. Old PDT formatter : it’s based on indentation strategies 3. Universal bridge for formatter settings (indentation size, tabs vs spaces, etc…)
org.eclipse.plugin.formatter.core: 1. New PDT formatter from Zend : it’s based on DOM AST (like JDT formatter), org.eclipse.php.ui: 1. autoedit strategies, based on indentation strategies 2. smart paste strategy Another tip, PHPAutoIndentStrategoy#smartPaste it's probably your problem. This method: 1. Create temporary document 2. Doing paste and indentation one by line (append, parse, calculate indent, replace line) 3. Detect intentation on target document 4. Cut from temporary document and paste into target I suggest checking how it was done in jdt/jsdt ;) Good luck! -- Dawid Pakuła +48 795 996 064 From: Jacek Pospychała jacek.pospych...@gmail.com Reply: PDT Developers pdt-dev@eclipse.org Date: 26 czerwca 2014 at 22:08:22 To: PDT Developers pdt-dev@eclipse.org Subject: Re: [pdt-dev] Problem with code pasting hi Michal, nice to meet you and welcome to the list! I'm affraid I can't give any useful tips beyond what you probably already found. Anyway, if you're really totally lost, you could have a look at recent pull requests (merged and pending), some of which were related to formatter. Can't wait to see your pull requests to PDT! cheers Jacek On Thu, Jun 26, 2014 at 4:01 PM, Michał Niewrzał <micha...@zend.com> wrote: > Hi All, > > I became a member of Zend Studio team so I probably will be a permanent > guest here:) Actually I'm working with problem that I found by accident but > after quick research I discovered that exists for some time. Pasting longer > php code (e.g. 1000 lines) takes a lot of time. > > I created a bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=438240 and I'm > currently looking for solution but I'm new in the area of code formatting so > it won't be easy task for me:) If someone can give me a tips or hint I will > be grateful. > > Thanks, > Michal > > _______________________________________________ > pdt-dev mailing list > pdt-dev@eclipse.org > https://dev.eclipse.org/mailman/listinfo/pdt-dev > _______________________________________________ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev
_______________________________________________ pdt-dev mailing list pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev