Package org.appformer.client.context
Class DefaultEditorContextProviderImpl
- java.lang.Object
-
- org.appformer.client.context.DefaultEditorContextProviderImpl
-
- All Implemented Interfaces:
EditorContextProvider
@ApplicationScoped public class DefaultEditorContextProviderImpl extends Object implements EditorContextProvider
-
-
Constructor Summary
Constructors Constructor Description DefaultEditorContextProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelgetChannel()Access the channel where the editor is running (e.g.Optional<OperatingSystem>getOperatingSystem()Access the operating system where the editor is running (e.g.booleanisReadOnly()Checks if the editor is in read only mode.
-
-
-
Method Detail
-
getChannel
public Channel getChannel()
Description copied from interface:EditorContextProviderAccess the channel where the editor is running (e.g. ONLINE, GITHUB or VSCODE).- Specified by:
getChannelin interfaceEditorContextProvider- Returns:
- The channel where the editor is running or DEFAULT if no channel is available.
-
getOperatingSystem
public Optional<OperatingSystem> getOperatingSystem()
Description copied from interface:EditorContextProviderAccess the operating system where the editor is running (e.g. MACOS, WINDOWS or LINUX).- Specified by:
getOperatingSystemin interfaceEditorContextProvider- Returns:
- The operating system where the editor is running or Optional.empty() if no information is available.
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:EditorContextProviderChecks if the editor is in read only mode.- Specified by:
isReadOnlyin interfaceEditorContextProvider- Returns:
- If the editor is in read only mode or if is not.
-
-