Codota Logo
ActionProvider
Code IndexAdd Codota to your IDE (free)

How to use
ActionProvider
in
it.tidalwave.netbeans.nodes.role

Best Java code snippets using it.tidalwave.netbeans.nodes.role.ActionProvider (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-nodes

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override @CheckForNull
public Action getPreferredAction()
 {
  try
   {
    return find(object, ActionProvider).getPreferredAction();
   }
  catch (NotFoundException e)
   {
    return null;
   }
 }
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-nodes

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override @CheckForNull
public Action[] getActions (final boolean context)
 {
  try
   {
    return find(object, ActionProvider).getActions().toArray(new Action[0]);
   }
  catch (NotFoundException e)
   {
    return new Action[0];
   }
 }
origin: it.tidalwave.blueshades/it-tidalwave-blueshades-commons

 @Override
 public void propertyChange (final @Nonnull PropertyChangeEvent event) 
  {
   if (ExplorerManager.PROP_SELECTED_NODES.equals(event.getPropertyName()))
    {
     final Node[] selectedNodes = (Node[])event.getNewValue();
     
     for (final Node selectedNode : selectedNodes)
      {
       final ActionProvider actionProvider = selectedNode.getLookup().lookup(ActionProvider.class);
       
       if (actionProvider != null)
        {
         try
          {
           // FIXME: introduce a new specific getSelectionAction()?
           actionProvider.getPreferredAction().actionPerformed(null);// FIXME: null  
          }
         catch (NotFoundException e)
          {
           // ok, no selection action 
          }
        }
      }
    }
  }
};
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-nodes

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override @CheckForNull
public Action[] getActions (final boolean context)
 {
  final Node delegate = getOriginal();
  //
  // If the delegate is not a NodePresentationModel, it is not using an ActionProvider, thus it is directly
  // providing its own actions. It could even have an ActionProvider in its Lookup as it could be a FilterNode; for
  // this reason there's this explicit check.
  //
  if (!(delegate instanceof NodePresentationModel) && !(delegate instanceof GenericFilterNode))
   {
    return super.getActions();
   }
  final ActionProvider actionProvider = getLookup().lookup(ActionProvider);
  return (actionProvider != null) ? actionProvider.getActions().toArray(new Action[0]) : super.getActions();
 }
origin: it.tidalwave.blueargyle/it-tidalwave-uniformity-ui-netbeans

 @Override
 public void propertyChange (final @Nonnull PropertyChangeEvent event) 
  {
   if (ExplorerManager.PROP_SELECTED_NODES.equals(event.getPropertyName()))
    {
     final Node[] selectedNodes = (Node[])event.getNewValue();
     
     for (final Node selectedNode : selectedNodes)
      {
       final ActionProvider actionProvider = selectedNode.getLookup().lookup(ActionProvider.class);
       
       if (actionProvider != null)
        {
         try
          {
           // FIXME: introduce a new specific getSelectionAction()?
           actionProvider.getPreferredAction().actionPerformed(null);// FIXME: null  
          }
         catch (NotFoundException e)
          {
           // ok, no selection action 
          }
        }
      }
    }
  }
};
origin: it.tidalwave.netbeans/it-tidalwave-netbeans-nodes

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override @CheckForNull
public Action getPreferredAction()
 {
  final Node delegate = getOriginal();
  //
  // If the delegate is not a NodePresentationModel, it is not using an ActionProvider, thus it is directly
  // providing its own actions. It could even have an ActionProvider in its Lookup as it could be a FilterNode; for
  // this reason there's this explicit check.
  //
  if (!(delegate instanceof NodePresentationModel) && !(delegate instanceof GenericFilterNode))
   {
    return super.getPreferredAction();
   }
  try
   {
    final ActionProvider actionProvider = getLookup().lookup(ActionProvider);
    return (actionProvider != null) ? actionProvider.getPreferredAction() : super.getPreferredAction();
   }
  catch (NotFoundException e)
   {
    return super.getPreferredAction();
   }
 }

it.tidalwave.netbeans.nodes.roleActionProvider

Most used methods

  • getPreferredAction
  • getActions

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Path (java.nio.file)
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now