Class VscodeConfigurator
java.lang.Object
org.jdrupes.builder.core.AbstractProvider
org.jdrupes.builder.core.AbstractGenerator
org.jdrupes.builder.vscode.VscodeConfigurator
- All Implemented Interfaces:
Generator, 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.
-
Field Summary
Fields inherited from class AbstractProvider
log -
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 byAbstractProvider.provide(ResourceRequest)after checking if the invocation is allowed.VSCode does not have a central JDK registry.Methods inherited from class AbstractGenerator
cleanup, name, name, newResource, project, toStringMethods inherited from class AbstractProvider
provideMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceProvider
provide
-
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 byAbstractProvider.provide(ResourceRequest)after checking if the invocation is allowed.- Specified by:
doProvidein classAbstractProvider- Type Parameters:
T- the generic type- Parameters:
requested- the requested- 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
-