Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
daa791a5
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
daa791a5
编写于
8月 14, 2013
作者:
B
bpatel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8016921: Change the profiles table on overview-summary.html page to a list
Reviewed-by: jjg
上级
e33367e5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
43 deletion
+33
-43
src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
...ools/doclets/formats/html/AbstractPackageIndexWriter.java
+2
-7
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
...om/sun/tools/doclets/formats/html/PackageIndexWriter.java
+14
-34
test/com/sun/javadoc/testProfiles/TestProfiles.java
test/com/sun/javadoc/testProfiles/TestProfiles.java
+17
-2
未找到文件。
src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
浏览文件 @
daa791a5
...
...
@@ -159,10 +159,7 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
body
.
addContent
(
div
);
if
(
configuration
.
showProfiles
)
{
Content
profileSummary
=
configuration
.
getResource
(
"doclet.Profiles"
);
Content
profilesTableSummary
=
configuration
.
getResource
(
"doclet.Member_Table_Summary"
,
configuration
.
getResource
(
"doclet.Profile_Summary"
),
configuration
.
getResource
(
"doclet.profiles"
));
addProfilesList
(
profileSummary
,
profilesTableSummary
,
body
);
addProfilesList
(
profileSummary
,
body
);
}
addPackagesList
(
packages
,
text
,
tableSummary
,
body
);
}
...
...
@@ -214,10 +211,8 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
* Do nothing. This will be overridden.
*
* @param profileSummary the profile summary heading
* @param profilesTableSummary the profiles table summary information
* @param body the content tree to which the profiles list will be added
*/
protected
void
addProfilesList
(
Content
profileSummary
,
Content
profilesTableSummary
,
Content
body
)
{
protected
void
addProfilesList
(
Content
profileSummary
,
Content
body
)
{
}
}
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
浏览文件 @
daa791a5
...
...
@@ -123,15 +123,20 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
/**
* {@inheritDoc}
*/
protected
void
addProfilesList
(
Content
profileSummary
,
String
profilesTableSummary
,
Content
body
)
{
Content
table
=
HtmlTree
.
TABLE
(
HtmlStyle
.
overviewSummary
,
0
,
3
,
0
,
profilesTableSummary
,
getTableCaption
(
profileSummary
));
table
.
addContent
(
getSummaryTableHeader
(
profileTableHeader
,
"col"
));
Content
tbody
=
new
HtmlTree
(
HtmlTag
.
TBODY
);
addProfilesList
(
tbody
);
table
.
addContent
(
tbody
);
Content
div
=
HtmlTree
.
DIV
(
HtmlStyle
.
contentContainer
,
table
);
protected
void
addProfilesList
(
Content
profileSummary
,
Content
body
)
{
Content
h2
=
HtmlTree
.
HEADING
(
HtmlTag
.
H2
,
profileSummary
);
Content
profilesDiv
=
HtmlTree
.
DIV
(
h2
);
Content
ul
=
new
HtmlTree
(
HtmlTag
.
UL
);
String
profileName
;
for
(
int
i
=
1
;
i
<
configuration
.
profiles
.
getProfileCount
();
i
++)
{
profileName
=
Profile
.
lookup
(
i
).
name
;
Content
profileLinkContent
=
getTargetProfileLink
(
"classFrame"
,
new
StringContent
(
profileName
),
profileName
);
Content
li
=
HtmlTree
.
LI
(
profileLinkContent
);
ul
.
addContent
(
li
);
}
profilesDiv
.
addContent
(
ul
);
Content
div
=
HtmlTree
.
DIV
(
HtmlStyle
.
contentContainer
,
profilesDiv
);
body
.
addContent
(
div
);
}
...
...
@@ -150,31 +155,6 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
body
.
addContent
(
div
);
}
/**
* Adds list of profiles in the index table. Generate link to each profile.
*
* @param tbody the documentation tree to which the list will be added
*/
protected
void
addProfilesList
(
Content
tbody
)
{
for
(
int
i
=
1
;
i
<
configuration
.
profiles
.
getProfileCount
();
i
++)
{
String
profileName
=
Profile
.
lookup
(
i
).
name
;
Content
profileLinkContent
=
getTargetProfileLink
(
"classFrame"
,
new
StringContent
(
profileName
),
profileName
);
Content
tdProfile
=
HtmlTree
.
TD
(
HtmlStyle
.
colFirst
,
profileLinkContent
);
HtmlTree
tdSummary
=
new
HtmlTree
(
HtmlTag
.
TD
);
tdSummary
.
addStyle
(
HtmlStyle
.
colLast
);
tdSummary
.
addContent
(
getSpace
());
HtmlTree
tr
=
HtmlTree
.
TR
(
tdProfile
);
tr
.
addContent
(
tdSummary
);
if
(
i
%
2
==
0
)
{
tr
.
addStyle
(
HtmlStyle
.
altColor
);
}
else
{
tr
.
addStyle
(
HtmlStyle
.
rowColor
);
}
tbody
.
addContent
(
tr
);
}
}
/**
* Adds list of packages in the index table. Generate link to each package.
*
...
...
test/com/sun/javadoc/testProfiles/TestProfiles.java
浏览文件 @
daa791a5
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 8006124 8009684
* @bug 8006124 8009684
8016921
* @summary Test javadoc support for profiles.
* @author Bhavesh Patel
* @library ../lib/
...
...
@@ -33,7 +33,7 @@
public
class
TestProfiles
extends
JavadocTester
{
//Test information.
private
static
final
String
BUG_ID
=
"8006124-8009684"
;
private
static
final
String
BUG_ID
=
"8006124-8009684
-8016921
"
;
private
static
final
String
PROFILE_BUG_ID
=
BUG_ID
+
"-1"
;
private
static
final
String
PACKAGE_BUG_ID
=
BUG_ID
+
"-2"
;
//Javadoc arguments.
...
...
@@ -105,6 +105,14 @@ public class TestProfiles extends JavadocTester {
{
PROFILE_BUG_ID
+
FS
+
"index.html"
,
"<frame src=\"overview-frame.html\" name=\"packageListFrame\" "
+
"title=\"All Packages\">"
},
//Test for "overview-summary.html" showing the profile list.
{
PROFILE_BUG_ID
+
FS
+
"overview-summary.html"
,
"<ul>"
+
NL
+
"<li><a href=\"compact1-summary.html\" target=\"classFrame\">"
+
"compact1</a></li>"
+
NL
+
"<li><a href=\"compact2-summary.html\" "
+
"target=\"classFrame\">compact2</a></li>"
+
NL
+
"<li><a href=\""
+
"compact3-summary.html\" target=\"classFrame\">compact3</a></li>"
+
NL
+
"</ul>"
}
};
private
static
final
String
[][]
PROFILES_NEGATED_TEST
=
{
...
...
@@ -159,6 +167,13 @@ public class TestProfiles extends JavadocTester {
},
{
PACKAGE_BUG_ID
+
FS
+
"pkg2"
+
FS
+
"Class1Pkg2.html"
,
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
},
{
PACKAGE_BUG_ID
+
FS
+
"overview-summary.html"
,
"<ul>"
+
NL
+
"<li><a href=\"compact1-summary.html\" target=\"classFrame\">"
+
"compact1</a></li>"
+
NL
+
"<li><a href=\"compact2-summary.html\" "
+
"target=\"classFrame\">compact2</a></li>"
+
NL
+
"<li><a href=\""
+
"compact3-summary.html\" target=\"classFrame\">compact3</a></li>"
+
NL
+
"</ul>"
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录