Using the SAP NetWeaver Developer Studio (NWDS) 7.5

Objective

After completing this lesson, you will be able to work with SAP NWDS 7.5

Using Perspectives in SAP NWDS 7.5

Selecting a Workspace

When the Workbench is launched, the first thing you see is a dialog that allows you to select where the workspace will be located. The workspace is the directory where your work will be stored. If you do not specify otherwise, Eclipse creates the workspace in your user directory. This workspace directory is used as the default content area for your projects as well as for holding any required metadata. For shared or multi-workspace installs you must explicitly specify the location for your workspace using the dialog (or via the "-data" command line argument).

Working with Perspectives

Perspectives define the initial set and layout of views in the Workbench window. They provide a set of functionality aimed at accomplishing a specific type of task or working with specific types of resources.

Opening Perspectives

Perspectives provide combinations of views and editors that are suited to performing a particular set of tasks. For example, can open the Debug perspective to debug a Java program. To open a new perspective, use the following procedure:

  1. Choose Open Perspective on the shortcut bar on the left side of the Workbench window. (This provides the same function as the WindowOpen Perspective menu on the menu bar.)

  2. To see a complete list of perspectives, choose Other... from the dropdown menu.

  3. Select the perspective that you want to open.

When the perspective opens, the title bar of the window it is in changes to display the name of the perspective. In addition, an icon is added to the shortcut bar, allowing you to quickly switch back to that perspective from other perspectives in the same window. By default, a perspective will open in the same window. If you would rather it opened in a new window, change the setting in the GeneralPerspectives preference page.

Switching Between Perspectives

Open perspectives are represented by icons on the perspective bar. When you have more than one perspective open, you can switch between them by clicking the icons on the shortcut bar.

Changing Where Perspectives Open

You can change the default behavior for how perspectives are opened in the Workbench using the following procedure:

  1. Open the GeneralPerspectives preference page.

  2. Choose either In the same window or In a new window from the Open a new perspective group.

  3. Choose OK.

Configuring Perspective Shortcuts

You can choose which menu items are available under the FileNew, WindowOpen Perspective, and WindowShow View menus using the Shortcuts tab of the Customize Perspective dialog. To configure shortcuts, use the following procedure:

  1. Switch to the perspective that you want to configure.

  2. Select WindowCustomize Perspective.

  3. Choose the Shortcuts tab.

  4. Choose the sub-menu whose shortcuts you want to edit.

  5. Use the Categories tree to turn groups of related shortcuts on or off, or select categories to work with individual menu items in the Shortcuts list.

  6. To cause the changes to take effect, choose OK.

Saving a User Defined Perspective

If you have modified a perspective by adding, deleting, or moving (docking) views, you can save your changes for future use using the following procedure:

  1. Switch to the perspective that you want to save.

  2. Choose WindowSave Perspective As.

  3. Type a new name for the perspective into the Name field. Choose OK.

Deleting a User Defined Perspective

You can delete perspectives that you defined yourself, but not those that are delivered with the Workbench. Use the following procedure:

  1. Open the GeneralPerspectives preference page.

  2. From the Available perspectives list, select the one that you want to delete and choose Delete.

  3. Choose OK.

Resetting Perspectives

To restore a perspective to its original layout, use the following procedure:

  1. Open the GeneralPerspectives preference page.

  2. From the Available perspectives list, select the perspective you want to restore.

  3. Choose Reset.

  4. Choose OK.

Working with Views and Editors

Views and editors are the main visual entities that appear in the Workbench. In any given perspective there is a single editor area, which can contain multiple editors, and a number of surrounding views that provide context.

The Workbench provides a number of operations for working with views and editors.

The figure shows the complete, but empty editor.

You can do the following:

Opening Views

Perspectives offer predefined combinations of views and editors. To open a view that is not included in the current perspective, choose WindowShow View from the main menu bar.

You can also create fast views to provide quick access to views that you use often.

Moving and Docking Views

To change the location of a view in the current perspective, use the following procedure:

  1. Drag the view by its title bar. Do not release the left mouse button yet.

  2. As you move the view around the Workbench, the mouse pointer changes to one of the drop cursors shown in the table below. The drop cursor indicates where the view will be docked if you release the left mouse button. To see the drop cursor change, drag the view over the left, right, top, or bottom border of another view or editor. You may also drag the view outside of the Workbench area to turn it into a "Detached" view.

  3. When the view is in the location that you want, relative to the view or editor area underneath the drop cursor, release the left mouse button.

  4. (Optional) If you want to save your changes, choose WindowSave Perspective As from the main menu bar.

  5. Note that a group of stacked views can be dragged using the empty space to the right of the view tabs.

