Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320872

Summary: Auto Insertion of brackets is buggy
Product: z_Archived Reporter: Pavel Galaton <pavel.galaton>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact: Ilina Stefanova <ilina.s>
Severity: major    
Priority: P1 CC: ganoro, silviya, zhaozhongwei
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
video that shows problem none

Description Pavel Galaton CLA 2010-07-26 04:34:47 EDT
Build Identifier: 20100617-1415

when you insert manually '}' in statements that has > 1 depth 
then auto insertion is totally wrong.

Reproducible: Always

Steps to Reproduce:
1. see video
Comment 1 Pavel Galaton CLA 2010-07-26 04:44:39 EDT
<?php
$a = 1;
if($a === 1) {
	$b=13;	
	$c=13;	
	if($b == 13) {
	|
}

insert '}' on '|' and you will see problem.
something happening with bug tracker , cant upload video add comment, this is 5th comment i've added
Comment 2 Pavel Galaton CLA 2010-07-26 04:53:40 EDT
Created attachment 175204 [details]
video that shows problem
Comment 3 Pavel Galaton CLA 2010-07-26 05:15:00 EDT
something really bad happened :(

<?php
if(true) {
	|
}

copy
if(true) {
	
}

and paste it to '|'

---------

if(true) {
	if(true) {
		$var = |
	}
}

copy 'true' from second if statement and paste to '|' it inserts additional tabs
more depth more tabs inserted
Comment 4 Zhongwei Zhao CLA 2010-08-01 23:07:38 EDT
Hi,

I got this issue,I will fix it asap:)
Comment 5 Zhongwei Zhao CLA 2010-08-02 03:48:22 EDT
fixed in head,thanks for your reporting!
Comment 6 Sylvia Tancheva CLA 2010-09-02 06:00:02 EDT
Should be verified in PDT 2.3
Comment 7 Ilina Stefanova CLA 2011-08-03 02:47:06 EDT
Verified.