Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.ant3
-rw-r--r--plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.excludelist2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng/src/org/eclipse/emf/cdo/releng/Api2Html.java52
3 files changed, 46 insertions, 11 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.ant b/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.ant
index 3ae71cabe2..1a69662659 100644
--- a/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.ant
+++ b/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.ant
@@ -19,8 +19,7 @@
<apitooling.compare baseline="${api.baseline}"
profile="${api.profile}"
report="${api.report}"
- includelist="${script.dir}/api_reports.includelist"
- excludelist="${script.dir}/api_reports.excludelist" />
+ includelist="${script.dir}/api_reports.includelist" />
</target>
</project>
diff --git a/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.excludelist b/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.excludelist
index 1c3a0c61d6..1a15f87990 100644
--- a/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.excludelist
+++ b/plugins/org.eclipse.emf.cdo.releng/hudson/api_reports.excludelist
@@ -1,4 +1,6 @@
R:.*\.releng.*
+ R:.*\.doc.*
+ R:.*\.sdk.*
R:.*\.examples.*
R:.*\.tests.*
R:.*\.buddies.*
diff --git a/plugins/org.eclipse.emf.cdo.releng/src/org/eclipse/emf/cdo/releng/Api2Html.java b/plugins/org.eclipse.emf.cdo.releng/src/org/eclipse/emf/cdo/releng/Api2Html.java
index ef313a000e..4ce8b32c7d 100644
--- a/plugins/org.eclipse.emf.cdo.releng/src/org/eclipse/emf/cdo/releng/Api2Html.java
+++ b/plugins/org.eclipse.emf.cdo.releng/src/org/eclipse/emf/cdo/releng/Api2Html.java
@@ -30,6 +30,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import java.util.jar.Manifest;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -97,6 +98,9 @@ public class Api2Html extends DefaultHandler
{
try
{
+ String componentVersion = null;
+ String componentChange = null;
+
String componentID = attributes.getValue("componentId");
String typeName = attributes.getValue("type_name");
String elementType = attributes.getValue("element_type");
@@ -105,9 +109,17 @@ public class Api2Html extends DefaultHandler
if (message.startsWith("The re-exported type"))
{
return;
+ // int pos = message.indexOf(" from ");
+ // if (pos != -1)
+ // {
+ // message = message.substring(0, pos);
+ // }
+ //
+ // componentChange = message;
+ // message = null;
+ // typeName = null;
}
- String componentChange = null;
if (componentID == null || componentID.length() == 0)
{
if (message.startsWith("The API component "))
@@ -117,12 +129,12 @@ public class Api2Html extends DefaultHandler
if (message.endsWith("added"))
{
- componentChange = "The API component has been added";
- componentID = componentID.replace('_', '(') + ")";
+ componentChange = "The plugin has been added";
+ componentVersion = readComponentVersion(componentID);
}
else if (message.endsWith("removed"))
{
- componentChange = "The API component has been removed";
+ componentChange = "The plugin has been removed";
}
else
{
@@ -142,7 +154,6 @@ public class Api2Html extends DefaultHandler
}
}
- String componentVersion = null;
int pos = componentID.indexOf('(');
if (pos != -1)
{
@@ -156,7 +167,7 @@ public class Api2Html extends DefaultHandler
message = remove(message, " for class " + typeName);
message = remove(message, " to " + typeName);
- if (message.startsWith("The deprecation modifiers has"))
+ if (message != null && message.startsWith("The deprecation modifiers has"))
{
message = "The deprecation modifier has" + message.substring("The deprecation modifiers has".length());
}
@@ -206,6 +217,26 @@ public class Api2Html extends DefaultHandler
}
}
+ private String readComponentVersion(String componentID) throws Exception
+ {
+ File plugin = new File(pluginsFolder, componentID);
+ File metaInf = new File(plugin, "META-INF");
+ File manifestFile = new File(metaInf, "MANIFEST.MF");
+
+ FileInputStream in = new FileInputStream(manifestFile);
+
+ try
+ {
+ Manifest manifest = new Manifest(in);
+ java.util.jar.Attributes attributes = manifest.getMainAttributes();
+ return attributes.getValue("Bundle-Version");
+ }
+ finally
+ {
+ in.close();
+ }
+ }
+
private String determineElementType(String typeName) throws MalformedURLException
{
if (classLoader == null)
@@ -311,10 +342,13 @@ public class Api2Html extends DefaultHandler
private String remove(String string, String remove)
{
- int pos = string.indexOf(remove);
- if (pos != -1)
+ if (string != null)
{
- string = string.substring(0, pos) + string.substring(pos + remove.length());
+ int pos = string.indexOf(remove);
+ if (pos != -1)
+ {
+ string = string.substring(0, pos) + string.substring(pos + remove.length());
+ }
}
return string;

Back to the top