Search in sources :

Example 1 with RegistryValue

use of com.intellij.openapi.util.registry.RegistryValue in project intellij-community by JetBrains.

the class JavaFXHighlightingTest method testInjectedController.

public void testInjectedController() throws Exception {
    myFixture.copyFileToProject("injected/MyController.java");
    myFixture.copyFileToProject("injected/FooVBox.java");
    final RegistryValue registryValue = Registry.get("javafx.fxml.controller.from.loader");
    final boolean injectionAllowed = registryValue.asBoolean();
    try {
        registryValue.setValue(true);
        doTestNavigation("injected.MyController", "label", "injected/" + getTestName(true) + ".fxml");
    } finally {
        registryValue.setValue(injectionAllowed);
    }
}
Also used : RegistryValue(com.intellij.openapi.util.registry.RegistryValue)

Example 2 with RegistryValue

use of com.intellij.openapi.util.registry.RegistryValue in project intellij-community by JetBrains.

the class ToggleDistractionFreeModeAction method alternateCurrentDistractionFreeModeSetting.

private static void alternateCurrentDistractionFreeModeSetting() {
    RegistryValue value = Registry.get(key);
    value.setValue(!value.asBoolean());
}
Also used : RegistryValue(com.intellij.openapi.util.registry.RegistryValue)

Example 3 with RegistryValue

use of com.intellij.openapi.util.registry.RegistryValue in project intellij-community by JetBrains.

the class BytecodeAnalysisIntegrationTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myMessageDigest = BytecodeAnalysisConverter.getMessageDigest();
    RegistryValue registryValue = Registry.get(ProjectBytecodeAnalysis.NULLABLE_METHOD);
    myNullableMethodRegistryValue = registryValue.asBoolean();
    registryValue.setValue(true);
}
Also used : RegistryValue(com.intellij.openapi.util.registry.RegistryValue)

Example 4 with RegistryValue

use of com.intellij.openapi.util.registry.RegistryValue in project intellij-community by JetBrains.

the class ClassFilesIndexFeaturesHolder method projectOpened.

@Override
public final void projectOpened() {
    for (final ClassFilesIndexFeature feature : ClassFilesIndexFeature.values()) {
        final RegistryValue registryValue = feature.getRegistryValue();
        registryValue.addListener(new RegistryValueListener.Adapter() {

            @Override
            public void afterValueChanged(final RegistryValue rawValue) {
                if (!rawValue.asBoolean() && myEnabledFeatures.containsKey(feature)) {
                    disposeFeature(feature);
                }
            }
        }, myProject);
    }
    final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
    compilerManager.addBeforeTask(new CompileTask() {

        @Override
        public boolean execute(final CompileContext context) {
            close();
            return true;
        }
    });
}
Also used : CompileTask(com.intellij.openapi.compiler.CompileTask) RegistryValue(com.intellij.openapi.util.registry.RegistryValue) CompilerManager(com.intellij.openapi.compiler.CompilerManager) RegistryValueListener(com.intellij.openapi.util.registry.RegistryValueListener) CompileContext(com.intellij.openapi.compiler.CompileContext)

Example 5 with RegistryValue

use of com.intellij.openapi.util.registry.RegistryValue in project intellij-community by JetBrains.

the class HtmlUtil method setShortNotationOfBooleanAttributeIsPreferred.

@TestOnly
public static void setShortNotationOfBooleanAttributeIsPreferred(boolean value, Disposable parent) {
    final boolean oldValue = isShortNotationOfBooleanAttributePreferred();
    final RegistryValue registryValue = Registry.get("html.prefer.short.notation.of.boolean.attributes");
    registryValue.setValue(value);
    Disposer.register(parent, new Disposable() {

        @Override
        public void dispose() {
            registryValue.setValue(oldValue);
        }
    });
}
Also used : Disposable(com.intellij.openapi.Disposable) RegistryValue(com.intellij.openapi.util.registry.RegistryValue)

Aggregations

RegistryValue (com.intellij.openapi.util.registry.RegistryValue)5 Disposable (com.intellij.openapi.Disposable)1 CompileContext (com.intellij.openapi.compiler.CompileContext)1 CompileTask (com.intellij.openapi.compiler.CompileTask)1 CompilerManager (com.intellij.openapi.compiler.CompilerManager)1 RegistryValueListener (com.intellij.openapi.util.registry.RegistryValueListener)1