Package com.dci.intellij.dbn.execution.compiler.options

Examples of com.dci.intellij.dbn.execution.compiler.options.CompilerSettings


    }

    public void update(AnActionEvent e) {
        Presentation presentation = e.getPresentation();

        CompilerSettings compilerSettings = getCompilerSettings(object.getProject());
        CompileType compileType = compilerSettings.getCompileType();
        DBObjectStatusHolder status = object.getStatus();

        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 isDebug = status.is(contentType, DBObjectStatus.DEBUG);
        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


    public void actionPerformed(AnActionEvent e) {
        SourceCodeFile virtualFile = getSourcecodeFile(e);
        if (virtualFile!= null) {
            Project project = virtualFile.getProject();
            DatabaseCompilerManager compilerManager = DatabaseCompilerManager.getInstance(project);
            CompilerSettings compilerSettings = getCompilerSettings(project);
            compilerManager.compileObject(
                    virtualFile.getObject(),
                    virtualFile.getContentType(),
                    compilerSettings.getCompileType(), false);
        }
    }
View Full Code Here

            DBSchemaObject schemaObject = virtualFile.getObject();
            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" :
                                    contentType == DBContentType.CODE_BODY ? "Compile body" : "Compile";
View Full Code Here

    public JPanel getComponent() {
        return mainPanel;
    }

    public void applyChanges() throws ConfigurationException {
        CompilerSettings settings = getConfiguration();
        settings.setCompileType((CompileType) compileTypeComboBox.getSelectedItem());
        settings.setAlwaysShowCompilerControls(showAlwaysRadioButton.isSelected());
    }
View Full Code Here

        settings.setCompileType((CompileType) compileTypeComboBox.getSelectedItem());
        settings.setAlwaysShowCompilerControls(showAlwaysRadioButton.isSelected());
    }

    public void resetChanges() {
        CompilerSettings settings = getConfiguration();
        compileTypeComboBox.setSelectedItem(settings.getCompileType());
        if (settings.alwaysShowCompilerControls())
            showAlwaysRadioButton.setSelected(true); else
            showWhenInvalidRadioButton.setSelected(true);
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.execution.compiler.options.CompilerSettings

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.