Search in sources :

Example 1 with OutputSink

use of com.google.idea.blaze.base.scope.OutputSink in project intellij by bazelbuild.

the class ProjectViewUi method parseProjectView.

public ProjectViewSet parseProjectView(final List<IssueOutput> issues) {
    final String projectViewText = projectViewEditor.getDocument().getText();
    final OutputSink<IssueOutput> issueCollector = output -> {
        issues.add(output);
        return OutputSink.Propagation.Continue;
    };
    return Scope.root(context -> {
        context.addOutputSink(IssueOutput.class, issueCollector);
        ProjectViewParser projectViewParser = new ProjectViewParser(context, workspacePathResolver);
        projectViewParser.parseProjectView(projectViewText);
        return projectViewParser.getResult();
    });
}
Also used : UIManager(javax.swing.UIManager) WriteAction(com.intellij.openapi.application.WriteAction) EditorFactoryImpl(com.intellij.openapi.editor.impl.EditorFactoryImpl) ProjectViewLanguage(com.google.idea.blaze.base.lang.projectview.language.ProjectViewLanguage) Document(com.intellij.openapi.editor.Document) PsiManagerEx(com.intellij.psi.impl.PsiManagerEx) JBLabel(com.intellij.ui.components.JBLabel) PsiManager(com.intellij.psi.PsiManager) OutputSink(com.google.idea.blaze.base.scope.OutputSink) UiUtil(com.google.idea.blaze.base.ui.UiUtil) BuildSystem(com.google.idea.blaze.base.settings.Blaze.BuildSystem) ProjectManager(com.intellij.openapi.project.ProjectManager) Scope(com.google.idea.blaze.base.scope.Scope) IssueOutput(com.google.idea.blaze.base.scope.output.IssueOutput) Disposer(com.intellij.openapi.util.Disposer) Project(com.intellij.openapi.project.Project) EditorEx(com.intellij.openapi.editor.ex.EditorEx) WorkspacePathResolver(com.google.idea.blaze.base.sync.workspace.WorkspacePathResolver) DataManager(com.intellij.ide.DataManager) DocumentImpl(com.intellij.openapi.editor.impl.DocumentImpl) Nullable(javax.annotation.Nullable) LightVirtualFile(com.intellij.testFramework.LightVirtualFile) Blaze(com.google.idea.blaze.base.settings.Blaze) FileManager(com.intellij.psi.impl.file.impl.FileManager) ProjectViewParser(com.google.idea.blaze.base.projectview.parser.ProjectViewParser) ProjectViewFileType(com.google.idea.blaze.base.lang.projectview.language.ProjectViewFileType) FileDocumentManagerImpl(com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl) Disposable(com.intellij.openapi.Disposable) Dimension(java.awt.Dimension) List(java.util.List) EditorColors(com.intellij.openapi.editor.colors.EditorColors) KeyboardFocusManager(java.awt.KeyboardFocusManager) ProjectImpl(com.intellij.openapi.project.impl.ProjectImpl) MutablePicoContainer(org.picocontainer.MutablePicoContainer) WorkspacePathResolverProvider(com.google.idea.blaze.base.sync.workspace.WorkspacePathResolverProvider) Result(com.intellij.openapi.application.Result) ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) EditorFactory(com.intellij.openapi.editor.EditorFactory) JCheckBox(javax.swing.JCheckBox) EditorSettings(com.intellij.openapi.editor.EditorSettings) WorkspacePath(com.google.idea.blaze.base.model.primitives.WorkspacePath) UndoUtil(com.intellij.openapi.command.undo.UndoUtil) NotNull(org.jetbrains.annotations.NotNull) JPanel(javax.swing.JPanel) IssueOutput(com.google.idea.blaze.base.scope.output.IssueOutput) ProjectViewParser(com.google.idea.blaze.base.projectview.parser.ProjectViewParser)

Aggregations

ProjectViewFileType (com.google.idea.blaze.base.lang.projectview.language.ProjectViewFileType)1 ProjectViewLanguage (com.google.idea.blaze.base.lang.projectview.language.ProjectViewLanguage)1 WorkspacePath (com.google.idea.blaze.base.model.primitives.WorkspacePath)1 ProjectViewSet (com.google.idea.blaze.base.projectview.ProjectViewSet)1 ProjectViewParser (com.google.idea.blaze.base.projectview.parser.ProjectViewParser)1 OutputSink (com.google.idea.blaze.base.scope.OutputSink)1 Scope (com.google.idea.blaze.base.scope.Scope)1 IssueOutput (com.google.idea.blaze.base.scope.output.IssueOutput)1 Blaze (com.google.idea.blaze.base.settings.Blaze)1 BuildSystem (com.google.idea.blaze.base.settings.Blaze.BuildSystem)1 WorkspacePathResolver (com.google.idea.blaze.base.sync.workspace.WorkspacePathResolver)1 WorkspacePathResolverProvider (com.google.idea.blaze.base.sync.workspace.WorkspacePathResolverProvider)1 UiUtil (com.google.idea.blaze.base.ui.UiUtil)1 DataManager (com.intellij.ide.DataManager)1 Disposable (com.intellij.openapi.Disposable)1 Result (com.intellij.openapi.application.Result)1 WriteAction (com.intellij.openapi.application.WriteAction)1 UndoUtil (com.intellij.openapi.command.undo.UndoUtil)1 Document (com.intellij.openapi.editor.Document)1 EditorFactory (com.intellij.openapi.editor.EditorFactory)1