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 212353 - Shift+Tab (Delete tab) shortcut does not work in editor
Summary: Shift+Tab (Delete tab) shortcut does not work in editor
Status: RESOLVED INVALID
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords: REGRESSION
: 227500 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-11 06:58 UTC by Vladimir Riha
Modified: 2013-06-20 13:57 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-05-11 06:58:09 UTC
To reproduce, 

- open either css file or html file with <style> tag that contains some css rules
- press Ctrl+A to select all and then Shift+Tab
=> text should start moving to the left, but nothing happens. It worked in 7.1.2

It is caused by the css code because in "plain" html (no style tag) it works and in css file it doesn't


Product Version: NetBeans IDE Dev (Build 201205100400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-19-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2012-05-11 06:58:44 UTC
bad component...
Comment 2 Vladimir Riha 2012-05-11 07:10:58 UTC
Sorry, not caused by css but it is general issue in editor. 

- in HTML file (or java, css...), if you select some code and try the Shift+Tab, it works until the 1st element (e.g. "package" in java, <html> in html...) does not get to the beginning of the line. Then it stops working.


Example for java: Select the piece of code in java file and keep pressing Shift+tab
- this partially works (only once, the comment never gets into the beginning of the line)

    public static void main(String[] args) {
        // TODO code application logic here
    }


- this is not working (select the entire code below, press Shift+Tab => nothing)

public class JavaApplication1 {

    public static void main(String[] args) {
        // TODO code application logic here
    }
}



Product Version: NetBeans IDE Dev (Build 201205100400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-19-generic-pae running on i386; UTF-8; en_US (nb)
Comment 3 dereknutile 2012-07-11 14:35:48 UTC
It works as expected for the parent, but not the children of the nest.  Take this code for example:

	<div>
		<ul>
			<li>Item 1</li>
			<li>Item 2</li>
		</ul>
	</div>

if you select the entire block, and Shift-Tab in v7.1:

<div>
	<ul>
		<li>Item 1</li>
		<li>Item 2</li>
	</ul>
</div>

Then Shift-Tab again:

<div>
<ul>
	<li>Item 1</li>
	<li>Item 2</li>
</ul>
</div>

And finally: 

<div>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</div>

In v.7.2 RC1, Shift-Tab removes indentation no further than this:
<div>
	<ul>
		<li>Item 1</li>
		<li>Item 2</li>
	</ul>
</div>
Comment 4 Vladimir Riha 2012-07-11 15:10:34 UTC
Yes, when a first element (tag) to the left is at "column 0" (beginning of the line), the shortcut stops working
Comment 5 Vladimir Riha 2013-03-15 06:05:39 UTC
*** Bug 227500 has been marked as a duplicate of this bug. ***
Comment 6 wnjordan 2013-03-15 06:27:16 UTC
This bug appears to have fallen through the cracks since it was first reported in 05/2012 and received the wrong priority.  I'm changing the version to 7.3 since it still exists and changing the Priority to 2 since 'Product feature doesn't work, a workaround may exist but it's difficult to use or impractical'.

Could you guys please release an update to 7.3 that fixes this?
Comment 7 Vladimir Riha 2013-03-15 06:36:12 UTC
Please do not change version, it was initially reported against 7.2 Dev. I don't think this is P2 but let's see.
Comment 8 David Strupl 2013-06-20 13:57:53 UTC
Hello,

I have tried to play with Java and HTML files in dev build as of today (20130620). I am closing the report as invalid as I think the Indent (TAB) and Dedent (Shift-TAB) actions work as expected.

Please note that those actions should be inverse - I mean when you select a block and you hit
"<TAB> <TAB> <Shift-TAB> <Shift-TAB>" you should always end up with the same text. The same should be true if you change the order to " <Shift-TAB> <Shift-TAB> <TAB> <TAB>" you should end up with the same text. And now it behaves that way - dedenting the whole paragraph should not IMHO change the text. If you have reached the left margin when dedenting the action does nothing (and that is correct). What you suggest leads to loosing the indentation information.

Closing as invalid but adding Mila to Cc: to have one more person to review the decision.

David