[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Problem with code pasting

Hi (czeÅÄ) and welcome,

now we have little mess in formatter:
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â)

1. New PDT formatter from Zend : itâs based on DOM AST (like JDT formatter),

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.pospychala@xxxxxxxxx
Reply: PDT Developers pdt-dev@xxxxxxxxxxx
Date: 26 czerwca 2014 at 22:08:22
To: PDT Developers pdt-dev@xxxxxxxxxxx
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!



On Thu, Jun 26, 2014 at 4:01 PM, MichaÅ NiewrzaÅ <michal.n@xxxxxxxx> 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@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
pdt-dev mailing list