Skip to content

Commit

Permalink
Remove error checking feature
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed Feb 5, 2023
1 parent 26856ca commit 11858a0
Show file tree
Hide file tree
Showing 29 changed files with 40 additions and 124 deletions.
3 changes: 0 additions & 3 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ Beautiful syntax highlighting provides you a better way to understand your code
<b>Code Completion</b>
The code editor provides basic completion based on a file content, it suggests names of functions, fields, and keywords within your file scope

<b>Error Checking</b>
Whenever you make a change, the code editor will correct you by highlighting a part of code that contains syntax errors <i>(Note that this feature currently works only for JavaScript, but it will be available for more languages soon)</i>

<b>File Manager</b>
A built-in file manager with SFTP/FTP(S) integration provides a convenient way to transfer files between mobile phone and computer

Expand Down
3 changes: 0 additions & 3 deletions fastlane/metadata/android/zh-TW/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<b>程式碼完成</b>
程式碼編輯器提供了基於檔案內容的基本完成功能,它提供了檔案範圍內的函數、字符串和關鍵字的名稱。

<b>錯誤檢查</b>
每當您進行更改時,程式碼編輯器都會通透過突出顯示包含語法錯誤的程式碼來糾正您<i>(請注意,此功能目前僅適用於 JavaScript,但很快將適用於更多語言)</i>

