📄 2explorer.html
字号:
面板的 Model 页.
<li>在 <b>problem_domain</b>
包上点鼠标右键并在右键菜单中选择
<b>Add to Favorites</b>.
<li>在 <b>ProductDesc</b> 类上点鼠标右键并在右键菜单中选择
<b>Add to Favorites</b>.
</ol>
<p>当你点击 Favorites
页中的类时,
类的源代码将显示在
Editor 中.如果类所属的模型图已在
Designer 中打开,
则模型图中对应的类节点也会被选中.
当你点击 Favorites
页中文件夹时,
它的模型图会显示在
Designer 中.</p>
<p>你可以选择显示或隐藏这三个页,
方法是在主菜单的
<b>View | Explorer</b>
下选择或取消对应的项目.</p>
</td>
<td valign="top" bgcolor="white"><img height="462" width="409" src="images/cashsales/tour2_server_fav_diag.png" hspace="5" vspace="5" alt="Explorer Favorites tab" align="left"></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<p>
<hr>
<p class="head3"><a name="componentstab"></a>组件页:
访问并重用组件模型</p>
<p>Components 页用来访问组件模型. 只有打开一个"包含组件"的工程时 Components 页才显示. 要在工程中包含组件,
请执行一下操作:</p>
<ol>
<li>在主菜单中选择 <nobr><b>Project | Properties</b> .</nobr><li>
在对话框中将 <b>Include Components</b> 项打开.</ol>
<p>下图显示了工程属性对话框和 Explorer 面板的 Component 页. Component 页显示了 Together 附带的 Coad
模型组件.</p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr>
<td bgcolor="#bbbbbb">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#993300" width="100%">
<tr>
<td bgcolor="#993300">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#ffffcc" width="100%">
<tr>
<td bgcolor="#ffffcc"><b>
操作步骤:</b> 在编辑器中打开 Coad
模型组件中的 <b>CustomerAccDesc</b>
类.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>按以下步骤完成这个操作:</p>
<ol>
<li>按前述方法将组件包含到工程中.<li>双击 <b>CustomerAccDesc</b>,
它在<b>CustomerAccountMgt | CustomerAccountApp </b>
中.
</ol>
<p>图标和编辑器附近显示的小锁表示只读.</p>
<p>所有的组件都在 Together 的 <b>modules/components</b>
目录下. 你可以将包和类从组件中复制到类图或工程中的任何一个包中.</p>
<p>你也可以创建自己的组件. 并将它们放置在 <b>component</b>
子目录中以便在工程中使用.</p>
</td>
<td valign="top" bgcolor="white"><img height="376" width="520" src="images/cashsales/tour2_components.png" hspace="5" vspace="5" alt="Project Properties Inspector" align="right"></td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<hr>
<p class="head3"><a name="moduletab"></a>Modules 页: 访问并扩展 Together 编译模块</p>
<p>Together 通过开放的 Java API 实现了高扩展性. 开放的 API 允许你编写 Java 程序, 在程序中使用来自
Together 的模型信息, 并可以与 Together 本身进行交互以便扩展其能力. 这样的程序称为<b>功能模块</b>.</p>
<p>功能模块保存在以下目录的子目录中:</p>
<p><b>$TGH$/modules/com/togethersoft/modules</b></p>
<p>通过 Module 页可访问 Together 提供的功能模块, 你自己的功能模块, 以及第三方功能模块.</p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr>
<td bgcolor="#cccccc">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#993300" width="100%">
<tr>
<td bgcolor="#993300">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#ffffcc" width="100%">
<tr>
<td bgcolor="#ffffcc"><b>
操作步骤:</b> 运行 Together
附带的事理功能模块 <b>Hello World</b>
.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>按以下步骤完成本操作:</p>
<ol>
<li>在 Explorer 面板中点击 Modules 页, 将它切换到最前.
<li>按展开图标(<img src="images/icons/expansionbox.gif" width="9" height="9" border="0" alt="icon" hspace="1">)将 <b>Sample | Hello World</b>
展开.<li>在 <b>Hello World (Java)</b>
(或列表中的任何其他功能模块)上点击鼠标右键并选择 <b>Run</b>.
结果将是一个简单的对话框, 如下图.</ol>
<p><img src="images/cashsales/tour2_helloworld.png" width="293" height="128" border="0" hspace="5" alt="hello world dialog"></p>
<p>Explorer 面板 Modules 页使用以下图标.</p>
<ul>
<li><img height="15" width="14" src="images/icons/moduleicon.gif" hspace="5" alt="Module icon">功能模块文件夹.
文件夹与其中包含的内容具有相同的右键菜单(运行或激活功能模块). <li><img height="14" width="12" src="images/icons/javamodicon.gif" hspace="5" alt="Java module icon">Java
源代码功能模块.<li><img height="14" width="12" src="images/icons/compmodicon.gif" hspace="5" alt="Compiled Java module icon">已编译的
Java 功能模块.<li><img height="14" width="12" src="images/icons/tclmodicon.gif" hspace="5" alt="Tcl module icon">Tcl
脚本功能模块(为向后兼容而保留).</ul>
<p> <b>Sample/Tutorial</b> 目录下包括一些简单的功能模块,
你可以在编辑器中察看或运行. 标准输出将出现在 Message 面板中.
你可以通过这些示例功能模块学习如何编写自己的功能模块.</p>
</td>
<td valign="top" bgcolor="white"><img height="368" width="233" src="images/cashsales/tour2_explorermodules.png" hspace="5" vspace="5" alt="Modules tab" align="left"></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<hr>
<p class="head3"><a name="testingtab"></a>Testing 页: 显示测试计划</p>
<p>测试体系是 Together 6.0 中新增加的特性. 只有当测试体系特性被激活后 Explorer 面板中才显示 Testing 页.</p>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr>
<td bgcolor="#cccccc">
<table border="0" cellpadding="5" cellspacing="2">
<tr>
<td valign="top" bgcolor="white">右图是 Together 附带的
CashSalesTest 工程在 Testing 页中的显示.<table border="0" cellpadding="0" cellspacing="2" bgcolor="#993300" width="100%">
<tr>
<td bgcolor="#993300">
<table border="0" cellpadding="0" cellspacing="2" bgcolor="#ffffcc" width="100%">
<tr>
<td bgcolor="#ffffcc"><b>
操作步骤:</b> 打开测试示例工程.</td>
</tr>
</table>
</td>
</tr>
</table>
<p>打开测试示例工程的步骤如下:</p>
<ol>
<li>将 Directory 页切换到最前.<li>展开 <b>Samples | java | CashSales.Test</b>.<li>
双击 <b>CashSalesTests.tpr</b>.<li>Together
询问你是否继续, 选择 <b>Yes</b>.</ol>
<p> <b>CashSales</b> 工程被关闭. 然后 <b>CashSalesTests</b>
被打开. (Together 不允许同时打开两个独立的工程.) 如果测试体系特性被激活, 则 Explorer
面板将显示如右图所示的 Testing 页.</p>
</td>
<td valign="top" bgcolor="white"><img height="340" width="227" src="images/cashsales/tour2_testingframework.png" hspace="5" vspace="5" alt="Modules tab" align="left"></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<center>
<p>
<hr>
<font size="2"><img border=0 height="19" width="298" src="images/generic/nvbuttons.gif" vspace="10" alt="Navigation bar" usemap="#nvbuttonsb601029d"></font><font size="2">
<map name="nvbuttonsb601029d">
<area href="#top" coords="101,2,146,17" shape="rect">
<area href="1gettoknow.html" coords="0,2,96,16" shape="rect">
<area href="3navigation.html" coords="152,1,208,17" shape="rect">
<area href="index.html" coords="216,1,295,17" shape="rect">
</map>
</font>
<div align="left">
<hr>
<p class="footnote">Copyright © 2002 TogetherSoft Corporation. All rights reserved.</p>
<p class="footnote"><font color="#666666">Last Revised: </font><csobj w="88" h="12" t="DateTime" format="MedDate" region="0">Fri, Mar 8, 2002</csobj></p>
</div>
</center>
<p class="footnote"><span style="font-size: 9pt">
<a href="mailto:%20e.w@263.net">翻译: 李颖(e.w@263.net)</a></span></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -