|
Studio contains a full featured editor that helps in developing applications. Some of the important features of Editor are:
Editing Code All the basic editor features like cut, copy, paste, undo, redo, change case can be used
Matching Parentheses Selects the matching parenthesis in the code if any.
Syntax Coloring The editor supports colour coding for Java, JSP, HTML and XML files.
Abbreviations The Editor provides abbreviations and allows the user to set new abbreviations for commonly used commands.
Edit > Undo
Undo the last action. All actions performed since the file was opened can be undone.
Edit > Redo
Redo the action that was undone.
Edit > Cut
Move selected text to the clipboard for pasting elsewhere.
Edit > Copy
Copy selected text to the clipboard for pasting elsewhere.
Edit > Paste
Paste text in a specified place from the clipboard.
Edit > Change Case > Upper Case/Lower Case/Invert Case
Converts the selected text to upper case, lower case or inverted case respectively. Inverted case is when the upper case characters get converted to lower case, and the lower case characters get converted to upper case.
Edit > Delete
Delete selected text.
Edit > Select All
Selects all the text at once in the File. The selected text can then be cut, copied or deleted.
Search > Find
Searches for the keyword and its near matches, make search case sensitive and finds in files. Find dialog box provides four options for advanced search:
Find Next searches for the next occurrence of the word, and Cancel cancels the command
Search > Find Next
Clicking on this searches for the next occurrence of the text found in a previous search. The keyboard shortcut F3 can also be used. The pattern for searching is taken from the following in order of preference:
Search > Find Previous
Clicking on this searches for the previous occurrence of the text found in a previous search. The keyboard shortcut Shift + F3 can also be used. The pattern for searching is taken from the following in order of preference:
Place the caret anywhere inside a word, and either click on Search > Find Word at Caret from the main menu, or press Ctrl + F3 on the keyboard. This searches for the next occurrence of the word and highlights it.
Place the caret anywhere inside a word, and press Ctrl + Shift + F3 on the keyboard. This searches for the previous occurrence of the word and highlights it.
Search > Highlight All Occurrences
Clicking on this from the main menu or pressing Ctrl + Shift + F7 on the keyboard highlights all occurrences of the selected text or the word where the caret is positioned.
Search > Incremental Search
You begin an incremental search by either clicking on Search > Incremental Search from the main menu or by pressing Ctrl + F on the keyboard. This brings up the Search pane, where you begin typing the string to be searched. As each character is typed, the search proceeds to the next occurrence in the window of the string as specified so far. Typing a word which has no match makes the text red in color.
Search > Find In Files
Clicking on this searches for a word in all the files of the specified type in the specified folder, and displays the results in the Output Panel. The results are displayed in a tree format. Enter the following information in the Find In Files dialog, and search for the word:
In the Find field, enter the text to be searched for. In File Types, the type of file that is being searched for is written. For example, *.java.
In the InFolder section, the folders where the files are available are written. It also provides you with six options for advanced search.
Find searches for all occurrences of the word, while Cancel cancels the Find in Files command.
Using the Find In Files option displays the search results in the Output Panel. Different operations can be performed to view these results. To delete a result from being excluded, select the result in the Output Panel and use the Delete button on the keyboard. This excludes the result, and also displays the row in grey color.
In the results that are displayed in the Output Panel, you can delete a few of the results, and then press Ctrl + Shift + A. T his searches for the next non excluded result. The icon,
can also be used to do the same operation.
Pressing Ctrl + Shift + Z on the keyboard or the icon,
searches for the previous non excluded result. Use the icon,
to stop the search process.
Press Ctrl + Shift + Q, or click on the icon,
to close the tab in the Output Panel. To re-run the search, press Ctrl + Alt + R, or use the icon,
available in the tab.
Search > Replace
Replace replaces a text with another. Clicking on Replace pops up a dialog box. In the dialog box, write the text to search for in the Find section. The word that it has to be replaced with is written in the Replace With section. To cancel the replace function in between, just press the Esc Key on the keyboard. The Replace function in Studio also provides the following options for advanced replace:
The following actions are fired when you click:
Regular expressions are powerful and specialized sets of patterns available to specify a set of possible strings that are to be matched. Studio Editor provides the following characters to be used in the Regular Expression field that are used in pattern matching.
Search > Go To Line..
Specify the line number to move the cursor to.
Search > Add/Remove Bookmarks
Bookmarks are placed on lines for easy manoeuvrability between lines. Using this option adds/removes the bookmark to/from the respective line.
Search > Remove All Bookmarks
Removes all bookmarks from the active file.
Search > Next Bookmark
Takes the control to the next bookmark in the file and positions the cursor at the beginning of the line.
Search > Previous Bookmark
Takes the control to the previous bookmark and positions the cursor at the beginning of the line.
Main Menu > File > Preferences
Clicking on this brings up a dialog box with three tabs: General, Editor and Abbreviations.
Main Menu > File > Preferences
Clicking on this brings up a dialog box with three tabs: General, Editor and Abbreviations. Click on the General tab to set the general properties.
The following properties can be set in the General tab:
Reopen last used Desk at startup Checking this option reopens the last active Desk in the Explore panel when Studio is restarted. This option by default is un-checked.
Recent Desks count Edit the number of recently opened Desks that should be displayed in the Desk main menu. The number of Desks that can be viewed range from 0 to 10.
Recent File count Edit the number of recently opened files that should be displayed in the File main menu. The number of files that can be viewed range from 0 to 10.
Auto Interface Code Generation Checking/un-checking this option generates/does not generate the home and remote interfaces for the bean each time the bean is generated. This option is checked by default.
Java Settings This section in the panel is used for setting the Java home and Java compiler.
Note: Sometimes compilers do not contain any bootstrap classpath. In such cases, add all the required bootstrap classes/JARs to the classpath of the Desk in the Build tab of the Properties Panel.
Example
When the compiler is selected as Jikes, add the JAR, rt.jar from under the jdk\jre\lib directory to the Desk's classpath.
Browser Command Enter the complete path of where the browser is installed. The browser entered here is then used for previewing all JSP and HTML files from Studio.
The following properties can be set in the Editor tab:
Clicking on OK sets the properties to be used by the Editor.
Here, a list of abbreviations is provided that help you capture commonly used code snippets. The user can add new abbreviations. Type the abbreviation name in the Name field and the entire complete text to be replaced in the Value field.
Always place your cursor in the position where it should appear after the abbreviation has been expanded.
Click on Add to add the abbreviation to the list. To remove the abbreviations from the list, use the Remove button.
Example
Typing SOP and entering the space bar key in a file automatically converts it to System.out.println(" ");
Abbreviations can be switched on and off by checking and un-checking the checkbox Abbreviations from Edit in the main menu. This is by default checked.
Enter the first character(s) of the word to be completed and press Ctrl + Enter keys on the keyboard. This displays all the words beginning with the character(s) in the file, one after the other. On reaching the right word, leave the keys and the word is completed automatically. The cursor is automatically placed at the end of the word.
Enter the first character(s) of the sentence to be completed and press Ctrl + K on the keyboard. This displays all the sentences typed in the file, one after the other. On reaching the right sentence to be completed, leave the keys and the sentence is completed automatically. The cursor is automatically placed at the end of the sentence. This is very useful for completing long import statements in files and also for multiple variable declarations.
Select the lines of code in the files to be line-commented and press Ctrl + T keys on the keyboard. To un-comment the line(s), which have been line-commented, use the , Shift + T keys on the keyboard.
To wing-comment selected lines of code in Studio, press Ctrl + M keys on the keyboard. To uncomment the line(s), which have been wing-commented, press Ctrl + Shift + M on the keyboard.
On Linux, press the above-mentioned keys, release them and then press Ctrl key again to comment or un-comment the selected lines of code.
View > Show Open File(s)...
Clicking on this pops up a floating panel that displays all the names of the open files in the Display Panel. Single Click on the name of the file makes that file active and displays the file in the Display Panel. Another alternative to move between open files is to press Ctrl + Tab keys on the keyboard.
On Linux, to move between open files press Ctrl + Tab and release them and then press Ctrl key again.
| Pramati Technologies © Copyright |
|