Skip to content

Commit 080e816

Browse files
authored
Merge pull request #1 from Toparvion/v1.1
v1.1 The next generation of the tool
2 parents 00922cc + 3cc631d commit 080e816

File tree

87 files changed

+21720
-384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+21720
-384
lines changed

.gitignore

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,41 @@ gradle-app.setting
1010
!gradle-wrapper.jar
1111

1212
# Cache of project
13+
### JetBrains template
14+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
15+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
16+
17+
## File-based project format:
18+
19+
## Plugin-specific files:
20+
21+
# IntelliJ
22+
23+
# mpeltonen/sbt-idea plugin
24+
25+
# JIRA plugin
26+
27+
# Crashlytics plugin (for Android Studio and IntelliJ)
28+
### Java template
29+
30+
# Mobile Tools for Java (J2ME)
31+
.mtj.tmp/
32+
33+
# Package Files #
34+
*.war
35+
*.ear
36+
37+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
38+
### Gradle template
39+
40+
# Ignore Gradle GUI config
41+
42+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
43+
44+
# Cache of project
45+
46+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
47+
# gradle/wrapper/gradle-wrapper.properties
1348
.gradletasknamecache
1449

1550
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
@@ -23,7 +58,7 @@ gradle-app.setting
2358

2459
## Project format:
2560
*.iws
26-
*.iml
61+
*.ipr
2762

2863
## Plugin-specific files:
2964

@@ -50,5 +85,4 @@ fabric.properties
5085
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
5186
hs_err_pid*
5287

53-
# droplets themselves are not the part of Dropper
54-
droplets/
88+
memo.txt

