From: vsr Date: Wed, 24 May 2017 16:37:38 +0000 (+0300) Subject: PyEditor: introduce auto-completion feature X-Git-Tag: V8_3_asterstudy_v0.8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=be47b48addcf8a7b54b66b465bc2c4247eb3f532;p=modules%2Fgui.git PyEditor: introduce auto-completion feature - Additionally provide missing preference option for SALOME PyViewer --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index da1936388..1005ae4f4 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -2932,6 +2932,20 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->addPreference( tr( "PREF_PY_LINE_NUMBS_AREA" ), pyDispGroup, LightApp_Preferences::Bool, "PyEditor", "LineNumberArea" ); // ... "Display settings" group <> + + // ... "Editor settings" group <> + int pyEditGroup = pref->addPreference( tr( "PREF_GROUP_PY_EDITOR" ), pyeditTab ); + // ... -> navigation mode + int pyCompletion = pref->addPreference( tr( "PREF_PY_COMPLETION_MODE" ), pyEditGroup, + LightApp_Preferences::Selector, "PyEditor", "CompletionPolicy" ); + aValuesList.clear(); + anIndicesList.clear(); + aValuesList << tr("PREF_PY_NONE") << tr("PREF_PY_AUTO") << tr("PREF_PY_MANUAL") << tr("PREF_PY_ALWAYS"); + anIndicesList << 0 << 1 << 2 << 3 ; + pref->setItemProperty( "strings", aValuesList, pyCompletion ); + pref->setItemProperty( "indexes", anIndicesList, pyCompletion ); + // ... "Editor settings" group <> + // ... "Tab settings" group <> int pyTabGroup = pref->addPreference( tr( "PREF_GROUP_PY_TAB" ), pyeditTab ); pref->setItemProperty( "columns", 2, pyTabGroup ); diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index 52869a881..fd899055d 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -1041,6 +1041,30 @@ File does not exist PREF_PY_LINE_NUMBS_AREA Display line numbers area + + PREF_GROUP_PY_EDITOR + Editor settings + + + PREF_PY_COMPLETION_MODE + Completion mode + + + PREF_PY_NONE + None + + + PREF_PY_AUTO + Auto + + + PREF_PY_MANUAL + Manual + + + PREF_PY_ALWAYS + Always + PREF_GROUP_PY_TAB Tab settings diff --git a/src/LightApp/resources/LightApp_msg_fr.ts b/src/LightApp/resources/LightApp_msg_fr.ts index c19a0da0f..b91790d59 100755 --- a/src/LightApp/resources/LightApp_msg_fr.ts +++ b/src/LightApp/resources/LightApp_msg_fr.ts @@ -1041,6 +1041,30 @@ Le fichier n'existe pas PREF_PY_LINE_NUMBS_AREA Affiche les numéros de ligne + + PREF_GROUP_PY_EDITOR + Editor settings + + + PREF_PY_COMPLETION_MODE + Completion mode + + + PREF_PY_NONE + None + + + PREF_PY_AUTO + Auto + + + PREF_PY_MANUAL + Manual + + + PREF_PY_ALWAYS + Always + PREF_GROUP_PY_TAB Indentation diff --git a/src/LightApp/resources/LightApp_msg_ja.ts b/src/LightApp/resources/LightApp_msg_ja.ts index 4fb5afcc2..02fa314f2 100644 --- a/src/LightApp/resources/LightApp_msg_ja.ts +++ b/src/LightApp/resources/LightApp_msg_ja.ts @@ -1040,6 +1040,30 @@ Pythonファイルは、文字、数字、アンダースコアが含まれて PREF_PY_LINE_NUMBS_AREA ライン数エリアの表示 + + PREF_GROUP_PY_EDITOR + Editor settings + + + PREF_PY_COMPLETION_MODE + Completion mode + + + PREF_PY_NONE + None + + + PREF_PY_AUTO + Auto + + + PREF_PY_MANUAL + Manual + + + PREF_PY_ALWAYS + Always + PREF_GROUP_PY_TAB 設定タブ