Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. private volatile int lineNumber;
  2. volatile public static ArrayList<CodeString> applicationSourceCode = new ArrayList<CodeString>();
  3.  
  4. while (lineNumber < WorkData.applicationSourceCode.size()) {
  5. if (isLineComplete) {
  6. isLineComplete = false;
  7. runOnUiThread(runnable);
  8. }
  9. }
  10.  
  11. line = WorkData.applicationSourceCode.get(lineNumber);
  12. ...
  13. isLineComplete = true;
  14. lineNumber++;
  15.  
  16. public class Analyzer {
  17.  
  18. public void verify(ArrayList<String> applicationSourceCode) {
  19. AtomicInteger line = new AtomicInteger(0);
  20. while (line.get() < applicationSourceCode.size()) {
  21. runOnUiThread(applicationSourceCode.get(line.getAndIncrement()));
  22. }
  23. }
  24.  
  25. private void runOnUiThread(String line) {
  26. //создаём новый объект Runnable и скармливаем потоку line.
  27. //не задерживаясь выходим.
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement