Class VscodeConfigurator
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
org.jdrupes.builder.vscode.VscodeConfigurator
- All Implemented Interfaces:
Generator, Renamable, ResourceProvider
The VscodeConfigurator provides the resource VscodeConfiguration.
The configuration consists of the configuration files:
- .vscode/settings.json
- .vscode/launch.json
- .vscode/tasks.json
Each generated data structure can be post processed by a corresponding
adapt method before being written to disk.
VS Code relies on the .project and .classpath files as used by
eclipse for its java support. Currently, the configurator does not
generate these files. Use the eclipse configurator in addition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadaptConfiguration(Runnable adaptor) Allow the user to add additional resources.adaptLaunch(Consumer<Map<String, Object>> adaptor) Allow the user to adapt the launch data structure before writing.adaptSettings(Consumer<Map<String, Object>> adaptor) Allow the user to adapt the settings data structure before writing.adaptTasks(Consumer<Map<String, Object>> adaptor) Allow the user to adapt the tasks data structure before writing.doProvide(ResourceRequest<T> requested) Invoked byResourceProviderSpi.provide(ResourceRequest)after checking if the invocation is allowed.VSCode does not have a central JDK registry.Methods inherited from class AbstractGenerator
cleanup, name, project, toStringMethods inherited from class AbstractProvider
context, name, of, rename, vavrStream
-
Constructor Details
-
VscodeConfigurator
Initializes a new vscode configurator.- Parameters:
project- the project
-
-
Method Details
-
adaptSettings
Allow the user to adapt the settings data structure before writing.- Parameters:
adaptor- the adaptor- Returns:
- the vscode configurator
-
jdk
VSCode does not have a central JDK registry. JDKs can therefore be configured with this method.- Parameters:
version- the versionlocation- the location- Returns:
- the vscode configurator
-
doProvide
Description copied from class:AbstractProviderInvoked byResourceProviderSpi.provide(ResourceRequest)after checking if the invocation is allowed.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
requested- the request for resources- Returns:
- the stream
-
adaptLaunch
Allow the user to adapt the launch data structure before writing. The version and an empty list for "configurations" has already be added.- Parameters:
adaptor- the adaptor- Returns:
- the vscode configurator
-
adaptTasks
Allow the user to adapt the tasks data structure before writing.- Parameters:
adaptor- the adaptor- Returns:
- the vscode configurator
-
adaptConfiguration
Allow the user to add additional resources.- Parameters:
adaptor- the adaptor- Returns:
- the eclipse configurator
-