SapphireSteel Forum
Welcome, Guest. Please login or register.
June 25, 2017, 02:52:22 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Sapphire and Amethyst IDEs
4074 Posts in 848 Topics by 708 Members
Latest Member: dcham_inbsys
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Amethyst
| | |-+  Intellisense / code completion issues
« previous next »
Pages: [1] Print
Author Topic: Intellisense / code completion issues  (Read 4256 times)
idleBishop
Newbie
*
Posts: 10


« on: August 20, 2014, 12:06:49 AM »

I'm running into a few issue with code completion, and I can't quite figure out how to fix it. I looked in several other threads, and the issues those threads cover seem to be different than mine. Sorry If I'm repeating anything that's already been covered. Here goes:



1) I noticed that when I try to utilize the code completion feature, code is often completed incorrectly. For example, if I type:

StageScaleMode.NO_

and press ctrl+space to invoke the completion window, I see StageScaleMode.NO_SCALE, which I select, and then I get:

StageScaleMode.NO_NO_SCALE instead of StageScaleMode.NO_SCALE. Is there a more correct way to invoke the code completion option?

2) intellisense doesn't seem to kick in for Vector objects. For example:

Code:
import starling.events.TouchEvent;

private function someTouchHandler(e:TouchEvent):void
{
    var touchGlobalX:int = e.touches[0].                <-- no intellisense pops up, and nothing happens if I press ctrl+space
}


Even though e.touches is defined as a Vector of Touch objects, I get nothing.

3) Is there some trick to getting imports to be automatically included? I often type something like

Code:
var someObj:CustomCla

Where CustomClass is a class defined in my project in some other package. Sometimes I get the option to choose "CustomClass" and when I do get the option, I choose it and sometimes the import of CustomClass does not appear. Is there a setting that controls this, or is there some bug happening?

4) Is there some sort of delay baked into when ctrl+space invokes the auto-complete options? it seems like it takes well over half a second for the dialog to appear, but I haven't timed it precisely. It would be great to be able to make that faster if possible.
« Last Edit: August 20, 2014, 12:08:27 AM by idleBishop » Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #1 on: August 21, 2014, 02:49:04 AM »

We'll look at these and get back to you with a more detailed response shortly.

Dermot
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #2 on: August 22, 2014, 08:19:37 AM »

We've done some more investigation ...

1) Yes, this is a bug. If you type StageScaleMode. and wait for the dropdown, it will work. If you type StageScaleMode.NO_, it doesn't recognize that the NO_ is already there.

2) The Intellisense should be smarter here. We'll fix that.

3) You should get imports generated automatically if the setting 'Generate import statements' is set to true in Tools | Options | Text Editor | Amethyst | IntelliSense is set.
If I comment out the Events import
Code:
//import flash.events.Event;
and then type (in a function)
Code:
var z:Event;
I get an import statement generated. If you are not getting an import statement generated, it means that (I think) IntelliSense doesn't know about your class. Check in the dropdown after the ':'. If your class is there, then you should get an import.

4) This is quite interesting. I hadn't noticed this before, but there is a delay if you look for it. I put some timing code in and measured the delay to be between 400 to 600ms, that is, as you say, about half a second. This is just about on the verge of being noticable, but it is there. I tracked this down to an idle loop parameter which is hardcoded to 1000ms, Setting this to 50ms reduced the delay to less than 100ms - and it is snappier. I don't think that you tell the difference between 100ms and 250ms, but there's definitely a difference between 100ms and 500ms. The loop delay is hardcoded, but we will reduce it to 50ms in the next release.

We're currently working on the next point upgrade (Amethyst 2.2) that supports VS2013 update 3 and various Android/Adobe updates which should be ready in the next couple of weeks and we'll include bugs you've reported.

Dermot
Logged
idleBishop
Newbie
*
Posts: 10


« Reply #3 on: August 22, 2014, 11:37:33 AM »

Awesome! Thank you so much for looking into all these items and following up with the details. I'll keep working with the tool and let you know if I run into any other questions/comments.
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1068


« Reply #4 on: September 02, 2014, 11:24:46 AM »

New versions of Amethyst fixing (hopefully) the Vector IntelliSense problem and supporting the latest AIR versions ...


Amethyst 2.2.0.1622 is now available for download

The Visual Studio 2010 version is http://www.sapphiresteel.com/downloads/amethyst_VS2010_2_2_0_1622.zip

The Visual Studio 2012 version is http://www.sapphiresteel.com/downloads/amethyst_VS2012_2_2_0_1622.zip

The Visual Studio 2013 version is http://www.sapphiresteel.com/downloads/amethyst_VS2013_2_2_0_1622.zip

Dermot
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!