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

Examples of com.dci.intellij.dbn.object.common.status.DBObjectStatusHolder


            if (schemaObject != null) {
                DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(schemaObject);
                if (schemaObject.getProperties().is(DBObjectProperty.COMPILABLE) &&  compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_INVALIDATION)) {
                    CompilerSettings compilerSettings = getCompilerSettings(schemaObject.getProject());
                    CompileType compileType = compilerSettings.getCompileType();
                    DBObjectStatusHolder status = schemaObject.getStatus();
                    DBContentType contentType = virtualFile.getContentType();

                    boolean isDebug = compileType == CompileType.DEBUG;
                    if (compileType == CompileType.KEEP) {
                        isDebug = status.is(contentType, DBObjectStatus.DEBUG);
                    }

                    boolean isPresent = status.is(contentType, DBObjectStatus.PRESENT);
                    boolean isValid = status.is(contentType, DBObjectStatus.VALID);

                    boolean isCompiling = status.is(contentType, DBObjectStatus.COMPILING);
                    boolean isEnabled = isPresent && !isCompiling && (compilerSettings.alwaysShowCompilerControls() || !isValid /*|| isDebug != isDebugActive*/);

                    presentation.setEnabled(isEnabled);
                    String text =
                            contentType == DBContentType.CODE_SPEC ? "Compile spec" :
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.object.common.status.DBObjectStatusHolder

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.