-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,661 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ | |
*.jar | ||
*.war | ||
*.ear | ||
/.settings | ||
/.project | ||
/.classpath | ||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2013 Yasuyuki Saito. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.466</version> | ||
</parent> | ||
|
||
<artifactId>vs-code-metrics</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<name>Jenkins Visual Studio Code Metrics Plugin</name> | ||
|
||
<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need --> | ||
<repositories> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
</project> |
55 changes: 55 additions & 0 deletions
55
src/main/java/org/jenkinsci/plugins/vs_code_metrics/VsCodeMetricsBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package org.jenkinsci.plugins.vs_code_metrics; | ||
|
||
import hudson.CopyOnWrite; | ||
import hudson.Extension; | ||
import hudson.model.Descriptor; | ||
import hudson.tasks.Builder; | ||
import hudson.tools.ToolInstallation; | ||
|
||
public class VsCodeMetricsBuilder extends Builder { | ||
|
||
@Override | ||
public Descriptor<Builder> getDescriptor() { | ||
return DESCRIPTOR; | ||
} | ||
|
||
/** | ||
* Descriptor should be singleton. | ||
*/ | ||
@Extension | ||
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl(); | ||
|
||
/** | ||
* @author Yasuyuki Saito | ||
*/ | ||
public static final class DescriptorImpl extends Descriptor<Builder> { | ||
|
||
@CopyOnWrite | ||
private volatile VsCodeMetricsInstallation[] installations = new VsCodeMetricsInstallation[0]; | ||
|
||
DescriptorImpl() { | ||
super(VsCodeMetricsBuilder.class); | ||
load(); | ||
} | ||
|
||
public String getDisplayName() { | ||
return Messages.VsCodeMetricsBuilder_DisplayName(); | ||
} | ||
|
||
public VsCodeMetricsInstallation[] getInstallations() { | ||
return installations; | ||
} | ||
|
||
public void setInstallations(VsCodeMetricsInstallation... antInstallations) { | ||
this.installations = antInstallations; | ||
save(); | ||
} | ||
|
||
/** | ||
* Obtains the {@link VsTestInstallation.DescriptorImpl} instance. | ||
*/ | ||
public VsCodeMetricsInstallation.DescriptorImpl getToolDescriptor() { | ||
return ToolInstallation.all().get(VsCodeMetricsInstallation.DescriptorImpl.class); | ||
} | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
src/main/java/org/jenkinsci/plugins/vs_code_metrics/VsCodeMetricsInstallation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package org.jenkinsci.plugins.vs_code_metrics; | ||
|
||
import java.io.IOException; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import hudson.EnvVars; | ||
import hudson.Extension; | ||
import hudson.model.EnvironmentSpecific; | ||
import hudson.model.Hudson; | ||
import hudson.model.Node; | ||
import hudson.model.TaskListener; | ||
import hudson.slaves.NodeSpecific; | ||
import hudson.tools.ToolDescriptor; | ||
import hudson.tools.ToolInstallation; | ||
|
||
/** | ||
* @author Yasuyuki Saito | ||
*/ | ||
public final class VsCodeMetricsInstallation extends ToolInstallation implements NodeSpecific<VsCodeMetricsInstallation>, EnvironmentSpecific<VsCodeMetricsInstallation> { | ||
|
||
/** */ | ||
private transient String pathToCodeMetricsPowerTool; | ||
|
||
@DataBoundConstructor | ||
public VsCodeMetricsInstallation(String name, String home) { | ||
super(name, home, null); | ||
} | ||
|
||
public VsCodeMetricsInstallation forNode(Node node, TaskListener log) throws IOException, InterruptedException { | ||
return new VsCodeMetricsInstallation(getName(), translateFor(node, log)); | ||
} | ||
|
||
public VsCodeMetricsInstallation forEnvironment(EnvVars environment) { | ||
return new VsCodeMetricsInstallation(getName(), environment.expand(getHome())); | ||
} | ||
|
||
protected Object readResolve() { | ||
if (this.pathToCodeMetricsPowerTool != null) { | ||
return new VsCodeMetricsInstallation(this.getName(), this.pathToCodeMetricsPowerTool); | ||
} | ||
return this; | ||
} | ||
|
||
/** | ||
* @author Yasuyuki Saito | ||
*/ | ||
@Extension | ||
public static class DescriptorImpl extends ToolDescriptor<VsCodeMetricsInstallation> { | ||
|
||
public String getDisplayName() { | ||
return Messages.VsCodeMetricsInstallation_DisplayName(); | ||
} | ||
|
||
@Override | ||
public VsCodeMetricsInstallation[] getInstallations() { | ||
return Hudson.getInstance().getDescriptorByType(VsCodeMetricsBuilder.DescriptorImpl.class).getInstallations(); | ||
} | ||
|
||
@Override | ||
public void setInstallations(VsCodeMetricsInstallation... installations) { | ||
Hudson.getInstance().getDescriptorByType(VsCodeMetricsBuilder.DescriptorImpl.class).setInstallations(installations); | ||
} | ||
|
||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/jenkinsci/plugins/vs_code_metrics/VsCodeMetricsPublisher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.jenkinsci.plugins.vs_code_metrics; | ||
|
||
import hudson.tasks.BuildStepMonitor; | ||
import hudson.tasks.Recorder; | ||
|
||
public class VsCodeMetricsPublisher extends Recorder { | ||
|
||
public BuildStepMonitor getRequiredMonitorService() { | ||
// TODO 自動生成されたメソッド・スタブ | ||
return null; | ||
} | ||
|
||
} |
91 changes: 91 additions & 0 deletions
91
src/main/java/org/jenkinsci/plugins/vs_code_metrics/bean/CodeMetricsReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
// | ||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 | ||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | ||
// Any modifications to this file will be lost upon recompilation of the source schema. | ||
// Generated on: 2012.11.14 at 09:02:21 �ߌ� JST | ||
// | ||
|
||
|
||
package org.jenkinsci.plugins.vs_code_metrics.bean; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
|
||
/** | ||
* <p>Java class for anonymous complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence> | ||
* <element ref="{}Targets" minOccurs="0"/> | ||
* </sequence> | ||
* <attribute name="Version" use="required" type="{http://www.w3.org/2001/XMLSchema}double" /> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "", propOrder = { | ||
"targets" | ||
}) | ||
@XmlRootElement(name = "CodeMetricsReport") | ||
public class CodeMetricsReport { | ||
|
||
@XmlElement(name = "Targets") | ||
protected Targets targets; | ||
@XmlAttribute(name = "Version", required = true) | ||
protected double version; | ||
|
||
/** | ||
* Gets the value of the targets property. | ||
* | ||
* @return | ||
* possible object is | ||
* {@link Targets } | ||
* | ||
*/ | ||
public Targets getTargets() { | ||
return targets; | ||
} | ||
|
||
/** | ||
* Sets the value of the targets property. | ||
* | ||
* @param value | ||
* allowed object is | ||
* {@link Targets } | ||
* | ||
*/ | ||
public void setTargets(Targets value) { | ||
this.targets = value; | ||
} | ||
|
||
/** | ||
* Gets the value of the version property. | ||
* | ||
*/ | ||
public double getVersion() { | ||
return version; | ||
} | ||
|
||
/** | ||
* Sets the value of the version property. | ||
* | ||
*/ | ||
public void setVersion(double value) { | ||
this.version = value; | ||
} | ||
|
||
} |
99 changes: 99 additions & 0 deletions
99
src/main/java/org/jenkinsci/plugins/vs_code_metrics/bean/Member.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// | ||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 | ||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | ||
// Any modifications to this file will be lost upon recompilation of the source schema. | ||
// Generated on: 2012.11.14 at 09:02:21 �ߌ� JST | ||
// | ||
|
||
|
||
package org.jenkinsci.plugins.vs_code_metrics.bean; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
|
||
/** | ||
* <p>Java class for anonymous complex type. | ||
* | ||
* <p>The following schema fragment specifies the expected content contained within this class. | ||
* | ||
* <pre> | ||
* <complexType> | ||
* <complexContent> | ||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
* <sequence> | ||
* <element ref="{}Metrics" minOccurs="0"/> | ||
* </sequence> | ||
* <attribute name="Name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> | ||
* </restriction> | ||
* </complexContent> | ||
* </complexType> | ||
* </pre> | ||
* | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType(name = "", propOrder = { | ||
"metrics" | ||
}) | ||
@XmlRootElement(name = "Member") | ||
public class Member { | ||
|
||
@XmlElement(name = "Metrics") | ||
protected Metrics metrics; | ||
@XmlAttribute(name = "Name", required = true) | ||
protected String name; | ||
|
||
/** | ||
* Gets the value of the metrics property. | ||
* | ||
* @return | ||
* possible object is | ||
* {@link Metrics } | ||
* | ||
*/ | ||
public Metrics getMetrics() { | ||
return metrics; | ||
} | ||
|
||
/** | ||
* Sets the value of the metrics property. | ||
* | ||
* @param value | ||
* allowed object is | ||
* {@link Metrics } | ||
* | ||
*/ | ||
public void setMetrics(Metrics value) { | ||
this.metrics = value; | ||
} | ||
|
||
/** | ||
* Gets the value of the name property. | ||
* | ||
* @return | ||
* possible object is | ||
* {@link String } | ||
* | ||
*/ | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* Sets the value of the name property. | ||
* | ||
* @param value | ||
* allowed object is | ||
* {@link String } | ||
* | ||
*/ | ||
public void setName(String value) { | ||
this.name = value; | ||
} | ||
|
||
} |
Oops, something went wrong.