Rectangular Edit Tools module uploaded

I have uploaded the Rectangular Edit Tools module to my Netbeans update center described here.

This module installs the following actions in Edit:Rectangle Menu and Rectangle toolbar.

Action

Icon

Description

Rectangular Cut ( Ctrl+Alt+X )  Rectangular Cut  Cuts the contents of rectangle defined by the selection
Rectangular Copy ( Ctrl+Alt+C )  Rectangular Copy  Copies the contents of rectangle defined by the selection
Rectangular Paste ( Ctrl+Alt+V )  Rectangular Paste  Pastes the contents of rectangle defined by the selection
Rectangular Delete ( Ctrl+Alt+MINUS )  Rectangular Delete  Deletes the contents of rectangle defined by the selection
Rectangular Clear ( Ctrl+Alt+SPACE )  Rectangular Clear  Replace the contents of rectangle defined by the selection with spaces
Rectangular Replace ( Ctrl+Alt+R )  Rectangular Replace  Replace the contents of rectangle defined by the selection with user specified string

Note: The leading column of the rectangle defined by the selection has to be less than the trailing column.

Example

Text and Selection
Action Text in editor Clipboard
0123456789
01
23456789
0123456789
0123456
789
0123456789
 Rectangular Cut Rectangular Cut
0123456789
01789
01789
01789
0123456789
2345
2345
2345
0123456789
01
23456789
0123456789
0123456
789
0123456789
 Rectangular Copy Rectangular Copy
0123456789
0123456789
0123456789
0123456789
0123456789
2345
2345
2345
0123456789
01
23456789
0123456789
0123456
789
0123456789
 Rectangular Paste Rectangular Paste with text in clipboard

--
++++
\*\*\*\*\*

0123456789
01--789
01++++789
01\*\*\*\*\*789
0123456789
--
++++
\*\*\*\*\*
0123456789
01
23456789
0123456789
0123456
789
0123456789
 Rectangular Delete Rectangular Delete
0123456789
01789
01789
01789
0123456789
No change
0123456789
01
23456789
0123456789
0123456
789
0123456789
 Rectangular Clear Rectangular Clear
0123456789
01 789
01 789
01 789
0123456789
No change
0123456789
01
23456789
0123456789
0123456
789
0123456789
  Rectangular Replace Rectangular Replace with user sepcified text

---
0123456789
01---789
01---789
01---789
0123456789
No change

Sources

TODO

  • Rectangular selection highlight

DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk. 

Comments:

Schweet! This is what I've been missing from emacs..

Dmitri

Posted by Dmitri Trembovetski on November 12, 2006 at 11:21 AM PST #

Thanks.

Trying to convert Emacs users to Netbeans. Not only Eclipse users :)

I have also added keyboard shortcuts and online help.

Posted by Sandip on November 12, 2006 at 11:45 AM PST #

Hi, Sandip The next step forward would be to select just the block (a real visual rectangle) one wants to copy/cut/paste. I've seen it in Idea, I think.

Posted by Claudiu on November 12, 2006 at 04:20 PM PST #

Yes. That is in my TODO list.

Posted by Sandip on November 13, 2006 at 08:05 AM PST #

The good old Alt-C from Brief !!
Thank you.

Posted by Gustavo on November 17, 2006 at 05:17 AM PST #

Yes, this is very nice. The UltraEdit program does this too. You might see how it does user interactions from the keyboard. It particularly has a bar-insert and bar-delete thing going on when the rectangular selection area has zero width (no columns). Again, a very nice feature.

Posted by John Muczynski on November 21, 2006 at 11:46 PM PST #

Hi. Thank you for this feature.

I have one question though. Say you have the following:

public enum Example
{
    A;

//     bad-----bad
//     bad-----bad
//     bad-----bad
//     bad-----bad
//     bad-----bad

    
    { // start block

//     good-----good
//     good-----good
//     good-----good
//     good-----good
//     good-----good

    } // end block

} // end class