LICENSE.txt

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
---------------------------------------------------------------------------------------------------------------
2+
jMint License
3+
---------------------------------------------------------------------------------------------------------------
4+
MIT License
5+
6+
Copyright (c) 2016 Toparvion
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all
16+
copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.
25+
===============================================================================================================
26+
27+
28+
---------------------------------------------------------------------------------------------------------------
29+
ANTLR4 License
30+
---------------------------------------------------------------------------------------------------------------
31+
[The BSD License]
32+
Copyright (c) 2012 Terence Parr and Sam Harwell
33+
All rights reserved.
34+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
35+
the following conditions are met:
36+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the
37+
following disclaimer.
38+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
39+
following disclaimer in the documentation and/or other materials provided with the distribution.
40+
- Neither the name of the author nor the names of its contributors may be used to endorse or promote products
41+
derived from this software without specific prior written permission.
42+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
43+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
44+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
45+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
46+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
47+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49+
===============================================================================================================
50+
51+
52+
---------------------------------------------------------------------------------------------------------------
53+
Javassist License
54+
---------------------------------------------------------------------------------------------------------------
55+
GNU LESSER GENERAL PUBLIC LICENSE
56+
Version 3, 29 June 2007
57+
58+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
59+
Everyone is permitted to copy and distribute verbatim copies
60+
of this license document, but changing it is not allowed.
61+
62+
63+
This version of the GNU Lesser General Public License incorporates
64+
the terms and conditions of version 3 of the GNU General Public
65+
License, supplemented by the additional permissions listed below.
66+
67+
0. Additional Definitions.
68+
69+
As used herein, "this License" refers to version 3 of the GNU Lesser
70+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
71+
General Public License.
72+
73+
"The Library" refers to a covered work governed by this License,
74+
other than an Application or a Combined Work as defined below.
75+
76+
An "Application" is any work that makes use of an interface provided
77+
by the Library, but which is not otherwise based on the Library.
78+
Defining a subclass of a class defined by the Library is deemed a mode
79+
of using an interface provided by the Library.
80+
81+
A "Combined Work" is a work produced by combining or linking an
82+
Application with the Library. The particular version of the Library
83+
with which the Combined Work was made is also called the "Linked
84+
Version".
85+
86+
The "Minimal Corresponding Source" for a Combined Work means the
87+
Corresponding Source for the Combined Work, excluding any source code
88+
for portions of the Combined Work that, considered in isolation, are
89+
based on the Application, and not on the Linked Version.
90+
91+
The "Corresponding Application Code" for a Combined Work means the
92+
object code and/or source code for the Application, including any data
93+
and utility programs needed for reproducing the Combined Work from the
94+
Application, but excluding the System Libraries of the Combined Work.
95+
96+
1. Exception to Section 3 of the GNU GPL.
97+
98+
You may convey a covered work under sections 3 and 4 of this License
99+
without being bound by section 3 of the GNU GPL.
100+
101+
2. Conveying Modified Versions.
102+
103+
If you modify a copy of the Library, and, in your modifications, a
104+
facility refers to a function or data to be supplied by an Application
105+
that uses the facility (other than as an argument passed when the
106+
facility is invoked), then you may convey a copy of the modified
107+
version:
108+
109+
a) under this License, provided that you make a good faith effort to
110+
ensure that, in the event an Application does not supply the
111+
function or data, the facility still operates, and performs
112+
whatever part of its purpose remains meaningful, or
113+
114+
b) under the GNU GPL, with none of the additional permissions of
115+
this License applicable to that copy.
116+
117+
3. Object Code Incorporating Material from Library Header Files.
118+
119+
The object code form of an Application may incorporate material from
120+
a header file that is part of the Library. You may convey such object
121+
code under terms of your choice, provided that, if the incorporated
122+
material is not limited to numerical parameters, data structure
123+
layouts and accessors, or small macros, inline functions and templates
124+
(ten or fewer lines in length), you do both of the following:
125+
126+
a) Give prominent notice with each copy of the object code that the
127+
Library is used in it and that the Library and its use are
128+
covered by this License.
129+
130+
b) Accompany the object code with a copy of the GNU GPL and this license
131+
document.
132+
133+
4. Combined Works.
134+
135+
You may convey a Combined Work under terms of your choice that,
136+
taken together, effectively do not restrict modification of the
137+
portions of the Library contained in the Combined Work and reverse
138+
engineering for debugging such modifications, if you also do each of
139+
the following:
140+
141+
a) Give prominent notice with each copy of the Combined Work that
142+
the Library is used in it and that the Library and its use are
143+
covered by this License.
144+
145+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
146+
document.
147+
148+
c) For a Combined Work that displays copyright notices during
149+
execution, include the copyright notice for the Library among
150+
these notices, as well as a reference directing the user to the
151+
copies of the GNU GPL and this license document.
152+
153+
d) Do one of the following:
154+
155+
0) Convey the Minimal Corresponding Source under the terms of this
156+
License, and the Corresponding Application Code in a form
157+
suitable for, and under terms that permit, the user to
158+
recombine or relink the Application with a modified version of
159+
the Linked Version to produce a modified Combined Work, in the
160+
manner specified by section 6 of the GNU GPL for conveying
161+
Corresponding Source.
162+
163+
1) Use a suitable shared library mechanism for linking with the
164+
Library. A suitable mechanism is one that (a) uses at run time
165+
a copy of the Library already present on the user's computer
166+
system, and (b) will operate properly with a modified version
167+
of the Library that is interface-compatible with the Linked
168+
Version.
169+
170+
e) Provide Installation Information, but only if you would otherwise
171+
be required to provide such information under section 6 of the
172+
GNU GPL, and only to the extent that such information is
173+
necessary to install and execute a modified version of the
174+
Combined Work produced by recombining or relinking the
175+
Application with a modified version of the Linked Version. (If
176+
you use option 4d0, the Installation Information must accompany
177+
the Minimal Corresponding Source and Corresponding Application
178+
Code. If you use option 4d1, you must provide the Installation
179+
Information in the manner specified by section 6 of the GNU GPL
180+
for conveying Corresponding Source.)
181+
182+
5. Combined Libraries.
183+
184+
You may place library facilities that are a work based on the
185+
Library side by side in a single library together with other library
186+
facilities that are not Applications and are not covered by this
187+
License, and convey such a combined library under terms of your
188+
choice, if you do both of the following:
189+
190+
a) Accompany the combined library with a copy of the same work based
191+
on the Library, uncombined with any other library facilities,
192+
conveyed under the terms of this License.
193+
194+
b) Give prominent notice with the combined library that part of it
195+
is a work based on the Library, and explaining where to find the
196+
accompanying uncombined form of the same work.
197+
198+
6. Revised Versions of the GNU Lesser General Public License.
199+
200+
The Free Software Foundation may publish revised and/or new versions
201+
of the GNU Lesser General Public License from time to time. Such new
202+
versions will be similar in spirit to the present version, but may
203+
differ in detail to address new problems or concerns.
204+
205+
Each version is given a distinguishing version number. If the
206+
Library as you received it specifies that a certain numbered version
207+
of the GNU Lesser General Public License "or any later version"
208+
applies to it, you have the option of following the terms and
209+
conditions either of that published version or of any later version
210+
published by the Free Software Foundation. If the Library as you
211+
received it does not specify a version number of the GNU Lesser
212+
General Public License, you may choose any version of the GNU Lesser
213+
General Public License ever published by the Free Software Foundation.
214+
215+
If the Library as you received it specifies that a proxy can decide
216+
whether future versions of the GNU Lesser General Public License shall
217+
apply, that proxy's public statement of acceptance of any version is
218+
permanent authorization for you to choose that version for the
219+
Library.
220+
===============================================================================================================
221+
222+
223+
---------------------------------------------------------------------------------------------------------------
224+
SLF4J License
225+
---------------------------------------------------------------------------------------------------------------
226+
Copyright (c) 2004-2013 QOS.ch
227+
All rights reserved.
228+
229+
Permission is hereby granted, free of charge, to any person obtaining
230+
a copy of this software and associated documentation files (the
231+
"Software"), to deal in the Software without restriction, including
232+
without limitation the rights to use, copy, modify, merge, publish,
233+
distribute, sublicense, and/or sell copies of the Software, and to
234+
permit persons to whom the Software is furnished to do so, subject to
235+
the following conditions:
236+
237+
The above copyright notice and this permission notice shall be
238+
included in all copies or substantial portions of the Software.
239+
240+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
241+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
242+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
243+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
244+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
245+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
246+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
247+
===============================================================================================================

