/plugins/MacroManager/tags/MacroManager_1_3/macroManager/MacroManagerPlugin.java

# · Java · 75 lines · 30 code · 13 blank · 32 comment · 0 complexity · b05ac09c1e7305bc4a9f5e024e6a7962 MD5 · raw file

  1. /*
  2. * MacroManagerPlugin.java
  3. * Copyright (C) 2002 Carmine Lucarelli
  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 macroManager;
  20. import java.awt.event.*;
  21. import java.util.*;
  22. import javax.swing.JOptionPane;
  23. import common.gui.PopupList;
  24. import macroManager.popup.*;
  25. import org.gjt.sp.jedit.*;
  26. import org.gjt.sp.util.Log;
  27. /**
  28. * Description of the Class
  29. */
  30. public class MacroManagerPlugin extends EditPlugin
  31. {
  32. /**
  33. * Description of the Method
  34. *
  35. *@param view Description of the Parameter
  36. */
  37. public static void showPopup(final View view)
  38. {
  39. FileSelectionListener listener = new MacroSelectionListener(view);
  40. FindFileWindow ffw = new FindFileWindow();
  41. ffw.addFileSelectionListener(listener);
  42. ffw.showWindow();
  43. }
  44. /**
  45. * Listens for import selection from popup import window.
  46. */
  47. private static class MacroSelectionListener implements FileSelectionListener
  48. {
  49. private View mView;
  50. /**
  51. * Constructor for the MacroSelectionListener object
  52. */
  53. public MacroSelectionListener(View view)
  54. {
  55. mView = view;
  56. }
  57. public void fileSelected(EditAction editAction)
  58. {
  59. editAction.invoke(mView);
  60. }
  61. }
  62. }