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

Bug 351714

Summary: Indentation problem when pasting arrays - extra tab added
Product: z_Archived Reporter: Aleksei <a.udachny>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ganoro, remy.suen, silviya
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Aleksei CLA 2011-07-11 10:35:58 EDT
Build Identifier: I20110613-1736

In Eclipse PDT consider the following array:

	$a = array(
		'i1' => 'foo',
		'i2' => 'bar'
	);

Notice that it is indented using tabs, one per indentation level. Also notice that it is already indented one step to the right.

Copy and paste the above array and you will get the result:









Reproducible: Always

Steps to Reproduce:
1.Copy the following array into Eclipse PDT:

	$a = array(
		'i1' => 'foo',
		'i2' => 'bar'
	);

Notice that it is indented using tabs, one per indentation level. Also notice that it is already indented one step to the right.

2. Select this code block in the IDE and copy-paste it to another location in the same file.

3. Notice that extra indentation level (extra tab) was added to the array elements. Now the array looks like:

	$a = array(
			'i1' => 'foo',
			'i2' => 'bar'
	);
Comment 1 Remy Suen CLA 2011-07-11 10:48:09 EDT
Please open bugs with PDT against PDT.
Comment 2 Roy Ganor CLA 2011-08-09 05:06:19 EDT
the current state is that paste results in this code:

$a = array(
'i1' => 'foo',
'i2' => 'bar'
);
Comment 3 Zhongwei Zhao CLA 2011-08-24 05:08:33 EDT
fixed in head
Comment 4 Sylvia Tancheva CLA 2011-10-18 08:32:52 EDT
Verified.

Ilina Stefanova