Previously, code in org.simantics.structural.synchronization.client was
in packages that were dangerously named
org.simantics.structural.synchronization, which could easily escalate
into split packages between bundles with more of such sloppy naming.
This moves the whole org.simantics.structural.synchronization.base
package from .structural.synchronization.client to
.structural.synchronization which changes nothing from the bundle user's
point of view. Code that stays in .structural.synchronization.client is
moved into the org.simantics.structural.synchronization.client package
to keep things cleaners.
gitlab #206
Change-Id: I2366b6e7395750cc9b6649abd3e77ef1661d2d1f
21 files changed:
import org.simantics.spreadsheet.graph.synchronization.SpreadsheetSynchronizationEventHandler;
import org.simantics.spreadsheet.resource.SpreadsheetResource;
import org.simantics.spreadsheet.util.SpreadsheetUtils;
import org.simantics.spreadsheet.graph.synchronization.SpreadsheetSynchronizationEventHandler;
import org.simantics.spreadsheet.resource.SpreadsheetResource;
import org.simantics.spreadsheet.util.SpreadsheetUtils;
-import org.simantics.structural.synchronization.Synchronizer;
+import org.simantics.structural.synchronization.client.Synchronizer;
import gnu.trove.iterator.TObjectIntIterator;
import gnu.trove.map.hash.TObjectIntHashMap;
import gnu.trove.iterator.TObjectIntIterator;
import gnu.trove.map.hash.TObjectIntHashMap;
import org.simantics.spreadsheet.graph.formula.SpreadsheetEvaluationEnvironment;
import org.simantics.spreadsheet.graph.synchronization.SpreadsheetSynchronizationEventHandler;
import org.simantics.spreadsheet.resource.SpreadsheetResource;
import org.simantics.spreadsheet.graph.formula.SpreadsheetEvaluationEnvironment;
import org.simantics.spreadsheet.graph.synchronization.SpreadsheetSynchronizationEventHandler;
import org.simantics.spreadsheet.resource.SpreadsheetResource;
-import org.simantics.structural.synchronization.Synchronizer;
+import org.simantics.structural.synchronization.client.Synchronizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.simantics.structural.synchronization.base.ModuleUpdateContext;
import org.simantics.structural.synchronization.base.ModuleUpdaterBase;
import org.simantics.structural.synchronization.base.PropertyUpdateRule;
import org.simantics.structural.synchronization.base.ModuleUpdateContext;
import org.simantics.structural.synchronization.base.ModuleUpdaterBase;
import org.simantics.structural.synchronization.base.PropertyUpdateRule;
-import org.simantics.structural.synchronization.utils.Solver;
public class LineUpdater extends ModuleUpdaterBase<SheetLineComponent> {
public class LineUpdater extends ModuleUpdaterBase<SheetLineComponent> {
org.simantics.datatypes.ontology;bundle-version="1.1.0",
org.simantics.structural.synchronization;bundle-version="1.0.0";visibility:=reexport,
org.slf4j.api
org.simantics.datatypes.ontology;bundle-version="1.1.0",
org.simantics.structural.synchronization;bundle-version="1.0.0";visibility:=reexport,
org.slf4j.api
-Export-Package: org.simantics.structural.synchronization,
- org.simantics.structural.synchronization.base
+Export-Package: org.simantics.structural.synchronization.client
Automatic-Module-Name: org.simantics.structural.synchronization.client
Automatic-Module-Name: org.simantics.structural.synchronization.client
-package org.simantics.structural.synchronization;
+package org.simantics.structural.synchronization.client;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentMap;
-package org.simantics.structural.synchronization;
+package org.simantics.structural.synchronization.client;
import gnu.trove.map.hash.THashMap;
import gnu.trove.map.hash.TObjectIntHashMap;
import gnu.trove.map.hash.THashMap;
import gnu.trove.map.hash.TObjectIntHashMap;
-package org.simantics.structural.synchronization;
+package org.simantics.structural.synchronization.client;
import gnu.trove.map.hash.TObjectIntHashMap;
import gnu.trove.set.hash.THashSet;
import gnu.trove.map.hash.TObjectIntHashMap;
import gnu.trove.set.hash.THashSet;
-package org.simantics.structural.synchronization.base;
+package org.simantics.structural.synchronization.client;
import org.eclipse.core.runtime.IProgressMonitor;
import org.simantics.db.ReadGraph;
import org.eclipse.core.runtime.IProgressMonitor;
import org.simantics.db.ReadGraph;
Bundle-SymbolicName: org.simantics.structural.synchronization;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-SymbolicName: org.simantics.structural.synchronization;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.simantics.structural.synchronization.base2,
+Export-Package: org.simantics.structural.synchronization.base,
org.simantics.structural.synchronization.protocol,
org.simantics.structural.synchronization.utils
Require-Bundle: org.simantics.databoard;bundle-version="0.6.5",
org.simantics.structural.synchronization.protocol,
org.simantics.structural.synchronization.utils
Require-Bundle: org.simantics.databoard;bundle-version="0.6.5",
package org.simantics.structural.synchronization.base;
package org.simantics.structural.synchronization.base;
-import gnu.trove.map.hash.THashMap;
-
import java.util.ArrayList;
import org.simantics.databoard.binding.mutable.Variant;
import org.simantics.structural.synchronization.utils.ComponentBase;
import org.simantics.structural.synchronization.utils.Solver;
import java.util.ArrayList;
import org.simantics.databoard.binding.mutable.Variant;
import org.simantics.structural.synchronization.utils.ComponentBase;
import org.simantics.structural.synchronization.utils.Solver;
+import gnu.trove.map.hash.THashMap;
+
public class ModuleUpdateContext<T extends ComponentBase<T>> {
private ModuleUpdaterBase<T> updater;
public class ModuleUpdateContext<T extends ComponentBase<T>> {
private ModuleUpdaterBase<T> updater;
package org.simantics.structural.synchronization.base;
package org.simantics.structural.synchronization.base;
-import gnu.trove.map.hash.THashMap;
-
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import org.simantics.structural.synchronization.protocol.SerializedVariable;
import org.simantics.structural.synchronization.utils.ComponentBase;
import org.simantics.structural.synchronization.protocol.SerializedVariable;
import org.simantics.structural.synchronization.utils.ComponentBase;
+import gnu.trove.map.hash.THashMap;
+
abstract public class ModuleUpdaterBase<T extends ComponentBase<T>> {
public String moduleType;
abstract public class ModuleUpdaterBase<T extends ComponentBase<T>> {
public String moduleType;
package org.simantics.structural.synchronization.base;
package org.simantics.structural.synchronization.base;
-import org.simantics.db.exception.DatabaseException;
import org.simantics.structural.synchronization.utils.ComponentBase;
import org.simantics.structural.synchronization.utils.ComponentBase;
public interface ModuleUpdaterFactoryBase<T extends ComponentBase<T>> {
public interface ModuleUpdaterFactoryBase<T extends ComponentBase<T>> {
- public ModuleUpdaterBase<T> createUpdater(String id) throws DatabaseException;
+ public ModuleUpdaterBase<T> createUpdater(String id) throws Exception;
package org.simantics.structural.synchronization.base;
package org.simantics.structural.synchronization.base;
-import gnu.trove.map.hash.THashMap;
-import gnu.trove.procedure.TObjectObjectProcedure;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.ArrayList;
import java.util.Collections;
import org.simantics.structural.synchronization.utils.Solver;
import org.slf4j.Logger;
import org.simantics.structural.synchronization.utils.Solver;
import org.slf4j.Logger;
+import gnu.trove.map.hash.THashMap;
+import gnu.trove.procedure.TObjectObjectProcedure;
+
abstract public class ReferenceResolverBase<T extends ComponentBase<T>> {
protected SynchronizationEventHandler eventHandler;
abstract public class ReferenceResolverBase<T extends ComponentBase<T>> {
protected SynchronizationEventHandler eventHandler;
import org.simantics.databoard.Bindings;
import org.simantics.databoard.adapter.AdaptException;
import org.simantics.databoard.Bindings;
import org.simantics.databoard.adapter.AdaptException;
-import org.simantics.db.exception.DatabaseException;
import org.simantics.structural.synchronization.internal.Policy;
import org.simantics.structural.synchronization.protocol.ChildInfo;
import org.simantics.structural.synchronization.protocol.Connection;
import org.simantics.structural.synchronization.internal.Policy;
import org.simantics.structural.synchronization.protocol.ChildInfo;
import org.simantics.structural.synchronization.protocol.Connection;
ModuleUpdaterBase<T> updater;
try {
updater = moduleUpdaterFactory.createUpdater(id);
ModuleUpdaterBase<T> updater;
try {
updater = moduleUpdaterFactory.createUpdater(id);
- } catch (DatabaseException e) {
+ } catch (Exception e) {
throw new RuntimeException(e);
}
if(updater == null)
throw new RuntimeException(e);
}
if(updater == null)
-package org.simantics.structural.synchronization.base2;
+package org.simantics.structural.synchronization.protocol;
import gnu.trove.map.hash.THashMap;
import gnu.trove.set.hash.THashSet;
import gnu.trove.map.hash.THashMap;
import gnu.trove.set.hash.THashSet;
import java.util.Map;
import org.simantics.databoard.util.URIStringUtils;
import java.util.Map;
import org.simantics.databoard.util.URIStringUtils;
-import org.simantics.structural.synchronization.protocol.ChildInfo;
-import org.simantics.structural.synchronization.protocol.Connection;
-import org.simantics.structural.synchronization.protocol.SerializedVariable;
-import org.simantics.structural.synchronization.protocol.SynchronizationEventHandler;
-import org.simantics.structural.synchronization.protocol.SynchronizationException;
/**
* <p>A partial implementation of SynchronizationEventHandler that contains all generic
/**
* <p>A partial implementation of SynchronizationEventHandler that contains all generic