Commit 7f89ed40 authored by Adam Knapp's avatar Adam Knapp
Browse files

Product number and version related improvements



Product version is collected to one place (ProductIdentity)
CRL and CAX based product number format automatically recognized
Signed-off-by: Adam Knapp's avatarAdam Knapp <knappadam5@gmail.com>
parent de4fe981
......@@ -22,5 +22,8 @@ Build the update site:
Build a plugin:
ant -f build_main.xml {common | designer | executor | help | logviewer}.plugin
Build zip package:
ant -f build_main.xml zip
clean:
ant -f build_main.xml clean-all
......@@ -14,6 +14,10 @@ import org.eclipse.titan.common.utils.ObjectUtils;
* */
public final class ProductIdentity implements Comparable<ProductIdentity> {
public static final String TITAN_PRODUCT_NUMBER = "CAX 105 7730";
public static final String TITAN_PRODUCT_NUMBER_CRL = "CRL 113 200";
public static final int TITAN_VERSION_MAJOR = 7;
public static final int TITAN_VERSION_MINOR = 2;
public static final int TITAN_VERSION_PATCHLEVEL = 0;
private String productNumber = null;
private int productNumberSuffix = 1;
......@@ -140,15 +144,24 @@ public final class ProductIdentity implements Comparable<ProductIdentity> {
return "RnXnn";
}
final StringBuilder builder = new StringBuilder(17);
final StringBuilder builder = new StringBuilder(20);
if (productNumber != null) {
builder.append(productNumber);
if (productNumberSuffix == 0 || (productNumberSuffix == 1 && revisionDigit < 9)) {
if (productNumber.contains("CRL") || productNumber.contains("crl")) {
builder.append(productNumber);
if (productNumberSuffix == 0 || (productNumberSuffix == 1 && revisionDigit < 9)) {
builder.append(' ');
} else {
builder.append('/').append(productNumberSuffix);
}
builder.append(' ');
} else if (productNumber.contains("CAX") || productNumber.contains("cax")) {
if (productNumberSuffix != 0) {
builder.append(productNumberSuffix);
builder.append('/');
}
builder.append(productNumber);
builder.append(' ');
} else {
builder.append('/').append(productNumberSuffix);
}
builder.append(' ');
}
builder.append('R').append(revisionDigit).append((char) (revisionLetter + 'A'));
......
......@@ -21,7 +21,9 @@ import org.eclipse.titan.designer.properties.data.FolderBuildPropertyData;
*/
public final class GeneralConstants {
public static final ProductIdentity ON_THE_FLY_ANALYZER_VERSION =
ProductIdentity.getProductIdentity(ProductIdentity.TITAN_PRODUCT_NUMBER, 7, 2, 0, 0);
ProductIdentity.getProductIdentity(ProductIdentity.TITAN_PRODUCT_NUMBER,
ProductIdentity.TITAN_VERSION_MAJOR, ProductIdentity.TITAN_VERSION_MINOR,
ProductIdentity.TITAN_VERSION_PATCHLEVEL, 0);
public static final boolean DEBUG = true;
public static final boolean ETSI_BUILD = false;
......
......@@ -25,8 +25,12 @@ import org.eclipse.titan.executor.jni.JNIMiddleWare;
public final class LaunchConfigurationDelegate extends TitanLaunchConfigurationDelegate {
/** { ttcn3_major, ttcn3_minor, ttcn3_patchlevel, ttcn3_buildnumber } */
private final ProductIdentity versionLow = ProductIdentity.getProductIdentity(ProductIdentity.TITAN_PRODUCT_NUMBER, 7, 2, 0, 0);
private final ProductIdentity versionHigh = ProductIdentity.getProductIdentity(ProductIdentity.TITAN_PRODUCT_NUMBER, 7, 2, 0, 0);
private final ProductIdentity versionLow = ProductIdentity.getProductIdentity(
ProductIdentity.TITAN_PRODUCT_NUMBER, ProductIdentity.TITAN_VERSION_MAJOR,
ProductIdentity.TITAN_VERSION_MINOR, ProductIdentity.TITAN_VERSION_PATCHLEVEL, 0);
private final ProductIdentity versionHigh = ProductIdentity.getProductIdentity(
ProductIdentity.TITAN_PRODUCT_NUMBER, ProductIdentity.TITAN_VERSION_MAJOR,
ProductIdentity.TITAN_VERSION_MINOR, ProductIdentity.TITAN_VERSION_PATCHLEVEL, 0);
@Override
public void launch(final ILaunchConfiguration arg0, final String arg1, final ILaunch arg2, final IProgressMonitor arg3) throws CoreException {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment