Advertisement
Guest User

dsdf

a guest
Jul 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public void executeInt4(AbstractModel r, int lvl) {
  2. DiagramEditor editor = DiagramEditor.getActiveEditor();
  3. int level = lvl + 1;
  4. List<AbstractModel> abs = new ArrayList<>();
  5. List<AbstractModel> ch = r.getChildren();
  6.  
  7. for(AbstractModel c : ch) {
  8. if (!(c instanceof TypeModel) && !(c instanceof FieldModel)
  9. && !(c instanceof MethodModel)) {
  10. abs.add(c);
  11. }
  12. }
  13.  
  14. int length = abs.size();
  15. if(length == 0) {
  16. r.setLocation(200,level*(-150));
  17. editor.checkDirty();
  18.  
  19. }
  20.  
  21. else {
  22. AutoArrangeCommand auto = new AutoArrangeCommand();
  23. for(int i = 0; i < length; i++) {
  24. auto.executeInt4(abs.get(i), level);
  25. }
  26. r.setLocation(200, level*(-150));
  27. editor.checkDirty();
  28.  
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement