public Highlighter(IDebuggerEnvironment env, ShellGraphProcessingEnvironment shellProcEnv, ElementRealizers realizers, GraphAnnotationAndChangesRecorder renderRecorder, YCompClient ycompClient, Stack <Sequence> debugSequences ) { this.env = env; this.shellProcEnv = shellProcEnv; this.realizers = realizers; this.renderRecorder = renderRecorder; this.ycompClient = ycompClient; this.debugSequences = debugSequences; }
/// <summary> /// Creates a new YCompClient instance and connects to the local YComp server. /// If it is not available a SocketException is thrown /// </summary> public YCompClient(INamedGraph graph, String layoutModule, int connectionTimeout, int port, DumpInfo dumpInfo, ElementRealizers realizers, Dictionary <string, IObject> nameToClassObject) { this.graph = graph; this.dumpInfo = dumpInfo; int startTime = Environment.TickCount; do { try { ycompClient = new TcpClient("localhost", port); } catch (SocketException) { ycompClient = null; Thread.Sleep(1000); } }while(ycompClient == null && Environment.TickCount - startTime < connectionTimeout); if (ycompClient == null) { throw new Exception("Connection timeout!"); } ycompStream = new YCompStream(ycompClient); SetLayout(layoutModule); dumpInfo.OnNodeTypeAppearanceChanged += new NodeTypeAppearanceChangedHandler(OnNodeTypeAppearanceChanged); dumpInfo.OnEdgeTypeAppearanceChanged += new EdgeTypeAppearanceChangedHandler(OnEdgeTypeAppearanceChanged); dumpInfo.OnTypeInfotagsChanged += new TypeInfotagsChangedHandler(OnTypeInfotagsChanged); this.realizers = realizers; realizers.RegisterYComp(this); this.nameToClassObject = nameToClassObject; // TODO: Add group related events }
public MatchMarkerAndAnnotator(ElementRealizers realizers, GraphAnnotationAndChangesRecorder renderRecorder, YCompClient ycompClient) { this.realizers = realizers; this.renderRecorder = renderRecorder; this.ycompClient = ycompClient; }