{"id":278507,"date":"2016-04-18T15:00:05","date_gmt":"2016-04-18T11:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278507"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278507","title":{"rendered":"\u0414\u0435\u043b\u0430\u0435\u043c UI \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0432 IntelliJ Idea \u00ab\u043a\u0430\u043a \u0443 maven&#8217;a\u00bb"},"content":{"rendered":"<br \/>\n<h1>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 QA \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 20 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0436\u0438\u0432\u0443\u0449\u0438\u0445 \u0432 \u043e\u0431\u0449\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0440\u0438\u0438 (Spring \u0441 XML \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u043e\u0431\u0449\u0438\u043c \u0434\u043b\u044f \u0432\u0441\u0435 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f \u043a\u043b\u0430\u0441\u0441\u043e\u043c). <\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 GUI \u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0432 Borland Delphi 6.0? \u0412\u0437\u044f\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0438 \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434, \u043d\u0443 \u0438 \u0440\u0430\u0437 \u0443\u0436 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 IntelliJ Idea, \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043c\u044b\u0441\u043b\u044c \u0441\u043e\u043e\u0440\u0443\u0434\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0438 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 Maven Integration Plugin.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cdd\/409\/397\/cdd4093977bd44c78ac5dc25288583a9.PNG\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0440\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1>\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h1>\n<p>  <\/p>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c \u0434\u043b\u044f Idea \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/index.html\">\u0442\u0443\u0442<\/a> \u0438\u043b\u0438 \u0432 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 <a href=\"https:\/\/habrahabr.ru\/post\/187106\/\">\u0445\u0430\u0431\u0440\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044d\u0442\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e UI \u0442\u0430\u043c \u043d\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/JetBrains\/intellij-community\">\u043a\u043e\u0434<\/a>, \u0430 \u044d\u0442\u043e \u0432\u0435\u0434\u044c \u043b\u0443\u0447\u0448\u0435 \u043b\u044e\u0431\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438! <del>(\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0442\u0435\u0431\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437\u0440\u044f\u0434 \u043f\u043e \u0441\u043e\u0432\u043a\u043e\u0432\u043e\u0439 \u043b\u043e\u043f\u0430\u0442\u0435)<\/del><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0441, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043f\u0430\u043f\u043a\u0430 <strong>plugins\/maven<\/strong>.<\/p>\n<p>  <\/p>\n<h1>Tips and tricks<\/h1>\n<p>  <\/p>\n<h2>Tool Window<\/h2>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0435 Tool Window \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <a href=\"http:\/\/www.jetbrains.org\/intellij\/sdk\/docs\/user_interface_components\/tool_windows.html\">\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c plugin.xml. \u041d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043a\u043d\u0430, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private void initToolWindow() {         final ToolWindowManagerEx manager = ToolWindowManagerEx.getInstanceEx(myProject);         ToolWindowEx myToolWindow = (ToolWindowEx) manager.registerToolWindow(HolyProjectPanel.ID, false, ToolWindowAnchor.RIGHT, myProject, true);         myToolWindow.setIcon(IconLoader.findIcon(&quot;\/icons\/jesterhat.png&quot;));         final ContentFactory contentFactory = ServiceManager.getService(ContentFactory.class);         final Content content = contentFactory.createContent(panel, &quot;&quot;, false);         ContentManager contentManager = myToolWindow.getContentManager();         contentManager.addContent(content);     }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u043a\u0430 Idea \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442?<\/h3>\n<p>  <\/p>\n<p>\u041d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">    public static void runWhenInitialized(final Project project, final Runnable r) {         if (project.isDisposed()) return;          if (!project.isInitialized()) {             StartupManager.getInstance(project).registerPostStartupActivity(DisposeAwareRunnable.create(r, project));             return;         }          runDumbAware(project, r);     }     public static void runDumbAware(final Project project, final Runnable r) {         if (DumbService.isDumbAware(r)) {             r.run();         }         else {             DumbService.getInstance(project).runWhenSmart(DisposeAwareRunnable.create(r, project));         }     }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u0430\u043a \u0432\u044b\u0440\u0430\u0441\u0442\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e<\/h2>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0433\u0434\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u041e\u0442\u0432\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d: JPanel (\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u0432\u044b\u0448\u0435 HolyProjectPanel \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u043c SimpleToolWindowPanel, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442 JPanel <del>(\u044f\u0439\u0446\u043e \u0432 \u0443\u0442\u043a\u0435, \u0443\u0442\u043a\u0430 \u0432 \u0437\u0430\u0439\u0446\u0435, \u0437\u0430\u044f\u0446 \u0432 \u0448\u043e\u043a\u0435)<\/del>.<br \/>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 JTree \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u043d\u0442. <\/p>\n<p>  <\/p>\n<p>UI Maven plugin&#8217;a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0435 SimpleTree, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0435\u0433\u043e \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 JTree, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u0438\u0447\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0438\u0441\u043a \u043d\u0430 \u043b\u0435\u0442\u0443:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a78\/696\/c8c\/a78696c8ccb2497d8883cd4cd48f7f63\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SimpleTreeBuilder:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">    SimpleTreeBuilder myTreeBuilder = new SimpleTreeBuilder(tree, (DefaultTreeModel) tree.getModel(), this, null)         Disposer.register(project, myTreeBuilder);         myTreeBuilder.initRoot();         myTreeBuilder.expand(myRoot, null);<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c Comparator \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<br \/>  \u0422\u0430\u043a\u0436\u0435, \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0443\u0437\u043b\u044b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">myTreeBuilder.addSubtreeToUpdate(node)<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0427\u0435\u043c \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 SimpleTree \u0438 SimpleTreeBuilder \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SimpleNode. \u041a\u043b\u0430\u0441\u0441 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442, \u043a\u0430\u043a \u0442\u0440\u0438 \u043a\u043e\u043f\u0435\u0439\u043a\u0438. \u0412\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 getChildren, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u0435\u043b (\u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u043a\u043d\u0430 \u0438\u043b\u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u0430), \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c (myName, myClosedIcon \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435).<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u043a\u0430\u0436\u0443\u0449\u0430\u044f\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u043a\u043e\u043d\u0447\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u0432\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438.<\/p>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0446\u0432\u0435\u0442\u0430\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/404\/4f3\/2f6\/4044f32f6f5c4650b6ff385c0c445116\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u043b\u0430\u0441\u0441 SimpleNode \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 PresentationData. \u0435\u0433\u043e \u0438 \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">    private void updatePresentation() {         PresentationData presentation = getPresentation();         presentation.clear();         presentation.addText(myName, SimpleTextAttributes.REGULAR_ATTRIBUTES);         presentation.addText(&quot; Red&quot;, new SimpleTextAttributes(Font.PLAIN, Color.RED));         presentation.addText(&quot; Level2Node&quot;, SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES);     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u044d\u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u0435\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">        @Override         public void handleDoubleClickOrEnter(SimpleTree tree, InputEvent inputEvent) {             if(Color.RED.equals(myColor)){                 myColor = Color.BLUE;             } else {                 myColor = Color.RED;             }             updatePresentation();         }        private void updatePresentation() {             PresentationData presentation = getPresentation();             presentation.clear();             presentation.addText(myName, SimpleTextAttributes.REGULAR_ATTRIBUTES);             presentation.addText(&quot; Red&quot;, new SimpleTextAttributes(Font.PLAIN, myColor));             presentation.addText(&quot; Level2Node&quot;, SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES);         }<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/89f\/42e\/ea9\/89f42eea92834226ab0f8ef0cd76ee2c\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u043e \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u044f \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e \u043f\u0430\u043d\u0435\u043b\u044c?<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432\u0441\u0435 \u0443\u0437\u043b\u044b, \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0441\u0441 CachingSimpleNode \u0432\u043c\u0435\u0441\u0442\u043e SimpleNode (\u041e\u043d \u0442\u0430\u043a \u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c: buildChildren()).<br \/>  \u0427\u0442\u043e\u0431\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c CachingSimpleNode \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043c \u043c\u0435\u0442\u043e\u0434 update() \u0438\u043b\u0438 update(PresentationData).<\/p>\n<p>  <\/p>\n<h2>\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430\u0434 \u0434\u0435\u0440\u0435\u0432\u043e\u043c<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c55\/a0f\/ae7\/c55a0fae7ee1435fad20159cae3528be\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u043d\u0435 \u043d\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c (\u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0448\u044c \u0441\u0430\u043c\u043e ToolsWindow \u0432 \u043a\u043e\u0434\u0435 \u2014 \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435). \u041e\u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 plugin.xml \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Actions, \u0442\u0430\u043c \u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0438\u043a\u043e\u043d\u043a\u0438, \u0442\u0443\u043b\u0442\u0438\u043f\u044b \u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;actions&gt;         &lt;action id=&quot;HolyProject.ExpandAll&quot; class=&quot;ui.ProcessesTreeAction$ExpandAll&quot; text=&quot;Expand All&quot;                 icon=&quot;AllIcons.Actions.Expandall&quot;\/&gt;         &lt;action id=&quot;HolyProject.CollapseAll&quot; class=&quot;ui.ProcessesTreeAction$CollapseAll&quot; text=&quot;Collapse All&quot;                 icon=&quot;AllIcons.Actions.Collapseall&quot;\/&gt;          &lt;action class=&quot;actions.MyToggleAction&quot; id=&quot;HolyProject.RefreshProcesses&quot; icon=&quot;AllIcons.Nodes.Cvs_roots&quot;                 text=&quot;Refresh HolyProjectProcesses status&quot; description=&quot;Refresh HolyProjectProcesses status&quot;\/&gt;         &lt;action class=&quot;actions.CommonAction&quot; id=&quot;HolyProject.RecreateProcesses&quot; icon=&quot;AllIcons.ToolbarDecorator.Import&quot;                 text=&quot;Recreate Processes List&quot; description=&quot;Recreate Processes List&quot;\/&gt;         &lt;group id=&quot;HolyProject.ProcessesToolbar&quot;&gt;             &lt;reference id=&quot;HolyProject.RefreshProcesses&quot;\/&gt;             &lt;reference id=&quot;HolyProject.RecreateProcesses&quot;\/&gt;             &lt;separator\/&gt;             &lt;reference id=&quot;HolyProject.ExpandAll&quot;\/&gt;             &lt;reference id=&quot;HolyProject.CollapseAll&quot;\/&gt;         &lt;\/group&gt;     &lt;\/actions&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Enabled\/Disabled \u043a\u043d\u043e\u043f\u043a\u0443, \u043a\u0430\u043a &quot;Toggle &#8216;Skip Tests&#8217; Mode&quot; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ToggleAction \u0432\u043c\u0435\u0441\u0442\u043e AnAction<\/strong><\/p>\n<p>  <\/p>\n<h2>\u041a\u0430\u043a \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 UI Thread \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0430\u043d\u0435\u043b\u0438, \u043d\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 UI \u043f\u043e\u0442\u043e\u043a\u0435, \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u0435\u0449\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">AppUIUtil.invokeOnEdt(() -&gt; {\/*do smth useful*\/});<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0435, \u0447\u0435\u043c \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f, \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/Trans00\/HolyProcessIdeaPlugin\">\u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>. <\/p>\n<p>  <\/p>\n<p>\u0423\u0434\u0430\u0447\u0438!<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/281851\/\"> https:\/\/habrahabr.ru\/post\/281851\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h1>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 QA \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 20 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0436\u0438\u0432\u0443\u0449\u0438\u0445 \u0432 \u043e\u0431\u0449\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0440\u0438\u0438 (Spring \u0441 XML \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u043e\u0431\u0449\u0438\u043c \u0434\u043b\u044f \u0432\u0441\u0435 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f \u043a\u043b\u0430\u0441\u0441\u043e\u043c). <\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 GUI \u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0432 Borland Delphi 6.0? \u0412\u0437\u044f\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0438 \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434, \u043d\u0443 \u0438 \u0440\u0430\u0437 \u0443\u0436 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 IntelliJ Idea, \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043c\u044b\u0441\u043b\u044c \u0441\u043e\u043e\u0440\u0443\u0434\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0438 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 Maven Integration Plugin.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cdd\/409\/397\/cdd4093977bd44c78ac5dc25288583a9.PNG\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0440\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-278507","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278507"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278507\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}