build.gradle

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
group 'FTC-Prepaid'
2-
version '1.0.1'
1+
group 'toparvion'
2+
version '1.1'
33

44
apply plugin: 'java'
55

66
sourceCompatibility = 1.6
7+
compileTestJava.options.encoding = 'UTF-8'
78

89
repositories {
910
mavenCentral()
@@ -15,20 +16,38 @@ configurations {
1516
}
1617

1718
dependencies {
18-
provided 'org.javassist:javassist:3.20.0-GA'
19+
compile 'org.javassist:javassist:3.20.0-GA'
1920
compile 'org.slf4j:slf4j-api:1.7.7'
21+
compile group: 'org.antlr', name: 'antlr4-runtime', version: '4.5.3'
2022
testCompile group: 'junit', name: 'junit', version: '4.11'
23+
testRuntime group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.7'
24+
2125
}
2226

2327
jar {
2428
manifest {
25-
attributes("Implementation-Title": "Dropper",
29+
attributes("Implementation-Title": "JMint",
2630
"Implementation-Version": version,
27-
"Premain-Class": "ru.ftc.upc.testing.dropper.DropperAgent")
31+
"Implementation-Vendor": "Toparvion",
32+
"Premain-Class": "tech.toparvion.jmint.JMintAgent",
33+
"Main-Class": "tech.toparvion.jmint.DropletChecker")
2834
}
29-
3035
from {
3136
(configurations.runtime - configurations.provided)
3237
.collect({ it.isDirectory() ? it : zipTree(it) })
3338
}
39+
exclude ('**/*.g4') // there is no need to export grammar files as they are already exported via generated parsers
40+
}
41+
42+
task runPainterWithDebug(type: JavaExec, dependsOn: jar) {
43+
classpath = sourceSets.test.runtimeClasspath /*+
44+
project.files('src/test/java/sampleapp/standalone/painter/slf4j-simple-1.7.7.jar')*/
45+
main 'sampleapp.standalone.painter.Painter'
46+
jvmArgs = ['-Dfile.encoding=UTF8',
47+
'-javaagent:build/libs/jmint-'+version+'.jar=' +
48+
'src/test/java/sampleapp/standalone/painter/DrawPaneDroplet.java;' +
49+
'src/test/java/sampleapp/standalone/painter/PainterDroplet.java;' +
50+
'src/test/resources/JFrameDroplet.java'
51+
].toList()
52+
debug = true // Gradle default debug port is 5005
3453
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
rootProject.name = 'dropper'
1+
rootProject.name = 'jmint'
22

src/main/java/ru/ftc/upc/testing/dropper/AfterMethodPatcher.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/main/java/ru/ftc/upc/testing/dropper/BeforeMethodPatcher.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)