PageRenderTime 53ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/projects/netbeans-7.3/usersguide/javahelp/org/netbeans/modules/usersguide/xml/css/csh/about_source_editor.html

https://gitlab.com/essere.lab.public/qualitas.class-corpus
HTML | 176 lines | 136 code | 8 blank | 32 comment | 0 complexity | 16a2385db420c2938d9dfc3130e6519d MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <!--
  3. * Copyright © 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  4. * Use is subject to license terms.
  5. *
  6. -->
  7. <html>
  8. <head>
  9. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  10. <title>About the CSS Source Editor</title>
  11. <link href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css"
  12. rel="StyleSheet" type="text/css">
  13. </head>
  14. <body>
  15. <h2>About the CSS Source Editor</h2>
  16. <p> <small><a href="#seealso">See Also</a>&nbsp; </small>
  17. <p>The CSS Source Editor is a full-featured text editor that is integrated with
  18. other parts of the IDE. You open the Source Editor by
  19. creating a new CSS file or double-clicking a CSS file node in the Projects window, Files window, or
  20. Navigator window.
  21. </p>
  22. <p>The CSS editor has the following features:</p>
  23. <dl>
  24. <dd><a href="#tabs">Tabs</a></dd>
  25. <dd><a href="#toolbar">Toolbar</a></dd>
  26. <dd><a href="#margins">Left Margin</a></dd>
  27. <dd><a href="#errorstripe">Error Stripe</a></dd>
  28. <dd><a href="#status">Status Line</a></dd>
  29. <dd><a href="#colors">Syntax Coloring</a></dd>
  30. <dd><a href="#completion">Code Completion</a></dd>
  31. <dd><a href="#style-builder">CSS Styles Window</a></dd>
  32. <dd><a href="#pair">Pair Completion</a></dd>
  33. <dd><a href="#insert">Insert Mode and Overwrite Mode</a></dd>
  34. <dd><a href="#preview">Preview Window</a></dd>
  35. </dl>
  36. <h3><a name="tabs">Source Editor Tabs</a></h3>
  37. <p>The top of the Source Editor has a tab for each open document. Each tab shows
  38. the name of the document. If the document has been modified and has not been
  39. saved, there is an asterisk (*) after its name. </p>
  40. <p>If multiple files are open, you can split the Source Editor view by clicking
  41. and dragging the tab. As you drag to different parts of the editing
  42. area, you see a red outline that shows you where the new
  43. window will open. When one of these boxes appears, you can drop the document
  44. and split the pane.</p>
  45. <ul class="note">
  46. <li>You must close the split file if you want the editor to return to its unsplit
  47. state. </li>
  48. </ul>
  49. <p>You can right-click a tab to access the following commands:</p>
  50. <ul>
  51. <li><b>Close All Documents.</b> Closes all files that are open in the Source
  52. Editor area.</li>
  53. <li><b>Close Other Documents. </b> Closes all files except for the selected file.</li>
  54. <li><b>Save Document.</b> Saves the selected file.</li>
  55. <li><b>Clone Document.</b> Opens a new tab for the same document. This command is
  56. particularly useful in combination with splitting the window so that you can view
  57. different parts of the same file simultaneously.</li>
  58. <li><b>Close Window.</b> Closes the selected file.</li>
  59. <li><b>Maximize Window/Restore Window.</b> Maximize Window hides other windows and
  60. expands the Source Editor to use all of the window space in the IDE. Restore Window
  61. returns the windows to the state that they were before you chose Maximize Window.
  62. You can also maximize and restore the Source Editor by double-clicking a tab.</li>
  63. <li><b>Undock/Dock Window</b> Opens document in an editor in a new window. If window is
  64. already undocked, the Dock Window option appears instead.</li>
  65. <li><strong>New Document Tab Group/Collapse Document Tab Group.</strong> Splits the editor window into two groups of tabs and separates the selected tab into the new group. If a separate group of tabs exists, Collapse Document Tab Group combines these groups into one group.</li>
  66. <li><b>Select in Projects</b> Highlights the file's node in the Projects window.</li>
  67. <li><b>Local History</b> Opens a menu from which you can view the changes you made to the
  68. file or revert those changes.</li>
  69. <li><b>SVN/Git/Mercurial/etc</b> If the file is under version control, this option appears.
  70. The option opens a menu of relevant version control commands.</li>
  71. <li><b>Diff To...</b> Diff the file to another file in its folder or another file open in the editor.</li>
  72. </ul>
  73. <h3><a name="toolbar">Toolbar</a></h3>
  74. <p>The editor toolbar at the top of the Source Editor window has
  75. buttons for various navigating and editing shortcuts.
  76. Hold the cursor over a button to display
  77. a description of the command. </p>
  78. <h3><a name="margins">Left Margin</a></h3>
  79. <p> The left margin displays annotation glyphs that indicate line status, such
  80. as warnings. </p>
  81. <p>You can right-click the left margin to display a pop-up menu. The margin
  82. can also optionally display line numbers.</p>
  83. <h3><a name="errorstripe">Error Stripe</a></h3>
  84. <p>The error stripe is the strip to
  85. the right of the right scroll bar and
  86. contains marks for various things in your file, such as errors, bookmarks,
  87. and comments for the To Do list. The error stripe represents the whole file, not
  88. just the lines currently displayed. You can immediately identify whether your
  89. file has any errors without having to scroll through the entire file. You can double-click
  90. a mark in the error stripe to jump to the line that the mark refers to.</p>
  91. <h3><a name="status">Status Line</a></h3>
  92. <p> The Source Editor status line is in the bottom right corner of the IDE. The first
  93. area of the status line shows the current line number and row number in the
  94. form <tt>line:row</tt>. The second area of the status line indicates the insertion
  95. mode (INS or OVR). The text area on the right is used for status messages.</p>
  96. <h3><a name="colors">Syntax Coloring</a></h3>
  97. <p> Source code displayed in the Source Editor is syntactically colored. For example,
  98. all CSS keywords are shown in blue and all CSS comments in light gray. </p>
  99. <h3><a name="completion">Code Completion</a></h3>
  100. <p>The IDE's code completion feature helps you fill in code and tags as you are typing.
  101. Code completion is available for CSS, HTML, and XML files.
  102. </p>
  103. <h3><a name="pair">Pair Completion</a></h3>
  104. <p>When you edit CSS, the Source Editor does matching of pair characters
  105. such as brackets, parentheses, and quotation marks. Closing characters are
  106. not duplicated if you type them yourself rather than letting the editor add
  107. them for you. </p>
  108. <h3><a name="insert">Insert Mode and Overwrite Mode</a></h3>
  109. <p>When the Source Editor is in insert mode, the default insertion point is a vertical
  110. bar, and text that you type is inserted. In overwrite mode, the default insertion
  111. point is a solid block, and text that you type replaces the existing text. </p>
  112. <p>Use the Insert key to toggle between the two modes. </p>
  113. <p>Whenever the insertion point in the Source Editor is located immediately after
  114. a brace, bracket, or parenthesis, the matching brace, bracket, or parenthesis
  115. is highlighted. </p>
  116. <ul class="note">
  117. <li>If the Source Editor beeps when you try to enter new text, the file is a
  118. read-only file. </li>
  119. </ul>
  120. <h3><a name="style-builder"></a>CSS Styles Window</h3>
  121. <p>The IDE includes a CSS Styles window that can help you define
  122. the properties and values for each HTML element.
  123. For each property you can select standard values from a dropdown list.
  124. You can use the upper pane of the CSS Styles window to quickly locate and navigate to elements in the style sheet.
  125. </p>
  126. <p>If the CSS Styles window does not open when you open the CSS file you can open the window by choosing Window &gt; Web &gt; CSS Styles from the main menu.
  127. The CSS Styles window opens in the main window next to the Editor window.</p>
  128. <!--<p>To use the CSS Styles window, go to the Editor window and place your cursor
  129. in the element whose style you want to define. A set of tabs appear in the Style
  130. Builder. The tabs correspond to style categories, such as Font and Background.
  131. Select a tab and select style settings in that tab. For example, to set the font
  132. of the &lt;h2&gt; element as Verdana, find <span style="color:green"><b>h2</b></span>
  133. in the Editor, open the Font tab in the Style builder, and select "Verdana, Arial, Helvetica,
  134. sans-serif" in the list of fonts.
  135. </p>
  136. <ul class="note">
  137. <li>Use the scrollbars in the Style Builder. Some of the selections may be hidden. You
  138. can increase the size of the Style Builder window by raising its top border.</li>
  139. <li>Combine the Style Builder and the <a href="#preview">Preview Window</a> to
  140. experiment easily with styles.</li>
  141. </ul>
  142. <h3><a name="preview"></a>Preview Window</h3>
  143. <p>The IDE provides a Preview window in which you can preview what HTML elements
  144. look like according to your CSS. By default, the Preview window appears below and to
  145. the right of the Editor window when you open a CSS file. If the Preview window is
  146. closed, open it by going to Window &gt; Other &gt; CSS Preview.</p>
  147. <p>The Preview window requires a CSS Previewer plugin. The NetBeans Update Center
  148. includes one CSS Previewer, the Flying Saucer Renderer. To install Flying Saucer,
  149. go to Tools &gt; Plugins, open the Available Plugins tab, and find the CSS Preview
  150. Flying Saucer plugin.</p>
  151. <p>To use the Preview window, select a CSS element in the Editor window. If the previewer
  152. can render the element, sample text in that style appears in the Preview window.</p>
  153. -->
  154. <dl>
  155. <dt><a name="seealso">See Also</a></dt>
  156. <dd><a href="../css_create.html">Creating a Cascading Style Sheet</a></dd>
  157. <dd><a href="../css_edit.html">Editing a Cascading Style Sheet</a></dd>
  158. </dl>
  159. <hr>
  160. <small><a href="../../../credits.html">Legal Notices</a></small>
  161. <table cellpadding="50" border="0">
  162. <tr>
  163. <td>&nbsp;</td>
  164. </tr>
  165. </table>
  166. </body>
  167. </html>