Package aQute.bnd.build.model
Class BndEditModel
java.lang.Object
aQute.bnd.build.model.BndEditModel
A model for a Bnd file. In the first iteration, use a simple Properties
object; this will need to be enhanced to additionally record formatting, e.g.
line breaks and empty lines, and comments.
- Author:
- Neil Bartlett
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBndEditModel(BndEditModel model) BndEditModel(Project project) BndEditModel(Workspace workspace) BndEditModel(IDocument document) -
Method Summary
Modifier and TypeMethodDescription<T extends Collection<Object>>
StringvoidaddBundleBlueprint(String location) voidaddExportedPackage(ExportedPackage export) voidaddIncludeResource(String resource) voidaddPath(VersionedClause versionedClause, String header) voidvoidaddPrivatePackage(String packageName) voidvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) static <T> StringUse the built in formatters to take an unformatted header and turn it into a formatted header useful in the editor, for example escaped newlines.genericGet(String propertyName) voidgenericSet(String propertyName, Object value) Return the saved changes in document format.getEE()getGenericString(String name) Return a processor for this model.List<org.osgi.resource.Requirement> getRunFw()List<org.osgi.resource.Requirement> booleanisBndrun()booleanisCnf()If this is on the cnf projectbooleanisDirty()booleanisIncludedPackage(String packageName) booleanbooleanvoidload()voidvoidvoidloadFrom(InputStream inputStream) lookupConverter(String propertyName) lookupFormatter(String propertyName) voidvoidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) voidIf this BndEditModel was created with a project then this method will save the changes in the document and will store them in the associated file.voidsaveChangesTo(IDocument document) voidsetBndResource(File bndResource) voidsetBndResourceName(String bndResourceName) voidsetBuildPath(List<? extends VersionedClause> paths) voidsetBundleActivator(String bundleActivator) voidsetBundleBlueprint(List<HeaderClause> bundleBlueprint) voidsetBundleCategory(String bundleCategory) voidsetBundleContactAddress(String bundleContactAddress) voidsetBundleCopyright(String bundleCopyright) voidsetBundleDescription(String bundleDescription) voidsetBundleDocUrl(String bundleDocUrl) voidsetBundleLicense(String bundleLicense) voidsetBundleName(String bundleName) voidsetBundleSymbolicName(String bundleSymbolicName) voidsetBundleUpdateLocation(String bundleUpdateLocation) voidsetBundleVendor(String bundleVendor) voidsetBundleVersion(String bundleVersion) voidsetClassPath(List<? extends String> classPath) voidsetDirty(boolean isDirty) voidvoidsetDSAnnotationPatterns(List<? extends String> patterns) voidvoidsetExportedPackages(List<? extends ExportedPackage> exports) voidsetGenericString(String name, String value) voidsetIgnoreStandalone(List<HeaderClause> headers) voidsetImportPatterns(List<? extends ImportPattern> patterns) voidsetIncludeResource(List<String> newEntries) voidsetIncludeSources(boolean includeSources) voidsetOutputFile(String name) voidsetPluginPath(List<String> pluginPath) voidsetPlugins(List<HeaderClause> plugins) voidsetPrivatePackages(List<String> newPackages) voidsetProject(Project project) voidsetResolveMode(ResolutionInstructions.ResolveMode resolveMode) voidsetRunBlacklist(List<org.osgi.resource.Requirement> requires) voidsetRunBundles(List<? extends VersionedClause> paths) voidsetRunFramework(String clause) voidvoidsetRunProgramArgs(String args) voidsetRunProperties(Map<String, String> props) voidsetRunRepos(List<String> repos) voidsetRunRequires(List<org.osgi.resource.Requirement> requires) voidsetRunVMArgs(String args) voidsetServiceComponents(List<? extends ServiceComponent> components) voidsetStandaloneLinks(List<HeaderClause> headers) voidsetSubBndFiles(List<String> subBndFiles) voidsetSystemPackages(List<? extends ExportedPackage> packages) voidsetTestPath(List<? extends VersionedClause> paths) voidsetTestSuites(List<String> suites) voidsetWorkspace(Workspace workspace) static voidtoAsciiStream(IDocument doc)
-
Field Details
-
NEWLINE_LINE_SEPARATOR
- See Also:
-
LIST_SEPARATOR
- See Also:
-
PROP_WORKSPACE
- See Also:
-
BUNDLE_VERSION_MACRO
- See Also:
-
-
Constructor Details
-
BndEditModel
public BndEditModel() -
BndEditModel
-
BndEditModel
-
BndEditModel
- Throws:
IOException
-
BndEditModel
- Throws:
IOException
-
-
Method Details
-
loadFrom
- Throws:
IOException
-
toEscaped
- Throws:
IOException
-
toAsciiStream
- Throws:
IOException
-
loadFrom
- Throws:
IOException
-
loadFrom
- Throws:
IOException
-
saveChangesTo
-
getAllPropertyNames
-
lookupConverter
-
lookupFormatter
-
genericGet
-
genericSet
-
getBundleLicense
-
setBundleLicense
-
getBundleCategory
-
setBundleCategory
-
getBundleName
-
setBundleName
-
getBundleDescription
-
setBundleDescription
-
getBundleCopyright
-
setBundleCopyright
-
getBundleUpdateLocation
-
setBundleUpdateLocation
-
getBundleVendor
-
setBundleVendor
-
getBundleContactAddress
-
setBundleContactAddress
-
getBundleDocUrl
-
setBundleDocUrl
-
getBundleSymbolicName
-
setBundleSymbolicName
-
getBundleVersionString
-
setBundleVersion
-
getBundleActivator
-
setBundleActivator
-
getOutputFile
-
setOutputFile
-
isIncludeSources
public boolean isIncludeSources() -
setIncludeSources
public void setIncludeSources(boolean includeSources) -
getPrivatePackages
-
setPrivatePackages
-
addPrivatePackage
-
getSystemPackages
-
setSystemPackages
-
getClassPath
-
setClassPath
-
getExportedPackages
-
setExportedPackages
-
addExportedPackage
-
getDSAnnotationPatterns
-
setDSAnnotationPatterns
-
getServiceComponents
-
setServiceComponents
-
getImportPatterns
-
setImportPatterns
-
getBuildPath
-
getTestPath
-
setBuildPath
-
addPath
-
addPath
-
setTestPath
-
getRunBundles
-
setRunBundles
-
isIncludedPackage
-
getSubBndFiles
-
setSubBndFiles
-
getRunProperties
-
setRunProperties
-
getRunVMArgs
-
setRunVMArgs
-
getRunProgramArgs
-
setRunProgramArgs
-
getTestSuites
-
setTestSuites
-
getPlugins
-
setPlugins
-
getPluginPath
-
setPluginPath
-
getDistro
-
setDistro
-
getRunRepos
-
setRunRepos
-
getRunFramework
-
getRunFw
-
getEE
-
setEE
-
setRunFramework
-
setRunFw
-
getRunRequires
-
setRunRequires
-
getRunBlacklist
-
setRunBlacklist
-
getStandaloneLinks
-
setStandaloneLinks
-
getIgnoreStandalone
-
setIgnoreStandalone
-
isProjectFile
public boolean isProjectFile() -
isBndrun
public boolean isBndrun() -
addPropertyChangeListener
-
addPropertyChangeListener
-
removePropertyChangeListener
-
removePropertyChangeListener
-
setBndResource
-
getBndResource
-
getBndResourceName
-
setBndResourceName
-
getBundleBlueprint
-
setBundleBlueprint
-
addBundleBlueprint
-
getIncludeResource
-
setIncludeResource
-
addIncludeResource
-
setProject
-
getProject
-
getWorkspace
-
setWorkspace
-
getGenericString
-
setGenericString
-
getProperties
Return a processor for this model. This processor is based on the parent project or the bndrun file. It will contain the properties of the project file and the changes from the model.- Returns:
- a processor that reflects the actual project or bndrun file setup
- Throws:
Exception
-
getDocumentChanges
Return the saved changes in document format. -
saveChanges
If this BndEditModel was created with a project then this method will save the changes in the document and will store them in the associated file.- Throws:
IOException
-
store
- Throws:
IOException
-
getResolveMode
-
setResolveMode
-
isDirty
public boolean isDirty()- Returns:
- true if there is a discrepancy between the project's file and the document
-
setDirty
public void setDirty(boolean isDirty) -
load
- Throws:
IOException
-
isCnf
public boolean isCnf()If this is on the cnf project- Returns:
- true if it is the cnf project
-
format
Use the built in formatters to take an unformatted header and turn it into a formatted header useful in the editor, for example escaped newlines.- Type Parameters:
T- the intermediate type, doesn't matter- Parameters:
header- the name of the instructioninput- the source string- Returns:
- the input or a formatted input if there is converter
-
add
-