Interface SourceGroupModifierImplementation
public interface SourceGroupModifierImplementation
The SPI side of
SourceGroupModifier
.
Expected to be present in project lookup of project types supporting automated creation
of SourceGroup
root folders.- Since:
- org.netbeans.modules.projectapi 1.24
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateSourceGroup
(String type, String hint) checks ifSourceGroup
of the given type and hint can be created.createSourceGroup
(String type, String hint) Creates aSourceGroup
of the given type and hint.
-
Method Details
-
createSourceGroup
Creates aSourceGroup
of the given type and hint. Typically a type is a constant for java/groovy/ruby source roots and hint is a constant for main sources or test sources. Please consult specific APIs fro the supported types/hints. Eg.JavaProjectConstants
for java related project sources. If the SourceGroup's type/hint is not supported, the implementation shall silently return null and not throw any exceptions. If the SourceGroup of given type/hint already exists it shall be returned as well.- Parameters:
type
- constant for type of sourceshint
-- Returns:
- the created or existing SourceGroup or null
-
canCreateSourceGroup
checks ifSourceGroup
of the given type and hint can be created. Typically a type is a constant for java/groovy/ruby source roots and hint is a constant for main sources or test sources. Please consult specific APIs fro the supported types/hints. Eg.JavaProjectConstants
for java related project sources. If the SourceGroup of given type/hint already exists it shall return true as well.- Parameters:
type
- constant for type of sourceshint
-- Returns:
- true if the SourceGroup exists or can be created.
-