• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to parse the java file

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am doing a project
, I need produce a product to "watch" the changing of variable of program in sound, this way may assist novice programmer to debug. They can not only use eyes to watch the variable on Screen, but also can hear the changing of variable. it is obviously to reduce the workload of programmer.
I have produced two java classes. One is the class can play MIDI notes, another is quite easy that watch the changing of variable, but need a sentence insert into the target java source file, after the changing of the variable. for instance, in a bubble sort program, if I intend to watch the variable n(from 0 to 10), I must insert manually a watching sentence where the line after the n changes line. But I need let a program automaticly parse the target java file, and automaticly insert the watching sentence into the right place
my question is that how to parse the java file,and insert the sentence into the right place??
GIve me a CLue...
Thank You!!!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you thinking that this should be done in an IDE? In which case a textListener similar to the ones that IDEs use to highlight various things, would work.
Or are you talking about doing this AFTER the class has been compiled?
 
Your buns are mine! But you can have this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic