Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
b9606de9
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
b9606de9
编写于
3月 09, 2011
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Making pronoun customizable
上级
c83d1196
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
24 addition
and
7 deletion
+24
-7
core/src/main/java/hudson/matrix/MatrixConfiguration.java
core/src/main/java/hudson/matrix/MatrixConfiguration.java
+2
-1
core/src/main/java/hudson/model/AbstractItem.java
core/src/main/java/hudson/model/AbstractItem.java
+8
-1
core/src/main/java/hudson/model/AbstractProject.java
core/src/main/java/hudson/model/AbstractProject.java
+4
-1
core/src/main/java/hudson/model/ExternalJob.java
core/src/main/java/hudson/model/ExternalJob.java
+2
-1
core/src/main/java/hudson/model/Job.java
core/src/main/java/hudson/model/Job.java
+3
-1
core/src/main/java/hudson/util/AlternativeUiTextProvider.java
.../src/main/java/hudson/util/AlternativeUiTextProvider.java
+3
-1
maven-plugin/src/main/java/hudson/maven/MavenModule.java
maven-plugin/src/main/java/hudson/maven/MavenModule.java
+2
-1
未找到文件。
core/src/main/java/hudson/matrix/MatrixConfiguration.java
浏览文件 @
b9606de9
...
...
@@ -24,6 +24,7 @@
package
hudson.matrix
;
import
hudson.Util
;
import
hudson.util.AlternativeUiTextProvider
;
import
hudson.util.DescribableList
;
import
hudson.model.AbstractBuild
;
import
hudson.model.Cause
;
...
...
@@ -200,7 +201,7 @@ public class MatrixConfiguration extends Project<MatrixConfiguration,MatrixRun>
@Override
public
String
getPronoun
()
{
return
Messages
.
MatrixConfiguration_Pronoun
(
);
return
AlternativeUiTextProvider
.
get
(
PRONOUN
,
this
,
Messages
.
MatrixConfiguration_Pronoun
()
);
}
@Override
...
...
core/src/main/java/hudson/model/AbstractItem.java
浏览文件 @
b9606de9
...
...
@@ -36,6 +36,8 @@ import hudson.model.listeners.SaveableListener;
import
hudson.security.AccessControlled
;
import
hudson.security.Permission
;
import
hudson.security.ACL
;
import
hudson.util.AlternativeUiTextProvider
;
import
hudson.util.AlternativeUiTextProvider.Message
;
import
hudson.util.AtomicFileWriter
;
import
hudson.util.IOException2
;
import
org.apache.tools.ant.taskdefs.Copy
;
...
...
@@ -104,7 +106,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
* {@link Item}. Must start with a capital letter.
*/
public
String
getPronoun
()
{
return
Messages
.
AbstractItem_Pronoun
(
);
return
AlternativeUiTextProvider
.
get
(
PRONOUN
,
this
,
Messages
.
AbstractItem_Pronoun
()
);
}
@Exported
...
...
@@ -500,4 +502,9 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
throw
new
CmdLineException
(
null
,
Messages
.
AbstractItem_NoSuchJobExists
(
name
,
AbstractProject
.
findNearest
(
name
).
getFullName
()));
return
item
;
}
/**
* Replaceable pronoun of that points to a job. Defaults to "Job"/"Project" depending on the context.
*/
public
static
final
Message
<
AbstractItem
>
PRONOUN
=
new
Message
<
AbstractItem
>();
}
core/src/main/java/hudson/model/AbstractProject.java
浏览文件 @
b9606de9
...
...
@@ -352,7 +352,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
*/
@Override
public
String
getPronoun
()
{
return
Messages
.
AbstractProject_Pronoun
(
);
return
AlternativeUiTextProvider
.
get
(
PRONOUN
,
this
,
Messages
.
AbstractProject_Pronoun
()
);
}
/**
...
...
@@ -1921,6 +1921,9 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
*/
public
static
final
Permission
ABORT
=
BUILD
;
/**
* Replaceable "Build Now" text.
*/
public
static
final
Message
<
AbstractProject
>
BUILD_NOW_TEXT
=
new
Message
<
AbstractProject
>();
/**
...
...
core/src/main/java/hudson/model/ExternalJob.java
浏览文件 @
b9606de9
...
...
@@ -25,6 +25,7 @@ package hudson.model;
import
hudson.model.RunMap.Constructor
;
import
hudson.Extension
;
import
hudson.util.AlternativeUiTextProvider
;
import
org.kohsuke.stapler.StaplerRequest
;
import
org.kohsuke.stapler.StaplerResponse
;
...
...
@@ -110,7 +111,7 @@ public class ExternalJob extends ViewJob<ExternalJob,ExternalRun> implements Top
@Override
public
String
getPronoun
()
{
return
Messages
.
ExternalJob_Pronoun
(
);
return
AlternativeUiTextProvider
.
get
(
PRONOUN
,
this
,
Messages
.
ExternalJob_Pronoun
()
);
}
public
static
final
class
DescriptorImpl
extends
TopLevelItemDescriptor
{
...
...
core/src/main/java/hudson/model/Job.java
浏览文件 @
b9606de9
...
...
@@ -43,6 +43,8 @@ import hudson.search.SearchItem;
import
hudson.search.SearchItems
;
import
hudson.security.ACL
;
import
hudson.tasks.LogRotator
;
import
hudson.util.AlternativeUiTextProvider
;
import
hudson.util.AlternativeUiTextProvider.Message
;
import
hudson.util.ChartUtil
;
import
hudson.util.ColorPalette
;
import
hudson.util.CopyOnWriteList
;
...
...
@@ -245,7 +247,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
@Override
public
String
getPronoun
()
{
return
Messages
.
Job_Pronoun
(
);
return
AlternativeUiTextProvider
.
get
(
PRONOUN
,
this
,
Messages
.
Job_Pronoun
()
);
}
/**
...
...
core/src/main/java/hudson/util/AlternativeUiTextProvider.java
浏览文件 @
b9606de9
...
...
@@ -92,10 +92,12 @@ public abstract class AlternativeUiTextProvider implements ExtensionPoint {
}
/**
* Each instance of this class represents a text that can be replaced by {@link AlternativeUiTextProvider}.
*
* @param <T>
* Context object type. Use {@link Void} to indicate that there's no context.
*/
public
static
class
Message
<
T
>
{
public
static
final
class
Message
<
T
>
{
// decided not to retain T as Class so that we can have Message<List<Foo>>, for example.
/**
...
...
maven-plugin/src/main/java/hudson/maven/MavenModule.java
浏览文件 @
b9606de9
...
...
@@ -44,6 +44,7 @@ import hudson.model.Saveable;
import
hudson.tasks.LogRotator
;
import
hudson.tasks.Publisher
;
import
hudson.tasks.Maven.MavenInstallation
;
import
hudson.util.AlternativeUiTextProvider
;
import
hudson.util.DescribableList
;
import
org.apache.maven.project.MavenProject
;
import
org.kohsuke.stapler.StaplerRequest
;
...
...
@@ -314,7 +315,7 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
@Override
public
String
getPronoun
()
{
return
Messages
.
MavenModule_Pronoun
(
);
return
AlternativeUiTextProvider
.
get
(
PRONOUN
,
this
,
Messages
.
MavenModule_Pronoun
()
);
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录