eclipse/eclipse-idreplace.patch
Andrew Overholt 84dcc5c77d - 3.3.1
- Update icu4j requirement for new version number.
2007-10-22 14:33:37 +00:00

35 lines
1.5 KiB
Diff

### Eclipse Workspace Patch 1.0
#P org.eclipse.pde.build
Index: src_ant/org/eclipse/pde/internal/build/tasks/IdReplaceTask.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/IdReplaceTask.java,v
retrieving revision 1.31.4.2
diff -u -r1.31.4.2 IdReplaceTask.java
--- src_ant/org/eclipse/pde/internal/build/tasks/IdReplaceTask.java 20 Aug 2007 15:02:51 -0000 1.31.4.2
+++ src_ant/org/eclipse/pde/internal/build/tasks/IdReplaceTask.java 2 Oct 2007 18:06:52 -0000
@@ -243,7 +243,7 @@
}
startVersionId++;
- String replacementVersion = null;
+ String replacementVersion = "";
Version v = new Version(new String(versionId));
String lookupKey = new String(elementId) + ':' + v.getMajor() + '.' + v.getMinor() + '.' + v.getMicro();
if (isPlugin) {
@@ -251,13 +251,14 @@
} else {
replacementVersion = (String) featureIds.get(lookupKey);
}
+ int change = 0;
if (replacementVersion == null) {
System.err.println("Could not find " + new String(elementId)); //$NON-NLS-1$
} else {
buffer.replace(startVersionId, endVersionId, replacementVersion);
contentChanged = true;
+ change = endVersionId - startVersionId - replacementVersion.length();
}
- int change = endVersionId - startVersionId - replacementVersion.length();
startElement = (endElementId > endVersionId) ? endElementId - change: endVersionId - change;
}