Skip to content

WebSocketManager

Sahar Mehrpour edited this page Jun 6, 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: [""],
	checkForFilesFolders: ["relative path 1", "relative path 2"],
        checkForFilesFoldersConstraints: "",       // <one of the predefined values>
        processFilesFolders: "",                   // <one of the predefined values>      
        quantifierQueryType: "",                   // <one of the predefined values>
        quantifierXPathQuery: ["XPath Query 1", "XPath Query 2"],
        constraintQueryType: "",                   // <one of the predefined values>
        constraintXPathQuery: ["XPath Query 1", "XPath Query 2"],
	grammar: ""                                // optional
}
  • 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: {
                 // rule properties
		}
}
  • 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", 
	ruleInfo: {
			// rule properties
		}
}
  • FAILED_NEW_RULE: information of a rule that failed to get stored

  • NEW_TAG: information of a new tag

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