Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.chrisle.netbeans.plugins.nbinstallplugin;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.util.List;
- import org.openide.loaders.DataObject;
- import org.openide.awt.ActionID;
- import org.openide.awt.ActionReference;
- import org.openide.awt.ActionReferences;
- import org.openide.filesystems.MIMEResolver;
- import org.openide.util.NbBundle.Messages;
- @Messages("CTL_NbInstallPluginAction=Install plugin")
- //@ActionRegistration(displayName = "#CTL_NbInstallPluginAction", key="org.chrisle.netbeans.plugins.nbinstallplugin.NbInstallPluginAction")
- @MIMEResolver.ExtensionRegistration(
- displayName = "#CTL_NbInstallPluginAction",
- extension = {"nbm", "NBM"},
- mimeType = "application/nbm"
- )
- //@DataObject.Registration(
- // mimeType = "application/nbm",
- ////// iconBase = "org/netbeans/gradle/project/resources/gradle.png",
- // displayName = "#CTL_NbInstallPluginAction",
- // position = 300
- //)
- @ActionReferences(
- @ActionReference(
- path = "Loaders/application/nbm/Actions",
- position = 150,
- id = @ActionID(category = "Tools", id = "org.chrisle.netbeans.plugins.nbinstallplugin.NbInstallPluginAction")
- )
- )
- //public final class NbInstallPluginAction extends MultiDataObject implements ActionListener {
- public final class NbInstallPluginAction implements ActionListener {
- private final List<DataObject> context;
- // public NbInstallPluginAction(FileObject fo, MultiFileLoader loader) throws DataObjectExistsException {
- // super(fo, loader);
- // }
- public NbInstallPluginAction(List<DataObject> context) {
- this.context = context;
- }
- @Override
- public void actionPerformed(ActionEvent ev) {
- for (DataObject dataObject : context) {
- // TODO use dataObject
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement