-
Notifications
You must be signed in to change notification settings - Fork 4
Redux Store
Sahar Mehrpour edited this page Jul 22, 2022
·
3 revisions
initial_state = {
ws: null,
ruleTable: [
{
index: "1",
title: "",
description: "",
tags: [],
grammar: "",
checkForFilesFolders: [""],
checkForFilesFoldersConstraints: "INCLUDE", // or EXCLUDE
processFilesFolders: "WITHIN",
quantifierXPathQuery: [],
constraintXPathQuery: [],
quantifierQueryType: "",
constraintQueryType: "",
rulePanelState: {
editMode: false,
title: "",
description: "",
ruleTags: [],
folderConstraint: "",
filesFolders: [],
constraintXPath: "",
quantifierXPath: "",
autoCompleteArray: [],
graphicalEditorState: {guiTree: {...initial_graphicalElementTree}, guiElements: {...initial_graphicalElements}, ruleType: ""}
},
xPathQueryResult: [{
data: {
quantifierResult: [{filePath: "", snippet: "", xml: {fileName: "", xml: ""}}],
satisfied: 0,
satisfiedResult: [],
violated: 0,
violatedResult: []
},
filePath: ""
}]
}
],
tagTable: [{tagName: "", detail: ""}],
xmlFiles: [{filePath: "", xml: ""}],
projectHierarchy: {
children: [{canonicalPath:"",fileName: "", fileType: "", isDirectory: false, name: "", parent:""},{}],
properties: {
canonicalPath: "",
isDirectory: true,
name: "",
parent: ""
}
},
projectPath: "",
currentHash: ["index"],
ignoreFileChange: false, // ignore the file switching in the IDE
displayEditRuleTutorial: true, // display the tour guide for edit rule
message: "init",
openFilePath: "",
hashManager: {
history: ["#/index"],
activeHashIndex: 0,
forwardDisable: "disabled",
backDisable: "disabled",
clickedOnButtons: false // used only in the reducer
},
rulePadState: {
isEditMode: false,
title: "",
description: "",
ruleTags: [],
folderConstraint: "",
filesFolders: [],
autoCompleteArray: [],
quantifierXPath: "", // only produced by autoComplete grammar
constraintXPath: "", // only produced by autoComplete grammar
sentMessages: [],
receivedMessages: [],
graphicalEditorState: {
ruleType: "", // "Must" or "MustBeEqualTo"
guiTree: {...initial_graphicalElementTree},
guiElements: {...initial_graphicalElements}
}
},
// mining Rules *
minedRulesState: {
// see miningRulesCore/extractFeatures/createFeatureMetaDataMap()
featureMetaData: {
featureInfoContainers: {
featureInfo: {},
featureInfoReverse: {},
featureMap: {},
featureMapReverse: {}
},
featureGroups: {spec: {}, usage: {}}
},
groupingMetaData: {
groupMapping: {},
fileMapping:{}
},
focusedElementData: {
filePath: "",
identifier: "",
mapFocusedElementToFeaturesKey: ""
},
doiInformation: {
recentVisitedFiles: [],
recentSearches: [],
recentVisitedElements: []
},
minedRules: []
},
featureSelection: {
filePath: "",
startOffset: "",
endOffset: "",
startLineOffset: "",
lineNumber: "",
lineText: "",
selectedText: "",
xpath: "",
modifiedSelectedText: "",
idMap: {},
displayTextArray: []
}
};
Class Name | Read Store Data | Edit Store Data |
---|---|---|
App | currentHash, loadingGif | currentHash |
WebSocketManager | ignoreFileChange, projectPath, featureMetaData | loadingGif, ws, projectHierarchy, projectPath, ruleTable, tagTable, openFilePath, ignoreFileChange, rulePadState.receivedMessages, xmlFiles, minedRulesState*, doiInformation*, featureSelection* |
HeaderBar | tagTable, currentHash, ws, projectPath, openFilePath | |
NavBar | hashManager | hashManager |
RulePanel | ruleTable, tagTable, currentHash, openFilePath, ws, message | ignoreFileChange, rulePanelState, ruleTable |
RuleTable | rulePadState, ruleTable, currentHash, tagTable | ruleTable, rulePanelState, ignoreFileChange |
TableOfContents | ruleTable, tagTable, currentHash | ruleTable, rulePanelState, ignoreFileChange |
RulePad | ruleTable, tagTable, xmlFiles, ws, projectHierarchy, rulePadState, displayEditRuleTutorial | ignoreFileChange, rulePadState, ruleTable, displayEditRuleTutorial |
GraphicalEditor | ruleTable, ws, rulePadState | rulePadState, ruleTable |
GenerateXPath | ws | rulePadState |
LearnDesignRulesComponent* | ws, xmlFiles, minedRulesState*, projectPath, message | minedRulesState* |
FeatureSelection* | featureSelection*, projectPath, message | featureSelection*, doiInformation* |
- The states and classes related to Mining Rules.