Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2015
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.83 KB | None | 0 0
  1. package org.chrisle.netbeans.plugins.nbinstallplugin;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import java.awt.event.ActionListener;
  5. import java.util.List;
  6. import org.openide.loaders.DataObject;
  7. import org.openide.awt.ActionID;
  8. import org.openide.awt.ActionReference;
  9. import org.openide.awt.ActionReferences;
  10. import org.openide.filesystems.MIMEResolver;
  11. import org.openide.util.NbBundle.Messages;
  12.  
  13. @Messages("CTL_NbInstallPluginAction=Install plugin")
  14.  
  15. //@ActionRegistration(displayName = "#CTL_NbInstallPluginAction", key="org.chrisle.netbeans.plugins.nbinstallplugin.NbInstallPluginAction")
  16. @MIMEResolver.ExtensionRegistration(
  17.     displayName = "#CTL_NbInstallPluginAction",
  18.     extension = {"nbm", "NBM"},
  19.     mimeType = "application/nbm"
  20. )
  21.  
  22. //@DataObject.Registration(
  23. //    mimeType = "application/nbm",
  24. //////    iconBase = "org/netbeans/gradle/project/resources/gradle.png",
  25. //    displayName = "#CTL_NbInstallPluginAction",
  26. //    position = 300
  27. //)
  28.  
  29. @ActionReferences(
  30.     @ActionReference(
  31.         path = "Loaders/application/nbm/Actions",
  32.         position = 150,
  33.         id = @ActionID(category = "Tools", id = "org.chrisle.netbeans.plugins.nbinstallplugin.NbInstallPluginAction")
  34.     )
  35. )
  36.  
  37.  
  38. //public final class NbInstallPluginAction extends MultiDataObject implements ActionListener {
  39. public final class NbInstallPluginAction implements ActionListener {
  40.  
  41.     private final List<DataObject> context;
  42.  
  43. //    public NbInstallPluginAction(FileObject fo, MultiFileLoader loader) throws DataObjectExistsException {
  44. //        super(fo, loader);
  45. //    }
  46.  
  47.     public NbInstallPluginAction(List<DataObject> context) {
  48.         this.context = context;
  49.     }
  50.  
  51.     @Override
  52.     public void actionPerformed(ActionEvent ev) {
  53.         for (DataObject dataObject : context) {
  54.             // TODO use dataObject
  55.         }
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement