Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Help understanding/using code completion
germobirt
Hi,<br />
<br />
using Birt 2.6.2 with the RCP GUI, I don't understand the code completion mechanism.<br />
<br />
If I start with "this." or "reportContext." a popup is shown with the available methods.<br />
But it ends after only a few methods.<br />
<br />
e.g.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>this.getReport().getGrid()</pre>
<br />
is suggested, but not what is possible from here on as e.g.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>.getRows().getCount()</pre>
<br />
And if I assign something to a var, no code completion is shown at all.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var grid = reportContext.getDesignHandle().findElement("myGrid");</pre>
<br />
After entering <strong class='bbc'>"grid."</strong> no code completion starts<br />
<br />
Is this working as expected or do I've to configure/define anything special?<br />
<br />
<br />
regards
Find more posts tagged with
Comments
CBR
Hi,
unfortunately it is working as expected. The code completion really sucks and is by far not comparable to what you might know from Java. This is not because the birt developers don't know how to develop a good editor, it is because Rhino is using duck typing. Java for example uses static and strong typing, therefore a IDE always got type information and therefore can enable the user to do code completion, syntax highlighting, refactoring and so on. I never saw an IDE for a duck typed programming language that got a working code completion.
That's also the reason why i prefer to develop complex logic in java instead of Rhino.
The reason why you do not get code completion in last example:
var grid = ...
grid. ??
is because the IDE has no chance to know of what type your variable grid is.
The code completion you get is the only thing the IDE can be sure about. This always relates to the element you are refering (therefore IDE knows of what type it is) and also the method of reportContext because these are developed in java and can be called from within Rhino.