You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/01/25 08:58:39 UTC

[royale-asjs] branch develop updated: Added a few Jewel Inspectable tags

This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3877171  Added a few Jewel Inspectable tags
3877171 is described below

commit 3877171715b2843add477264f07dba7f328f5ce8
Author: Harbs <ha...@in-tools.com>
AuthorDate: Fri Jan 25 10:58:28 2019 +0200

    Added a few Jewel Inspectable tags
---
 .../src/main/royale/org/apache/royale/jewel/Button.as    |  1 +
 .../apache/royale/jewel/beads/controls/SizeControl.as    |  5 +++--
 .../org/apache/royale/jewel/beads/controls/TextAlign.as  | 16 +++++++++-------
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
index 87ecdf5..f74f257 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
@@ -253,6 +253,7 @@ package org.apache.royale.jewel
             return _emphasis;
         }
 
+        [Inspectable(category="General", enumeration="primary,secondary,emphasized")]
         public function set emphasis(value:String):void
         {
             if (_emphasis != value)
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as
index ef09fbf..09b2bd7 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as
@@ -67,8 +67,9 @@ package org.apache.royale.jewel.beads.controls
             return _size;
         }
 
-        public function set size(value:String):void
-        {
+		[Inspectable(category="General", enumeration="xsmall,small,large,xlarge")]
+		public function set size(value:String):void
+		{
 			COMPILE::JS
             {
 				_oldSize = _size;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as
index 486cc7b..4589742 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as
@@ -62,19 +62,21 @@ package org.apache.royale.jewel.beads.controls
 		 *  @playerversion AIR 2.6
 		 *  @productversion Royale 0.9.4
 		 */
-        public function get align():String
-        {
-            return _align;
-        }
-        public function set align(value:String):void
-        {
+		public function get align():String
+		{
+				return _align;
+		}
+
+    [Inspectable(category="General", enumeration="left,right,center", defaultValue="left")]
+		public function set align(value:String):void
+		{
 			if(_align !== value)
             {
 				oldValue = _align;
 				_align = value;
                 updateHost();
 			}
-        }
+		}
 
 		private var _strand:IStrand;
 		


Re: [royale-asjs] branch develop updated: Added a few Jewel Inspectable tags

Posted by Harbs <ha...@gmail.com>.
Carlos,

VS Code supports code intelligence for setters which have [Inspectable] tags on them. I just added a few in places that I saw. You might want to add more tags where appropriate.

FWIW, I don’t think “category” really does anything outside Flash Builder Design View, but maybe one day we could make categories useful again.

I’m not sure that defaultValue, minValue and maxValue currently do anything either, but I’m hoping Josh can make them useful as well and it’s probably a good idea to add those when appropriate.

Thanks,
Harbs

> On Jan 25, 2019, at 10:58 AM, harbs@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> harbs pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> 
> The following commit(s) were added to refs/heads/develop by this push:
>     new 3877171  Added a few Jewel Inspectable tags
> 3877171 is described below
> 
> commit 3877171715b2843add477264f07dba7f328f5ce8
> Author: Harbs <ha...@in-tools.com>
> AuthorDate: Fri Jan 25 10:58:28 2019 +0200
> 
>    Added a few Jewel Inspectable tags
> ---
> .../src/main/royale/org/apache/royale/jewel/Button.as    |  1 +
> .../apache/royale/jewel/beads/controls/SizeControl.as    |  5 +++--
> .../org/apache/royale/jewel/beads/controls/TextAlign.as  | 16 +++++++++-------
> 3 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
> index 87ecdf5..f74f257 100644
> --- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
> +++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Button.as
> @@ -253,6 +253,7 @@ package org.apache.royale.jewel
>             return _emphasis;
>         }
> 
> +        [Inspectable(category="General", enumeration="primary,secondary,emphasized")]
>         public function set emphasis(value:String):void
>         {
>             if (_emphasis != value)
> diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as
> index ef09fbf..09b2bd7 100644
> --- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as
> +++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/SizeControl.as
> @@ -67,8 +67,9 @@ package org.apache.royale.jewel.beads.controls
>             return _size;
>         }
> 
> -        public function set size(value:String):void
> -        {
> +		[Inspectable(category="General", enumeration="xsmall,small,large,xlarge")]
> +		public function set size(value:String):void
> +		{
> 			COMPILE::JS
>             {
> 				_oldSize = _size;
> diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as
> index 486cc7b..4589742 100644
> --- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as
> +++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/TextAlign.as
> @@ -62,19 +62,21 @@ package org.apache.royale.jewel.beads.controls
> 		 *  @playerversion AIR 2.6
> 		 *  @productversion Royale 0.9.4
> 		 */
> -        public function get align():String
> -        {
> -            return _align;
> -        }
> -        public function set align(value:String):void
> -        {
> +		public function get align():String
> +		{
> +				return _align;
> +		}
> +
> +    [Inspectable(category="General", enumeration="left,right,center", defaultValue="left")]
> +		public function set align(value:String):void
> +		{
> 			if(_align !== value)
>             {
> 				oldValue = _align;
> 				_align = value;
>                 updateHost();
> 			}
> -        }
> +		}
> 
> 		private var _strand:IStrand;
> 		
>