From 79645e6981a97224024c5226d8713dce9569d54a Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Mon, 21 Oct 2013 04:09:20 +0100 Subject: STORM-1831 First attempt at using SyntaxIdLSL capability. (incomplete) --- indra/newview/llpreviewscript.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 9fb0a4fb63..21e33f30d5 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -35,6 +35,7 @@ #include "lliconctrl.h" #include "llframetimer.h" #include "llfloatergotoline.h" +#include "llsyntaxid.h" class LLLiveLSLFile; class LLMessageSystem; @@ -149,6 +150,7 @@ private: BOOL mEnableSave; BOOL mHasScriptData; LLLiveLSLFile* mLiveFile; + LLSyntaxIdLSL mSyntaxLSL; LLScriptEdContainer* mContainer; // parent view }; -- cgit v1.2.3 From bad5179f276f6913bfb9a313d25d02d0e883d678 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 25 Oct 2013 14:42:04 +0100 Subject: storm-1831 Fixing viewer crash and clean up. No idea why storing the region pointer in mRegion causes crashes, when doing it locally in each method doesn't. --- indra/newview/llpreviewscript.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 21e33f30d5..73ccaab0b8 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -150,7 +150,7 @@ private: BOOL mEnableSave; BOOL mHasScriptData; LLLiveLSLFile* mLiveFile; - LLSyntaxIdLSL mSyntaxLSL; + LLSyntaxIdLSL mSyntaxIdLSL; LLScriptEdContainer* mContainer; // parent view }; -- cgit v1.2.3 From 4af21580297dd85727ffdc5d4eee89ad58ead271 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sat, 9 Nov 2013 11:31:32 +0000 Subject: Adding method to load cached/default syntax file and method to access sKeyWordsXML. --- indra/newview/llpreviewscript.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 73ccaab0b8..149c27461e 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,6 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); + void initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 29b2129e1eec0dbbb909422e82766a58f14c5da3 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sat, 9 Nov 2013 11:32:08 +0000 Subject: Backed out changeset: e82d9467bec8 --- indra/newview/llpreviewscript.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 149c27461e..73ccaab0b8 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,6 @@ public: ~LLScriptEdCore(); void initMenu(); - void initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 488964157cb02b44ac9c72bb6c57e47c2b21ee53 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 21:57:29 +0000 Subject: Moving keywords code into its own method. --- indra/newview/llpreviewscript.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 73ccaab0b8..bc0256703e 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,6 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); + bool initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 1cf2acf6d70c5ce68d6faedffbbf2b070f2a6fd7 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 22:47:34 +0000 Subject: Fixing some small discrepencies. --- indra/newview/llpreviewscript.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index bc0256703e..149c27461e 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); - bool initKeywords(); + void initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 377eb5561f885902585830226fd82c4ceeec4e05 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Mon, 11 Nov 2013 16:34:16 +0000 Subject: Renaming initKeywords to better reflect its intended use (onRegionChangeInitialiseKeywords) --- indra/newview/llpreviewscript.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 149c27461e..2dd5a1b6a7 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); - void initKeywords(); + void onRegionChangeInitialiseKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 76aa75974f25ffe3837fd5789a00e9dd194903e4 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 6 Mar 2014 13:24:52 +0000 Subject: storm-1831 Changes in postBuild to use onFileFetchedCallback --- indra/newview/llpreviewscript.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 2dd5a1b6a7..67a4ca52fa 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -79,6 +79,7 @@ public: void initMenu(); void onRegionChangeInitialiseKeywords(); + void onFileFetchedInitialiseKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 06bdcef531c79db7f6901e2c5f5f63b2f75ad4e5 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 9 Mar 2014 04:55:46 +0000 Subject: storm-1831 Fixing identificaton of label for highlighting. --- indra/newview/llpreviewscript.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 67a4ca52fa..0841c8188b 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -77,9 +77,12 @@ protected: public: ~LLScriptEdCore(); + void clearHighlights(); + void initialiseKeywords(); void initMenu(); - void onRegionChangeInitialiseKeywords(); - void onFileFetchedInitialiseKeywords(); + void processKeywords(); + void processLoaded(); + void updateKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); @@ -133,6 +136,8 @@ protected: void addHelpItemToHistory(const std::string& help_string); static void onErrorList(LLUICtrl*, void* user_data); + bool mLive; + private: std::string mSampleText; LLTextEditor* mEditor; @@ -155,6 +160,10 @@ private: LLSyntaxIdLSL mSyntaxIdLSL; LLScriptEdContainer* mContainer; // parent view + +public: + boost::signals2::connection mRegionChangedCallback; + }; class LLScriptEdContainer : public LLPreview @@ -163,6 +172,7 @@ class LLScriptEdContainer : public LLPreview public: LLScriptEdContainer(const LLSD& key); + LLScriptEdContainer(const LLSD& key, const bool live); protected: std::string getTmpFileName(); @@ -172,7 +182,7 @@ protected: LLScriptEdCore* mScriptEd; }; -// Used to view and edit a LSL from your inventory. +// Used to view and edit an LSL script from your inventory. class LLPreviewLSL : public LLScriptEdContainer { public: @@ -217,7 +227,7 @@ protected: }; -// Used to view and edit an LSL that is attached to an object. +// Used to view and edit an LSL script that is attached to an object. class LLLiveLSLEditor : public LLScriptEdContainer { friend class LLLiveLSLFile; -- cgit v1.2.3 From 8e53c5bfb0e9feffa0450b362f21f56036b9b75c Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Wed, 26 Mar 2014 20:31:05 +0000 Subject: storm-1831 Removing the callback after first region crossing. Prevents repeated callbacks after highlighting has been removed for live script. --- indra/newview/llpreviewscript.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 0841c8188b..dc4f828cf1 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -162,6 +162,7 @@ private: LLScriptEdContainer* mContainer; // parent view public: + boost::signals2::connection mFileFetchedCallback; boost::signals2::connection mRegionChangedCallback; }; -- cgit v1.2.3 From 8c39617c9ac469a8635d511142148ad5a38de836 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 12:52:07 -0600 Subject: Begin moving script editor portions of LLTextEditor to their own derived class. This should fix the run off segment bugs by not overriding LLTextBase::clearSegments() in LLTextEditor TODO: Move the rest of the script stuff out of LLTextEditor for simplicity sake --- indra/newview/llpreviewscript.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index dc4f828cf1..913303d57d 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -39,7 +39,7 @@ class LLLiveLSLFile; class LLMessageSystem; -class LLTextEditor; +class LLScriptEditor; class LLButton; class LLCheckBoxCtrl; class LLScrollListCtrl; @@ -140,7 +140,7 @@ protected: private: std::string mSampleText; - LLTextEditor* mEditor; + LLScriptEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); void (*mSearchReplaceCallback) (void* userdata); -- cgit v1.2.3 From 46627b4eb2218babbc94421f9b93c03e2951cc6c Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 23:20:33 -0600 Subject: Remove clearHighlights() --- indra/newview/llpreviewscript.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 913303d57d..3ac48ae9c4 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -77,7 +77,6 @@ protected: public: ~LLScriptEdCore(); - void clearHighlights(); void initialiseKeywords(); void initMenu(); void processKeywords(); -- cgit v1.2.3 From e8422e5bed6c593c8a26b533f33103911a1d3da6 Mon Sep 17 00:00:00 2001 From: Cinder Date: Tue, 6 May 2014 11:09:50 -0600 Subject: Let's get started: some code policy cleanup, reference arguments where we can, correct spelling --- indra/newview/llpreviewscript.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 3ac48ae9c4..966c149d3d 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -156,7 +156,6 @@ private: BOOL mEnableSave; BOOL mHasScriptData; LLLiveLSLFile* mLiveFile; - LLSyntaxIdLSL mSyntaxIdLSL; LLScriptEdContainer* mContainer; // parent view -- cgit v1.2.3 From 8501d6494bceeea962d7251d882ddc244a8daa7f Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 7 May 2014 19:58:56 -0600 Subject: Code policy --- indra/newview/llpreviewscript.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 966c149d3d..69a72325fc 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -77,7 +77,7 @@ protected: public: ~LLScriptEdCore(); - void initialiseKeywords(); + void initializeKeywords(); void initMenu(); void processKeywords(); void processLoaded(); -- cgit v1.2.3 From 6141aa44d0f2aa2662a536c9d3ce9312dd57bd99 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 12 May 2014 06:54:04 -0600 Subject: STORM-2027 - Fix syntax highlighting on subsequent opening of scripts. This could use more refactoring, but it fixes it. --- indra/newview/llpreviewscript.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 8b98b908e1..e19a87ec0a 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -72,6 +72,7 @@ protected: void (*save_callback)(void* userdata, BOOL close_after_save), void (*search_replace_callback)(void* userdata), void* userdata, + bool live, S32 bottom_pad = 0); // pad below bottom row of buttons public: ~LLScriptEdCore(); -- cgit v1.2.3 From 70aff2154b910afd9a8bdc14c72c4e058c8b1076 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 12 May 2014 07:23:52 -0600 Subject: Eliminate updateKeywords() --- indra/newview/llpreviewscript.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index e19a87ec0a..5aab3ed938 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -81,7 +81,6 @@ public: void initMenu(); void processKeywords(); void processLoaded(); - void updateKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 41f6c5ce4899b3ae57aefa564ee22ff84fa698ce Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 9 Jun 2014 15:14:09 -0600 Subject: Greatly simplify LLSyntaxIdLSL: * Move file fetched callback to the singleton and handle all syntax id changes within the singleton * Remove a fair number of bool checks and method relying more on callbacks to drive syntax changes. * Don't pretty print the cache file to conserve space and to speed up xml to llsd parsing * Clean up includes --- indra/newview/llpreviewscript.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llpreviewscript.h') diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 5aab3ed938..9ea191e928 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -159,8 +159,7 @@ private: LLScriptEdContainer* mContainer; // parent view public: - boost::signals2::connection mFileFetchedCallback; - boost::signals2::connection mRegionChangedCallback; + boost::signals2::connection mSyntaxIDConnection; }; -- cgit v1.2.3