Skip to content
Snippets Groups Projects
Commit e0752e9c authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

improves debug traces

refs 2553
parent fa49f27b
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.introspection.IIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.introspection.KernelIntrospectionSystemService;
import org.fortiss.tooling.kernel.introspection.items.ConstraintVerificationServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.model.INamedElement;
import org.fortiss.tooling.kernel.model.constraints.ConstrainedWithChecksum;
import org.fortiss.tooling.kernel.model.constraints.ConstraintsFactory;
import org.fortiss.tooling.kernel.model.constraints.IConstrained;
......@@ -157,6 +158,9 @@ public final class ConstraintVerificationService extends
*/
private final boolean DEBUG = false;
/** Number used to annotate the traces. */
private int debug_trace_number = 0;
/**
* @param constrained
* @param constraint
......@@ -185,7 +189,16 @@ public final class ConstraintVerificationService extends
res.save(oos, options);
if(DEBUG) {
FileOutputStream file = new FileOutputStream("/home/aravantinos/temp.xml");
String fileName = "/home/aravantinos/temp/constraints/temp" + debug_trace_number++;
String nameConstraint =
constraint instanceof INamedElement ? ((INamedElement)constraint).getName()
: constraint.toString();
String nameConstrained =
constrained instanceof INamedElement ? ((INamedElement)constrained)
.getName() : constrained.toString();
FileOutputStream file =
new FileOutputStream(fileName + "_" + nameConstraint + "_" +
nameConstrained + ".xml");
ObjectOutputStream oos2 = new ObjectOutputStream(file);
res.save(oos2, options);
oos2.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment