@@ -119,6 +119,7 @@ else if (str.endsWith("class") || str.endsWith("interface")){
119
119
boolean isInterface = str .contains ("interface" );
120
120
cls .setInterface (isInterface );
121
121
addMembers (cls , s .substring (start , end ));
122
+ cls .setPosition (i );
122
123
classes .add (cls );
123
124
124
125
@@ -218,7 +219,7 @@ private static void addMembers(Class cls, String s){
218
219
boolean isInterface = word .toString ().equals ("interface" );
219
220
innerClass .setInterface (isInterface );
220
221
addMembers (innerClass , s .substring (start , end ));
221
-
222
+ innerClass . setPosition ( nextWord . end );
222
223
cls .addMember (innerClass );
223
224
}
224
225
@@ -283,6 +284,7 @@ private static void addMembers(Class cls, String s){
283
284
}
284
285
method .setPublic (isPublic );
285
286
method .setDescription (comment .getDescription ());
287
+ method .setPosition (word .end );
286
288
cls .addMember (method );
287
289
288
290
@@ -386,6 +388,7 @@ else if (b<a || d<a){ //found property or class
386
388
property .setType (type );
387
389
property .setStatic (isStatic );
388
390
property .setDefaultValue (defaultValue );
391
+ property .setPosition (word .end );
389
392
cls .addMember (property );
390
393
391
394
@@ -922,11 +925,13 @@ private static ArrayList<Class> getClasses(String s){
922
925
cls .setNamespace (namespace );
923
926
Comment comment = parseComment (fn .get ("comment" ).toString ());
924
927
cls .setDescription (comment .getDescription ());
928
+ cls .setPosition (i );
925
929
classes .add (cls );
926
930
927
931
928
932
//Add constructor
929
933
Constructor contructor = new Constructor (functionName );
934
+ contructor .setPosition (start );
930
935
for (Parameter parameter : getParameters (params , comment .getAnnotations ())){
931
936
contructor .addParameter (parameter );
932
937
}
@@ -986,6 +991,7 @@ private static ArrayList<Method> getFunctions(String s){
986
991
Method function = new Method (functionName );
987
992
function .setDescription (comment .getDescription ());
988
993
function .setPublic (fn .get ("isPublic" ).toBoolean ());
994
+ function .setPosition (word .end );
989
995
functions .add (function );
990
996
991
997
@@ -1269,6 +1275,7 @@ private static ArrayList<Config> parseConfig(String defaultConfig){
1269
1275
String key = prevWord .toString ().trim ();
1270
1276
Config config = new Config (key );
1271
1277
config .setDescription (parseComment (prevWord .lastComment ).getDescription ());
1278
+ config .setPosition (prevWord .end );
1272
1279
arr .add (config );
1273
1280
1274
1281
//Get config value and update i
@@ -1286,6 +1293,7 @@ else if (str.endsWith(":")){
1286
1293
String key = str .substring (0 , str .length ()-1 );
1287
1294
Config config = new Config (key );
1288
1295
config .setDescription (parseComment (word .lastComment ).getDescription ());
1296
+ config .setPosition (word .end );
1289
1297
arr .add (config );
1290
1298
1291
1299
@@ -1299,6 +1307,7 @@ else if (str.startsWith(":")){
1299
1307
String key = prevWord .toString ().trim ();
1300
1308
Config config = new Config (key );
1301
1309
config .setDescription (parseComment (prevWord .lastComment ).getDescription ());
1310
+ config .setPosition (prevWord .end );
1302
1311
arr .add (config );
1303
1312
1304
1313
@@ -1328,6 +1337,7 @@ else if (str.contains(":")){
1328
1337
1329
1338
Config config = new Config (key );
1330
1339
config .setDescription (parseComment (word .lastComment ).getDescription ());
1340
+ config .setPosition (word .end );
1331
1341
arr .add (config );
1332
1342
1333
1343
//Get config value and update i
0 commit comments