Additionally, using the flag bypasses shared library synchronisation.
Change-Id: I384a2f878483be25c92e9644113e4d5b2ae95bca
if (args.contains(SimanticsArguments.DO_NOT_SYNCHRONIZE_ONTOLOGIES)) {
requireSynchronize = false;
if (args.contains(SimanticsArguments.DO_NOT_SYNCHRONIZE_ONTOLOGIES)) {
requireSynchronize = false;
+ ontologyPolicy = OntologyRecoveryPolicy.Bypass;
}
if (args.contains(SimanticsArguments.DISABLE_INDEX)) {
}
if (args.contains(SimanticsArguments.DISABLE_INDEX)) {
SimanticsArguments.EXPERIMENT,
SimanticsArguments.DISABLE_INDEX,
SimanticsArguments.DATABASE_ID,
SimanticsArguments.EXPERIMENT,
SimanticsArguments.DISABLE_INDEX,
SimanticsArguments.DATABASE_ID,
+ SimanticsArguments.DO_NOT_SYNCHRONIZE_ONTOLOGIES
};
IArguments result = Arguments.parse(args, accepted);
return result;
};
IArguments result = Arguments.parse(args, accepted);
return result;
* It is applied when the ontology in the database of a workspace doesn't match
* a newer ontology in the Eclipse workspace.
*/
* It is applied when the ontology in the database of a workspace doesn't match
* a newer ontology in the Eclipse workspace.
*/
- public static enum OntologyRecoveryPolicy { ThrowError, Merge, ReinstallDatabase }
+ public static enum OntologyRecoveryPolicy { ThrowError, Merge, ReinstallDatabase, Bypass}
/**
* This policy dictates how the Simantics platform startup should react if
/**
* This policy dictates how the Simantics platform startup should react if
session.getService(XSupport.class).setServiceMode(true, true);
// Throw error
session.getService(XSupport.class).setServiceMode(true, true);
// Throw error
- if (ontologyPolicy == OntologyRecoveryPolicy.ThrowError) {
+ if (ontologyPolicy == OntologyRecoveryPolicy.ThrowError || ontologyPolicy == OntologyRecoveryPolicy.Bypass) {
StringBuilder sb = new StringBuilder("The following graphs are not installed in the database: ");
if (!installTGs.isEmpty()) {
int i = 0;
StringBuilder sb = new StringBuilder("The following graphs are not installed in the database: ");
if (!installTGs.isEmpty()) {
int i = 0;
sb.append(" Database/Platform Bundle version mismatch.\n");
}
sb.append("Hint: Use -fixErrors to install the graphs.");
sb.append(" Database/Platform Bundle version mismatch.\n");
}
sb.append("Hint: Use -fixErrors to install the graphs.");
- throw new PlatformException(sb.toString());
+ if (ontologyPolicy == OntologyRecoveryPolicy.ThrowError)
+ throw new PlatformException(sb.toString());
+ else
+ log.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, sb.toString()));
// Reinstall database
if (ontologyPolicy == OntologyRecoveryPolicy.ReinstallDatabase) {
log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Reinstalling the database."));
// Reinstall database
if (ontologyPolicy == OntologyRecoveryPolicy.ReinstallDatabase) {
log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Reinstalling the database."));