org.netbeans.modules.projectapi/1 1.45

org.netbeans.spi.project.support
Class LookupProviderSupport

java.lang.Object
  extended by org.netbeans.spi.project.support.LookupProviderSupport

public final class LookupProviderSupport
extends Object

Factory for lookup capable of merging content from registered LookupProvider instances.

Since:
org.netbeans.modules.projectapi 1.12

Method Summary
static LookupMerger<ActionProvider> createActionProviderMerger()
          Factory method for creating LookupMerger instance that merges ActionProvider instances in the project lookup.
static Lookup createCompositeLookup(Lookup baseLookup, String folderPath)
          Creates a project lookup instance that combines the content from multiple sources.
static LookupMerger<Sources> createSourcesMerger()
          Factory method for creating LookupMerger instance that merges Sources instances in the project lookup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCompositeLookup

public static Lookup createCompositeLookup(Lookup baseLookup,
                                           String folderPath)
Creates a project lookup instance that combines the content from multiple sources. A convenience factory method for implementors of Project.

The pattern Projects/TYPE/Lookup is conventional for the folder path, and required if LookupProvider.Registration, LookupMerger.Registration, or ProjectServiceProvider are used.

Parameters:
baseLookup - initial, base content of the project lookup created by the project owner
folderPath - the path in the System Filesystem that is used as root for lookup composition, as for Lookups.forPath(java.lang.String). The content of the folder is assumed to be LookupProvider instances.
Returns:
a lookup to be used in project

createSourcesMerger

public static LookupMerger<Sources> createSourcesMerger()
Factory method for creating LookupMerger instance that merges Sources instances in the project lookup. Allows to compose the Sources content from multiple sources.

Returns:
instance to include in project lookup

createActionProviderMerger

public static LookupMerger<ActionProvider> createActionProviderMerger()
Factory method for creating LookupMerger instance that merges ActionProvider instances in the project lookup. The first ActionProvider which supports the command and is enabled on it_will perform it.

Returns:
instance to include in project lookup
Since:
1.38

org.netbeans.modules.projectapi/1 1.45

Built on May 24 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.