Examples of DBSchema


Examples of com.dci.intellij.dbn.object.DBSchema

                    public void run() {
                        textEditor.getEditor().getDocument().setText(content);
                        SQLConsoleEditorState.super.applyToEditor(textEditor);
                        SQLConsoleFile file = (SQLConsoleFile) DocumentUtil.getVirtualFile(textEditor.getEditor());
                        if (currentSchema != null) {
                            DBSchema schema = file.getConnectionHandler().getObjectBundle().getSchema(currentSchema);
                            if (schema != null) file.setCurrentSchema(schema);
                        }
                    }
                }.start();
            }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

                    ref.setReferencedElement(referencedElement);
                    setElementType(substitutionCandidate);
                    return;
                }

                DBSchema schema = getCurrentSchema();
                if (schema != null && objectType.isSchemaObject()) {
                    referencedElement = schema.getChildObject(objectType, ref.getText().toString(), false);
                    if (isValidReference(referencedElement)) {
                        ref.setParent(null);
                        ref.setReferencedElement(referencedElement);
                        setElementType(substitutionCandidate);
                        return;
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        connectionLabel.setIcon(connectionHandler.getIcon());
        schemasList.setCellRenderer(new ObjectListCellRenderer());

        Project project = connectionHandler.getProject();
        FileConnectionMappingManager connectionMappingManager = FileConnectionMappingManager.getInstance(project);
        DBSchema currentSchema = connectionMappingManager.getCurrentSchema(virtualFile);

        List<DBSchema> schemas = connectionHandler.getObjectBundle().getSchemas();
        DefaultListModel model = new DefaultListModel();

        for (DBSchema schema : schemas) {
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        String typeOwner = resultSet.getString("DATA_TYPE_OWNER");
        String typePackage = resultSet.getString("DATA_TYPE_PACKAGE");
        String dataTypeName = resultSet.getString("DATA_TYPE_NAME");
        DBObjectBundle objectBundle = parent.getConnectionHandler().getObjectBundle();
        if (typeOwner != null) {
            DBSchema typeSchema = objectBundle.getSchema(typeOwner);
            if (typePackage != null) {
                DBPackage packagee = typeSchema.getPackage(typePackage);
                declaredType = packagee.getType(dataTypeName);
            } else {
                declaredType = typeSchema.getType(dataTypeName);
            }
            if (declaredType == null) typeName = dataTypeName;
        } else {
            nativeDataType = objectBundle.getNativeDataType(dataTypeName);
            if (nativeDataType == null) typeName = dataTypeName;
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        return selectConnectionForm.getConnectionsList();
    }

    protected void doOKAction() {
        ConnectionHandler activeConnection = selectConnectionForm.getSelectedConnection();
        DBSchema currentSchema = selectConnectionForm.getSelectedSchema();
        file.setActiveConnection(activeConnection);
        file.setCurrentSchema(currentSchema);
        Editor editor = EditorUtil.getSelectedEditor(file.getProject());
        DocumentUtil.touchDocument(editor);
        super.doOKAction();
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

    public JComponent getPreferredFocusedComponent() {
        return selectCurrentSchemaForm.getSchemasList();
    }

    protected void doOKAction() {
        DBSchema currentSchema = selectCurrentSchemaForm.getSelectedSchema();
        file.setCurrentSchema(currentSchema);
        super.doOKAction();
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

            DBObjectBundle objectBundle = connectionHandler.getObjectBundle();
            if (sourceElement.getParent() instanceof QualifiedIdentifierPsiElement && sourceElement.getParent().getFirstChild() != sourceElement) {
                QualifiedIdentifierPsiElement qualifiedIdentifierPsiElement = (QualifiedIdentifierPsiElement) sourceElement.getOriginalElement().getParent();
                DBObject parentObject = qualifiedIdentifierPsiElement.lookupParentObjectFor(identifierElementType);
                if (parentObject != null) {
                    DBSchema currentSchema = PsiUtil.getCurrentSchema(sourceScope);
                    objectBundle.lookupChildObjectsOfType(
                            consumer,
                            parentObject,
                            objectType,
                            filter,
                            currentSchema);

                }
            } else if (!identifierElementType.isLocalReference()){
                Set<DBObject> parentObjects = LeafPsiElement.identifyPotentialParentObjects(objectType, filter, sourceScope, null);
                if (parentObjects != null && parentObjects.size() > 0) {
                    for (DBObject parentObject : parentObjects) {
                        DBSchema currentSchema = PsiUtil.getCurrentSchema(sourceScope);
                        objectBundle.lookupChildObjectsOfType(
                                consumer,
                                parentObject.getUndisposedElement(),
                                objectType,
                                filter,
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

public class SetExecutionSchemaComboBoxAction extends ComboBoxAction {
    private MethodExecutionInput executionInput;

    public SetExecutionSchemaComboBoxAction(MethodExecutionInput executionInput) {
        this.executionInput = executionInput;
        DBSchema schema = executionInput.getExecutionSchema();
        if (schema != null) {
            Presentation presentation = getTemplatePresentation();
            presentation.setText(NamingUtil.enhanceUnderscoresForDisplay(schema.getName()));
            presentation.setIcon(schema.getIcon());
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        }
        return actionGroup;
    }

    public void update(AnActionEvent e) {
        DBSchema schema = executionInput.getExecutionSchema();
        Presentation presentation = e.getPresentation();
        presentation.setText(NamingUtil.enhanceUnderscoresForDisplay(schema.getName()));
        presentation.setIcon(schema.getIcon());

    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        }
    }

    private boolean selectConnection(DBLanguageFile file) {
        ConnectionHandler activeConnection = file.getActiveConnection();
        DBSchema currentSchema = file.getCurrentSchema();
        if (activeConnection == null || currentSchema == null || activeConnection.isVirtual()) {
            String message =
                    activeConnection == null ?
                            "The file is not linked to any connection.\n" +
                            "To continue with the statement execution please select a target connection." :
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.