You can also move a view by using the pop-up menu for the view. (Click the icon at the left end of the view's title bar, or right-click anywhere else in the view's title bar). As well as moving the view this menu will provide shortcut options for turning a view into either a "Fast" or "Detached" view.

Rearranging Tabbed Views

In addition to dragging and dropping (docking) views inside the Workbench, you can rearrange the order of views within a tabbed notebook using the following procedure:

  1. Choose the tab of the view that you want to move and drag it to where you want it. A stack symbol appears as you drag the view across other view tabs.

  2. Release the mouse button when you have the view tab in the desired location. The view that you selected is now moved.

Creating Fast Views

Fast views are hidden views that can be quickly opened and closed. They work like other views except they do not take up space in your Workbench window. To create a fast view, use the following procedure:

  1. Click the title bar of the view that you want. Hold the mouse button down.

  2. Drag the view to the Fast View bar and release the mouse button. By default the shortcut bar is located in the lower left corner of the window.

Alternatively, you can choose the button located on the left side of the Fast View bar that will present you with a selection of views. Choosing one of these views will add it to the Fast View bar immediately.

The icon for the view that you dragged now appears on the shortcut bar. You can look at the view by clicking its icon on the shortcut bar. As soon as you click somewhere else outside the view, it is hidden again.

To restore the view to its original location (and remove it from the Fast View bar), toggle the fast view item in the view button's context menu.

You can also create and restore fast views by selecting Fast View from the context menu that opens when you click the icon at the left side of the view's title bar.

Detaching Views

Detached views are views that are shown in a separate window with a smaller trim. They work like other views except they are always shown in front of the Workbench window.

To detach a view, use the following procedure:

  1. If the Workbench window is maximized, resize it so that it does not fill the entire screen.

  2. Click the title bar of the view that you want to detach. Hold the mouse button down.

  3. Drag the view to the outside of the Workbench window and release the mouse button.

To restore the view to be shown inside of the Workbench window, drag it into the Workbench window. You can also detach a view by selecting Detached from the context menu that opens when you click the icon at the left side of the view's title bar.

Working with Projects, Folders and Files

There are three different types of resources in the workbench: projects, folders, and files. Projects are the largest structural unit used by the Workbench. Projects contain folders and files, and they can be opened, closed, or built. Folders can contain other folders and files. The Workbench provides a number of mechanisms for working with projects, folders and files.

The figure shows the opened New dialog, with all open possibilities.

Creating a Project

To create a project, use the following procedure:

  1. On the main menu bar, choose FileNew Project.

  2. Select a category from the left column and then select the type of project to create from the right column. To assist in locating a particular wizard, the text field can be used to show only the wizards that match the entered text. Choose Next.

  3. In the Project name field, type a name for your new project.

  4. (Optional) The project that you create will map to a directory structure in the file system. The default file system location is displayed in the Location field. If you want to create the project and its contained resources in a different location, clear the Use default location checkbox and specify the new location.

  5. If you want the new project to be dependent on one or more other projects, choose Next and select the projects to be referenced.

  6. Choose Finish. The new project is listed in one of the navigation views.

Hint

The GeneralPerspectives preference page allows you to specify the perspective behavior when a new project is created.

Closing Projects

When a project is closed, it can no longer be changed in the Workbench and its resources no longer appear in the Workbench, but they do still reside on the local file system. Closed projects require less memory. Also, since they are not examined during builds, closing a project can improve build time. To close a project, use the following procedure:

  1. Select the project in one of the navigation views.

  2. Choose Close Project on the pop-up menu.

To re-open the project, use the following procedure:

  1. Select the project in one of the navigation views.

  2. Choose Open Project on the pop-up menu.

Deleting Projects

To delete a project and remove its contents from the file system, use the following procedure:

  1. Select the project in one of the navigation views.

  2. Choose Delete on the pop-up menu.

  3. In the dialog box that opens, choose Also delete contents under.

  4. Choose Yes.

To delete a project from the workspace without removing its contents from the file system, use the following procedure:

  1. Select the project in one of the navigation views.

  2. Choose Delete on the pop-up menu.

  3. In the dialog box that opens, choose Do not delete contents.

  4. Choose Yes.

Creating a Folder

To create a new folder, use the following procedure:

  1. In one of the navigation views, right-click the project or folder where you want to create the new folder.

  2. From the pop-up menu, choose NewFolder.

  3. Enter the name of the new folder and choose Finish.

Creating a File

To create a file, use the following procedure:

  1. In one of the navigation views, right-click the project or folder where you want to create the new file.

  2. From the pop-up menu, choose NewFile

  3. Specify the name of the file, including the file extension (for example, newfile.txt).

  4. Choose Finish.

