5 Replies Latest reply on Dec 10, 2009 10:27 AM by Jason San Jose

    Code hinting with ctrl+spacebar

    santu_ohm

      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.

        • 1. Re: Code hinting with ctrl+spacebar
          martin.berg Level 1

          I happens too, for certain files it works for others

          • 2. Re: Code hinting with ctrl+spacebar
            Jason San Jose Adobe Employee

            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

            • 3. Re: Code hinting with ctrl+spacebar
              Khaye2728 Level 1

              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.
              • 4. Re: Code hinting with ctrl+spacebar
                martin.berg Level 1

                java.lang.NullPointerException
                    at com.adobe.flexbuilder.codemodel.internal.asdoc.ClassCommentRef.<init>(ClassCommentRef.jav a:36)
                    at com.adobe.flexbuilder.codemodel.internal.tree.ClassNode.getDynamicCommentRef(ClassNode.ja va:779)
                    at com.adobe.flexbuilder.codemodel.internal.tree.BaseDefinitionNode.getComment(BaseDefinitio nNode.java:334)
                    at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProposal.<init>(ActionScrip tCompletionProposal.java:151)
                    at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcessor.getTypeProposal(A ctionScriptCompletionProcessor.java:691)
                    at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcessor.createProposalsFr omDefinitions(ActionScriptCompletionProcessor.java:952)
                    at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcessor.createLocalPropos als(ActionScriptCompletionProcessor.java:786)
                    at com.adobe.flexide.as.core.contentassist.ActionScriptCompletionProcessor.computeCompletion Proposals(ActionScriptCompletionProcessor.java:1142)
                    at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentA ssistant.java:1836)
                    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionP roposalPopup.java:555)
                    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposal Popup.java:552)
                    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopu p.java:487)
                    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProp osalPopup.java:481)
                    at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssi stant.java:1664)
                    at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:807)
                    at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.ja va:1506)
                    at com.adobe.flexide.editorcore.editor.FlexSourceViewer.doOperation(FlexSourceViewer.java:17 6)
                    at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.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)

                • 5. Re: Code hinting with ctrl+spacebar
                  Jason San Jose Adobe Employee

                  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