Package com.dci.intellij.dbn.object.common

Examples of com.dci.intellij.dbn.object.common.DBObject


    /*********************************************************
     *                        PsiFile                        *
     *********************************************************/
    @NotNull
    public VirtualFile getVirtualFile() {
        DBObject object = getObject();
        return object == null ? NullVirtualFile.INSTANCE : object.getVirtualFile();
    }
View Full Code Here


    @Override
    public int hashCode() {
        GenericDatabaseElement parent = objectList.getParent();
        if (parent instanceof DBObject) {
            DBObject object = (DBObject) parent;
            String qualifiedName = object.getQualifiedNameWithType() + "." + getName();
            return qualifiedName.hashCode();
        }

        if (parent instanceof DBObjectBundle) {
            DBObjectBundle objectBundle = (DBObjectBundle) parent;
View Full Code Here

    @Nullable
    public VirtualFile getParent() {
        GenericDatabaseElement parent = objectList.getParent();
        if (parent instanceof DBObject) {
            DBObject parentObject = (DBObject) parent;
            return NavigationPsiCache.getPsiDirectory(parentObject).getVirtualFile();
        }

        if (parent instanceof DBObjectBundle) {
            DBObjectBundle objectBundle = (DBObjectBundle) parent;
View Full Code Here

    protected PsiFile getPsiInner(@NotNull Language language) {
        if (language instanceof DBLanguage) {
            VirtualFile virtualFile = getVirtualFile();
            if (virtualFile instanceof DatabaseObjectFile) {
                DatabaseObjectFile objectFile = (DatabaseObjectFile) virtualFile;
                DBObject object = objectFile.getObject();
                return NavigationPsiCache.getPsiFile(object);
            }

            DBLanguage baseLanguage = (DBLanguage) getBaseLanguage();
            PsiFile psiFile = super.getPsiInner(baseLanguage);
View Full Code Here

        if (objects != null) {
            for (int i=0; i<length; i++) {
                if (i == objects.size()) {
                    return;
                }
                DBObject object = objects.get(i);
                add(new NavigateToObjectAction(parentObject, object));
            }
            if (!showFullList && objects.size() > MAX_ITEMS) {
                add(new ObjectNavigationListShowAllAction(parentObject, navigationList));
            }
View Full Code Here

        return cancelled || !ApplicationManager.getApplication().isActive();
    }

    public String getElementName(Object element) {
        if (element instanceof DBObject) {
            DBObject object = (DBObject) element;
            return object.getQualifiedName();
        }

        return element == null ? null : element.toString();
    }
View Full Code Here

        public void visitObjectList(DBObjectList<DBObject> objectList) {
            if (isListScannable(objectList) && isParentRelationValid(objectList)) {
                DBObjectType objectType = objectList.getObjectType();
                if (isLookupEnabled(objectType)) {
                    boolean isLookupEnabled = objectsLookupSettings.isEnabled(objectType);
                    DBObject originalParentObject = parentObject;
                    for (DBObject object : objectList.getObjects()) {
                        if (breakLoad()) break;
                        if (isLookupEnabled) {
                            if (bucket == null) bucket = new THashSet<String>();
                            bucket.add(object.getName());
View Full Code Here

        public void visitObjectList(DBObjectList<DBObject> objectList) {
            if (isListScannable(objectList) && isParentRelationValid(objectList)) {
                DBObjectType objectType = objectList.getObjectType();
                if (isLookupEnabled(objectType)) {
                    boolean isLookupEnabled = objectsLookupSettings.isEnabled(objectType);
                    DBObject originalParentObject = parentObject;
                    for (DBObject object : objectList.getObjects()) {
                        if (breakLoad()) break;
                        if (isLookupEnabled && object.getName().equals(objectName)) {
                            if (bucket == null) bucket = new ArrayList<DBObject>();
                            bucket.add(object);
View Full Code Here

    public class DatabaseObjectListCellRenderer extends ColoredListCellRenderer {
        @Override
        protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
            if (value instanceof DBObject) {
                DBObject object = (DBObject) value;
                setIcon(object.getIcon());
                append(object.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
                append(" [" + object.getConnectionHandler().getName() + "]", SimpleTextAttributes.GRAY_ATTRIBUTES);
                if (object.getParentObject() != null) {
                    append(" - " + object.getParentObject().getQualifiedName(), SimpleTextAttributes.GRAY_ATTRIBUTES);
                }
            } else append(value.toString(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
        }
View Full Code Here

import java.util.Collections;

public class NavigationBarExtension implements NavBarModelExtension {
    public String getPresentableText(Object object) {
        if (object instanceof DBObject) {
            DBObject dbObject = (DBObject) object;
            return dbObject.getName();
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.object.common.DBObject

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.