Search in sources :

Example 1 with StatusBar

use of com.intellij.openapi.wm.StatusBar in project intellij-community by JetBrains.

the class HgIncomingOutgoingWidget method activate.

@CalledInAwt
public void activate() {
    MessageBusConnection busConnection = myProject.getMessageBus().connect();
    busConnection.subscribe(HgVcs.STATUS_TOPIC, this);
    busConnection.subscribe(HgVcs.INCOMING_OUTGOING_CHECK_TOPIC, this);
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
    if (null != statusBar && isVisible()) {
        statusBar.addWidget(this, myProject);
        isAlreadyShown = true;
    }
}
Also used : MessageBusConnection(com.intellij.util.messages.MessageBusConnection) StatusBar(com.intellij.openapi.wm.StatusBar) CalledInAwt(org.jetbrains.annotations.CalledInAwt)

Example 2 with StatusBar

use of com.intellij.openapi.wm.StatusBar in project intellij-community by JetBrains.

the class ResourceBundleEditor method selectionChanged.

private void selectionChanged() {
    myBackSlashPressed.clear();
    UIUtil.invokeLaterIfNeeded(() -> {
        updateEditorsFromProperties(true);
        final StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
        if (statusBar != null) {
            statusBar.setInfo("Selected property: " + getSelectedPropertyName());
        }
    });
}
Also used : StatusBar(com.intellij.openapi.wm.StatusBar)

Example 3 with StatusBar

use of com.intellij.openapi.wm.StatusBar in project intellij-community by JetBrains.

the class CleanPycAction method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    final PsiElement[] elements = e.getData(LangDataKeys.PSI_ELEMENT_ARRAY);
    if (elements == null)
        return;
    final List<File> pycFiles = new ArrayList<>();
    ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> {
        for (PsiElement element : elements) {
            PsiDirectory dir = (PsiDirectory) element;
            collectPycFiles(new File(dir.getVirtualFile().getPath()), pycFiles);
        }
        FileUtil.asyncDelete(pycFiles);
    }, "Cleaning up .pyc files...", false, e.getProject());
    final StatusBar statusBar = WindowManager.getInstance().getIdeFrame(e.getProject()).getStatusBar();
    statusBar.setInfo("Deleted " + pycFiles.size() + " bytecode file" + (pycFiles.size() != 1 ? "s" : ""));
}
Also used : PsiDirectory(com.intellij.psi.PsiDirectory) ArrayList(java.util.ArrayList) File(java.io.File) StatusBar(com.intellij.openapi.wm.StatusBar) PsiElement(com.intellij.psi.PsiElement)

Example 4 with StatusBar

use of com.intellij.openapi.wm.StatusBar in project intellij-community by JetBrains.

the class PackageFileAction method setStatusText.

private static void setStatusText(Project project, List<VirtualFile> files) {
    if (!files.isEmpty()) {
        StringBuilder fileNames = new StringBuilder();
        for (VirtualFile file : files) {
            if (fileNames.length() != 0)
                fileNames.append(", ");
            fileNames.append("'").append(file.getName()).append("'");
        }
        String time = TIME_FORMAT.format(Clock.getTime());
        final String statusText = CompilerBundle.message("status.text.file.has.been.packaged", files.size(), fileNames, time);
        final StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
        if (statusBar != null) {
            statusBar.setInfo(statusText);
        }
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) StatusBar(com.intellij.openapi.wm.StatusBar)

Example 5 with StatusBar

use of com.intellij.openapi.wm.StatusBar in project intellij-community by JetBrains.

the class ActionMenu method showDescriptionInStatusBar.

public static void showDescriptionInStatusBar(boolean isIncluded, Component component, String description) {
    IdeFrame frame = (IdeFrame) (component instanceof IdeFrame ? component : SwingUtilities.getAncestorOfClass(IdeFrame.class, component));
    StatusBar statusBar;
    if (frame != null && (statusBar = frame.getStatusBar()) != null) {
        statusBar.setInfo(isIncluded ? description : null);
    }
}
Also used : IdeFrame(com.intellij.openapi.wm.IdeFrame) StatusBar(com.intellij.openapi.wm.StatusBar)

Aggregations

StatusBar (com.intellij.openapi.wm.StatusBar)36 Project (com.intellij.openapi.project.Project)8 WindowManager (com.intellij.openapi.wm.WindowManager)6 Editor (com.intellij.openapi.editor.Editor)4 PsiElement (com.intellij.psi.PsiElement)4 FindManager (com.intellij.find.FindManager)3 FindModel (com.intellij.find.FindModel)3 FileEditorManager (com.intellij.openapi.fileEditor.FileEditorManager)3 VirtualFile (com.intellij.openapi.vfs.VirtualFile)3 IdeFrame (com.intellij.openapi.wm.IdeFrame)3 HighlightManager (com.intellij.codeInsight.highlighting.HighlightManager)2 Application (com.intellij.openapi.application.Application)2 Document (com.intellij.openapi.editor.Document)2 EditorColorsManager (com.intellij.openapi.editor.colors.EditorColorsManager)2 EditorColorsScheme (com.intellij.openapi.editor.colors.EditorColorsScheme)2 TextAttributes (com.intellij.openapi.editor.markup.TextAttributes)2 FileChooserDescriptorFactory (com.intellij.openapi.fileChooser.FileChooserDescriptorFactory)2 MessageType (com.intellij.openapi.ui.MessageType)2 TextFieldWithBrowseButton (com.intellij.openapi.ui.TextFieldWithBrowseButton)2 HyperlinkLabel (com.intellij.ui.HyperlinkLabel)2