- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这篇文章的顶部较短的部分是我想要做的。第二部分是到目前为止已经完成的工作。它真的很长,但你应该能够从这里的顶部看到我在做什么。如果您对更多细节感兴趣,只需查看注释即可。
我正在使用 NetBeans 平台作为起点构建一个应用程序。以前的版本使用 JavaHelp 作为最终用户文档。在编写所有新文档时,我可以继续练习,但如果使用它的信息,我会发现它很缺乏。
我已经了解了如何创建新的 HelpSet 以及 XML 到 HTML 的关系。可以在新建文档中手写代码&截图,但是感觉很手工,不知道有没有什么插件或者工具可以方便制作?
通过 Google-foo,我找到了几篇围绕该主题的帖子,但大多数帖子都与 2003 年相关,现在已是死胡同。使用 JavaHelp 是否过时?下面我概述了我为启发人们搜索相同内容所做的工作,也许有人可以指出我这样做的方式效率低下。
这不是一个糟糕的方法,但是必须为我上传的每个文件向两个 XML 文件添加行,然后每次都必须指向一个长代码 URL,这对于快速写出这些东西来说感觉很麻烦。
感谢阅读。
编辑:有一件事我确实有问题。我不知道如何更改 JavaHelp 的初始登录页面。现在它说“这列出了 IDE 加载的所有文档,单击左侧以通读它”。这对我的最终用户没有任何意义。
另外,我不知道如何更改左侧主题的顺序。现在它们似乎没有任何有用的顺序。我想按字母顺序排列,或者将它们按某种有用的顺序排列。
在Netbeans中,右击模块New->Other点击Module Development选择JavaHelp Help Set。这将在模块下创建一个新包。它将遵循模块的命名约定,并在末尾附加一个 .docs。例如 org.netbeans.newmodule.docs。
在此之下它将创建 6 个文件:
package-info.java (package info file)
<modulename>-about.html (As seen HTML help file)
<modulename>-map.xml (creates a connection to the HTML pages (E.G about) to a target, used in making links & building the hierarchy for the table of contents)
<modulename>-toc.xml (Table of contents XML)
<modulename>-hs.xml (Specifies the Table of contents view & javax control, & index)
<modulename>-idx.xml (Controls the index)
第一个 HTML 文件是初始信息页面。这是最终用户将阅读的帮助文件。它只是特定格式的常规 HTML。
<modulename>-about.html
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>About Module</title>
<link rel="stylesheet" href="nbdocs:/org/netbeans/modules/usersguide/ide.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h2>About Module</h2>
<p>
<!-- TODO describe your module, add more pages... -->
</p>
</body>
</html>
<!--
Tip: to create a link which will open in an external web browser, try:
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.netbeans.org/">
<param name="text" value="<html><u>http://www.netbeans.org/</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
To create a link to a help set from another module, you need to know the code name base and path, e.g.:
<a href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/configure/configure_options.html">Using the Options Window</a>
(This link will behave sanely if that module is disabled or missing.)
-->
任何东西都可以添加到 <body>
中文档的一部分。我使用过简单的内联 CSS 并使用 <FONT>
标签到目前为止有效。它还链接到外部 CSS 文件,因此我认为这也可以。您可以通过指定路径链接到其他帮助文件。该路径将始终以 nbdocs:/<yorumodulepath>
开头
例如:Any event added here will show up on the <a href="nbdocs:/com/mymodule/mod1/start/docs/start-about.html">start page</a>
如果图像与javahelp在同一个源码包中,则可以相对链接。
例如:<img src="startPageLogo.png">
XML 文件很重要,因为它们设置了帮助文档的结构。
<modulename>-map.xml
此文件将 HTML 文件链接到 nbdocs 文件。这将允许您在 HTML 文件中创建指向其他帮助文件位置的链接,并使其正确打开和关闭 JavaHelp 树。结构似乎是:<mapID target="<com.yoruproject.modname" url="<htmlfilename/.html"/>
E.G
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 2.0//EN" "http://java.sun.com/products/javahelp/map_2_0.dtd">
<map version="2.0">
<mapID target="com.mymodule.mod1.start.about" url="start-about.html"/>
<mapID target="com.mymodule.mod1.start.calevents" url="start-calevents.html"/>
<mapID target="com.mymodule.mod1.start.backupreminder" url="start-backupreminder.html"/>
</map>
<modulename>-toc.xml
此文件控制 JavaHelp 左侧的结构,用户可以使用该结构深入了解帮助文档的不同区域。格式如下:
<toc version="2.0">
<tocitem text="Top Category">
<tocitem text="SubItem" target="com.mymod.mod1.start.about"/>
<tocitem text="SubCategory">
<tocitem text="SubCategoryItem1" target="com.mymod.mod1.start.backupreminder"/>
<tocitem text="SubCategory2" target="com.mymod.mod1.start.about">
<tocitem text="SubCategoryItem2" target="com.mymod.mod1.start.classifyreminder"/>
</tocitem>
</tocitem>
</tocitem>
</toc>
这是一个完整文件的示例:
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN" "http://java.sun.com/products/javahelp/toc_2_0.dtd">
<toc version="2.0">
<tocitem text="Start Page">
<tocitem text="Getting Started" target="com.mymodule.mod1.start.about"/>
<tocitem text="Calendar Events" target="com.mymodule.mod1.start.calevents"/>
<tocitem text="Notification Pane">
<tocitem text="Backup Reminders" target="com.mymodule.mod1.start.backupreminder"/>
<tocitem text="New Classification Downloads" target="com.mymodule.mod1.start.backupreminder"/>
</tocitem>
</tocitem>
</toc>
<modulename>-hs.xml
我还没有弄乱这个文件。它似乎概述了目录、索引的 IDX 文件和 SearchView 文件(这是默认的 Java 位置)的位置。
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0">
<title>HMSStart Help</title>
<maps>
<homeID>com.mymodule.mod1.start.about</homeID>
<mapref location="start-map.xml"/>
</maps>
<view mergetype="javax.help.AppendMerge">
<name>TOC</name>
<label>Table of Contents</label>
<type>javax.help.TOCView</type>
<data>start-toc.xml</data>
</view>
<view mergetype="javax.help.AppendMerge">
<name>Index</name>
<label>Index</label>
<type>javax.help.IndexView</type>
<data>start-idx.xml</data>
</view>
<view>
<name>Search</name>
<label>Search</label>
<type>javax.help.SearchView</type>
<data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
</view>
</helpset>
最佳答案
首要问题是什么?是不是现在的流程太费劲了?我认为如果您一次问一个明确的问题会更容易提供帮助。不管怎样,这里有一些可能有用的提示。
据我所知,Sun JavaHelp 的开发已经停止。您可能想尝试 Oracle Help反而。它与 JavaHelp 非常相似,但维护更为积极。
有一些商业创作工具可以帮助您摆脱制作 JavaHelp(或 Oracle Help)的苦差事。示例:
其他选项是免费的基于 XML 的文档框架 DocBook 和 DITA,它们都提供样式表(请参阅 here 和 here )从 XML 源代码生成 JavaHelp(我认为为了实现这个需要很少的东西也适用于 Oracle Help)。
还有其他(非 JavaHelp)替代品。例如,DocBook 还提供了基于 Web 的帮助格式:WebHelp .也许您会发现这很有趣。
关于java - 将 JavaHelp 用于有关基于 NetBeans 的应用程序、工具或插件的最终用户文档以使其更容易?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9994373/
考虑需要与 iOS 5 和 iOS 6 兼容的应用。 有没有办法标记纯粹为了 iOS 5 兼容性而存在的代码,以便当部署目标最终更改为 iOS 6 时它显示为编译错误(或警告)? 像这样: #IF_D
我想我知道答案但是...有什么方法可以防止全局变量被稍后执行的 修改吗? ?我知道全局变量首先是不好的,但在必要时,有没有办法让它成为“最终”或“不可变”?欢迎黑客/创造性的解决方案。谢谢 最佳答案
class Foo { final val pi = 3 } 是否每Foo对象有一个 pi成员?因此我应该把 pi在伴生对象中? 最佳答案 如果您担心内存占用,您可以考虑将此字段移动到伴随对象中。
随着可用的 Web 开发框架种类繁多,似乎总是有一种“尝试新事物”的永久动机。因此,我们中的一些人发现自己用一个框架换另一个框架,从来没有对最终结果完全满意。当然,总会有一个特定的 Web 框架可以完
在MDN中指出, If the finally block returns a value, this value becomes the return value of the entire try
我正在尝试用 JavaScript 制作一个基本的井字棋类型游戏。尽管 x 和 y 值在 if 语句的范围内,但除最后一个之外的所有空格都有效。 我不知道为什么最后的 else if 语句不起作用。
我想知道如何使用PowerMock模拟kotlin最终类(class),以便进行测试。我按照指南测试了Java最终类,但仍然出现此错误 Cannot subclass final class 有什么办
考虑以下设置: // debugger class public class Debug { // setting public final static boolean DEBUG
给定以下类(class): public class SomeClass { private final int a; public SomeClass(int a) {
This question already has answers here: What does “final” do if you place it before a variable?
我有一个类PasswordEncryptor,它使用org.jasypt.util.password.StrongPasswordEncryptor作为其字段之一,因为我试图使应用程序“可集群”所有类
我今天有一个关于 StreamReader 类的问题。具体使用文件名参数初始化此类例如: TextReader tr = new StreamReader(fileName); 显然,当此操作完成后,
我想弄清楚什么是使用带锁的 try/finally 的最佳方式。 当我在同一个地方有 lock() 和 unlock() 时,我只使用 try/finally block 作为 JavaDoc还建议:
在 Java 中序列化后是否可以将 final transient 字段设置为任何非默认值?我的用例是一个缓存变量——这就是它是 transient 的原因。我还有一个习惯,就是制作不会改变的 Map
在this问题说 final transient 字段在序列化后不能设置为任何非默认值。那么,为什么我为 aVar1 变量设置了 3,为 aVar3 变量设置了 s3? import java.io.
在Xbox上进行开发时,我使用的是F#规范中最终工作流程的修改版。 Xbox上的.net框架似乎不支持尾部调用。因此,我必须在编译时禁用尾部调用优化。 尽管起初看来这种限制会阻止在计算表达式中使用任何
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我想让我的带有自定义对象的ArrayList成为最终对象,以便对象在设置后无法更改。 我试图这样声明它: private final ArrayList XML = new ArrayList();
我有一个场景,我需要类似于 .NET 的 try-catch-finally block 的内容。 在我的尝试中,我将创建一个#temp表,向其中插入数据并基于#temp处理其他数据集。 先是CATC
对此可能有一个简单的答案,但尝试充分使用 Butterknife,将一些 findViewById 转换为 @BindViews,并注意到我无法在需要声明为 Final 的 View 上使用 Bind
我是一名优秀的程序员,十分优秀!