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 - Standard comment block format should stay in place when shifting a line to the left or right using keyboard shortcut (ShiftLineLeft/ShiftLineRight)
Summary: Standard comment block format should stay in place when shifting a line to th...
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@php
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-12 14:13 UTC by HNSZ
Modified: 2017-05-12 14:15 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

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