Skip to content

Commit b79ddbd

Browse files
author
saharmehrpour
committed
tags are added to rules, tags are indexed in table of content, modified rules and tags are sent to server individually
1 parent 7d43c4b commit b79ddbd

25 files changed

Lines changed: 1388 additions & 673 deletions

.idea/libraries/json_20090211.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/json_simple_1_1_1.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 329 additions & 488 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IntelliJTestPlugin.iml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
</content>
1010
<orderEntry type="inheritedJdk" />
1111
<orderEntry type="sourceFolder" forTests="false" />
12+
<orderEntry type="library" name="json-simple-1.1.1" level="project" />
13+
<orderEntry type="library" name="json-20090211" level="project" />
1214
</component>
1315
</module>

README.md

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,60 @@ In this version, the core of the plugin is based on [SRCML](http://www.srcml.org
2525
There must be a file name `ruleJson.txt` in the project folder. In this file, there exists a JSON object named `ruleTable`. Here is the example for this file:
2626

2727
```
28-
ruleTable=
2928
[
3029
{
31-
"ruleDescription": "All classes must have a constructor",
32-
"detail": "No detail!",
33-
"quantifierXpath": "//src:class",
34-
"quantifierTitle": "All classes",
35-
"quantifierXpathName": "//src:class/src:name/text()",
36-
"conditionedTitle": "Classes with constructors",
37-
"conditionedXpath": "//src:class[count(src:block/src:constructor)>0]",
38-
"conditionedXpathName": "//src:class[count(src:block/src:constructor)>0]/src:name/text()"
39-
},
40-
{
41-
"ruleDescription": "All @Entity classes must be registered.",
42-
"detail": "All @Entity classes must register themselves so that they can be used with Objectify. You need the statement ObjectifyService.register(TheEntityClassInQuestion);",
43-
"quantifierXpath": "//src:class[src:annotation/src:name/text()=\"Entity\"]",
44-
"quantifierXpathName": "//src:class[src:annotation/src:name/text()=\"Entity\"]/src:name/text()",
45-
"quantifierTitle": "All @Entity classes",
46-
"conditionedXpath": "//src:call[src:name//text()=\"register\"]",
47-
"conditionedXpathName": "//src:call[src:name//text()=\"register\"]/src:argument_list//src:name[position()=1]/text()",
48-
"conditionedTitle": "Registered classes"
49-
}
30+
"ruleDescription": "All classes must have a constructors",
31+
"detail": "No detail.",
32+
"quantifierXpath": "//src:class",
33+
"quantifierTitle": "All classes",
34+
"quantifierXpathName": "//src:class/src:name/text()",
35+
"conditionedTitle": "Classes with constructors",
36+
"conditionedXpath": "//src:class[count(src:block/src:constructor)>0]",
37+
"conditionedXpathName": "//src:class[count(src:block/src:constructor)>0]/src:name/text()",
38+
"tags": [
39+
"class",
40+
"constructor"
41+
],
42+
"index": 1
43+
},
44+
{
45+
"ruleDescription": "All @Entity classes must be registered.",
46+
"detail": "All @Entity classes must register themselves so that they can be used with Objectify. You need the statement ObjectifyService.register(TheEntityClassInQuestion);",
47+
"quantifierXpath": "//src:class[src:annotation/src:name/text()=\"Entity\"]",
48+
"quantifierXpathName": "//src:class[src:annotation/src:name/text()=\"Entity\"]/src:name/text()",
49+
"quantifierTitle": "All @Entity classes",
50+
"conditionedXpath": "//src:call[src:name//text()=\"register\"]",
51+
"conditionedXpathName": "//src:call[src:name//text()=\"register\"]/src:argument_list//src:name[position()=1]/text()",
52+
"conditionedTitle": "Registered classes",
53+
"tags": [
54+
"class",
55+
"annotation",
56+
"entity",
57+
"register",
58+
"function"
59+
],
60+
"index": 2
61+
}
5062
]
5163
```
5264

5365
The format of this file is not final.
66+
67+
##tagJson.txt
68+
69+
There is also another json file named `tagJson.txt`. In this file we store information
70+
about tags. Here is an example for this file:
71+
72+
```
73+
[
74+
{
75+
"tagName": "class",
76+
"detail": "detail about tag 'class'"
77+
},
78+
{
79+
"tagName": "constructor",
80+
"detail": "detail about tag 'constructor'"
81+
}
82+
```
83+
84+
The format of this file is not final.
64 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-3.33 KB
Binary file not shown.
4.34 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)