//     good-----good
//     good-----good
//     good-----good
//     good-----good
//     good-----good

}

Can you use the rectangular edit tools on the dashes between "bad"'s? The rectangular buttons disable for me.

Thanks again. I plan to use your wonderful examples in learning how to create plugins for NetBeans.

Posted by Jay Logan on November 29, 2006 at 02:11 AM PST #

Jay,

Yes, you should be able to do that. Yes I have seen that the actions get disabled sometimes. However clicking on some other nodes in the project and back in the editor seems to enable the actions. I do not know why.

Posted by Sandip on November 29, 2006 at 09:30 AM PST #

Looks good. Are you aware that Ctrl-Alt-Minus is an hotkey that is hard to disable on Linux? It switches to the next resolution configured in your X server. Similarly, avoid Ctrl-Alt-PLUS, Ctrl-Alt-BACKSPACE, and Ctrl-Alt-F1 to Ctrl-Alt-F12.

Posted by Peter von der Ahé on March 15, 2007 at 09:29 AM PDT #

Thanks Peter.

I use windows so I am not aware of these issues on linux. Even though I have heard about in the blog comments here. So I will keep that in mind.

In case you did not know, if you want you can customize the key bindings using Tools:Keymap and look for actions under Other category.

Posted by Sandip on March 15, 2007 at 10:01 AM PDT #

Hi! I want to select a rectangle. You have not documented how can i select a rectangle, so i can't delete it nor copy it or anything :(

Posted by EmmanuelOga on August 29, 2007 at 10:59 PM PDT #

oooooooook... i have just understood.... :)

Posted by EmmanuelOga on August 29, 2007 at 11:00 PM PDT #

Yes. It is a little confusing because it does not highlight the resulting rectangle. It simply shows regular selection even though the above actions work on the rectangle correctly.
<p>
Rectangle highlight is something I have not implemented yet.

Posted by Sandip on August 29, 2007 at 11:51 PM PDT #

Is there plans for rectangular highlight?

Posted by Alexander Faucher on October 23, 2007 at 04:49 AM PDT #

Hi
I just found this and its really useful. But in NB 6.0 the rectangle tool bar buttons aren't available until I open a text document (like a properties file), then it is available in the source editor.

Is this a bug?

Posted by Rory on April 28, 2008 at 03:06 AM PDT #

Rory,

Please clarify what you mean. The Rectangle Edit tools are meant to work with the text in text editor.

Posted by Sandip on April 28, 2008 at 03:13 AM PDT #

Hi
The problem was that the source editor the rectangle icons at the top were disabled, and wouldn't enable until I opened a text document, like a properties file.

However, it works in 6.1 which I just installed, so thank you, but never mind :)

Posted by Rory on April 28, 2008 at 08:18 PM PDT #

I tested this plugin with NetBeans IDE 6.5.1 and it works. The issue reported by Rory is still there but I have a different observation.

When we click on the Java source file from Projects Panel the tool buttons get disabled but when we choose the Java source from the Editor tabs then the tool buttons are enabled.

Something is going wrong when the files are opened or selected through the Projects panel.

with regards
Tushar Joshi, Nagpur

Posted by Tushar Joshi on May 14, 2009 at 03:19 PM PDT #

Hi Sandip,

The plugin is not working in Netbeans 6.9. I have been using it for a while and found it useful. Can you help us fix it.

Thanks a lot for your time and work.

Posted by guest on June 17, 2010 at 12:01 AM PDT #

Hi Sandip,

The plugin is not working in Netbeans 6.9. I have been using it for a while and found it useful. Can you help us fix it.

Thanks a lot for your time and work.

Posted by Hameed on June 17, 2010 at 12:02 AM PDT #

could you fix this plugins for Netbean 6.9,
please...

Posted by Guntur on July 18, 2010 at 12:26 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

sandipchitale

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today