Setting Local History Preferences

To indicate the level of local history that should be kept for each resource in the Workbench, use the following procedure:

  1. Open the GeneralWorkspaceLocal History preference page.

  2. In the Days to keep files field, type the number of days that you want to keep records for any one Workbench resource. For example, if you type 7, then a history of saved states from the last seven days will be kept.

  3. In the Maximum entries per file field, type the number of states to keep for any one Workbench resource. Note that when you exceed the number of entries per file, the oldest changes are discarded to make room for the newer changes.

  4. In the Maximum file size (MB) field, type the maximum file size (in MB) of a resource for which a local history should be kept. If the size of the resource exceeds the maximum amount of file size allocated, no local history is kept for that resource.

  5. Choose OK to set your preferences and close the Local History Preferences page.

Importing

You can import files into the Workbench in several ways, depending on your operating system, using the following procedure:

  • By using the Import wizard

  • By dragging files or folders from the file system to one of the navigation views

  • By copying files or folders from the file system and pasting them into one of the navigation views

The figure shows the opened Import dialog. You have the following possibilities.

Importing Existing Projects

You can use the Import Wizard to import an existing project into workspace using the following procedure:

  1. From the main menu bar, choose FileImport.

  2. Choose GeneralExisting Project into Workspace and choose Next.

  3. Choose either Select root directory or Select archive file and choose the associated Browse to locate the directory or file containing the projects.

  4. In the Projects screen area, select the project or projects that you would like to import.

  5. Choose Finish to start the import.

Importing Resources from the File System

You can use the Import Wizard to import resources from the local file system into an existing project using the following procedure:

  1. From the main menu bar, choose FileImport.

  2. Choose GeneralFile System and choose Next.

  3. Choose the Browse button on the next page of the wizard to select the directories from which you would like to add the resources.

  4. In the import selection panes, use the following methods to select exactly the resources you want to add:

    • Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the right pane, select or clear checkboxes for individual files.

    • Choose Filter Types to filter the current selection for files of a specific type.

    • Choose Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add.

    • Choose Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.

  5. Specify the Workbench project or folder that will be the import destination.

  6. When you have finished specifying your import options, choose Finish.

Hint

You can also import folders and files by dragging them from the file system and dropping them into one of the navigation views, or by copying and pasting.

Importing Resources from an Archive File

You can use the Import wizard to extract files from an archive file into the Workbench using the following procedure:

  1. From the main menu bar, choose FileImport.

  2. Choose GeneralArchive File and choose Next.

  3. Choose the Browse button on the next page of the wizard, to select the archive files that contain the files you want to extract and import into the Workbench.

  4. In the import selection panes, use the following methods to select exactly the resources you want to add:

    • Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the right pane, select or clear checkboxes for individual files.

    • Choose Filter Types to filter the current selection for files of a specific type.

    • Choose Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add.

    • Choose Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.

  5. Specify the Workbench project or folder that will be the import destination.

  6. When you have finished specifying your import options, choose Finish.

Exporting

You can export files from the Workbench in several ways, depending on your operating system, using the following procedure:

  • By using the Export wizard.

  • By dragging files or folders from one of the navigation views to the file system.

  • By copying files or folders from one of the navigation views and pasting them into the file system.

Exporting Resources to the File System

You can use the Export wizard to export resources from the Workbench to the file system using the following procedure:

  1. In one of the navigation views, select the resources that you want to export.

  2. From the main menu bar, choose FileExport.

  3. Choose GeneralFile System and choose Next.

  4. By default, the resources that you selected will be exported, along with all their children. Optionally, use the checkboxes in the left and right panes to select the set of resources to export, and use push buttons such as Select Types to filter the types of files that you want to export.

  5. Choose the Browse button on the next page of the wizard, to select the directory you would like to export the resources to.

  6. Specify the directory in the file system that will be the export destination.

  7. Choose Finish.

Hint

You can also export folders and files by dragging them from one of the navigation views to the file system and dropping them in the file system, or by copy and paste.

Exporting Resources to an Archive File

You can use the Export wizard to export resources from the Workbench to an archive file in the file system using the following procedure:

  1. In one of the navigation views, select the resources that you want to export.

  2. From the main menu bar, choose FileExport.

  3. Choose GeneralArchive File and choose Next.

  4. By default, the resources that you selected will be exported along with their children. Optionally, use the checkboxes in the left and right panes to select the set of resources to export, and use push buttons such as Select Types to filter the types of files that you want to export.

  5. Specify the path and name of the archive file into which you want to export the selected resources.

  6. Choose Finish.

Log in to track your progress & complete quizzes