This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270625

Summary: Standard comment block format should stay in place when shifting a line to the left or right using keyboard shortcut (ShiftLineLeft/ShiftLineRight)
Product: php Reporter: HNSZ
Component: Formatting & IndentationAssignee: issues@php <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description HNSZ 2017-05-12 14:13:00 UTC
Hello Madam/Sir,

Suppose I want to describe a workflow in a standard comment block
```php
/**
 * ExampleWorkFlow
 * 
 * DoDishesThatIShouldHaveDoneLastNightOrThisMorningEven
 * DecideWhatToEatForDinner
 * PickIngredients
 * SearchCupboard
 * SearchRefridgerator
 * If IFindOutThatDontHaveEveryThingINeed
 *     Choice:
 *         GoBackTo DecideWhatToEatForDinner
 *         GoToStoreToGet MissingIngredients
 */
```

So half way this comment I decide that I want to indent certain lines 
And I'm addicted to shift line so i press alt+shift+rightarrow
EXPECTED/DESIRED:
```php
/**
 * 
 * Regarding the standard comment block
 * Suppose I want to describe a workflow
 * ExampleWorkFlow
 * 
 * DoDishesThatIShouldHaveDoneLastNightOrThisMorningEven
 * DecideWhatToEatForDinner
 * PickIngredients
 *---->SearchCupboard
 *---->SearchRefridgerator
 * If IFindOutThatDontHaveEveryThingINeed
 *     Choice:
 *         GoBackTo DecideWhatToEatForDinner
 *         GoToStoreToGet MissingIngredients
 */
```

But unfortunately
ACTUAL:
```php
/**
 * 
 * Regarding the standard comment block
 * Suppose I want to describe a workflow
 * ExampleWorkFlow
 * 
 * DoDishesThatIShouldHaveDoneLastNightOrThisMorningEven
 * DecideWhatToEatForDinner
 * PickIngredients
----> * SearchCupboard
----> * SearchRefridgerator
 * If IFindOutThatDontHaveEveryThingINeed
 *     Choice:
 *         GoBackTo DecideWhatToEatForDinner
 *         GoToStoreToGet MissingIngredients
 */
```

Same thing for going the other way
EXPECTED/DESIRED:
 /**
 * If IFindOutThatDontHaveEveryThingINeed
 *     Choice:
 *         GoBackTo DecideWhatToEatForDinner
 *    GoToStoreToGet MissingIngredients<----
 */
```
ACTUAL:
 /**
 * If IFindOutThatDontHaveEveryThingINeed
 *     Choice:
 *         GoBackTo DecideWhatToEatForDinner
*         GoToStoreToGet MissingIngredients<
 */
```

Basically what I believe the rule should be is the following
If commentblock is selected as a whole:
       Indent or deindent the entire line

If part of the comment block is selected 
or 
If nothing is selected and cursor is inside the body (i.e. not on line containing /** or */): 
       Indent or deintent only the text and leave the stars/slashes in place.


PS I love this editor. It made me a happier person.
Comment 1 HNSZ 2017-05-12 14:15:12 UTC
Ignore the backticks (```php)
I thought MarkDown would work.