-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- tests not mandatory (for ratio calculation) - data item mapping for coverage.xml elements
- Loading branch information
brandt
authored and
brandt
committed
Oct 21, 2015
1 parent
32eb6e5
commit cbbd509
Showing
22 changed files
with
501 additions
and
66 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
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
102 changes: 102 additions & 0 deletions
102
src/main/java/hudson/plugins/emma/AdvancedSettings.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,102 @@ | ||
|
||
package hudson.plugins.emma; | ||
|
||
import java.io.Serializable; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
//[KB] implementation for the advanced setup support | ||
public class AdvancedSettings implements Serializable { | ||
|
||
private boolean testNotMandatory = false; | ||
|
||
private String firstDataColumnDescriptor = ""; | ||
private String secondDataColumnDescriptor = ""; | ||
private String thirdDataColumnDescriptor = ""; | ||
private String fourthDataColumnDescriptor = ""; | ||
private String fifthDataColumnDescriptor = ""; | ||
|
||
|
||
private String getValue(String value, String defaultValue){ | ||
|
||
if ((value == null)||("".equals(value))) | ||
{ | ||
value = defaultValue; | ||
} | ||
return value; | ||
} | ||
|
||
|
||
public void setTestNotMandatory(boolean state){ | ||
|
||
testNotMandatory = state; | ||
} | ||
|
||
public boolean getTestNotMandatory(){ | ||
|
||
return testNotMandatory; | ||
} | ||
|
||
public String getFirstDataColumnDescriptor() { | ||
|
||
return getValue(firstDataColumnDescriptor, Messages.CoverageObject_Legend_Class()); | ||
} | ||
|
||
public void setFirstDataColumnDescriptor(String name) { | ||
|
||
firstDataColumnDescriptor = name; | ||
} | ||
|
||
public String getSecondDataColumnDescriptor() { | ||
|
||
return getValue(secondDataColumnDescriptor, Messages.CoverageObject_Legend_Block()); | ||
} | ||
|
||
public void setSecondDataColumnDescriptor(String name) { | ||
|
||
secondDataColumnDescriptor = name; | ||
} | ||
|
||
public String getThirdDataColumnDescriptor() { | ||
|
||
return getValue(thirdDataColumnDescriptor, Messages.CoverageObject_Legend_Method()); | ||
} | ||
|
||
public void setThirdDataColumnDescriptor(String name) { | ||
|
||
thirdDataColumnDescriptor = name; | ||
} | ||
|
||
public String getFourthDataColumnDescriptor() { | ||
|
||
return getValue(fourthDataColumnDescriptor, Messages.CoverageObject_Legend_Line()); | ||
} | ||
|
||
public void setFourthDataColumnDescriptor(String name) { | ||
|
||
fourthDataColumnDescriptor = name; | ||
} | ||
|
||
public String getFifthDataColumnDescriptor() { | ||
|
||
return getValue(fifthDataColumnDescriptor, Messages.CoverageObject_Legend_Condition()); | ||
} | ||
|
||
public void setFifthDataColumnDescriptor(String name) { | ||
|
||
fifthDataColumnDescriptor = name; | ||
} | ||
|
||
public void applySettings(AdvancedSettings settings){ | ||
|
||
if(settings != null){ | ||
setTestNotMandatory(settings.getTestNotMandatory()); | ||
setFirstDataColumnDescriptor(settings.getFirstDataColumnDescriptor()); | ||
setSecondDataColumnDescriptor(settings.getSecondDataColumnDescriptor()); | ||
setThirdDataColumnDescriptor(settings.getThirdDataColumnDescriptor()); | ||
setFourthDataColumnDescriptor(settings.getFourthDataColumnDescriptor()); | ||
setFifthDataColumnDescriptor(settings.getFifthDataColumnDescriptor()); | ||
} | ||
} | ||
} | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// |
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
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
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
Oops, something went wrong.