Tivoli Service Desk 6.0 Developer's Toolkit Tools and Utilities Guide

Chapter 1: The Developer's Toolkit Integrated Development Environment

Back to Table of Contents


Introduction

Purpose of the IDE

The Developer's Toolkit Integrated Development Environment, or IDE, is an integrated work space for writing Developer's Toolkit applications. The IDE is designed to enable users to build applications by selecting options in a graphical user interface (GUI) environment rather than working from the command prompt. You can use the IDE to organize Developer's Toolkit applications and access the tools you need to build them.

The IDE hierarchy

Within the IDE, all Developer's Toolkit applications are organized in a hierarchical structure within a project file. In the IDE, each project is a file made up of one or more windows called targets. Targets contain components called items that are used to build the application.

To build applications, your workflow typically follows the sequence of this hierarchy. The following steps summarize the process for building a Developer's Toolkit application project using a hierarchical approach.

  1. Identify any existing source code files that you want to include in the project file. You may want to set up a directory for these files.
  2. Create a new project file.
  3. Add targets to your project file.
  4. Add items to the targets.
  5. Create the source code file for each item, unless it already exists.

What is a project?

A project is the highest level in the IDE's hierarchical file structure. A project is a window that shows a list of targets. A project can have one target or many, depending on the complexity of the application you're building and how you choose to organize it.

What is a target?

A target is a window that is linked to a project. The target window shows a list of items associated with the project. One target can hold all the items for a project, or the items can be grouped into multiple targets, depending on how you want to organize your Developer's Toolkit application.

What is an item?

An item is the lowest level in the IDE's hierarchical file structure. An item is a window that is linked to a target. The item window shows the name of one item associated with a target. One item or multiple items can make up a target.

Item names are the full path, including file name, of source files used to build an application. Because files are referenced by path name rather than being physically copied into the IDE, they do not have to be created within the IDE to be included in your project. You can define any file as part of the project in the IDE.

Programs Used in the IDE

Edit programs

There are two edit programs: a default text editor and the Interface Designer. The default text editor is used to edit ASCII text files. A default text editor has already been defined for your operating system, however you can change it to a different editor. For more information, see the section Editing Items with a Text Editor later in this chapter.

The Interface Designer is used to edit .df files. For more information on using the Interface Designer, see the Tivoli Service Desk 6.0 Developer's Toolkit Interface Designer Guide.

Build programs

There are two build programs that convert files from a source format to an object format. During the build process, the build program creates a new file with an extension that is derived from the original file extension.

The build program converts the file to machine code and adds a "c" to the file extension. A build for a .kb (knowledgebase) file creates a file with a .kbc extension.

The following example shows the build programs and the type of files each converts.

Build Program Converts
Interface Generator .df to .dfc
TSD Script Parser .kb to .kbc

Run programs

The run process runs or displays files, and in doing so, designates the program that runs the selected file. For example, the Interface Viewer can be used to view .df files.

Working With Project Files

Overview

This section covers the following topics:

Creating a new project file

When you create a new project file, it is recommended that you create a new, separate directory for your file(s).

To create a new project file:

  1. From the TSD Integrated Development Environment window, open the Developer's Toolkit IDE.
  2. From the File menu, choose New. You can now set up the targets and items for a project file

Opening an existing project file

Use this procedure to open an existing project file.

To open an existing project file:

  1. Open the IDE, if it is not already open.
  2. From the File menu, choose Open.
  3. From the Open Project File dialog box, select the file name of the project file you want to use.
  4. Choose Open.

Saving a project file

When you name a project file, the default extension is .ide. You may specify any extension, however.

To save a project file with the original file name:

  1. From the File menu, choose Save. Any new information you added to the project file is now saved to the original file name.

To save a project file to a different name:

  1. From the File menu, choose Save As.
  2. Specify the path and file name you want to use for the file.
  3. Choose Open.

Using Targets in a Project File

Overview

Once you open or create a project file, you can add targets to it. You can create as many targets in a project file as you want, but there must be at least one. You can add any number of items to a target. However, as an organizational tool, each target should hold only items that are part of a logical group of information or files.

This section covers the following topics:

Adding a target to a project file

Each target holds items that are part of a related group of data used to build an application. Use the following
procedure to add a target to a project file.

  1. Open the project file you want to use.
  2. From the Target menu, choose Add.
  3. In the Target Title box, type the title of the new target.
  4. Note: This is required. If you do not supply a title, an error message appears stating that a value must be supplied before the target is accepted.

  5. Choose OK.

Editing a target name

Editing a target allows you to change the target name.

To edit a target:

  1. Open the project file you want to use.
  2. Activate the target you want to edit by choosing its tab.
  3. From the Target menu, choose Edit.
  4. Make any changes to the target title.
  5. Choose OK to return to the project file.

Clearing a target

Clearing a target removes all items from it, although the source files are not affected by the clear process.

Caution: You cannot undo the clear process. Once you clear items from a target, the only way to restore them is to either close the project file without saving it or to manually add each item back in to the target.

To clear items from a target, use the following procedure.

  1. Activate the target you want to clear items from by choosing its tab.
  2. From the Target menu, choose Clear. A Warning message appears that asks if you want to remove all items from the target.
  3. Choose one of the following options.
If you... then...
want to clear the target choose Yes
do not want to clear the target choose No

Deleting a target from a project file

