Edit menu

The Edit menu contains commands for editing source code. Choose one of the following commands for more information.



Edit|Undo

In the editor, undoes your most recent keystrokes or mouse actions. In the UI designer, undoes an action.

In the editor, Undo can reinsert any characters you delete, delete any characters you insert, replace any characters you overwrite, or move your cursor back to its prior position.

You can undo multiple successive actions by choosing Undo repeatedly. This undoes your changes by "stepping back" through your actions and reverting them to their previous state.

If you undo a block operation, your file appears as it was before you executed the block operation.

The Undo command does not change an option setting that affects more than one window.



Edit|Redo

Reverses the effects of your most recent undo. Redo only has effect immediately after an Undo command. There are multiple levels of Redo.



Edit|Cut

Removes selected text from its current position in the editor and places it on the clipboard.

Cut replaces the current clipboard contents with the selected item. To insert the contents of the clipboard elsewhere choose Edit|Paste.



Edit|Copy

Places an exact copy of the selected text on the clipboard and leaves the original untouched. Copy replaces the current clipboard contents with the selected items.



Edit|Paste

Inserts the contents of the clipboard into the active source code in the editor. Text is inserted at the current cursor position.

You can paste the current contents of the clipboard as many times as you like until you cut or copy new text onto the clipboard.



Edit|Delete

Removes the selected text without placing a copy on the clipboard.

Delete is useful if you want to remove an item, but you do not want to overwrite the contents of the clipboard.

Even though you cannot paste deleted text, you can restore it by immediately choosing Edit|Undo.



Edit|Format

Formats the selected line of code using the indenting level of the previous line.



Edit|Optimize Imports

Rewrites and reorganizes your import statements according to the custom settings on the the Import Style page of the Project Properties dialog box (Project|Project Properties).

It also removes any import statements that are no longer used in the code.

See also



Edit|Rename

Applies a new name to the selected package, class, method, field, local variable, or property, ensuring that all references to that name are correctly handled. Rename refactoring a constructor renames the class.

See also



Edit|Move

Moves the selected class to a new package. Move refactoring is only allowed on a top-level public class.

See also



Edit|Change Parameters

Adds, renames, deletes and re-orders a method's parameters. You can edit a newly added parameter before you close the dialog; however, you cannot edit an existing parameter.

See also



Edit|Extract Method

Turns the selected code fragment into a method. JBuilder moves the extracted code outside of the current method, determines the needed parameter(s), generates local variables if necessary, and determines the return type. It inserts a call to the new method in the code where the code fragment resided.

See also



Edit|Introduce Variable

Replaces the result of a complex expression, or part of the expression, with a temporary variable name that explains the purpose of the expression or sub-expression.

See also



Edit|Surround With Try/Catch

Adds a try/catch statement around the selected block of code. It detects all checked exceptions in a block and adds specific blocks for each checked exception.

See also



Edit|MemberInsight

Displays accessible data members and methods for the current context.

See also



Edit|ParameterInsight

Display parameters expected for the method being coded.

See also



Edit|ClassInsight

Displays classes accessible through the current class path.

See also



Edit|Select All

Selects the entire source code file in the editor. Any editing actions, such as Cut, Copy, or Paste will be performed on the entire file.