Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
updated JaCoCo library to 0.7.2 + preparation for Java Web/EE/EJB/EAR…
Browse files Browse the repository at this point in the history
… projects + code cleanup
  • Loading branch information
jonathanlermitage committed Sep 19, 2014
1 parent f08bf30 commit 2947b6c
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## JaCoCoverage Change Log

### Version 1.3.8.20140919.2148 (2014-09-19)
* updated JaCoCo library to 0.7.2 (see its [changelog](http://www.eclemma.org/jacoco/trunk/doc/changes.html)).
* preparation for Java Web/EE/EJB/EAR projects support (will be activated once [NetBeans bug 246072](https://netbeans.org/bugzilla/show_bug.cgi?id=246072) is fixed).
* *built with NetBeans 8.0.1FCS and Oracle JDK7.*

### Version 1.3.7.20140512.1900 (2014-05-12)
* updated JaCoCo library to 0.7.1 (see its [changelog](http://www.eclemma.org/jacoco/trunk/doc/changes.html)).

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Ant target) is executed for the project. Currently the Java Application, Java Li
Cobertura based plugins.
* JaCoCo is a free code coverage library for Java, which has been created by the [EclEmma team](http://www.eclemma.org/jacoco/).

TikiOne JaCoCoverage plugin is built with and for the [NetBeans 8.0 platform](http://netbeans.org) and the latest version of
TikiOne JaCoCoverage plugin is built with and for the [NetBeans 8.0.1 platform](http://netbeans.org) and the latest version of
[Oracle JDK7](http://www.oracle.com/technetwork/java/javase/downloads/index.html).

### Download stable builds
Expand Down
2 changes: 1 addition & 1 deletion nbproject/platform.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ cluster.path=\
${nbplatform.active.dir}/websvccommon
disabled.modules=
nbjdk.active=JDK_1.7
nbplatform.active=nb80
nbplatform.active=default
2 changes: 1 addition & 1 deletion tikione-jacoco-lib/manifest.mf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ AutoUpdate-Show-In-Client: false
OpenIDE-Module: fr.tikione.jacoco.lib/1
OpenIDE-Module-Layer: fr/tikione/jacoco/lib/layer.xml
OpenIDE-Module-Localizing-Bundle: fr/tikione/jacoco/lib/Bundle.properties
OpenIDE-Module-Specification-Version: 0.7.1.20140512.1900
OpenIDE-Module-Specification-Version: 0.7.2.20140919.2145

8 changes: 4 additions & 4 deletions tikione-jacoco-lib/nbproject/genfiles.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=eea180bb
build.xml.data.CRC32=4c0c1a66
build.xml.script.CRC32=b0c00133
build.xml.stylesheet.CRC32=a56c6a5b@2.56.1
build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=eea180bb
nbproject/build-impl.xml.data.CRC32=4c0c1a66
nbproject/build-impl.xml.script.CRC32=10dbad13
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.56.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1
27 changes: 14 additions & 13 deletions tikione-jacoco-lib/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
<package>com.vladium.emma.rt</package>
<package>org.jacoco.agent</package>
<package>org.jacoco.agent.rt</package>
<package>org.jacoco.agent.rt.internal_9dd1198</package>
<package>org.jacoco.agent.rt.internal_9dd1198.asm</package>
<package>org.jacoco.agent.rt.internal_9dd1198.asm.commons</package>
<package>org.jacoco.agent.rt.internal_9dd1198.asm.tree</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.data</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.instr</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.internal</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.internal.data</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.internal.flow</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.internal.instr</package>
<package>org.jacoco.agent.rt.internal_9dd1198.core.runtime</package>
<package>org.jacoco.agent.rt.internal_9dd1198.output</package>
<package>org.jacoco.agent.rt.internal_e6e56f0</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.asm</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.asm.commons</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.asm.tree</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.data</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.instr</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.internal</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.internal.data</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.internal.flow</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.internal.instr</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.core.runtime</package>
<package>org.jacoco.agent.rt.internal_e6e56f0.output</package>
<package>org.jacoco.ant</package>
<package>org.jacoco.asm</package>
<package>org.jacoco.asm.commons</package>
Expand All @@ -37,6 +37,7 @@
<package>org.jacoco.core.internal.flow</package>
<package>org.jacoco.core.internal.instr</package>
<package>org.jacoco.core.runtime</package>
<package>org.jacoco.core.tools</package>
<package>org.jacoco.report</package>
<package>org.jacoco.report.check</package>
<package>org.jacoco.report.csv</package>
Expand Down
Binary file modified tikione-jacoco-lib/release/modules/ext/jacocoagent.jar
Binary file not shown.
Binary file modified tikione-jacoco-lib/release/modules/ext/jacocoant.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ OpenIDE-Module-Display-Category=Libraries
OpenIDE-Module-Name=JaCoCo Library
OpenIDE-Module-Short-Description=The JaCoCo library
OpenIDE-Module-Long-Description=\
The JaCoCo 0.7.0 library. \
The JaCoCo 0.7.2 library. \
JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team (<a href="http://www.eclemma.org/jacoco/">http://www.eclemma.org/jacoco</a>).
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ OpenIDE-Module-Display-Category=Libraries
OpenIDE-Module-Name=JaCoCo Library
OpenIDE-Module-Short-Description=La librairie JaCoCo
OpenIDE-Module-Long-Description=\
La librairie JaCoCo 0.6.5. \
La librairie JaCoCo 0.7.2. \
JaCoCo est une librairie gratuite de couverture de code pour Java, cr\u00e9\u00e9e par l'\u00e9quipe EclEmma (<a href="http://www.eclemma.org/jacoco/">http://www.eclemma.org/jacoco</a>).
2 changes: 1 addition & 1 deletion tikione-jacocoverage-plugin/manifest.mf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Manifest-Version: 1.0
OpenIDE-Module: fr.tikione.jacocoverage.plugin/1
OpenIDE-Module-Layer: fr/tikione/jacocoverage/plugin/layer.xml
OpenIDE-Module-Localizing-Bundle: fr/tikione/jacocoverage/plugin/Bundle.properties
OpenIDE-Module-Specification-Version: 1.3.8.20140523.2140
OpenIDE-Module-Specification-Version: 1.3.8.20140919.2148
OpenIDE-Module-Needs: org.openide.filesystems.FileUtil.toFileObject
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,12 @@ private void runJacocoJavaagent(final Project project)
}
}
antTaskJavaagentParam = "\"" + NBUtils.getJacocoAgentJar().getAbsolutePath()
+ "\"=includes=*:" + NBUtils.getProjectJavaPackagesAsStr(project, prjProps, ":", ".*")
+ ",destfile=\"" + binreport.getAbsolutePath() + "\"" + exclude.toString();
//+ "\"=includes=*:" + NBUtils.getProjectJavaPackagesAsStr(project, prjProps, ":", ".*")
//+ ",destfile=\"" + binreport.getAbsolutePath() + "\"" + exclude.toString();
+ "\"=destfile=\"" + binreport.getAbsolutePath() + "\"" + exclude.toString(); // TODO revert once j2ee works

System.out.println("binreport=" + binreport.getAbsolutePath());


FileObject scriptToExecute = project.getProjectDirectory().getFileObject("build", "xml");
if (scriptToExecute == null) { // Fix for GitHub #16.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public class ProjectAntTestJ2SE

public ProjectAntTestJ2SE() {
super("test");
setEnabled(Utils.isProjectSupported(NBUtils.getSelectedProject(), NBProjectTypeEnum.J2SE));
setEnabled(Utils.isProjectSupported(NBUtils.getSelectedProject(), NBProjectTypeEnum.J2SE/*,
NBProjectTypeEnum.J2EE, NBProjectTypeEnum.J2EE_EAR,
NBProjectTypeEnum.J2EE_EJB, NBProjectTypeEnum.J2EE_WEB*/));
putValue(DynamicMenuContent.HIDE_WHEN_DISABLED, true);
putValue(Action.NAME, Bundle.CTL_ProjectAntTestJ2SE());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package fr.tikione.jacocoverage.plugin.config;

import java.io.FileNotFoundException;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JPanel;
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
import org.netbeans.spi.project.ui.support.ProjectCustomizer.Category;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;

/**
* JaCoCoverage configuration category at project level.
* <br/>See <a href="http://wiki.netbeans.org/DevFaqActionAddProjectCustomizer">DevFaqActionAddProjectCustomizer</a> for integration.
*
* @author Jonathan Lermitage
*/
@ProjectCustomizer.CompositeCategoryProvider.Registration(
projectType = "org-netbeans-modules-web-project-webproject",
position = 1405)
public class PrjcfgAntJavaeewebCatProvider implements ProjectCustomizer.CompositeCategoryProvider {

private Category cat;

public @Override
Category createCategory(Lookup context) {
ImageIcon pluginIcon = new ImageIcon(getClass().getResource(
"/fr/tikione/jacocoverage/plugin/resources/icon/famfamfam_lightning.png"));
cat = ProjectCustomizer.Category.create(
"JaCoCoverage",
"JaCoCoverage",
pluginIcon.getImage());
return cat;
}

public @Override
JComponent createComponent(Category category, Lookup context) {
JPanel panel;
try {
panel = new PrjcfgAntJavasePanel(context);
cat.setStoreListener(new PrjcfgAntJavaseListener((IStorable) panel));
} catch (FileNotFoundException ex) {
Exceptions.printStackTrace(ex);
panel = new JPanel();
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
panel = new JPanel();
}
return panel;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -97,8 +98,8 @@ public void load()
if (prjCfgFile.exists()) {
try {
getInternalPref().putAll((Map<Object, Object>) mapper.readValue(prjCfgFile, Map.class).get(JSON_GENERAL));
getPkgclssExclude().addAll((List<String>) mapper.readValue(prjCfgFile, Map.class).get(JSON_PKGFILTER));
} catch (Exception ex) {
getPkgclssExclude().addAll((Collection<? extends String>) mapper.readValue(prjCfgFile, Map.class).get(JSON_PKGFILTER));
} catch (IOException ex) {
LOGGER.log(Level.INFO, "Project's JaCoCoverage configuration file format is outdated or invalid. Reset cause:", ex);
String msg = "The project's JaCoCoverage configuration file format is outdated or invalid.\n"
+ "The configuration file has been reset to support new format.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,13 @@
<file name="fr-tikione-jacocoverage-plugin-config-ProjectCustomizerAntJavase.instance_hidden"/>
</folder>
</folder>
<folder name="org-netbeans-modules-web-project-webproject">
<folder name="Customizer">
<file name="fr-tikione-jacocoverage-plugin-config-PrjcfgAntJavaeewebCatProvider.instance">
<attr name="position" intvalue="1405"/>
</file>
<file name="fr-tikione-jacocoverage-plugin-config-ProjectCustomizerAntJavaee.instance_hidden"/>
</folder>
</folder>
</folder>
</filesystem>

0 comments on commit 2947b6c

Please sign in to comment.