当前位置: 首页>>代码示例>>Java>>正文


Java ToolWindow.setTitle方法代码示例

本文整理汇总了Java中com.intellij.openapi.wm.ToolWindow.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java ToolWindow.setTitle方法的具体用法?Java ToolWindow.setTitle怎么用?Java ToolWindow.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.wm.ToolWindow的用法示例。


在下文中一共展示了ToolWindow.setTitle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Override
public void init(ToolWindow window) {
    Project project = ProjectChecker.getFirstOpenedProject();
    String title = "Configuration";
    if (project != null) {
        title += " for '" + project.getName() + "'";
        PsiManager.getInstance(project).addPsiTreeChangeListener(this);
    }
    window.setTitle(title);
    componentList.add(new Triple<>(new String[]{"languages", "translations"}, Boolean.class, cbTranslationEnabled));
    componentList.add(new Triple<>(new String[]{"languages", "http_accept_language"}, Boolean.class, cbActiveLanguageBrowser));
    componentList.add(new Triple<>(new String[]{"languages", "include_default_lang"}, Boolean.class, cbIncludeDefaultLang));

    try {
        refreshComponents(true);
    } catch (Exception e) {
        errorOccurred = true;
    }
}
 
开发者ID:PioBeat,项目名称:GravSupport,代码行数:20,代码来源:SystemSettingsToolWindowFactory.java

