/plugins/LaTeXTools/branches/stable_0-5_branch/latextools/uk/co/antroy/latextools/LaTeXPlugin.java

# · Java · 58 lines · 29 code · 10 blank · 19 comment · 1 complexity · 693aaa86391d9359c31bf3472e7afa24 MD5 · raw file

  1. /*
  2. * LaTeXPlugin.java
  3. * Copyright (C) 2002 Anthony Roy
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. package uk.co.antroy.latextools;
  20. import org.gjt.sp.jedit.EBComponent;
  21. import org.gjt.sp.jedit.EBMessage;
  22. import org.gjt.sp.jedit.EditBus;
  23. import sidekick.SideKickPlugin;
  24. import java.util.ArrayList;
  25. import java.util.Iterator;
  26. import java.util.List;
  27. public class LaTeXPlugin
  28. extends SideKickPlugin {
  29. private static List editBusList = new ArrayList();
  30. //~ Methods ...............................................................
  31. public static void addToEditBus(EBComponent component){
  32. EditBus.addToBus(component);
  33. editBusList.add(component);
  34. }
  35. public static void removeFromEditBus(EBComponent component){
  36. EditBus.removeFromBus(component);
  37. editBusList.remove(component);
  38. }
  39. public void stop(){
  40. for (Iterator it = editBusList.iterator(); it.hasNext(); ){
  41. EBComponent component = (EBComponent) it.next();
  42. EditBus.removeFromBus(component);
  43. it.remove();
  44. }
  45. }
  46. public void handleMessage(EBMessage message) {
  47. }
  48. }