Skip navigation
Currently Being Moderated

Code hinting with ctrl+spacebar

Dec 9, 2009 11:59 PM

I am currently testing Flash builder 4 beta 2 and what I am facing right now is code hinting that comes with pressing ctrl+spacebar.This feature is sometime shown by my Flash builder but sometime it doesn't show anything

What I am trying to say is that say I launched Flash builder now and it is showing the code hinting with press of ctrl+spacebar.Now I close the flash builder and again relaunch it ,then the same code hinting doesn't show at all even if I press ctrl+spacebar.

Any user facing this situation.

 
Replies
  • Currently Being Moderated
    Dec 10, 2009 3:27 AM   in reply to santu_ohm

    I happens too, for certain files it works for others

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2009 10:01 AM   in reply to martin.berg

    Do you see an error dialog or anything in your workspace log? <workspace location>/.metadata/.log

     

    There is a intermittent known bug in Beta 2 https://bugs.adobe.com/jira/browse/FB-21566 that you may be seeing.

     

    Jason San Jose

    Quality Engineer, Flash Builder

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2009 10:09 AM   in reply to santu_ohm

    Code hints improvements

    Code hints are one of the most frequently used features of any IDE. In this release, we've made several subtle changes to how code hints work to improve usability and productivity.

    More information in code hints

    The proposals in the code hints popup now display more descriptive information.

    • In ActionScript and MXML, types and tag names respectively show the packages they reside in; for example, "UIComponent - mx.core".
    • Properties show their type and the class where they are declared; for example, "name : String - MyClass".
    • When present, ASDoc comments are shown in a tooltip.
    • ActionScript hints are now grouped by properties, then by functions.
    • When namespaces are open (for example via use namespace mx_internal or this.mx_internal::...) code hints will show proposals for definitions in those namespaces.

    Proposal cycling

    Sometimes while writing MXML, you just want to see the list of available properties of a particular kind. For example, you would like to see all effects supported on s:Button. This kind of filtering behavior is now possible with proposal cycling in MXML.

    To see this in action, open the code hints popup and press Ctrl+Space again after the popup is open (see Figure 3). By default, the next cycle you will see is All Properties (or Properties if you happen to be in an attribute scope). The name of the current cycle is displayed at the bottom of the popup. If you continue pressing Ctrl+Space until you see Effects, then code hints will shown only effects properties.

    Proposal cycling for code hints.

    Figure 3. Proposal cycling for code hints.

    By default, the cycle order is as follows:

    1. All (appears only for tag scopes)
    2. All Properties
    3. Properties
    4. Events
    5. Effects
    6. Styles

    You can reorder or turn off proposal cycling by opening the Preferences dialog and selecting Flash Builder > Editors > MXML Code > Advanced.

    Code hints recommendations

    To help with the transition from MX to Spark components, MXML code hint proposals now indicate when a component has been replaced with an alternative. If you trigger code hints for a component that has a replacement in Spark (for example, mx:Button), code hints will display “use s:Button instead” (see Figure 4). Also, “s:Button” will appear below the proposals for mx:Button.

    MX-to-Spark recommendations included in code hints.

    Figure 4. MX-to-Spark recommendations included in code hints.

    In an SDK 4 MXML file, if you look for hints on a component that doesn’t exist, the code hints will propose valid alternatives. For example, if you look for s:HBox, code hints will propose both s:HGroup and mx:HBox as potential matches (see Figure 5).

    Potential matches for s:Hbox.

    Figure 5. Potential matches for s:Hbox.

    Camel case support

    The Flex SDK naming conventions use a camel case pattern for nearly all identifiers. Flash Builder 4 beta 2 uses the capital letters that denote word boundaries to accelerate code hinting (see Figure 6).

    Camel case support for code hints (after typing “SkC”).

    Figure 6. Camel case support for code hints (after typing “SkC”).

    For example, instead of typing mx:AdvancedDataG to see all tags that start mx:AdvancedDataGrid, you can simply type ADG and the code hint proposals will be filtered as you would expect. The same applies to properties and attributes. For example, from a UIComponent, type eMin to show explicitMinimumHeight and explicitMinimumWidth. Note that each segment is matched from the beginning.

    Camel case support is available in the ActionScript and MXML editors as well as the Open Type dialog (Ctrl+Shift+T).

    Language and Flex SDK Features

    Several ActionScript and MXML language features are newly supported in code hints:

    • Full Vector support in ActionScript and MXML
      The Vector base type declaration displays class and interface names in code hints. Also, code hinting for methods and array access to vectors shows the correct strong type.
    • MXML 2009 library tag definitions
      Definitions declared within an MXML 2009 document are available in code hints as if they were a normal MXML component. Definitions also support rename refactoring.
    • FXG Support
      FXG components are hinted just like any other component. They support rename and move refactoring and show up in the Open Type dialog just like a normal class.
    • Metadata references to types
      ActionScript metadata tags such as [Event], [HostComponent], and so on have an attribute that specifies a fully qualified type name. These references are now recognized and support features you would expect for a type reference, including go to definition, mark occurrences, and rename and move refactoring.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2009 10:16 AM   in reply to Khaye2728

    java.lang.NullPointerException
        at com.adobe.flexbuilder.codemodel.internal.asdoc.ClassCommentRef.<init> (ClassCommentRef.java:36)
        at com.adobe.flexbuilder.codemodel.internal.tree.ClassNode.getDynamicCom mentRef(ClassNode.java:779)
        at com.adobe.flexbuilder.codemodel.internal.tree.BaseDefinitionNode.getC omment(BaseDefinitionNode.java:334)
        at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProposa l.<init>(ActionScriptCompletionProposal.java:151)
        at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcess or.getTypeProposal(ActionScriptCompletionProcessor.java:691)
        at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcess or.createProposalsFromDefinitions(ActionScriptCompletionProcessor.java :952)
        at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcess or.createLocalProposals(ActionScriptCompletionProcessor.java:786)
        at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcess or.computeCompletionProposals(ActionScriptCompletionProcessor.java:114 2)
        at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompleti onProposals(ContentAssistant.java:1836)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeP roposals(CompletionProposalPopup.java:555)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$1 6(CompletionProposalPopup.java:552)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(Co mpletionProposalPopup.java:487)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProp osals(CompletionProposalPopup.java:481)
        at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCom pletions(ContentAssistant.java:1664)
        at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.j ava:807)
        at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation (ProjectionViewer.java:1506)
        at com.adobe.flexide.editorcore.editor.FlexSourceViewer.doOperation(Flex SourceViewer.java:176)
        at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationActi on.java:131)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction .java:129)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2009 10:27 AM   in reply to martin.berg

    Thanks. That stack is the same as FB-21566. For Beta 2, please follow the workaround in the bug.

     

    Jason San Jose

    Quality Engineer, Flash Builder

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points