|
org.netbeans.modules.project.ant/1 1.37.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.project.support.ant.SourcesHelper.SourceRootConfig
public final class SourcesHelper.SourceRootConfig
Helper class for configuring source roots.
A typical usage is to use it as "named parameters" idiom when adding source root:
sourcesHelper.sourceRoot("${src.dir}").displayName("Source Packages").type("java").add();
Note also that when adding typed source root, principal (untyped) source
root usually needs to be added as well. You may reuse existing config object like this:
sourcesHelper.sourceRoot("${src.dir}").displayName("Source Packages")
.add() // adding as principal root, continuing configuration
.type("java").add(); // adding as typed root
| Method Summary | |
|---|---|
SourcesHelper.SourceRootConfig |
add()
Adds configured source root to SourcesHelper. |
SourcesHelper.SourceRootConfig |
displayName(String value)
Configures a display name (for SourceGroup.getDisplayName()) |
SourcesHelper.SourceRootConfig |
excludes(String value)
Configures optional exclude list. |
SourcesHelper.SourceRootConfig |
hint(String value)
Configures optional hint for SourceGroupModifier allowing creation of this
source root on demand. |
SourcesHelper.SourceRootConfig |
icon(Icon value)
Configures a regular icon for the source root, optional. |
SourcesHelper.SourceRootConfig |
includes(String value)
Configures optional include list. |
SourcesHelper.SourceRootConfig |
openedIcon(Icon value)
Configures an opened variant icon for the source root, optional. |
SourcesHelper.SourceRootConfig |
type(String value)
Turns a root into typed source root which will be considered only in certain contexts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public SourcesHelper.SourceRootConfig displayName(String value)
SourceGroup.getDisplayName())
value -
this
public SourcesHelper.SourceRootConfig includes(String value)
throws IllegalArgumentException
Value is evaluated and then treated as a comma- or space-separated pattern list,
as detailed in the Javadoc for PathMatcher.
(As a special convenience, a value consisting solely of an Ant property reference
which cannot be evaluated, e.g. ${undefined}, is ignored.)
SourceGroup.contains(org.openide.filesystems.FileObject) will then reflect the includes and excludes for files, but note that the
semantics of that method requires that a folder be "contained" in case any folder or file
beneath it is contained, and in particular the root folder is always contained.
value - Ant-style includes; may contain Ant property substitutions;
Only files and folders matching the pattern (or patterns),
and not specified in the excludes list,
will be included.
Must not be null.
this
IllegalArgumentException - When null is passed as parameter.
public SourcesHelper.SourceRootConfig excludes(String value)
throws IllegalArgumentException
includes(java.lang.String) for details.
value - Ant-style excludes; may contain Ant property substitutions;
files and folders
matching the pattern (or patterns) will not be included,
even if specified in the includes list.
Must not be null.
this
IllegalArgumentException - When null is passed as parameter.public SourcesHelper.SourceRootConfig type(String value)
value - a source root type such as
JavaProjectConstants.SOURCES_TYPE_JAVA
thispublic SourcesHelper.SourceRootConfig hint(String value)
SourceGroupModifier allowing creation of this
source root on demand.
value - A hint
thisSourcesHelper.createSourceGroupModifierImplementation()public SourcesHelper.SourceRootConfig icon(Icon value)
value -
thispublic SourcesHelper.SourceRootConfig openedIcon(Icon value)
value -
this
public SourcesHelper.SourceRootConfig add()
throws IllegalStateException
SourcesHelper.
this
IllegalStateException - if this method is called after either
SourcesHelper.createSources() or SourcesHelper.registerExternalRoots(int)
was calledSourcesHelper.registerExternalRoots(int)
|
org.netbeans.modules.project.ant/1 1.37.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||