站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

SharabilityQueryImplementation (NetBeans General Queries API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.queries
Interface SharabilityQueryImplementation


public interface SharabilityQueryImplementation

Determine whether files should be shared (for example in a VCS) or are intended to be unshared.

Could be implemented e.g. by project types which know that certain files or folders in a project (e.g. src/) are intended for VCS sharing while others (e.g. build/) are not.

Note that the Project API module registers a default implementation of this query which delegates to the project which owns the queried file, if there is one. This is more efficient than searching instances in global lookup, so use that facility wherever possible.

Threading note: implementors should avoid acquiring locks that might be held by other threads. Generally treat this interface similarly to SPIs in org.openide.filesystems with respect to threading semantics.

See Also:
SharabilityQuery, AntProjectHelper.createSharabilityQuery(...)

Method Summary
 int getSharability(File file)
          Check whether a file or directory should be shared.
 

Method Detail

getSharability

public int getSharability(File file)
Check whether a file or directory should be shared. If it is, it ought to be committed to a VCS if the user is using one. If it is not, it is either a disposable build product, or a per-user private file which is important but should not be shared.

Parameters:
file - a file to check for sharability (may or may not yet exist)
Returns:
one of SharabilityQuery's constants

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.