Package org.openquark.gems.client.IntellicutListModelAdapter

Examples of org.openquark.gems.client.IntellicutListModelAdapter.IntellicutListEntry


            if (e.getSource() == connectGem) {
                connectSelectedGem();
           
            } else if (e.getSource() == viewProperties) {
               
                IntellicutListEntry item = (IntellicutListEntry) intellicutPanel.getIntellicutList().getSelectedValue();
               
                if (item.getData() instanceof GemEntity) {
                    GemEntity gemEntity = (GemEntity) item.getData();
                    gemCutter.getNavigatorOwner().displayMetadata(gemEntity, true);
                }               
            }
        }
View Full Code Here


        intellicutPanel.setBorder(null);
        intellicutPanel.setMoveable(false);
       
        // Select the correct item in the list.
        GemEntity gemEntity = (GemEntity) getValueNode().getValue();
        IntellicutListEntry listEntry = adapter.getListEntryForData(gemEntity);
       
        if (listEntry != null) {
            intellicutPanel.getIntellicutList().setSelectedValue(listEntry, true);
        } else {
            intellicutPanel.getIntellicutList().clearSelection();
View Full Code Here

    }
   
    @Override
    public void commitValue() {
       
        IntellicutListEntry listEntry = (IntellicutListEntry) intellicutPanel.getIntellicutList().getSelectedValue();

        if (listEntry != null) {
           
            GemEntity gemEntity = (GemEntity) listEntry.getData();
            ModuleTypeInfo currentModuleInfo = valueEditorManager.getPerspective().getWorkingModuleTypeInfo();
            TypeExpr valueNodeType = getValueNode().getTypeExpr();
            TypeExpr functionType = gemEntity.getTypeExpr();
            TypeExpr unifiedType;
           
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected void commitValue() {

        IntellicutListEntry listEntry = (IntellicutListEntry) intellicutPanel.getIntellicutList().getSelectedValue();
       
        if (listEntry != null) {
       
            // Note: For TypeExpr which contains uninstantiated TypeVars, we must 'duplicate' them somehow.
            TypeExpr instanceTypeExpr = ((TypeExpr) listEntry.getData()).copyTypeExpr();
            ValueNode replacement = getOwnerValueNode().transmuteValueNode(valueEditorManager.getValueNodeBuilderHelper(), valueEditorManager.getValueNodeTransformer(), instanceTypeExpr);
   
            // Get the TypeVar that we are instantiating.
            replaceValueNode(replacement, true);

View Full Code Here

            if (isPopupVisible()) {

                // Set the text to the text of the selected item.
                if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                   
                    IntellicutListEntry selected = (IntellicutListEntry) getSelectedItem();
                   
                    if (selected != null) {
                        JTextField textField = (JTextField) getEditor().getEditorComponent();
                        textField.setText(selected.getDisplayString());
                        hidePopup();
                    }
                   
                    return;
                }
View Full Code Here

       
        if (index == -1) {
            return null;
        }
       
        IntellicutListEntry listEntry = (IntellicutListEntry) getModel().getElementAt(index);
       
        if (listEntry == null) {
            return null;
        }
View Full Code Here

    /**
     * Completes the steps necessary to properly close the CodeGemPanel autocomplete popup
     */
    void closeAutoCompletePopup() {
        // when the panel is closed, then we want to complete the proper user actions
        IntellicutListEntry selected = autoCompletePopup.getSelected();
        JTextComponent calEditor = editor.getEditorComponent();
       
        // Close before doing anything else, so that the ui doesn't try to update the popup appearance for any string insertion.
        autoCompletePopup.setVisible(false);          
       
        // if the user commited, then 'selected' is not null
       
        if (selected != null) {
            String insertion = selected.getSourceText();
            int userInputLength = autoCompletePopup.getUserInputQualifiedNameLength();
           
            // removes the user's portion of the to-be completed work to fix case errors
            // eg. User types "Hou", then hit Ctrl-Space. Then we replace "Hou" with "hour"
            editor.insertAutoCompleteString(userInputLength, insertion);
View Full Code Here

     */
    IntellicutInfo getIntellicutInfo(GemEntity gemEntity) {
       
        if (intellicutMode != IntellicutMode.NOTHING) {
            IntellicutListModel listModel = intellicutPanel.getIntellicutListModel();
            IntellicutListEntry listEntry = listModel.getAdapter().getListEntryForData(gemEntity);
           
            if (listEntry != null) {
                return listEntry.getIntellicutInfo();
            } else {
                return new IntellicutInfo(AutoburnUnifyStatus.NOT_POSSIBLE, -1, -1);
            }
        }

View Full Code Here

TOP

Related Classes of org.openquark.gems.client.IntellicutListModelAdapter.IntellicutListEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.