DVT Eclipse IDE Custom Dialogs - Part I - Create Custom Dialogs for Your Scripts

Description

With DVT Custom Dialogs you can easily create graphical interfaces to get user input and pass it on to simulation scripts or any other tool. In conjunction with DVT Generic Run configurations, Custom Dialogs provide a one-click away external tool dashboard. This demo movie shows you how to create and use such a dialog.

Transcript

Introduction

A DVT Custom Dialog is a user-defined graphical interface which can be used in conjunction with the DVT generic run configurations to get user input. For example, you can easily create interfaces for your simulation scripts.

Creating a Custom Dialog

To create a dialog, go to the File menu, New, Example, and select DVT Custom Dialog. A dialog description file is created and opened. The SWT XML preview view is always kept in sync with the XML content.

A dialog is comprised of a set of customizable graphical elements called widgets, each described by an XML tag. The built-in example contains all the available widgets.

Using the Custom Dialog

Now let's use this dialog. Create a new run configuration and fill in the command with the dvt_dialog_prompt variable. This variable takes as an argument the path to the custom dialog XML file and will be replaced by the custom dialog output.

All widgets which specify an id contribute to the output of the dialog. The contribution of a particular widget is the concatenation of the id and the value of the widget. For example, the output of the text widget will be -seed 12345.

Note: Autocomplete is available when editing the custom dialog XML file. For example, to insert a button, type the opening tag character, press Ctrl-Space, then pick Button from the list. Do the same to specify the button id, text, and style.