If you delete a target from a project file, all items on that target are also removed from the project file. The source files are not affected by the deletion.

  1. To delete a target, activate the target you want to delete by choosing its tab.
  2. From the Target menu, choose Delete. A Warning message appears that asks if you want to delete the target.
  3. Choose one of the following options.
If you... then...
want to delete the target choose Yes.
do not want to delete the target choose No.

Working With Items

Overview

A target item is a reference to a source file, and can be added to or deleted from its target at any time.

This section covers the following topics:

Adding an item to a target

Before you add items to the targets in a project file, consider the information that follows:

To add an item to a target:

  1. Activate the target you want to use by choosing its tab.
  2. From the Item menu, choose Add.
  3. From the File name list, select the file name of the item you want to add to the target.
  4. Choose Open.

Placeholders

As you build project files, you may want to add placeholders for source files that have not yet been created. Placeholders are empty files that allow you to form the structure of your application though you may not have source material. For example, you may want to create files that will eventually become help files for your application, even though you have not created the help text yet.

To create a placeholder:

  1. Activate the target you want to use by choosing its tab.
  2. From the Item menu, choose Add.
  3. In the File name box, type the name of the item you want to add.
  4. Choose Open.

Deleting an item

You may choose to remove an item either because you don't want it associated with a particular target anymore, or because you need to move it to another target. The only way to move an item is to remove it from its current target and add it to another target.

To remove an item from a target:

  1. Select the item you want to remove.
  2. From the Item menu, choose Remove. Alternatively, press DELETE. A Warning message appears that asks if you want to delete the item.
  3. Choose one of the following options.
If you... then...
want to delete the item choose Yes.
do not want to delete the item choose No.

Editing Items with a Text Editor

Overview

Editing items in a target allows you to make changes when you build an application. Items can be associated with different text editors, depending on the type of item. For instance, a module of code can be associated with a text editor, while a dialog box file is associated with the Interface Designer.

This section covers the following topics:

Opening and Closing a text editor

Each item in a project file is automatically associated with a text editor that can be used to modify its contents.

To open a text editor:

  1. Select the item you want to edit.
  2. From the Item menu, choose Edit.
  3. Note: You can also open a text editor by double-clicking the item you want to edit.

To close a text editor:

  1. Review the changes you made to the item file.
  2. From the File menu, choose Save.
  3. From the File menu, choose Exit.

Changing the default text editor

There may be occasions when you want to change the default text editor. For example, if you have a text editor that you use regularly, you may prefer to continue to use it rather than the default text editor provided with the IDE.

To change the default text editor:

  1. From the Options menu, choose Editor.
  2. Change the listed editor to one of your choice.
  3. Choose OK.

Building Items

Overview

The IDE provides several options for building and updating object code for an item. This section covers the following topics:

The difference between a build and an update is that when you build items, all specified items are rebuilt unconditionally. For more information on building your application, see The TSD Script Parser.

When you update items, only those items that have source code that is newer than the object code are rebuilt. For more information, see Updating Your Project section.

Note: If there is no object code for an item that is selected for an update, it is built.

When the IDE executes the build program, it passes the name of the item(s) to build as command line arguments. When you build or update multiple files, a message appears confirming a successful build or update.

If a build program is specified as a command line for an item, substitutions are performed in the application. If no command line is defined, the name of the selected item is used. If no build program is specified for the selected item, a warning message appears.

Building an item

To build an item in a target:

  1. Choose the item you want to use.
  2. From the Item menu, choose Build.

Rebuilding all the items in a target

To build all the items on a target:

  1. Select the target you want to use.
  2. From the Build menu, choose Rebuild Target.

Rebuilding all the items in a project

To build all the items in a project:

  1. From the Build menu, choose Rebuild All.

Updating Your Project

Overview

You can update just the targets in your application or the entire project file, including associated targets and items.

This section covers the following topics:

Updating all the items in a target

To update all the items on a target:

  1. Select the target you want to use.
  2. From the Build menu, choose Update Target.

Updating the project file

To update all the items in a project file:

  1. From the Build menu, choose Update All.

Building and Updating .kb Files

Overview

Knowledgebases are built and updated in the same manner that items are built and updated. That is, for an update, the TSD Script Parser parses all .kb files in the project whose time stamp is newer than its .kbc file, or if no .kbc file exists, one is created.

Rebuilding a .kb file allows the TSD Script Parser to parse all .kb files in the project regardless of their modification times.

This section covers the following topics:

Rebuilding a knowledgebase

To build a knowledgebase:

  1. From the Integrated Development Environment window, select the .kb file you want to use.
  2. From the Build menu, choose Rebuild KB.

Updating a knowledgebase

To update a knowledgebase:

  1. From the Integrated Development Environment window, select the .kb file you want to update.
  2. From the Build menu, choose Update KB.

Running Files

Overview

The IDE can run any executable file. This section covers the following topics:

Running a file

To run a file:

  1. From the Integrated Development Environment window, select the item that you want to run.
  2. Do one of the following:
  3. ~ From the Item menu, choose Run.
    or
    ~ Click the Run toolbar button.

Setting the working directory to run Developer's Toolkit programs

To set the working directory to run Developer's Toolkit programs:

  1. From the Options menu, choose Run Directory.
  2. Type the directory name from where you want Developer's Toolkit programs to run.
  3. Choose OK.

Tivoli Service Desk 6.0 Developer's Toolkit Tools and Utilities Guide

Back to Table of Contents
Copyright