Search in sources :

Example 6 with OCWorkspace

use of com.jetbrains.cidr.lang.workspace.OCWorkspace in project intellij by bazelbuild.

the class StubOCWorkspaceManager method enableCSupportForTesting.

/**
 * Enable C++ language support for testing (a previously registered OCWorkspace which may have
 * disabled language support).
 *
 * <p>This function does not work since sdkcompat v173, OCLanguage.LANGUAGE_SUPPORT_DISABLED will
 * still return true after calling enableCSupportForTesting(). RebuildSymbols may have some
 * issues, please read BlazeNdkSupportEnabler.doRebuildSymbols for more details.
 */
public void enableCSupportForTesting() throws Exception {
    OCWorkspace workspace = OCWorkspaceManager.getWorkspace(project);
    Boolean isCurrentlyEnabled = !OCLanguage.LANGUAGE_SUPPORT_DISABLED.get(project, false);
    if (!isCurrentlyEnabled) {
        enableLanguageSupport(project);
        rebuildSymbols(project, workspace);
    }
}
Also used : OCWorkspace(com.jetbrains.cidr.lang.workspace.OCWorkspace)

Aggregations

OCWorkspace (com.jetbrains.cidr.lang.workspace.OCWorkspace)6 TimingScope (com.google.idea.blaze.base.scope.scopes.TimingScope)1 SourceToTargetMap (com.google.idea.blaze.base.targetmaps.SourceToTargetMap)1 BlazeCWorkspace (com.google.idea.blaze.cpp.BlazeCWorkspace)1