Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
2d05008d
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2d05008d
编写于
1月 14, 2011
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reducing the visibility of the markup
上级
2f7fbafd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
8 deletion
+31
-8
core/src/main/java/hudson/AbstractMarkupText.java
core/src/main/java/hudson/AbstractMarkupText.java
+10
-0
core/src/main/java/hudson/console/HudsonExceptionNote.java
core/src/main/java/hudson/console/HudsonExceptionNote.java
+6
-8
war/src/main/webapp/css/style.css
war/src/main/webapp/css/style.css
+15
-0
未找到文件。
core/src/main/java/hudson/AbstractMarkupText.java
浏览文件 @
2d05008d
...
...
@@ -86,6 +86,16 @@ public abstract class AbstractMarkupText {
addMarkup
(
startPos
,
endPos
,
"<a href='"
+
url
+
"'>"
,
"</a>"
);
}
/**
* Inserts an A tag that surrounds the given position.
* But this hyperlink is less visible.
*
* @since 1.395
*/
public
void
addHyperlinkLowKey
(
int
startPos
,
int
endPos
,
String
url
)
{
addMarkup
(
startPos
,
endPos
,
"<a class='lowkey' href='"
+
url
+
"'>"
,
"</a>"
);
}
/**
* Adds a start tag and end tag around the entire text
*/
...
...
core/src/main/java/hudson/console/HudsonExceptionNote.java
浏览文件 @
2d05008d
...
...
@@ -32,7 +32,7 @@ public class HudsonExceptionNote extends ConsoleNote<Object> {
else
return
null
;
// unexpected format. abort.
}
text
.
addHyperlink
(
charPos
,
end
,
annotateClassName
(
line
.
substring
(
charPos
,
end
)));
text
.
addHyperlink
LowKey
(
charPos
,
end
,
annotateClassName
(
line
.
substring
(
charPos
,
end
)));
return
new
ConsoleAnnotator
()
{
public
ConsoleAnnotator
annotate
(
Object
context
,
MarkupText
text
)
{
...
...
@@ -40,7 +40,7 @@ public class HudsonExceptionNote extends ConsoleNote<Object> {
Matcher
m
=
STACK_TRACE_ELEMENT
.
matcher
(
line
);
if
(
m
.
find
())
{
// allow the match to happen in the middle of a line to cope with prefix. Ant and Maven put them, among many other tools.
text
.
addHyperlink
(
m
.
start
()+
4
,
m
.
end
(),
annotateMethodName
(
m
.
group
(
1
),
m
.
group
(
2
),
m
.
group
(
3
),
Integer
.
parseInt
(
m
.
group
(
4
))));
text
.
addHyperlink
LowKey
(
m
.
start
()+
4
,
m
.
end
(),
annotateMethodName
(
m
.
group
(
1
),
m
.
group
(
2
),
m
.
group
(
3
),
Integer
.
parseInt
(
m
.
group
(
4
))));
return
this
;
}
...
...
@@ -49,7 +49,7 @@ public class HudsonExceptionNote extends ConsoleNote<Object> {
int
s
=
idx
+
CAUSED_BY
.
length
();
int
e
=
line
.
indexOf
(
':'
,
s
);
if
(
e
<
0
)
e
=
line
.
length
();
text
.
addHyperlink
(
s
,
e
,
annotateClassName
(
line
.
substring
(
s
,
e
)));
text
.
addHyperlink
LowKey
(
s
,
e
,
annotateClassName
(
line
.
substring
(
s
,
e
)));
return
this
;
}
...
...
@@ -65,13 +65,11 @@ public class HudsonExceptionNote extends ConsoleNote<Object> {
// TODO; separate out the annotations and mark up
private
String
annotateMethodName
(
String
className
,
String
methodName
,
String
sourceFileName
,
int
lineNumber
)
{
// for now
return
"http://grepcode.com/search/?query="
+
className
+
'.'
+
methodName
+
"&entity=method"
;
return
"http://stacktrace.hudson-labs.org/search/?query="
+
className
+
'.'
+
methodName
+
"&entity=method"
;
}
private
String
annotateClassName
(
String
className
)
{
// for now
return
"http://grepcode.com/search?query="
+
className
;
return
"http://stacktrace.hudson-labs.org/search?query="
+
className
;
}
@Extension
...
...
@@ -97,5 +95,5 @@ public class HudsonExceptionNote extends ConsoleNote<Object> {
private
static
final
String
CAUSED_BY
=
"Caused by: "
;
private
static
final
Pattern
AND_MORE
=
Pattern
.
compile
(
"\t... [0-9]+ more"
);
private
static
final
Pattern
AND_MORE
=
Pattern
.
compile
(
"\t... [0-9]+ more
\n
"
);
}
war/src/main/webapp/css/style.css
浏览文件 @
2d05008d
...
...
@@ -143,6 +143,21 @@ a:visited {
color
:
#5c3566
;
}
a
.lowkey
:link
{
text-decoration
:
none
;
color
:
inherit
;
}
a
.lowkey
:hover
{
text-decoration
:
underline
;
color
:
inherit
;
}
a
.lowkey
:visited
{
text-decoration
:
none
;
color
:
inherit
;
}
/* tip - anchors of class info */
a
.tip
{
position
:
relative
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录