Interface ConfigSource
-
- All Known Implementing Classes:
AbstractConfigSource,CollectedConfigSource,CollectedConfigSource,CollectedConfigSource,FilesConfigSource,FilesConfigSource,FilesConfigSource
public interface ConfigSourcePossible source locations for configuration files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable java.io.FilegetFile(@NotNull ProjectSettings projectSettings, @NotNull java.lang.String type, int index)Returns a config file.@NotNull java.lang.StringgetName()Returns the internal name.booleanisArchDirectoryInputFieldEnabled()Whether the "archetype directory" input field in the settings dialog should be enabled.<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
voidread(@NotNull ProjectSettings projectSettings, @NotNull AbstractResources<G,A,R> resources, @NotNull ErrorView errorView)Reads config files.@NotNull java.lang.StringtoString()
-
-
-
Method Detail
-
getName
@NotNull @NotNull java.lang.String getName()
Returns the internal name.- Returns:
- the internal name
-
toString
@NotNull @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
read
<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> void read(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull AbstractResources<G,A,R> resources, @NotNull @NotNull ErrorView errorView)
Reads config files.- Parameters:
projectSettings- the project settings to useresources- the resources to updateerrorView- the error view for reporting errors
-
isArchDirectoryInputFieldEnabled
boolean isArchDirectoryInputFieldEnabled()
Whether the "archetype directory" input field in the settings dialog should be enabled.- Returns:
- whether the input field should be enabled
-
getFile
@Nullable @Nullable java.io.File getFile(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull java.lang.String type, int index) throws java.io.IOExceptionReturns a config file.- Parameters:
projectSettings- the project settings to usetype- the file typeindex- the file index, starting with0- Returns:
- the file or
nullif no more files are available - Throws:
java.io.IOException- if an error occurs
-
-