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

Bug 326373

Summary: Collapsed class variables doesn't expand when using code folding.
Product: z_Archived Reporter: Andrejs Verza <andrejs.verza>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrejs Verza CLA 2010-09-28 03:06:04 EDT
Build Identifier: 20100917-0705

PHP allows to define multiple class variables in a single block within a class definition, like this:
protected
  $variable1 = 123,
  $variable2 = 'abc',
  $variable3 = false;

Eclipse allows to fold this block of code in one line (using Collapse All context menu function), but the problem is that one have to click the "unfold" button many times afterwards, before the variable definition block gets fully unfolded.

The same goes if one wants to collapse variable block. Eclipse folds only the first variable in line, hiding "protected" keyword, as well as the definition of $variable1, but leaving $variable2 and $variable3 visible.

Reproducible: Always

Steps to Reproduce:
1. Create an empty PHP class with random name.
2. Define class variables like this:

protected
  $variable1 = 123,
  $variable2 = 'abc',
  $variable3 = false;

3. Use Collapse All from the context menu.
4. Unfold class definition by clicking plus sign.
5. Now you see a partial definition of class variables. Try to unfold them by clicking plus sign. You'll have to do that many times.