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); } }
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); }); }
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); } } }
/** Updates the state (breakpoint list). */ public void setCurrentServerBreakpointList(ImmutableList<Breakpoint> newBreakpointList) { currentServerBreakpointList = newBreakpointList; }
/** * 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; }