Tài liệu Beginning SQL Server Modeling- P2 - Pdf 92

CHAPTER 2  INTRODUCTION TO INTELLIPAD
21

Figure 2-13. Intellipad View menu
Full Screen
The Full Screen option switches to a view where the current Intellipad window fills the entire display,
and the title/menu bar at the top is removed. This provides as much real estate as possible on the display
for reading, editing, or typing new content in the window. Besides dispensing with the menu bar, the
buffer name (normally displayed under the menu bar in the upper left) and the zoom level and mode in
the upper right disappear.
Figure 2-14 shows a three-pane Intellipad window before being put into the Full Screen format,
while Figure 2-15 shows the same window in Full Screen format, but at a reduced scale, in order to fit on
the page. Figure 2-14. Sample three-pane window before being put in Full Screen mode
Download from Wow! eBook <www.wowebook.com>
CHAPTER 2  INTRODUCTION TO INTELLIPAD
22

Figure 2-15. Window from Figure 2-14, but in Full Screen mode (reduced scale)
Figures 2-16 and 2-17 show a closeup view of the window control icons for full-screen and restored
size windows in this view mode.
While the text and upper right of the window in Figure 2-15 are difficult to read because of the
reduced scale, you can see that the display behaviors of each pane remain the same. The primary
difference is that the menu bar, zoom setting display, and mode display are gone. If you click on the icon
to the left of the Close icon
, this will restore the window to its previous size, but will retain the Full
Screen format without the menu bar and other items.
The location is to the left of the mode name on the pane’s title line, indicated by the cursor in Figure
2-18.
Executing the Zoom function under the View menu causes the mini-buffer pane to appear at the
bottom of the Intellipad window. (I wrote about this feature in the earlier section titled “The Find
Commands”) The Zoom() function is automatically invoked in the mini-buffer, with the argument set to
the active pane’s current zoom setting. The current zoom setting is highlighted, as shown in Figure 2-18,
so that you can easily change it to a different level by typing the new value. Note that you can also zoom
by clicking the Zoom setting, displayed as a percentage. Clicking this will invoke the mini-buffer with the
Zoom function in exactly the same way as zoom can be invoked from the View menu. Figure 2-18. Intellipad Zoom function
Split Windows
You’ve already seen examples of how the Intellipad window can be split horizontally and/or vertically
into multiple panes, addressing the same or different buffers. Splitting the current pane (the pane with
focus) is accomplished using the View

Split Horizontally (Ctrl-W,-) or View

Split Vertically (Ctrl-W,\)
menu options. Initially, the new pane created by the split action will address the same buffer as the
active pane in which the split action was invoked, so you should see exactly the same content in the new
pane as you did in the original, and at the same zoom level. However, other behaviors set in the original
pane, such as line numbers or Word Wrap will be defaulted.
You can set the new pane to a new or different buffer, and whatever other properties you want. In
Figure 2-19, there are two views of the same unsaved buffer, the left one at 100% zoom with no line wrap
and no line numbers, and the right one at 80% zoom with line wrap on and line numbers displayed.

Download from Wow! eBook <www.wowebook.com>
CHAPTER 2  INTRODUCTION TO INTELLIPAD

Commands List
Invoking the Commands option will display a list of functions in the current active pane in Rich Text
mode. These functions must be executed in the mini-buffer (previously discussed), but also can be used
in a script file. Figure 2-22 shows some of the functions listed in the Commands view. Figure 2-22. Intellipad MiniBuffer Commands list (note the Rich Text mode, upper right)
Download from Wow! eBook <www.wowebook.com>
CHAPTER 2  INTRODUCTION TO INTELLIPAD
26
Intellipad Primer
Invoking the Intellipad Primer option of the Help menu displays a useful overview of the Intellipad
interface and features, including a discussion of what is involved in customizing and configuring the
editor. Like the Commands list, this is displayed in the currently active pane in Rich Text mode. Figure
2-23 shows the top part of the Primer text. Figure 2-23. The Intellipad Primer
View Title Banner Functions
You’ve probably noticed each pane has a title banner with the name of the view or buffer on the left and
the zoom level and mode on the right. Each of these three parts provides some functionality if you click
on it. Clicking on the title, as shown in Figure 2-24, reveals a drop-down menu allowing you to select any
of the currently active buffers. Clicking on one of these will switch the view to the selected buffer.

Download from Wow! eBook <www.wowebook.com>
CHAPTER 2  INTRODUCTION TO INTELLIPAD
27

Figure 2-24. Current buffers drop-down menu
Clicking the zoom level, as discussed in the upcoming “Zoom” section, will bring up the mini-buffer

items can be clicked to navigate to the selected destination buffer.
I have already briefly touched on the M Graph mode, used in conjunction with the DSL Grammar
mode.
M mode is used for developing M code. As with the DSL Grammar mode, M mode provides syntax
colorization, error marking of syntax errors, and the T-SQL preview mode.
Project mode provides support for developing projects. These projects will normally consist of
multiple M or DSL grammar (.mg) files and can be managed and edited in Visual Studio with the Visual
Studio M language plug-in.
Python mode supports development of Python code. As with M mode, Python mode provides
syntax colorization and error flagging for syntactically incorrect Python. For test metric purposes, code
coverage is provided if you launch Intellipad from the command line with the /coverage option.
Table mode is used primarily in the Errors pane (when the Errors pane is enabled) to display a list of
errors. Using this mode to display errors enables the errors to be sorted on any column.
T-SQL 1.1 mode provides a view of the T-SQL code generated by M code. To show how this works,
let’s try a small exercise.
Demonstrating the Intellipad T-SQL Preview Mode
In this exercise, you will create some very simple M code to demonstrate how the SQL Server Modeling
framework is able to generate T-SQL output code from M input code. The exercise involves creating an
extent of entities I will call
SandwichOrders
. An extent is a concept in M that maps to data storage (a
table) in SQL Server. For the time being, I would recommend not being concerned about the syntax of the
M code used in this example. I will get into this in future chapters. The primary objective here is to
demonstrate how T-SQL code can be generated from M code.
Download from Wow! eBook <www.wowebook.com>


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status