Java 类com.intellij.util.containers.ImmutableList 实例源码

项目:js-graphql-intellij-plugin    文件:JSGraphQLLanguageToolWindowManager.java   
public void logCurrentErrors(@NotNull ImmutableList<JSGraphQLErrorResult> immutableResults, boolean setActive) {
    ApplicationManager.getApplication().assertIsDispatchThread();
    if (myCurrentErrorTreeViewPanel == null) {
        if (!myFirstInitialized || myToolWindow == null) {
            return;
        }

        Content list = createCurrentErrorContent(myToolWindow);
        myToolWindow.getContentManager().setSelectedContent(list);
        show();
    }

    if (myFirstInitialized && myCurrentErrorTreeViewPanel != null) {
        final List<JSGraphQLErrorResult> results = ContainerUtil.newArrayList(immutableResults);
        if (!results.equals(myLastResult)) {
            logErrorsImpl(myCurrentErrorTreeViewPanel, results);
            myLastResult = results;
        }
    }

    if (setActive) {
        setActivePanel(myCurrentErrorTreeViewPanel, myToolWindow);
    }

}
项目:js-graphql-intellij-plugin    文件:JSGraphQLLanguageUIProjectService.java   
public void logErrorsInCurrentFile(@NotNull PsiFile file, List<JSGraphQLErrorResult> errors) {
    final ImmutableList<JSGraphQLErrorResult> errorsList = ContainerUtil.immutableList(errors);
    fileUriToErrors.put(file.getVirtualFile().getUrl(), errorsList);
    UIUtil.invokeLaterIfNeeded(() -> {
        myToolWindowManager.logCurrentErrors(errorsList, false);
    });
}
项目:js-graphql-intellij-plugin    文件:JSGraphQLLanguageUIProjectService.java   
private void logErrorsForFile(VirtualFile file, boolean forceRefresh) {
    ImmutableList<JSGraphQLErrorResult> currentErrors = fileUriToErrors.get(file.getUrl());
    if(currentErrors != null) {
        if(forceRefresh) {
            myToolWindowManager.logCurrentErrors(ContainerUtil.immutableList(Collections.emptyList()), false);
        }
        myToolWindowManager.logCurrentErrors(currentErrors, false);
    } else {
        // files we don't know the errors for
        if(myToolWindowManagerInitialized) {
            // don't attempt to log errors until the view is ready
            myToolWindowManager.logCurrentErrors(ContainerUtil.immutableList(Collections.emptyList()), false);
        }
    }
}
项目:google-cloud-intellij    文件:CloudDebugProcessState.java   
/** Updates the state (breakpoint list). */
public void setCurrentServerBreakpointList(ImmutableList<Breakpoint> newBreakpointList) {
  currentServerBreakpointList = newBreakpointList;
}
项目:google-cloud-intellij    文件:CloudDebugProcessState.java   
/**
 * Returns a cached set of {@link Breakpoint} objects. The list is periodically updated from a
 * background timer.
 *
 * @return the current list of breakpoints and their state
 */
@NotNull
@Transient
public ImmutableList<Breakpoint> getCurrentServerBreakpointList() {
  return currentServerBreakpointList;
}