Package com.dci.intellij.dbn.language.common.navigation

Examples of com.dci.intellij.dbn.language.common.navigation.NavigateToSpecificationAction


                                                identifierPsiElement.getObjectType());

                            if (targetElement != null) {
                                NavigationAction navigationAction = targetContentType == DBContentType.CODE_BODY ?
                                        new NavigateToDefinitionAction(null, targetElement, objectType) :
                                        new NavigateToSpecificationAction(null, targetElement, objectType);
                                Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
                                NavigationGutterRenderer gutterIconRenderer = new NavigationGutterRenderer(navigationAction, GutterIconRenderer.Alignment.RIGHT);
                                annotation.setGutterIconRenderer(gutterIconRenderer);
                            }
                            NavigateToObjectAction navigateToObjectAction = new NavigateToObjectAction(identifierPsiElement.resolveUnderlyingObject(), objectType);
                            Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
                            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);
                            annotation.setGutterIconRenderer(new NavigationGutterRenderer(navigationAction, GutterIconRenderer.Alignment.RIGHT));
                        }
                        NavigateToObjectAction navigateToObjectAction = new NavigateToObjectAction(identifierPsiElement.resolveUnderlyingObject(), objectType);
                        Annotation annotation = holder.createInfoAnnotation(basePsiElement, null);
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.language.common.navigation.NavigateToSpecificationAction

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.