Creating an AWM Model

AWM モデルを作成するには、次の操作を行います。

  1. Visual COBOL を起動します。メッセージが表示されたら、Eclipse ワークスペースのパスを指定します。

    初めて Eclipse を起動した場合は、Eclipse の [ここからはじめよう] ページが表示されます。このページが表示されたときは、[Open Team Developer Perspective] をクリックします。

  2. [File > New > Project] をクリックします。

    [New Project] ダイアログ ボックスが開きます。

  3. [General > Project] をクリックし、[Next] をクリックします。
  4. [Project Name] フィールドに「Model Configuration」と入力します。
  5. [Finish] をクリックします。

    空のプロジェクトが作成されます。

  6. プロジェクトを右クリックし、[New > Other] をクリックします。

    [New] ダイアログ ボックスが開きます。

  7. [AWM > AWM Model] をクリックし、[Next] をクリックします。
  8. [File name] フィールドに「 CONFIG.model」と入力します。
  9. [Finish] をクリックします。

    The CONFIG.model is displayed in the AWM Model editor.

The AWM Model editor shows all modeled types and relationships in a tree structure.それらの属性は [Properties] ビューで表示および編集できます。If the Properties view is not visible, right-click in the AWM Model editor, and then click Show Properties View.When editing an AWM model the editor view and the properties are closely linked.New AWM components are defined in the editor view by right-clicking an AWM component, and then clicking New Child or New Sibling.The attributes of the new component are displayed in the Properties view.

モデル エディターの最初の行は、現在作業中のリソースを表します。階層の次のレベルを表示するには、 をクリックします。これにより、どの AWM モデルにも含まれる [Document Root] が表示されます。[Document Root] には、構成不可のグローバルな属性の定義が格納されます。階層の次のレベルを展開すると、[AWM Model] が表示されます。すべてのオブジェクト タイプのカテゴリがここで定義されています。When you are creating a model from scratch the model does not contain any categories at first.You start by defining all categories which you require in your model.

Categories are children of the AWM Model and are created using the context menu's New Child command.たとえば、[Properties] カテゴリを作成する手順を次に示します。

  1. [AWM Model] を右クリックします。
  2. [New Child > Properties] をクリックします。

    [Properties] カテゴリが [AWM Model] に子として追加されます。

[Properties] カテゴリにプロパティを追加する方法は次のとおりです。

  1. [Properties] を右クリックします。
  2. [New Child > Property] をクリックします。

    [New Object] ダイアログ ボックスが開きます。

  3. In the New ID field, type SAMPLE_PROP_NewProperty.
  4. Click OK.

プロパティの属性が [Properties] ビューに表示されます。

Properties view for a selected property

[Value] 列で属性の値を変更できます。属性に応じて適切な値を入力または選択する必要があります。

[Special Property] は必須の属性です。デフォルト値は「NONE」です。詳細については、「Special Properties」を参照してください。

[Type] は必須の属性です。デフォルト値は「String」です。詳細については、「Property」を参照してください。

[Retrieve All Values] 属性には、アクション記述子への参照が必要です。The property is intended to define an action which references a tool to retrieve all valid values for this property.At this point no action descriptor has been defined so the reference to the action descriptor cannot be specified.

[Value Keys] 属性では、複数の値を指定できます。複数の値を指定する方法は次のとおりです。

  1. [Value Keys] の [Value] 列をクリックし、 をクリックします。

    [Value Keys] ダイアログ ボックスが開きます。


    Value Keys dialog box
  2. [Value] フィールドに「One」と入力します。
  3. [Add] をクリックします。
  4. 手順 2 から 3を繰り返して、値「Two」、「Three」、および「Four」を追加します。
  5. [OK] をクリックします。

[Remove] をクリックして値を削除したり、[Up] または [Down] をクリックして値の順序を変更したりできます。

一部の属性では複数行の文字列値を指定できます。これらは、「Tool descriptor」および「Relationship: Tool Has Input Parameter」の表で「複数行」とマークされています。[Properties] ビューで入力フィールドをダブルクリックすると、テキスト領域を含む [Input] ダイアログが開きます。このフィールドで、複数行の文字列を入力または編集できます。

フィールドに値を入力する際、Eclipse ウィンドウの左下にヘルプ テキストが表示されます。ここには、属性の簡単な説明か、入力が適切でない場合はエラー メッセージが表示されます。属性フィールドに入力した値は、想定される属性値に照らして検証されます。For example, typing characters into the Value Min Length field generates a format exception message as the field expects a number.


Help text for selected attributes

長いヘルプ メッセージは最後まで表示されないことがあります。この場合は、ポインターをテキストに合わせると完全なメッセージが表示されます。

関係と複雑な属性を構成することができます。どちらも対応するオブジェクト タイプ (要素タイプやツール記述子など) の子であり、コンテキスト メニューの [New Child] を使用して作成されます。These are then modeled in the Properties view.

関係はエディターでの表示形式が他のタイプと異なり、Their Target ID is shown directly in the label.順序を示すシーケンス番号 ([Seq No]) もラベルに表示されます。

Labelling in the model editor

オブジェクト タイプを削除するには、コンテキスト メニューの [Delete] コマンドを使用します。オブジェクト タイプを削除すると、その下のレベルがすべて削除されます。If you delete something by mistake, it can be recovered using the undo command in the context menu of the Model editor.