<b>檔案管理器</b>
內建的檔案管理器與SFTP/FTP(S)集合,為在手機和電腦之間傳輸文件提供了便利。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SettingsManager(private val sharedPreferences: SharedPreferences) {
// Editor
const val KEY_WORD_WRAP = "WORD_WRAP"
const val KEY_CODE_COMPLETION = "CODE_COMPLETION"
const val KEY_ERROR_HIGHLIGHTING = "ERROR_HIGHLIGHTING"
// const val KEY_ERROR_HIGHLIGHTING = "ERROR_HIGHLIGHTING"
const val KEY_PINCH_ZOOM = "PINCH_ZOOM"
const val KEY_LINE_NUMBERS = "SHOW_LINE_NUMBERS"
const val KEY_HIGHLIGHT_CURRENT_LINE = "HIGHLIGHT_CURRENT_LINE"
Expand Down Expand Up @@ -103,9 +103,9 @@ class SettingsManager(private val sharedPreferences: SharedPreferences) {
var codeCompletion: Boolean
get() = sharedPreferences.getBoolean(KEY_CODE_COMPLETION, true)
set(value) = sharedPreferences.edit().putBoolean(KEY_CODE_COMPLETION, value).apply()
var errorHighlighting: Boolean
/*var errorHighlighting: Boolean
get() = sharedPreferences.getBoolean(KEY_ERROR_HIGHLIGHTING, true)
set(value) = sharedPreferences.edit().putBoolean(KEY_ERROR_HIGHLIGHTING, value).apply()
set(value) = sharedPreferences.edit().putBoolean(KEY_ERROR_HIGHLIGHTING, value).apply()*/
var pinchZoom: Boolean
get() = sharedPreferences.getBoolean(KEY_PINCH_ZOOM, true)
set(value) = sharedPreferences.edit().putBoolean(KEY_PINCH_ZOOM, value).apply()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sealed class SettingsEvent<T>(val value: T) {

class WordWrap(value: Boolean) : SettingsEvent<Boolean>(value)
class CodeCompletion(value: Boolean) : SettingsEvent<Boolean>(value)
class ErrorHighlight(value: Boolean) : SettingsEvent<Boolean>(value)
// class ErrorHighlight(value: Boolean) : SettingsEvent<Boolean>(value)
class PinchZoom(value: Boolean) : SettingsEvent<Boolean>(value)
class LineNumbers(value: Pair<Boolean, Boolean>) :
SettingsEvent<Pair<Boolean, Boolean>>(value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class ToolbarManager(
}

// Tools Menu
R.id.action_error_checking -> listener.onErrorCheckingButton()
// R.id.action_error_checking -> listener.onErrorCheckingButton()
R.id.action_insert_color -> listener.onInsertColorButton()

// Overflow Menu
Expand Down Expand Up @@ -239,7 +239,7 @@ class ToolbarManager(
fun onPreviousResultButton()
fun onFindParamsChanged(params: FindParams)

fun onErrorCheckingButton()
// fun onErrorCheckingButton()
fun onInsertColorButton()

fun onUndoButton(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import androidx.fragment.app.activityViewModels
import androidx.lifecycle.flowWithLifecycle
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import com.afollestad.materialdialogs.MaterialDialog
import com.blacksquircle.ui.core.ui.adapter.TabAdapter
import com.blacksquircle.ui.core.ui.delegate.viewBinding
import com.blacksquircle.ui.core.ui.extensions.*
Expand Down Expand Up @@ -365,25 +364,6 @@ class EditorFragment : Fragment(R.layout.fragment_editor), BackPressedHandler,
binding.editor.find(params)
}

override fun onErrorCheckingButton() {
val position = tabAdapter.selectedPosition
if (position > -1) {
MaterialDialog(requireContext()).show {
title(R.string.dialog_title_result)
message(R.string.message_no_errors_detected)
/*viewModel.parseEvent.value?.let { model ->
model.exception?.let {
message(text = it.message)
binding.editor.setErrorLine(it.lineNumber)
}
}*/
positiveButton(R.string.action_ok)
}
} else {
context?.showToast(R.string.message_no_open_files)
}
}

override fun onInsertColorButton() {
viewModel.obtainEvent(EditorIntent.ColorPicker)
}
Expand Down Expand Up @@ -441,25 +421,6 @@ class EditorFragment : Fragment(R.layout.fragment_editor), BackPressedHandler,
binding.editor.colorScheme
)
}
is SettingsEvent.ErrorHighlight -> {
if (event.value) {
binding.editor.debounce(
coroutineScope = viewLifecycleOwner.lifecycleScope,
waitMs = 1500
) { text ->
if (text.isNotEmpty()) {
/*val position = adapter.selectedPosition
if (position > -1) {
viewModel.parse(
adapter.currentList[position],
binding.editor.language,
binding.editor.text.toString()
)
}*/
}
}
}
}
is SettingsEvent.PinchZoom -> if (event.value) pinchZoom()
is SettingsEvent.LineNumbers -> lineNumbers {
lineNumbers = event.value.first
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ class EditorViewModel @Inject constructor(
val codeCompletion = settingsManager.codeCompletion
settings.add(SettingsEvent.CodeCompletion(codeCompletion))

val errorHighlighting = settingsManager.errorHighlighting
settings.add(SettingsEvent.ErrorHighlight(errorHighlighting))
/*val errorHighlighting = settingsManager.errorHighlighting
settings.add(SettingsEvent.ErrorHighlight(errorHighlighting))*/

val pinchZoom = settingsManager.pinchZoom
settings.add(SettingsEvent.PinchZoom(pinchZoom))
Expand Down
4 changes: 2 additions & 2 deletions feature-editor/src/main/res/menu/menu_overflow_vertical.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
android:icon="@drawable/ic_tools"
app:iconTint="@color/colorIcon">
<menu>
<item
<!--<item
android:id="@+id/action_error_checking"
android:title="@string/action_error_checking"
android:icon="@drawable/ic_code_check"
app:iconTint="@color/colorIcon"/>
app:iconTint="@color/colorIcon"/>-->
<item
android:id="@+id/action_insert_color"
android:title="@string/action_insert_color"
Expand Down
6 changes: 3 additions & 3 deletions feature-editor/src/main/res/menu/menu_tools.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
<!--<item
android:id="@+id/action_error_checking"
android:title="@string/action_error_checking"
android:icon="@drawable/ic_code_check"
app:iconTint="@color/colorIcon"/>
app:iconTint="@color/colorIcon" />-->
<item
android:id="@+id/action_insert_color"
android:title="@string/action_insert_color"
android:icon="@drawable/ic_palette"
app:iconTint="@color/colorIcon"/>
app:iconTint="@color/colorIcon" />
</menu>
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="action_close_replace">Ersetzen schließen</string>
<string name="action_goto_line">Gehe zu Zeile</string>
<string name="action_go_to">Gehe zu</string>
<string name="action_error_checking">Fehlerüberprüfung</string>
<!--<string name="action_error_checking">Fehlerüberprüfung</string>-->
<string name="action_insert_color">Farbe einfügen</string>
<string name="action_settings">Einstellungen</string>
<string name="action_tools">Tools</string>
Expand Down
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="action_close_replace">Fermer Remplacer</string>
<string name="action_goto_line">Aller à la Ligne</string>
<string name="action_go_to">Aller à</string>
<string name="action_error_checking">Vérification des Erreurs</string>
<!--<string name="action_error_checking">Vérification des Erreurs</string>-->
<string name="action_insert_color">Insérer une Couleur</string>
<string name="action_settings">Paramètres</string>
<string name="action_tools">Outils</string>
Expand Down
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="action_close_replace">Fechar substituir</string>
<string name="action_goto_line">Ir para a linha</string>
<string name="action_go_to">Ir para</string>
<string name="action_error_checking">Checar erros</string>
<!--<string name="action_error_checking">Checar erros</string>-->
<string name="action_insert_color">Inserir cor</string>
<string name="action_settings">Configurações</string>
<string name="action_tools">Ferramentas</string>
Expand Down
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="action_close_replace">Закрыть замену</string>
<string name="action_goto_line">Перейти к строке</string>
<string name="action_go_to">Перейти</string>
<string name="action_error_checking">Проверка ошибок</string>
<!--<string name="action_error_checking">Проверка ошибок</string>-->
<string name="action_insert_color">Вставить цвет</string>
<string name="action_settings">Настройки</string>
<string name="action_tools">Инструменты</string>
Expand Down
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="action_close_replace">關閉取代</string>
<string name="action_goto_line">跳到行</string>
<string name="action_go_to">跳到</string>
<string name="action_error_checking">錯誤檢查</string>
<!--<string name="action_error_checking">錯誤檢查</string>-->
<string name="action_insert_color">插入顏色</string>
<string name="action_settings">設定</string>
<string name="action_tools">工具</string>
Expand Down
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<string name="action_close_replace">关闭替换</string>
<string name="action_goto_line">转到行</string>
<string name="action_go_to">转到</string>
<string name="action_error_checking">错误检查</string>
<!--<string name="action_error_checking">错误检查</string>-->
<string name="action_insert_color">插入颜色</string>
<string name="action_settings">设置</string>
<string name="action_tools">工具</string>
Expand Down
2 changes: 1 addition & 1 deletion feature-editor/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<string name="action_close_replace">Close Replace</string>
<string name="action_goto_line">Go to Line</string>
<string name="action_go_to">Go to</string>
<string name="action_error_checking">Error Checking</string>
<!--<string name="action_error_checking">Error Checking</string>-->
<string name="action_insert_color">Insert Color</string>
<string name="action_settings">Settings</string>
<string name="action_tools">Tools</string>
Expand Down
1 change: 1 addition & 0 deletions feature-settings/src/main/res/raw/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<b>Fixed:</b> Infinite loading in split screen mode<br>
<b>Fixed:</b> Extended keyboard was always visible<br>
<b>Fixed:</b> Error messages are now embedded in UI<br>
• Removed error checking, it'll be rewritten from scratch in the future<br>
• Internal architecture improvements<br>
• Bugfixes and minor improvements<br>
<br>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<string name="pref_word_wrap_summary">Aktivieren, damit sich Wörter der Bildschirmbreite anpassen.</string>
<string name="pref_code_completion_title">Code Completion</string>
<string name="pref_code_completion_summary">Autovervollständigungsvorschläge anzeigen.</string>
<string name="pref_error_highlighting_title">Fehlermarkierung</string>
<string name="pref_error_highlighting_summary">Echtzeit-Fehlermarkierung aktivieren. Neustart erforderlich.</string>
<!--<string name="pref_error_highlighting_title">Fehlermarkierung</string>
<string name="pref_error_highlighting_summary">Echtzeit-Fehlermarkierung aktivieren. Neustart erforderlich.</string>-->
<string name="pref_pinch_zoom_title">Pinch-to-Zoom-Gesten</string>
<string name="pref_pinch_zoom_summary">Zoom-Gesten im Editor aktivieren.</string>
<string name="pref_line_numbers_title">Line Numbers</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<string name="pref_word_wrap_summary">Activer le renvoi à la ligne pour s\'adapter à la largeur de l\'écran.</string>
<string name="pref_code_completion_title">Complétion de code</string>
<string name="pref_code_completion_summary">Afficher les suggestions de saisie semi-automatique.</string>
<string name="pref_error_highlighting_title">Mise en surbrillance des erreurs</string>
<string name="pref_error_highlighting_summary">Activer la mise en surbrillance des erreurs en temps réel. Un redémarrage est requis.</string>
<!--<string name="pref_error_highlighting_title">Mise en surbrillance des erreurs</string>
<string name="pref_error_highlighting_summary">Activer la mise en surbrillance des erreurs en temps réel. Un redémarrage est requis.</string>-->
<string name="pref_pinch_zoom_title">Zoom par pincement</string>
<string name="pref_pinch_zoom_summary">Activer les gestes de zoom dans l\'éditeur.</string>
<string name="pref_line_numbers_title">Line Numbers</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<string name="pref_word_wrap_summary">Ativa a quebra de linha para o texto caber na tela.</string>
<string name="pref_code_completion_title">Completação de código</string>
<string name="pref_code_completion_summary">Mostra sugestões de autocompletação.</string>
<string name="pref_error_highlighting_title">Realçar erros</string>
<string name="pref_error_highlighting_summary">Realça erros em tempo real. É preciso reiniciar o aplicativo.</string>
<!--<string name="pref_error_highlighting_title">Realçar erros</string>
<string name="pref_error_highlighting_summary">Realça erros em tempo real. É preciso reiniciar o aplicativo.</string>-->
<string name="pref_pinch_zoom_title">Zoom</string>
<string name="pref_pinch_zoom_summary">Zoom de pinça no editor.</string>
<string name="pref_line_numbers_title">Line Numbers</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<string name="pref_word_wrap_summary">Включите перенос слов для отображения текста по ширине экрана.</string>
<string name="pref_code_completion_title">Автодополнение кода</string>
<string name="pref_code_completion_summary">Показывать варианты автодополнения.</string>
<string name="pref_error_highlighting_title">Подсветка ошибок</string>
<string name="pref_error_highlighting_summary">Включить подсветку ошибок в реальном времени. Требуется перезапуск.</string>
<!--<string name="pref_error_highlighting_title">Подсветка ошибок</string>
<string name="pref_error_highlighting_summary">Включить подсветку ошибок в реальном времени. Требуется перезапуск.</string>-->
<string name="pref_pinch_zoom_title">Увеличение жестом</string>
<string name="pref_pinch_zoom_summary">Включить жест увеличения текста в редакторе.</string>
<string name="pref_line_numbers_title">Номера строк</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<string name="pref_word_wrap_summary">是否依據螢幕寬度自動換行。</string>
<string name="pref_code_completion_title">程式碼補全</string>
<string name="pref_code_completion_summary">輸入時將自動在下拉選單中顯示程式碼補全建議。</string>
<string name="pref_error_highlighting_title">錯誤高亮</string>
<string name="pref_error_highlighting_summary">啟用即時錯誤高亮顯示(需要重新啟動應用程式才能生效)。</string>
<!--<string name="pref_error_highlighting_title">錯誤高亮</string>
<string name="pref_error_highlighting_summary">啟用即時錯誤高亮顯示(需要重新啟動應用程式才能生效)。</string>-->
<string name="pref_pinch_zoom_title">手勢縮放</string>
<string name="pref_pinch_zoom_summary">在編輯器中啟用縮放手勢。</string>
<string name="pref_line_numbers_title">行號</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<string name="pref_word_wrap_summary">是否根据屏幕宽度自动换行。</string>
<string name="pref_code_completion_title">代码补全</string>
<string name="pref_code_completion_summary">在输入时将自动在下拉菜单中显示代码补全建议。</string>
<string name="pref_error_highlighting_title">错误高亮</string>
<string name="pref_error_highlighting_summary">启用实时错误高亮显示(需要重启本应用才能生效)。</string>
<!--<string name="pref_error_highlighting_title">错误高亮</string>
<string name="pref_error_highlighting_summary">启用实时错误高亮显示(需要重启本应用才能生效)。</string>-->
<string name="pref_pinch_zoom_title">手势缩放</string>
<string name="pref_pinch_zoom_summary">在编辑器中启用缩放手势。</string>
<string name="pref_line_numbers_title">Line Numbers</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
<string name="pref_word_wrap_summary">Enable word wrap to fit screen width.</string>
<string name="pref_code_completion_title">Code Completion</string>
<string name="pref_code_completion_summary">Show autocomplete suggestions.</string>
<string name="pref_error_highlighting_title">Error Highlighting</string>
<string name="pref_error_highlighting_summary">Enable realtime error highlighting. Restart required.</string>
<!--<string name="pref_error_highlighting_title">Error Highlighting</string>
<string name="pref_error_highlighting_summary">Enable realtime error highlighting. Restart required.</string>-->
<string name="pref_pinch_zoom_title">Pinch Zoom</string>
<string name="pref_pinch_zoom_summary">Enable zoom gesture in the editor.</string>
<string name="pref_line_numbers_title">Line Numbers</string>
Expand Down
4 changes: 2 additions & 2 deletions feature-settings/src/main/res/xml/preference_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
android:defaultValue="true"
android:key="CODE_COMPLETION"/>

<SwitchPreference
<!--<SwitchPreference
android:title="@string/pref_error_highlighting_title"
android:summary="@string/pref_error_highlighting_summary"
android:defaultValue="true"
android:key="ERROR_HIGHLIGHTING"/>
android:key="ERROR_HIGHLIGHTING" />-->

<SwitchPreference
android:title="@string/pref_pinch_zoom_title"
Expand Down
Loading

0 comments on commit 11858a0

Please sign in to comment.