{"id":1533,"date":"2007-04-20T15:18:00","date_gmt":"2007-04-20T15:18:00","guid":{"rendered":"http:\/\/t.motd.kr\/articles\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports"},"modified":"2022-12-28T01:46:31","modified_gmt":"2022-12-27T16:46:31","slug":"fixing-eclipse-organize-imports-annoyance-for-static-imports","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/","title":{"rendered":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports"},"content":{"rendered":"

Static import \ubb38\uc5d0 \ub300\ud55c \uc774\ud074\ub9bd\uc2a4\uc758 ‘Organize Import’ \ubb38\uc81c \ud574\uacb0\ud558\uae30<\/p>\n

CTRL+SHIFT+O<\/kbd> is probably the most pressed shortcut in Eclipse JDT. It cleans up any unused imports, expands ugly asterisks, and reorganizes the import statements in order. It was very nice until asterisks were considered ugly. Since static imports are introduced in Java 5, things have been changed dramatically. Who will ever want his or her static import statement with an asterisk to be expanded? Unfortunately, Eclipse JDT gets rid of the asterisks in static imports mercilessly.<\/p>\n

CTRL+SHIFT+O<\/kbd>\ub294 \uc544\ub9c8\ub3c4 \uc774\ud074\ub9bd\uc2a4 JDT\uc5d0\uc11c \uac00\uc7a5 \ub9ce\uc774 \ub20c\ub9ac\ub294 \ub2e8\ucd95\ud0a4\uc77c \uac83\uc785\ub2c8\ub2e4. \uc774 \ub2e8\ucd95\ud0a4\ub97c \ub204\ub974\uba74 \ub354\uc774\uc0c1 \uc4f0\uc774\uc9c0 \uc54a\ub294 import \ubb38\uc740 \uc0ac\ub77c\uc9c0\uace0, \ubcf4\uae30 \ud749\ud55c \ubcc4\ud45c import \ubb38\uc740 \uc804\uac1c\ub418\uace0, import\ubb38\uc740 \uc21c\uc11c\uc5d0 \ub9de\uac8c \uc7ac\uc815\ub82c\ub429\ub2c8\ub2e4. \ubcc4\ud45c import \ubb38\uc774 \ubcf4\uae30 \ud749\ud558\ub2e4\uace0 \uc0dd\uac01\ub420 \ub54c\uae4c\uc9c0\ub294 \ucc38 \uc88b\uc558\uc9c0\uc694. Static import \ubb38\uc774 Java 5\uc5d0 \ub4f1\uc7a5\ud55c \uc774\ud6c4\ub85c \uc0c1\ud669\uc774 \uc644\uc804\ud788 \ubc14\ub00c\uc5c8\uc2b5\ub2c8\ub2e4. \ub204\uac00 \ubcc4\ud45c static import \ubb38\uc774 \uc804\uac1c\ub418\uae38 \uc0c1\uc0c1\uc774\ub098 \ud588\uaca0\uc5b4\uc694? \uc548\ud0c0\uae5d\uac8c\ub3c4 \uc774\ud074\ub9bd\uc2a4 JDT\ub294 \ubb34\uc790\ube44\ud558\uac8c static import \ubb38\uc758 \ubcc4\ud45c\uae4c\uc9c0 \uc5c6\uc560\ubc84\ub9bd\ub2c8\ub2e4.<\/p>\n

What is fortunate though is that there’s an option that changes this default behavior.<\/p>\n

\uadf8\ub098\ub9c8 \ub2e4\ud589\uc2a4\ub7ec\uc6b4 \uac83\uc740 \uc774 \ub514\ud3f4\ud2b8 \uac12\uc744 \ubc14\uafb8\ub294 \uc635\uc158\uc774 \uc788\ub2e4\ub294 \uac81\ub2c8\ub2e4.<\/p>\n

    <\/p>\n
  1. Choose ‘Window -> Preferences…’ menu.<\/li>\n

    <\/p>\n

  2. Choose ‘Java -> Code Style -> Organize Imports’ in the left pane.<\/li>\n

    <\/p>\n

  3. Set the ‘Number of static imports needed for .*’ to ‘1’ in the right pane.<\/li>\n

    <\/p>\n

  4. Click ‘OK’ button.<\/li>\n

    \n<\/ol>\n

      <\/p>\n
    1. ‘Window -> Preferences…’ \uba54\ub274\ub97c \uc120\ud0dd\ud569\ub2c8\ub2e4.<\/li>\n

      <\/p>\n

    2. \uc67c\ucabd\uc5d0\uc11c ‘Java -> Code Style -> Organize Imports’\ub97c \uc120\ud0dd\ud569\ub2c8\ub2e4.<\/li>\n

      <\/p>\n

    3. \uc624\ub978\ucabd\uc5d0\uc11c ‘Number of static imports needed for .*’\ub97c ‘1’\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n

      <\/p>\n

    4. ‘OK’ \ubc84\ud2bc\uc744 \ub204\ub985\ub2c8\ub2e4.<\/li>\n

      \n<\/ol>\n","protected":false},"excerpt":{"rendered":"

      Static import \ubb38\uc5d0 \ub300\ud55c \uc774\ud074\ub9bd\uc2a4\uc758 ‘Organize Import’ \ubb38\uc81c \ud574\uacb0\ud558\uae30 CTRL+SHIFT+O is probably the most pressed shortcut in Eclipse JDT. It cleans up any unused imports, expands ugly asterisks, and reorganizes the import statements in order. It was very nice until asterisks were considered ugly. Since static imports are introduced in Java 5, things have been… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports — T's message of the day<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports — T's message of the day\" \/>\n<meta property=\"og:description\" content=\"Static import \ubb38\uc5d0 \ub300\ud55c \uc774\ud074\ub9bd\uc2a4\uc758 ‘Organize Import’ \ubb38\uc81c \ud574\uacb0\ud558\uae30 CTRL+SHIFT+O is probably the most pressed shortcut in Eclipse JDT. It cleans up any unused imports, expands ugly asterisks, and reorganizes the import statements in order. It was very nice until asterisks were considered ugly. Since static imports are introduced in Java 5, things have been... Continue reading →\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\" \/>\n<meta property=\"og:site_name\" content=\"T's message of the day\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/trustin\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/trustin\" \/>\n<meta property=\"article:published_time\" content=\"2007-04-20T15:18:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-27T16:46:31+00:00\" \/>\n<meta name=\"author\" content=\"Trustin Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/trustin\" \/>\n<meta name=\"twitter:site\" content=\"@trustin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Trustin Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\"},\"author\":{\"name\":\"Trustin Lee\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\"},\"headline\":\"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports\",\"datePublished\":\"2007-04-20T15:18:00+00:00\",\"dateModified\":\"2022-12-27T16:46:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\"},\"wordCount\":170,\"publisher\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\",\"url\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\",\"name\":\"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports — T's message of the day\",\"isPartOf\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#website\"},\"datePublished\":\"2007-04-20T15:18:00+00:00\",\"dateModified\":\"2022-12-27T16:46:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vault.motd.kr\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#website\",\"url\":\"https:\/\/vault.motd.kr\/wordpress\/\",\"name\":\"T's message of the day\",\"description\":\"the best is yet to come\",\"publisher\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vault.motd.kr\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d\",\"name\":\"Trustin Lee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png\",\"contentUrl\":\"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png\",\"width\":966,\"height\":966,\"caption\":\"Trustin Lee\"},\"logo\":{\"@id\":\"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/t.motd.kr\/\",\"https:\/\/www.facebook.com\/trustin\",\"https:\/\/www.instagram.com\/trustinlee\/\",\"https:\/\/www.linkedin.com\/in\/trustin\",\"https:\/\/twitter.com\/https:\/\/www.twitter.com\/trustin\",\"https:\/\/www.youtube.com\/@trustinlee\"]}]}<\/script>","yoast_head_json":{"title":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports — T's message of the day","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/","og_locale":"en_US","og_type":"article","og_title":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports — T's message of the day","og_description":"Static import \ubb38\uc5d0 \ub300\ud55c \uc774\ud074\ub9bd\uc2a4\uc758 ‘Organize Import’ \ubb38\uc81c \ud574\uacb0\ud558\uae30 CTRL+SHIFT+O is probably the most pressed shortcut in Eclipse JDT. It cleans up any unused imports, expands ugly asterisks, and reorganizes the import statements in order. It was very nice until asterisks were considered ugly. Since static imports are introduced in Java 5, things have been... Continue reading →","og_url":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/","og_site_name":"T's message of the day","article_publisher":"https:\/\/www.facebook.com\/trustin","article_author":"https:\/\/www.facebook.com\/trustin","article_published_time":"2007-04-20T15:18:00+00:00","article_modified_time":"2022-12-27T16:46:31+00:00","author":"Trustin Lee","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/trustin","twitter_site":"@trustin","twitter_misc":{"Written by":"Trustin Lee","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/#article","isPartOf":{"@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/"},"author":{"name":"Trustin Lee","@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d"},"headline":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports","datePublished":"2007-04-20T15:18:00+00:00","dateModified":"2022-12-27T16:46:31+00:00","mainEntityOfPage":{"@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/"},"wordCount":170,"publisher":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/","url":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/","name":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports — T's message of the day","isPartOf":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#website"},"datePublished":"2007-04-20T15:18:00+00:00","dateModified":"2022-12-27T16:46:31+00:00","breadcrumb":{"@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vault.motd.kr\/wordpress\/posts\/1533\/fixing-eclipse-organize-imports-annoyance-for-static-imports\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vault.motd.kr\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Fixing Eclipse 'Organize Imports' Annoyance For Static Imports"}]},{"@type":"WebSite","@id":"https:\/\/vault.motd.kr\/wordpress\/#website","url":"https:\/\/vault.motd.kr\/wordpress\/","name":"T's message of the day","description":"the best is yet to come","publisher":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vault.motd.kr\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/4430ad90fc2ddeef051565701d85db9d","name":"Trustin Lee","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png","contentUrl":"https:\/\/vault.motd.kr\/wordpress\/wp-content\/uploads\/2020\/09\/avatar-2019-966px.png","width":966,"height":966,"caption":"Trustin Lee"},"logo":{"@id":"https:\/\/vault.motd.kr\/wordpress\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/t.motd.kr\/","https:\/\/www.facebook.com\/trustin","https:\/\/www.instagram.com\/trustinlee\/","https:\/\/www.linkedin.com\/in\/trustin","https:\/\/twitter.com\/https:\/\/www.twitter.com\/trustin","https:\/\/www.youtube.com\/@trustinlee"]}]}},"_links":{"self":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1533"}],"collection":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/comments?post=1533"}],"version-history":[{"count":1,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1533\/revisions"}],"predecessor-version":[{"id":5813,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/posts\/1533\/revisions\/5813"}],"wp:attachment":[{"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/media?parent=1533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/categories?post=1533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vault.motd.kr\/wordpress\/wp-json\/wp\/v2\/tags?post=1533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}