示例2: batchPerform

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
protected void batchPerform(Project project, final SvnVcs activeVcs, VirtualFile[] file, DataContext context) throws VcsException {
  final File[] ioFiles = new File[file.length];
  for (int i = 0; i < ioFiles.length; i++) {
    ioFiles[i] = new File(file[i].getPath());
  }
  if (ioFiles.length > 0) {
    ToolWindow w = ToolWindowManager.getInstance(project).getToolWindow(PropertiesComponent.ID);
    PropertiesComponent component = null;
    if (w == null) {
      component = new PropertiesComponent();
      w = ToolWindowManager.getInstance(project).registerToolWindow(PropertiesComponent.ID, component, ToolWindowAnchor.BOTTOM);
    } else {
      component = ((PropertiesComponent) w.getContentManager().getContents()[0].getComponent());
    }
    w.setTitle(ioFiles[0].getName());
    w.show(null);
    final PropertiesComponent comp = component;
    w.activate(new Runnable() {
      public void run() {
        comp.setFile(activeVcs, ioFiles[0]);
      }
    });
  }

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:ShowPropertiesAction.java

示例3: initTerminal

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
public void initTerminal(final ToolWindow toolWindow) {
    toolWindow.setToHideOnEmptyContent(true);
    LocalTerminalDirectRunner terminalRunner = LocalTerminalDirectRunner.createTerminalRunner(myProject);
    myTerminalRunner = terminalRunner;
    toolWindow.setStripeTitle("React Native");
    Content content = createTerminalInContentPanel(terminalRunner, toolWindow);
    toolWindow.getContentManager().addContent(content);
    toolWindow.setShowStripeButton(true);
    toolWindow.setTitle("Console");
    ((ToolWindowManagerEx) ToolWindowManager.getInstance(this.myProject)).addToolWindowManagerListener(new ToolWindowManagerListener() {
        @Override
        public void toolWindowRegistered(@NotNull String s) {

        }

        @Override
        public void stateChanged() {
            ToolWindow window = ToolWindowManager.getInstance(myProject).getToolWindow(RNToolWindowFactory.TOOL_WINDOW_ID);
            if (window != null) {
                boolean visible = window.isVisible();
                if (visible && toolWindow.getContentManager().getContentCount() == 0) {
                    initTerminal(window);
                }
            }
        }
    });
    toolWindow.show(null);
    JBTabbedTerminalWidget terminalWidget = getTerminalWidget(toolWindow);
    if (terminalWidget != null && terminalWidget.getCurrentSession() != null) {
        Terminal terminal = terminalWidget.getCurrentSession().getTerminal();
        if (terminal != null) {
            terminal.setCursorVisible(true);// 是否启用光标 BeanSoft
        }
    }
}
 
开发者ID:beansoftapp,项目名称:react-native-console,代码行数:36,代码来源:ReactNativeTerminal.java

示例4: initTerminal

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
public void initTerminal(final ToolWindow toolWindow) {
    toolWindow.setToHideOnEmptyContent(true);
    LocalTerminalDirectRunner terminalRunner = LocalTerminalDirectRunner.createTerminalRunner(myProject);
    toolWindow.setStripeTitle("Fastdex");
    Content content = createTerminalInContentPanel(terminalRunner, toolWindow);
    toolWindow.getContentManager().addContent(content);
    toolWindow.setShowStripeButton(true);
    toolWindow.setTitle("Console");
    ((ToolWindowManagerEx) ToolWindowManager.getInstance(this.myProject)).addToolWindowManagerListener(new ToolWindowManagerListener() {
        @Override
        public void toolWindowRegistered(@NotNull String s) {

        }

        @Override
        public void stateChanged() {
            ToolWindow window = ToolWindowManager.getInstance(myProject).getToolWindow(FastdexToolWindowFactory.TOOL_WINDOW_ID);
            if (window != null) {
                boolean visible = window.isVisible();
                if (visible && toolWindow.getContentManager().getContentCount() == 0) {
                    initTerminal(window);
                }
            }
        }
    });
    toolWindow.show(null);
    JBTabbedTerminalWidget terminalWidget = getTerminalWidget(toolWindow);
    if (terminalWidget != null && terminalWidget.getCurrentSession() != null) {
        Terminal terminal = terminalWidget.getCurrentSession().getTerminal();
        if (terminal != null) {
            terminal.setCursorVisible(false);
        }
    }
}
 
开发者ID:typ0520,项目名称:fastdex,代码行数:35,代码来源:FastdexTerminal.java

示例5: createToolWindowContent

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull final Project project, @NotNull final ToolWindow toolWindow) {
  toolWindow.setTitle(myExternalSystemId.getReadableName());
  ContentManager contentManager = toolWindow.getContentManager();
  final ExternalProjectsViewImpl projectsView = new ExternalProjectsViewImpl(project, (ToolWindowEx)toolWindow, myExternalSystemId);
  ExternalProjectsManager.getInstance(project).registerView(projectsView);
  ContentImpl tasksContent = new ContentImpl(projectsView, ExternalSystemBundle.message("tool.window.title.projects"), true);
  contentManager.addContent(tasksContent);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AbstractExternalSystemToolWindowFactory.java

示例6: updateToolWindowTitle

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
protected void updateToolWindowTitle(CommanderPanel activePanel) {
  final ToolWindow toolWindow = myToolWindowManager.getToolWindow(ToolWindowId.COMMANDER);
  if (toolWindow != null) {
    final AbstractTreeNode node = activePanel.getSelectedNode();
    if (node instanceof ProjectViewNode) {
      toolWindow.setTitle(((ProjectViewNode)node).getTitle());
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:Commander.java

示例7: createToolWindowContent

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
  toolWindow.setAvailable(true, null);
  toolWindow.setToHideOnEmptyContent(true);
  toolWindow.setTitle(myFramework.getDisplayName());

  MvcProjectViewPane view = new MvcProjectViewPane(project, this);
  view.setup((ToolWindowEx)toolWindow);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:MvcToolWindowDescriptor.java

示例8: createToolWindowContent

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
  String title = Blaze.buildSystemName(project) + " Console";
  toolWindow.setTitle(title);
  toolWindow.setStripeTitle(title);
  BlazeConsoleView.getInstance(project).createToolWindowContent(toolWindow);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:8,代码来源:BlazeConsoleToolWindowFactory.java

示例9: processConsole

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
private static void processConsole(Project project, ProcessHandler processHandler) {
        ConsoleView consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
        consoleView.clear();
        consoleView.attachToProcess(processHandler);
        processHandler.startNotify();

        ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
        ToolWindow toolWindow;
        toolWindow = toolWindowManager.getToolWindow(TOOL_ID);

        // if already exist tool window then show it
        if (toolWindow != null) {
            toolWindow.show(null);// TODO add more tabs here?
            return;
        }

        toolWindow = toolWindowManager.registerToolWindow(TOOL_ID, true, ToolWindowAnchor.BOTTOM);
        toolWindow.setTitle("Android....");
        toolWindow.setStripeTitle("Android Console");
        toolWindow.setShowStripeButton(true);
        toolWindow.setIcon(PluginIcons.ICON_TOOL_WINDOW);

        JPanel panel = new JPanel((LayoutManager) new BorderLayout());
        panel.add((Component) consoleView.getComponent(), "Center");

        // Create toolbars
        DefaultActionGroup toolbarActions = new DefaultActionGroup();
        AnAction[]
                consoleActions = consoleView.createConsoleActions();// 必须在 consoleView.getComponent() 调用后组件真正初始化之后调用
        toolbarActions.addAll((AnAction[]) Arrays.copyOf(consoleActions, consoleActions.length));
        toolbarActions.add((AnAction) new StopProcessAction("Stop process", "Stop process", processHandler));
//        toolbarActions.add((AnAction) new CloseAction(defaultExecutor, runDescriptor, project));


        ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("unknown", (ActionGroup) toolbarActions, false);
        toolbar.setTargetComponent(consoleView.getComponent());
        panel.add((Component) toolbar.getComponent(), "West");

        ContentImpl consoleContent = new ContentImpl(panel, "Build", false);
        consoleContent.setManager(toolWindow.getContentManager());

        toolbarActions.add(new CloseTabAction(consoleContent));

//        addAdditionalConsoleEditorActions(consoleView, consoleContent);
//        consoleComponent.setActions();
        toolWindow.getContentManager().addContent(consoleContent);
        toolWindow.getContentManager().addContent(new ContentImpl(new JButton("Test"), "Build2", false));
        toolWindow.show(null);
    }
 
开发者ID:beansoftapp,项目名称:react-native-console,代码行数:50,代码来源:RNUtil.java

示例10: createToolWindowContent

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull final Project project, @NotNull final ToolWindow toolWindow) {

    final File adb = AndroidSdkUtils.getAdb(project);
    ExecutionManager.getInstance(project).getContentManager();

    RunnerLayoutUi layoutUi = RunnerLayoutUi.Factory.getInstance(project).create("LogViewer", TOOL_WINDOW_ID, "Logview Tools", project);

    toolWindow.setIcon(LogviewerPluginIcons.TOOL_ICON);
    toolWindow.setAvailable(true, null);
    toolWindow.setToHideOnEmptyContent(true);
    toolWindow.setTitle(TOOL_WINDOW_ID);


    DeviceContext deviceContext = new DeviceContext();

    Content logcatContent = createLogcatContent(layoutUi, project, deviceContext);
    final LogView logcatView = logcatContent.getUserData(LOG_VIEW_KEY);
    layoutUi.addContent(logcatContent, 0, PlaceInGrid.center, false);

    final JBLoadingPanel loadingPanel = new JBLoadingPanel(new BorderLayout(), project);
    loadingPanel.add(layoutUi.getComponent(), BorderLayout.CENTER);

    final ContentManager contentManager = toolWindow.getContentManager();
    Content c = contentManager.getFactory().createContent(loadingPanel, "", true);
    c.putUserData(LOG_VIEW_KEY, logcatView);
    contentManager.addContent(c);
    ApplicationManager.getApplication().invokeLater(new Runnable() {
        @Override
        public void run() {
            logcatView.activate();
        }
    }, project.getDisposed());


    if (adb != null) {
        loadingPanel.setLoadingText("Initializing ADB");
        loadingPanel.startLoading();

        ListenableFuture<AndroidDebugBridge> future = AdbService.getInstance().getDebugBridge(adb);
        Futures.addCallback(future, new FutureCallback<AndroidDebugBridge>() {
            @Override
            public void onSuccess(@Nullable AndroidDebugBridge bridge) {
                Logger.getInstance(LogviewFactory.class).info("Successfully obtained debug bridge");
                loadingPanel.stopLoading();
            }

            @Override
            public void onFailure(@NotNull Throwable t) {
                loadingPanel.stopLoading();
                Logger.getInstance(LogviewFactory.class).info("Unable to obtain debug bridge", t);
                String msg;
                if (t.getMessage() != null) {
                    msg = t.getMessage();
                } else {
                    msg = String.format("Unable to establish a connection to adb",
                            ApplicationNamesInfo.getInstance().getProductName(), adb.getAbsolutePath());
                }
                Messages.showErrorDialog(msg, "ADB Connection Error");
            }
        }, EdtExecutor.INSTANCE);
    } else {
        logcatView.showHint("No adb connection!.\n\nDrag and drop log files to view them.");
    }
}
 
开发者ID:josesamuel,项目名称:logviewer,代码行数:66,代码来源:LogviewFactory.java


注:本文中的com.intellij.openapi.wm.ToolWindow.setTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。