import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.diagram.synchronization.ErrorHandler;
import org.simantics.g2d.canvas.ICanvasContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.hash.THashMap;
*/
public class DiagramContentRequest extends BaseRequest<Resource, DiagramContents> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(DiagramContentRequest.class);
+
int previousElementCount = 32;
ErrorHandler errorHandler;
}
}
-
+
try {
- s.waitFor(components.size());
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
+ s.waitFor(components.size());
+ } catch (InterruptedException e) {
+ LOGGER.error("An error occured while waiting for diagram to load", e);
+ }
+
// Remove elements that were not recognized in descending order.
unrecognizedElementIndices.sort();
unrecognizedElementIndices.forEachDescending(new TIntProcedure() {