Package io.github.isotes.vs.utils
Class ProjectWrapper
- java.lang.Object
-
- io.github.isotes.vs.utils.ProjectWrapper
-
public class ProjectWrapper extends Object
Wrapper to provide utility accessors primarily for C/C++ projectsGet started:
- Use
getConfiguration(String)to obtain a convenience wrapper providing access to the sections commonly present in C/C++ project files. - Use
save(Path)andstringify()to save a project file preserving original newline and BOM and trying to work with formatting inconsistencies of the upstream project to minimize unintended differences.
- Use
-
-
Field Summary
Fields Modifier and Type Field Description booleanhasBomStringnewlinePathpathProjectDocument.ProjectprojectProjectDocumentprojectDocument
-
Constructor Summary
Constructors Constructor Description ProjectWrapper(ProjectDocument projectDocument)ProjectWrapper(Path path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ProjectConfiguration>configurations()ConfigurationWrappergetConfiguration(String config)PropertyGroupWrappergetGlobalsPropertyGroup()PropertyGroupTypegetPropertyGroup(String label)GenericPropertyGroupgetUserMacrosPropertyGroup()voidsave(Path path)Stringstringify()Stringstringify(String newline, boolean withBom)
-
-
-
Field Detail
-
path
public final Path path
-
projectDocument
public final ProjectDocument projectDocument
-
project
public final ProjectDocument.Project project
-
newline
public final String newline
-
hasBom
public final boolean hasBom
-
-
Constructor Detail
-
ProjectWrapper
public ProjectWrapper(ProjectDocument projectDocument)
-
ProjectWrapper
public ProjectWrapper(Path path)
-
-
Method Detail
-
configurations
public List<ProjectConfiguration> configurations()
-
getConfiguration
public ConfigurationWrapper getConfiguration(String config)
-
getPropertyGroup
public PropertyGroupType getPropertyGroup(String label)
-
getGlobalsPropertyGroup
public PropertyGroupWrapper getGlobalsPropertyGroup()
-
getUserMacrosPropertyGroup
public GenericPropertyGroup getUserMacrosPropertyGroup()
-
stringify
public String stringify()
-
save
public void save(Path path)
-
-