Skip to content

WebSocketManager

Sahar Mehrpour edited this page May 23, 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

{
	ID: 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 {ID: number, tagName: "", detail: ""}

  • PROJECT_HIERARCHY: custom tree of the project:

canonicalPath, parent, name, isDirectory, properties
Directories >> children
files >> fileType, fileName
  • PROJECT_PATH: the path of the project.

  • 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 path

  • UPDATE_TAG: the new description of a tag {tagID: number, tagInfo:{ID: number, tagName: "", detail: ""}}

  • FAILED_UPDATE_TAG: information of a tag that failed to get updated.

  • UPDATE_RULE: the updated information of a rule

{
	ruleID: number, 
	ruleInfo: {
			ID: 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: ""
		}
}
  • FAILED_UPDATE_RULE: information of a rule that failed to get updated

  • 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

{
	ruleID: number, 
	rule: {
			ID: 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: ""
		}
}
  • FAILED_NEW_RULE: information of a rule that failed to get stored

  • NEW_TAG: information of a new tag

{
	tag: {tagName: "", detail: ""},
	tagName: ""
}
  • FAILED_NEW_TAG: information of a tag that failed to get stored

  • FILE_CHANGE: the file path for which the rules are filtered. Only the filePath is shown in message.data

Clone this wiki locally