Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351714 - Indentation problem when pasting arrays - extra tab added
Summary: Indentation problem when pasting arrays - extra tab added
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 10:35 EDT by Aleksei CLA
Modified: 2020-05-14 11:08 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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