Package com.dci.intellij.dbn.editor.code

Examples of com.dci.intellij.dbn.editor.code.SourceCodeManager


                            annotation.setGutterIconRenderer(new NavigationGutterRenderer(navigateToObjectAction, GutterIconRenderer.Alignment.LEFT));


                        }
                    } else if (object.getContentType() == DBContentType.CODE_SPEC_AND_BODY) {
                        SourceCodeManager codeEditorManager = SourceCodeManager.getInstance(object.getProject());


                        BasePsiElement targetElement = codeEditorManager.getObjectNavigationElement(object, targetContentType, identifierPsiElement.getObjectType(), identifierPsiElement.getChars());
                        if (targetElement != null) {
                            NavigationAction navigationAction = targetContentType == DBContentType.CODE_BODY ?
                                    new NavigateToDefinitionAction(object, targetElement, objectType) :
                                    new NavigateToSpecificationAction(object, targetElement, objectType);
                            Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
View Full Code Here


        navigate();
    }

    public void navigate() {
        if (parentObject != null) {
            SourceCodeManager codeEditorManager = SourceCodeManager.getInstance(parentObject.getProject());
            codeEditorManager.navigateToObject((DBSchemaObject) parentObject, navigationElement);
        } else {
            navigationElement.navigate(true);
        }
    }
View Full Code Here

        if (object != null) {
            hashCode = (object.getQualifiedNameWithConnectionId() + contentType.getDescription()).hashCode();
            updateChangeTimestamp();
            setCharset(databaseFile.getConnectionHandler().getSettings().getDetailSettings().getCharset());
            try {
                SourceCodeManager sourceCodeManager = SourceCodeManager.getInstance(getProject());
                SourceCodeContent sourceCodeContent = sourceCodeManager.loadSourceFromDatabase(object, contentType);
                content = sourceCodeContent.getSourceCode();
                offsets = sourceCodeContent.getOffsets();
                sourceLoadError = null;
            } catch (SQLException e) {
                content = "";
View Full Code Here

            updateChangeTimestamp();
            originalContent = null;

            DBSchemaObject object = getObject();
            if (object != null) {
                SourceCodeManager sourceCodeManager = SourceCodeManager.getInstance(getProject());
                SourceCodeContent sourceCodeContent = sourceCodeManager.loadSourceFromDatabase(object, contentType);
                content = sourceCodeContent.getSourceCode();
                offsets = sourceCodeContent.getOffsets();

                getDatabaseFile().updateDDLFiles(getContentType());
                setModified(false);
View Full Code Here

                        String content = editor.getDocument().getText();
                        virtualFile.setContent(content);
                        DBSchemaObject object = virtualFile.getObject();
                        if (object != null) {
                            try {
                                SourceCodeManager sourceCodeManager = SourceCodeManager.getInstance(project);
                                String referenceText = sourceCodeManager.loadSourceCodeFromDatabase(object, virtualFile.getContentType());
                                if (!progressIndicator.isCanceled()) {
                                    openDiffWindow(e, referenceText, "Database version", "Local version vs. database version");
                                }

                            } catch (SQLException e1) {
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.editor.code.SourceCodeManager

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.