Skip to content

WebSocketManager

Sahar Mehrpour edited this page May 20, 2020 · 4 revisions

WebSocketManager receives data from the server, processes it if necessary, and updates the redux store. The websocket port is defined here.

The receiving messages are:

  • XML: xml data of the code {filePath: "", xml: ""}

  • RULE_TABLE: the array of rule objects

{
	index: number,
	title: "",
	description: "",
	tags: [""],
	ruleType: { constraint:"FOLDER"|"NONE", checkFor:[""], type: "WITHIN"|"BETWEEN"|"MIXED"},
	quantifier: {detail: "", command: XPath}
	constraint: {detail: "", command1: XPath, command2: XPath, command3: XPath},
	grammar: ""
}
  • TAG_TABLE: the array of tags {tagName: "", detail: ""}

  • PROJECT_HIERARCHY: custom tree of the project:

canonicalPath, parent, name, isDirectory, properties
Directories >> children
files >> fileType, fileName
  • VERIFY_RULES: A single to ignite the processing of rules.

  • UPDATE_XML: the data of the new xml {filePath: "", xml: ""}

  • CHECK_RULES_FOR_FILE: the file name

  • UPDATE_TAG: the new description of a tag {tagName: "", detail: ""}

  • UPDATE_RULE: the updated information of a rule

{
	ruleIndex: number, 
	rule: {
			index: number,
			title: "",
			description: "",
			tags: [""],
			ruleType: { constraint:"FOLDER"|"NONE", checkFor:[""], type: "WITHIN"|"BETWEEN"|"MIXED"},
			quantifier: {detail: "", command: XPath}
			constraint: {detail: "", command1: XPath, command2: XPath, command3: XPath},
			grammar: ""
		}
}
  • UPDATE_TAG_TABLE: a signal for the updated tagTable

  • UPDATE_RULE_TABLE: a signal for the updated ruleTable

  • EXPR_STMT_XML: the xml generated for a piece of code sent as a text {xmlText: "", messageID: ""}

  • NEW_RULE: information of a new rule

{
	ruleIndex: number, 
	rule: {
			index: number,
			title: "",
			description: "",
			tags: [""],
			ruleType: { constraint:"FOLDER"|"NONE", checkFor:[""], type: "WITHIN"|"BETWEEN"|"MIXED"},
			quantifier: {detail: "", command: XPath}
			constraint: {detail: "", command1: XPath, command2: XPath, command3: XPath},
			grammar: ""
		}
}
  • NEW_TAG: information of a new tag
{
	tag: {tagName: "", detail: ""},
	tagName: ""
}
  • SHOW_RULES_FOR_FILE: the file path for which the rules are filtered. Only the filePath is shown in message.data

Clone this wiki locally