 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.utils;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.prefs.Preferences;
26 import org.jetbrains.annotations.NotNull;
92 public static void setServer(@NotNull
final CharSequence server) {
100 public static void setClient(@NotNull
final CharSequence client) {
145 public static List<String>
splitCommand(@NotNull
final String command) {
146 final char[] s = command.toCharArray();
148 while (pos < s.length && s[pos] ==
' ') {
151 final List<String> result =
new ArrayList<>();
152 while (pos < s.length) {
158 while (pos < s.length && s[pos] !=
'"') {
162 if (pos < s.length && s[pos] ==
'"') {
167 while (pos < s.length && s[pos] !=
' ') {
172 while (pos < s.length && s[pos] ==
' ') {
175 result.add(
new String(s, start, end - start));
177 if (result.isEmpty()) {
AppPreferencesModel(@NotNull final String serverDefault, @NotNull final String clientDefault, @NotNull final String editorDefault)
Creates a new instance.
Maintains the application preferences state.
Base package of all Gridarta classes.
static final Preferences PREFERENCES
Preferences.
static List< String > splitCommand(@NotNull final String command)
Splits a command string into an array.
String getClientDefault()
Returns the client setting's default value.
static String path(@NotNull final CharSequence str)
Creates a reasonable path.
String getServer()
Returns the server setting.
static void setEditor(@NotNull final CharSequence editor)
Sets the editor setting.
static final String PREFERENCES_APP_EDITOR
Preferences key for editor application.
final String clientDefault
The default value for the client setting.
String getEditorDefault()
Returns the editor setting's default value.
static final String PREFERENCES_APP_SERVER
Preferences key for server application.
Utility class for converting relative map paths to absolute map paths and vice versa.
final String serverDefault
The default value for the server setting.
static void setClient(@NotNull final CharSequence client)
Sets the client setting.
String getServerDefault()
Returns the server setting's default value.
String getEditor()
Returns the editor setting.
String getClient()
Returns the client setting.
Daimonin Editor like your to identify any bugs in the editor
static final String PREFERENCES_APP_CLIENT
Preferences key for client application.
static void setServer(@NotNull final CharSequence server)
Sets the server setting.
final String editorDefault
The default value for the editor setting.
Interface used as preferences location.