You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Nicolas Granon <ng...@online.fr> on 2017/11/01 21:22:06 UTC

About code-assist in FlashBuilder

As said before, getting full code-assist (along with goto definition) with
Apache Royale SDK 0.9 implies, at this time, to manually add source code
path in "build path" panel.

However, after rather extensive search, it seems that FB *should* build
automatically all that is needed regarding code-assist, with the help of the
"code model" java packages. See
https://help.adobe.com/en_US/flashbuilder/extensibility/.

I am pretty sure that some undocumented properties in SWCs allow for "auto
discovery". You will notice that *all* source code from the Flex SDK is in
fact part of the Flex SDK SWCs (some of them are password protected like
playerglobal.swc preventing them to be exposed to code assist).
I suspect that the "enable debugger2 tag" (reserved value = 6517) plays some
role, and maybe also  the "debugId" and "product info" tags.

If anyone has info about how codemodel "decides" to include - or not - a SWC
in its analysis, that would be a great bonus.

HTH

Nicolas Granon



--



Re: About code-assist in FlashBuilder

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Nicolas,

I had to get finish up the compiler refactor before debugging further into
this.

Turns out that "goto definition" requires source attachments and source
attachments are special-cased by FB for the existing Flex SWC names.  I'd
been told that was the case and finally found the source code for it.
There is no way to make it auto-discover Royale SWCs without patching FB.
However, I did discover that it appears that we can extend the "Convert"
launch scripts to automatically inject the source attachments into each
project.  I just pushed changes for that.

I also found that FB has its own embedded compiler for code model.  It
does not use the compiler in the SDK.  That means that there is no way to
get new compiler options to work as "additional compiler options" without
patching FB.  However, for me, a <projectname>-config.xml file did work.
CodeModel's compiler did not look for it, and the Royale compiler saw it
and I was able to get JS output in another folder.

Thanks,
-Alex

On 11/1/17, 2:22 PM, "Nicolas Granon" <ng...@online.fr> wrote:

>As said before, getting full code-assist (along with goto definition) with
>Apache Royale SDK 0.9 implies, at this time, to manually add source code
>path in "build path" panel.
>
>However, after rather extensive search, it seems that FB *should* build
>automatically all that is needed regarding code-assist, with the help of
>the
>"code model" java packages. See
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhelp.adob
>e.com%2Fen_US%2Fflashbuilder%2Fextensibility%2F&data=02%7C01%7C%7C0e323ec4
>92f94610099408d5217202ad%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364
>51695913044828&sdata=%2BYN%2FwjrooqbEdUV3TgLWsu7oXezqQEMeNP3PdKFFK3w%3D&re
>served=0.
>
>I am pretty sure that some undocumented properties in SWCs allow for "auto
>discovery". You will notice that *all* source code from the Flex SDK is in
>fact part of the Flex SDK SWCs (some of them are password protected like
>playerglobal.swc preventing them to be exposed to code assist).
>I suspect that the "enable debugger2 tag" (reserved value = 6517) plays
>some
>role, and maybe also  the "debugId" and "product info" tags.
>
>If anyone has info about how codemodel "decides" to include - or not - a
>SWC
>in its analysis, that would be a great bonus.
>
>HTH
>
>Nicolas Granon
>
>
>
>--
>
>