.. Preferences 設定 =========== .. There are some types of preferences, which can all be adjusted in the tabs of a single preferences dialog. このツールには何種類かの設定があります。これらの設定はすべて、ひとつの設定ダイアログの中の、何枚かのタブですべて変更できるようになっています。 .. * Global preferences: These preferences determine the general behaviour and look of the application. They are stored in the file .sdedit.conf in a user directory ($HOME on Unix, Application Data on Windows). In order to restore the default preferences (which came shipped with the application), one can use the "Restore defaults" button. * **Global preferences(グローバル設定):** これらの設定は一般的な動作と、アプリケーションの見た目についての変更を行うためのものです。これらの設定はユーザフォルダ(Unixであれば\ :file:`$HOME`\ 、Windowsであれば\ :file:`Application Data`\ 以下)の\ :file:`.sdedit.conf`\ というファイルに格納されます。もしもアプリケーションインストール時のデフォルトの設定にもどしたい場合には、\ ``"Restore defaults"``\ ボタンを使用すると戻すことができます。 .. * Initial diagram preferences: These preferences are applied to a diagram that is being newly created or that is loaded from a plain (sd) file. They are also stored in .sdedit.conf. One can use the current diagram's preferences as the initial preferences (via the "Save as initial" button). Also, one can restore the default initial preferences (which came shipped with the application) via the "Restore defaults" button. * **Initial diagram preferences(初期図面設定):** これらの設定は新規作成された図や、プレーンな(sd)ファイルをロードした時に適用されます。この設定も\ :file:`.sdedit.conf`\ の中に格納されます。また、\ `"Save as inital"`\ ボタンを使用すると、現在の図の設定を、初期図面設定として保存して使用することができます。もしもアプリケーションインストール時のデフォルトの設定にもどしたい場合には、\ ``"Restore defaults"``\ ボタンを使用すると戻すことができます。 .. * Current diagram preferences: These preferences are applied only to the diagram currently being displayed. They are saved along with the diagram source when it is saved as an sdx file. When a diagram is saved as an sd file, these preferences will be lost. * **Current diagram preferences(現在の図面設定):** これらの設定は現在表示されている図にだけ適用されます。これらの設定は、図が\ ``sdx``\ ファイルとして保存されるときに一緒に保存されます。もしも、図を\ ``sd``\ ファイルとして保存される時には、これらの設定は失われます。 .. Filtering フィルタ機能 ============ .. The contents of the text area can be replaced by the output of a command that you have entered after clicking the filter icon. If no text is selected, the whole of the text is used as the command's input and replaced by its output, otherwise the replacement is applied to the selection only. テキストエリアの中の内容を置換する機能があります。フィルタアイコンをクリックしたあとに、入力したコマンドの出力で置き換えます。もしもテキストが選択されていなければ、テキスト全体がコマンドの入力として使用され、そのコマンドの出力で置換されます。そうでない場合には、選択されたテキストのみが置換対象になります。 .. The field where the command is entered can be left by clicking the ESC key. This may also terminate a command that has been entered and has not yet finished. There is a history of commands you have already entered in this session, through which you can browse using the cursor up and cursor down key. コマンドが入力されるフィールドが表示されたときには、ESCキーを押すと抜けることができます。また、ESCキーを押すと、入力されたが終わってないコマンドを終了させることもできます。この機能で入力されたコマンドのヒストリーを保持する機能もあります。これはカーソルの上下キーを使用することで見ることができます。 .. This feature can be used by people who are too lazy to use the file dialog in order to load a file. For example: cat ~/my_diagram.sd. It can also be used for replacing patterns: sed s/foo/bar/g. Or to remove lines that contain comments: grep -v # ... Of course cat, sed and grep must be available on the system then. この機能は、ファイルをロードするためのファイルダイアログを開くのすら面倒な人がファイルを開くのに使用することもできます。例えば以下のように入力すると、テキストエリアにロードできます。 .. code-block:: bash cat ~/my_diagram.sd また、以下のサンプルは、テキストの単語を一括で置換するためのものです。 .. code-block:: bash sed s/foo/bar/g コメント行を削除するには、以下のようにします。 .. code-block:: bash grep -v # もちろん、ユーザの使用しているシステムで、\ ``cat``, ``sed``, ``grep``\ が使用できるようになっている必要があります。 HTMLマップファイル ==================== .. If an image of a sequence diagram is used on a website, if might be useful to be able to navigate to a certain target if a head of a lifeline is clicked. For this purpose, a HTML map file can be generated for the diagram that is currently being displayed (see the Extras menu). もしもシーケンス図の画像をウェブサイトで使用する場合には、ライフラインの頭をクリックすることで、特定のターゲットへのナビゲーションをしたりすることができます。このために、現在表示されている図からHTMLマップファイルを作成する機能が、Extrasメニューの中にあります。 .. The map file contains just a tag, comprising tags for each object of the diagram. The tag's href attribute equals the name of the object, or, if the declaration of the object is followed by '#!href=""' , an URL of your choice. Example:: マップファイルはタグだけを持っています。タグは図のそれぞれのオブジェクトをあらわすタグを含んでいます。タグのhref属性は、オブジェクトの名前同じになります。あるいは、オブジェクト宣言の後ろに\ ``'#!href=""'``\ が付加されるのであれば、自由に選択したURLを使用することができます:: object:Class #!href="../foo.html#bar" .. Javadoc taglet Javadocタグレット ================= .. Quick Sequence Diagram Editor helps you to add sequence diagrams to your Java documentation (javadoc). Pass these two parameters to the javadoc tool: Quick Sequence Diagram Editorは、Javaのプログラムのドキュメント(javadoc)にシーケンス図を追加するのにも使用することができます。以下の二つのパラメータをjavadocのツールのコマンドで追加します:: -tagletpath -taglet net.sf.sdedit.taglet.SequenceTaglet .. is the location of the Quick Sequence Editor class files, that can be the jar file or the bin directory. If you are using the exe file, there is no such location, sorry. はQuick Sequence Editorのクラスファイルのパスを指定します。jarファイルもしくはbinディレクトリを指定することができます。もしもexeファイルを使用している場合には、申し訳ないですが指定することができません(訳注: jar版をダウンロードしてください)。 .. Now javadoc will interpret the contents of @sequence.diagram tags as textual descriptions of sequence diagrams. It will create PNG images from them and they will be shown on the HTML pages generated by the standard doclet. The images are stored in a directory that is a child of the javadoc target directory. オプションを指定すると、\ ``@sequence.diagram``\ タグを解釈できるようになり、シーケンス図を表現するテキストを読み込むことができるようになります。このタグからPNG画像ファイルが作成され、標準のdocletを使って生成されたHTMLのページの中に表示されます。画像ファイルは、javadocの出力先ディレクトリの中に保存されます。 .. When @sequence.diagram is followed by a quoted string, this string will be used as a headline for the sequence diagram. @sequence.diagram can appear in a package description and anywhere in a class definition. ``@sequence.diagram``\ の後ろにはクオーテーションでくくられた文字列が続きます。この文字列はシーケンス図の表題として使用されます。\ ``@sequence.diagram``\ タグはパッケージの記述でも、クラス定義でも、どこに書くこともできます: .. code-block:: java /** EnigmaDecoderの説明です。. ... @author アラン=チューリング @sequence.diagram "EnigmaDecoderのインスタンス作成" a:A /decoder:EnigmaDecoder a:decoder.new @deprecated */ .. /** This is the description of the EnigmaDecoder. ... @author Alan Turing @sequence.diagram "Instantiation of the EnigmaDecoder" a:A /decoder:EnigmaDecoder a:decoder.new @deprecated */ .. Beware of code-formatters that join lines in javadoc comments. This might result in syntactically wrong sequence diagram descriptions. Javadocコメントにラインを付加するコードフォーマッターに注意してください。これによって、シーケンス図のテキストのフォーマットとしては文法を間違ったものが生成される可能性があります。 .. Command line コマンドライン ============== .. sdedit can be invoked from within a shell. Let be the invokation command, e. g. java -jar sdedit-3.0.jar, sdedit-3.0.exe, sdedit.bat, or ./sdedit.sh. Users of the zip distributions who are familiar with Java might invoke sdedit typing something like java -classpath bin:lib/.... Note that ant run or ant start will not work as a . sdeditはコマンドラインの中からも起動することができます。<起動コマンド>は\ ``java -jar sdedit-3.0.jar``, ``sdedit-3.0.exe``, ``sdedit.bat``, ``sdedit.sh``\ などに置き換えて読んでください。Javaに詳しく、zip形式の配布物を利用している人は、\ ``java -classpath bin:lib/...``\ とタイプして起動するかもしれません。\ ``ant run`` ``and start``\ は<起動コマンド>としては動作しません。 .. The point of running sdedit from within a shell is to automatically create documents or images from diagram files. シェルからsdeditを実行するポイントは、図のファイルからドキュメントか画像を自動的に作成できるというところにあります。 .. In order to do this, specify the name of the output file to be created using the -o option behind . The type of the file to be created (pdf, ps, svg, png, ...) is to be named as the value of the -t option. The paper format and orientation can be configured using the -f and -r option, respectively. Appending -h as an option shows a list of long options that can be used for configuring the diagram. この機能を使用するためには、<起動コマンド>の後ろに、出力するファイル名を指定する、-oオプションを使用してください。PDF, PS, SVG, PNGなど、生成するファイルのタイプは、-tオプションで指定します。紙のフォーマットや向きは、-f, -rオプションを使用することで設定を行うことができます。図の設定を行うのに使用される、長いオプションのリストを見るには、-hオプションを追加して実行します .. Examples: .. code-block:: bash > <起動コマンド> -h > <起動コマンド> -o /tmp/bfs.pdf -t pdf /tmp/examples/bfs.sd > <起動コマンド> -o /tmp/ssh.ps -t ps -f A0 -r Landscape --threaded=false /tmp/examples/ssh.sd .. If options are used, exactly one input file must be defined. When no option is used, arbitrarily many input files can be specified, which will be loaded into separate tabs then. オプションが設定されている場合には、入力ファイルはひとつだけしか指定することができません。オプションが使用されていない場合には、任意の数の入力ファイルを指定することができます。それぞれのファイルは別々のタブにロードされます。 .. RT diagram server RTダイアグラムサーバ ==================== .. Diagram specifications can be transmitted through a TCP socket and displayed in real time, i. e. as soon as a new line is transmitted, the diagram will be updated. 図の仕様をTCPのソケットから受信してリアルタイムに表示できる機能があります。一行受信すると、そのたびに図が更新されます。 .. To use this function, select "Start/stop RT server" in the Extras menu and enter a port number. A process that connects to the port will have to follow a very simple uni-directional protocol: この機能を使用するためには、Extrasメニューから\ ``"Start/stop RT server"``\ を選択して、ポート番号を入力します。ポートにつなぐプロセスは、以下のような、非常にシンプルな単方向のプロトコルで通信しなければなりません。 .. * The first line is interpreted as the name of a new tab to be opened. * The remaining lines are entered into the text area of the new tab. * When a line consists of the word "end", the socket will be closed. The line will not appear in the text area. * 最初の行は、新規に開かれる新しいタブ名として解釈されます * 残りの行は新規に開かれたタブのテキストエリアに書き込まれていきます。 * ``"end"``\ という単語が含まれる行が来たら、ソケットをクローズします。その行はテキストエリアには入力されません。 The server is started automatically if the "Autostart RT diagram server" flag is set to 1 in the configuration dialog. 設定ダイアログで\ ``"Autostart RT diagram server"``\ のフラグが1に設定されると、起動時に自動的にサーバ機能がスタートします。