넷빈즈의 루비 단축키 :: Ruby Shortcuts in Netbeans

Keybindings

This is not a complete list of keyboard shortcuts applicable to Ruby development in NetBeans; it is instead a list of some of the most important ones. For a complete set, consult KeymapProfileFor60. A handy but perhaps not as accurate PDF table is here.

Action Shortcut Mac Shortcut
Show code completion alternatives Ctrl-Space Ctrl-Space
Show documentation for the method, class or field under the caret. (Doesn't always work given Ruby's dynamic nature.) Ctrl-Shift-Space Command-Shift-Space
Show name of current parameter (when editing an argument list for a method call). (Doesn't always work given Ruby's dynamic nature.) Ctrl-P Command-P
Select applicable quickfix (when a lightbulb is showing next to the current line) Alt-Enter Alt-Enter
Jump between a Rails action (a method in a controller file) and its corresponding view (a .rhtml or .erb file). Ctrl-Shift-A Command-Shift-A
Jump between a test file and its tested file. Ctrl-Shift-T Command-Shift-T
Select the next enclosing block (hit repeatedly to select the surrounding statement, if block, method block, class, etc.) Alt-Shift-. (dot) Ctrl-Shift-.
Opposite of Ctrl-Shift-. in that it selects progressively smaller blocks around the caret. Alt-Shift-, (comma) Ctrl-Shift-,
Rename the symbol under the caret Ctrl-R Command-R
Go to the declaration of the symbol under the caret Ctrl-B Command-B
Comment or uncomment (toggle comments) for the selected lines or the line containing the caret Ctrl-/ (slash) Command-/
Reformat the code (selection or full file) Alt-Shift-F Ctrl-Shift-F
Indent or Outdent the selected lines Tab/Shift-Tab Tab/Shift-Tab
Go to line (by line number) Ctrl-G Ctrl-G
Toggle Breakpoint on current line Ctrl-F8 Command-F8
Hippie-expand / complete the current word by inserting the next matching word from open buffers. (Hit repeatedly to cycle through matches). Ctrl-K Command-K
Open Type (go to a class in open projects or in the Ruby libraries) Ctrl-O Command-O
Open File by name prefix (not path) Alt-Shift-O Ctrl-Shift-O
Run the current file. In a Rails project, this will open up the browser on the URL relevant to the file (unless it's a rakefile or a test file.) Shift-F6 Shift-F6
Test File (runs the unit test associated with the given file, or if not found the file itself as a test) Ctrl-F6 Command-F6



Snippets

See the RubyCodeTemplates document for more details.

There's a large number of code templates bundled with NetBeans. The following brief list just summarizes a few you might find convenient. To use, type the abbreviation in the editor and then hit Tab. Use the Tab key or Enter to finish each "section" in the template (if there are multiple). Shift-Tab will cycle backwards. The current editing section is shown in a blue highlight.

Abbreviation Description
: Insert a hash entry of the form :key => "value"
l Insert =>
doc Insert a do block with an unused block iterator variable
r In an RHTML file: Insert <% %>
re In an RHTML file, insert a Ruby Expression: <%= %>
jc For JRuby, require java and import a class by fully qualified name
ife If-else block
begin Begin-rescue-end block



Other Tips

  • There is a command for reformatting/word wrapping comments. You can go into the options dialog, locate the keymap and in the "Other" category, locate the "Reformat Paragraph" action and bind it to whatever you want. The word wrapping algorithm knows about rdoc conventions and will treat lists (bulleted, numbered, and labelled) specially, will leave preformatted content alone, etc.
  • You can also enable automatic word wrapping in comments by running the IDE with -J-Druby.autowrap.comments=true (which you can also add to your netbeans.conf or nbrubyide.conf file.
  • Pressing "#" inside a double quoted string will insert #{ } with the caret in the middle
  • Pressing "#" in a string when there is a text selection will surround the text selection with #{ }.
  • Similarly, pressing left parenthesis, left bracket, left brace, single quote or double quote when there is a text selection in Ruby code will surround the text selection with the opposite character (e.g. insert right parenthesis, right bracket, ... etc on the opposite end as well.
  • Pressing ", + or _ in a comment when there is a selected word will surround the word with the same character (useful for rdoc formatting).
2007/08/05 19:25 2007/08/05 19:25
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

몇가지 사소한 넷빈즈 팁

Did you know that Control-K automatically completes any previously typed strings from within the same editor? Similarly, Control-L completes previously typed strings found after the insertion point. Press either shortcut repeatedly to cycle through all possible completions.

Use shortcuts to speed up your work: Typing a colon and then hiting the tabkey inserts a hash entry of the form :key => "value". Pressing # inside a double quoted string will insert #{} with the caret in the middle. See the lost of all Ruby keyboard shortcuts in NetBeans IDE.

Did you know that you can open files that are not part of a project in the Favorites window? Select Windows > Favorites for a customizable file browser. You can also choose Navigate > Go to File or Go to Type from the menu to search for files and resources in your projects.
2007/08/05 19:24 2007/08/05 19:24
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

ANT 를 이용한 RMI 컴파일 ( rmic 로 stub 생성하기 )

2007/08/03 11:36

서비 JAVA , ,

Ant를 이용하여 RMI 빌드를 위한 스크립트 이다.

(Language : xml)
<!-- RMI 생성 -->
<target name="rmi" description="RMI Stub 생성" depends="make">
<echo message="* rmic 실행  *"></echo>
 <rmic base="./bin/classes" classname="com.prompt.rfid.rmi.CallableFunctionImpl" classpath="./bin/classes" stubversion="1.2">
   <classpath>
     <fileset dir="${jar.dir}">
      <include name="**/*.jar" />
     </fileset>
     <fileset dir="${lib.dir}">
        <include name="**/*.jar" />
       </fileset>
     <fileset dir="${classes.dir}">
      <include name="**/*.class" />
     </fileset>
   </classpath>
 </rmic>
</target>

다른부분은 특별히 언급 할 필요는 없을 듯 하다.
<rmic .. > 태그의 속성만 설명 하자면
base : rmic로 컴파일된 skel 과 stub이 위치할 경로 지정
classname : rmic 로 stub을 생성할 원격 객체를 지정
                 ( 소스를 지정하는게 아니라 javac에 의해 컴파일된 class 파일을 지정 한다. )
classpath : classname에 지정한 원격 객체 class파일이 위치하고 있는 경로
stubversion : 1.1 과 1.2 중 하나를 선택 할 수 있다. ( http://www.yunsobi.com/blog/61 참조 )
                   1.1을 지정하면 jre 1.3 이전의 방식대로 skel 과 stub 을 모두 생성 한다.
                   1.2를 지정하면 jre 1.4 이후 방식으로 sutb 만 생성한다.
2007/08/03 11:36 2007/08/03 11:36
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

기이한 세가지 이야기 :: 기담 ( 奇談 )

 
-- 스포일러 없음 --
영화 기담 포스터


영화 기담 포스터



'화려한 휴가'와 'D-WAR' 사이에서 조용히 개봉한 독특한 공포이야기 '기담'
지난 주말 '화려한 휴가'를 보고 오늘은 퇴근 후 기어이 혼자서 '기담'을 관람했다.
'화려한 휴가'를 같이 본 친구를 꼬득여 볼까도 했지만 공포/스릴러라면 치를 떠는 친구인지라
도저히 같이 보잔 말을 할 수 없었다. ( 사무실 사람들도 D-War 보러가자고 난리인 판국에
이름도 못들어본 '기담'이라는 영화에 관심이나 가겠는가.. )

사실 '기담'에 대한 이야기는 두어달 전 쯤에 소개로 만난이가 기담 제작에 참여 했던 사람이어서 몇몇
재미있는 이야기를 들을 수 있었고 그 때부터 개봉일만 기다리고 있었던 영화였기에 개봉일인 오늘 보지
않을 수 없었다.
영화판 이야기로는 기담도 꽤나 많은 우여곡절-제작 중단과 재개-을 겪으며 꽤 오랜기간의 촬영 끝에
간판을 거는 영화라고 한다. 그 친구와 이야기 할 땐 '화려한 휴가'가 가장 큰 라이벌이 될 것 같다고
하더니 'D-War'라는 복병이 숨어 있었을 줄이야..


보고난 소감은 , 딱 잘라 공포 나 스릴러라는 장르에 넣기 모호한 면이 있지만,  well-made 공포 영화라고
생각 한다. 일본의 끈적끈적한 공포 영화와도 다르고 그간 한국 공포영화에서 버여 주던 '깜짝 놀래키기'나
'비명 질러대기' 로 이야기를 끌어가지도 않는다.
화면과 이야기는 잘 다듬어져 있고 배우들의 연기도 안정적이다. 보는 동안은 긴장을 하지만 영화가
끝나고 난 후엔 공포 보단 드라마가 기억에 남는 그런 독특한 영화이다.

사진이 취미인지라 영화나 영상물을 보면 화면의 프레임과 빛을 유심히 보게 되는데 '기담'은 빛을 꽤나
잘 다루고 있으며 표준이나 약간 망원 계열의 렌즈로 촬영 했는지 화면은 시종일관 안정적인 구도를
유지하고 있다. - 그런데도 시각적인 지루함이 덜 한걸 보면 편집에 대단히 신경을 썼기 때문이리라 -
이건 개인적인 생각인데.. 기담에는 인물의 클로즈업이나 바스트씬에 유난히 많은 시간을 할애 하고
있다. 큰 덩어리가 주는 존재감도 공포를 느끼게 하는 요소로 사용한게 아닐까..?

각설하고, 영화 '기담'은 근자에 본 공포영화 중에 손에 꼽을만한 수작임에는 틀림 없다.
공포영화를 좋아하거나 색다른 귀신 이야기에 관심이 있는 이라면 챙겨 볼 만한 영화라고 생각한다.

시놉시스 열기..

2007/08/02 09:49 2007/08/02 09:49
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. 2007/08/03 22:37
    [기담]-기이한 이야기의 끝 Tracked from 뱀과 베아트리체
  2. 2008/03/19 21:58
    BPF후 Tracked from ego + ing
  1. 음..이거 네이버 평점이 의외로 좋더라구요.
    원래 공포물 못 보는데 상당히 끌리는 중입니다.
    오늘 화려한 휴가 보러갈거긴 한데, 조만간 라따뚜이랑 디워랑 기담도 봐야겠어요. 혼자라도 보러가야할 듯;;

  2. 아미료님. 올여름 극장가 영화를 다 섭렵하실 모양입니다.
    저도 영화 보고 난 후 영화평을 찾아보기 시작 했는데요.
    의외로 배경 음악쪽엔 후한 점수를 주지 않고 있더라구요..
    배경음이 영화와 언매치 라거나 영화 감상을 방해하거나 하진 않지만
    영화 싸이코에서 들었을 법한 효과음이 몇번 나오는데 그 때문인 듯
    싶습니다.

  3. '기담'으로 검색하다가 좋은 포스팅 보고 찾아왔습니다^^

    기담 장기 상영을 위한 네티즌 서명을 받고 있는데
    관심 있으시다면 도와주세요^^

    청원문 전문 :

    http://agoraplaza.media.daum.net/petition/petition.do?action=view&no=30536&cateNo=244&boardNo=30536


    영화 제작사, 배급사가 영화를 제공하는 게 아니라 소비자가 보고 싶어하는 영화를 요구하고 볼 수 있길 바랍니다.

    영화 기담은 올해 공포 영화의 수작으로 호평 받으며
    적은 상영극장 수에도 불구하고 관객들의 사랑을 받고 있습니다.

    그런데 여러 블록버스터 영화들의 틈에 끼어서
    8월 1일에 개봉했음에도 불구하고
    애초에 200여개의 극장, 그것도 소규모 극장으로 개봉했는데
    벌써부터 극장 수가 줄고,
    그나마 상영하는 극장도 단관개봉, 교차상영하는 경우가 많습니다.

    제작사와 배급사의 알력과 배분에 의해
    극장에 걸리는 영화가 결정되고 관객이 보고 싶어하는 영화가 있음에도 불구하고 멀티상영관이 한 두 어개 블록버스터 영화로만 채워졌습니다.

    기담을 보고 싶어하는 관객이 많음에도 불구하고
    상영 극장이 너무 적습니다.
    좋은 공포 영화 기담을 보고 싶어하는 영화 소비자의 요구를 받아주세요

  4. raim님 다녀가 주셔서 감사합니다.
    벌써 간판을 내린다고 하니.. 저도 조금 안타깝습니다.
    큰 영화 사이에서 선전하고 있다고 생각 했는데..
    말씀하셨던 부분이 장르영화의 어려운점이 아닌가 합니다.

서비, 종로에서 추태 부리다.

2007/07/29 15:55

서비 낙서장




간만에 만난 대학 동기녀석들에게 응석이라도 부리려 그랬던 걸까?
이런 추태도 너무 오랜만에 부려 본다.
친구들아 미안하다. 감정을 주체할 수 없었나 보다.




2007/07/29 15:55 2007/07/29 15:55
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

Baby Don`t Cry :: 安室奈美恵(아무로나미에)

호리키타 미키

사진은 호리키타 마키 사진집 진화론 中




지금 흐르는 곡은 '보잘것 없는 꿈' ( 아무로나미에 의
Baby Don`t Cry 으로 정정 합니다. 미우군님 감사합니다.
^^ 저만 몰랐던거 맞군요.. 히힛 )
이라는 제목의 노래입니다.
꽤 오래전에 모 온라인 동호회에서 알게 된 친구로 부터
받은 곡인데요.. 그동안 이런 곡을 받았다는것조차 잊고 있었습니다.

어제 디스크를 정리하면서 처음 들었는데 곡 분위기나 보컬의
목소리, 멜로디가 마음에 쏙 들어 곡 정보를 찾아보려고 검색을
해 봤는데 온통 일드 Hero OST의 ささやかな夢 정보 밖에 없더군요.

잘 알려지지 않는 곡 제가 몰랐던 곡- 혹, 저만 몰랐던 곡일 수도.. -
의 비애긴 하지만 이제라도 보물된 느낌이군요.

다녀가시는 분들 중 혹, 곡정보를 아시는 분이시라면
댓글 부탁 드립니다.
2007/07/27 00:44 2007/07/27 00:44
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. Blog Icon
    민제

    baby don't cry
    일드 비밀의 화원 ost
    2006년도 드라마였던걸로 압니다.
    드라마와 ost가 잘 어울렸던거 같아요
    특히 여자배우와 잘 어울렸던듯 해요

온라인 디지탈 컨텐츠에 영속성이 존재 할까?

2007/07/23 11:29

서비 낙서장 ,

얼마 전부터, 아니 꽤 오래전부터 가지고 있던 의문이다.
디지털 컨텐츠가 가지는 장점이 무었인가?
원본과 똑같은 복사본을 수없이 만들 수 있다는점과 반영구적인 보존이 가능 하다는거 아닌가?
그런데 디지털 건텐츠의 거대 유통소이자 저장소인 웹의 현실은 어떤가?
원본과 똑같은 복사본을 만들 수 있다는 장점은 눈앞에 접하고있는 컨텐츠가 원본인지.. 변경된 사본은 아닌지를
구분 할 수 없는 치명적인 단점을 수반하며 설령 그게 원본이라 하더라도 그건 오늘의 원본 이지 어제의 원본이 아닐 수 있다.
반영구적이라는 컨텐츠의 수명은 컨텐츠의 소유자, 혹은 컨텐츠가 속한 집단의 문화/성향, 유지 비용 등의 이유로  너무나 간단히 사라져 간다.

그럼 현재의 역사를 기록하고 있는 이런 디지탈 컨텐츠를 어떻게 영구히 유지 할 수 있을까?
이런 생각은 비단 나만 가지고 있던게 아니다. 이미 인터넷아카이브 라는 비영리 조직 의해 세계의 웹페이지들이 수집/보관 되고 있다.  관련기사 보기
모르긴 몰라도 이와 유사한 목적으로 활동하는 조직이나  진행되는 프로젝트들이 얼마간은 더 있을것이다.
하지만, 인터넷아카이브의 예를 보더라도 수집되는 웹사이트의 모든 페이지가 기록 되는 건 아니다.

개인이 만들어 내는 수많은 역사의 일부를 어떻게 보관 할 수 있을까?
이런 고민에 대해 기술적이 부분까지 고민을 진행 해 보진 않았지만 어렴풋이나마 '웹 사이트 무덤'과 같은 서비스를 생각 해 본 적이 있다.
- '무덤'이라는 단어의 어감이 좋지만은 않지만 더이상 활동하지 않는 사이트의 컨텐츠를 유지하며 온라인상에
흔적을 남겨 놓는다는 점에서 무덤이라 단어를 사용했을 뿐이다. -
사이트를 소유하고 운영하던 사람이 어떤 이유로 사이트와 그 컨텐츠를 유지할 능력을 상실 할 경우 무덤을 관리하는 단체
- 영리와 비영리는 또다른 문제 - 에 사이트 보관을 의뢰하면 그 단체에서는 영구적으로 그 정보를 보관 해 주는것이 기본적인 얼개이다.
'여전히 유지 비용 문제가 남게 되지만 최소한 온라인 컨텐츠가 일순간 사라지는 건 막을 수 있지 않을까'하는 상상을 하곤 했다.
이건 순전히 개인적인 상상으로, 실현되기 위해서는 수많은 현실적 문제들을 해결 해야 할 것이다.

이런 형태가 아니더라도 어떻게든 온라인 컨텐츠를 다음세대에 전달 할 방법이 필요하다고 생각한다.

인류가 만들어낸 그 어떤 문명의 속도보다 빠르게 변화하는 온라인 세상의 컨텐츠에 어떻게 영속성을 부여할 수 있을까?
2007/07/23 11:29 2007/07/23 11:29
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. 2007/07/23 14:38
    태터캠프 - 블로고스피어 오딧세이(4) Tracked from 하민혁의 통신보안
  2. 2007/07/23 18:31
    웹 콘텐츠여 영원하라, RSSArchives.org Tracked from 링블로그-그만의 아이디어
  1. 저도 저 사이트 꽤 오래 전에 본 기억이 납니다.
    저 같은 경우는 온라인보다는 오프라인에서의 기록에 대해 더 먼저 고찰했더랬죠.
    어쨌든 결국 어떤 식으로든 적자생존의 방식을 보일거라고 생각합니다.

컴포넌트 시스템과 클래스 로더 경계 :: Java Class Loader

어느 곳에서나 소프트웨어 개발자들은 단일 애플리케이션 개발 전략을 넘어서서 상호작용(interoperating) 애플리케이션 시스템 개발로 나아가고 있다. 현재 엔터프라이즈 개발자들이 당면하고 있는 문제들 중 하나는 최근의 WAR 와 EAR 파일 등 Web and Enterprise Archives 같은 단일 애플리케이션 디플로이먼트 구조에서 느슨하게 결합된 애플리케이션 컴포넌트 시스템으로 어떻게 옮겨갈 것인가 이다. 개발자들은 J2EE 플랫폼의 기본 기능과 호환됨과 동시에 코드 재사용을 늘리고 애플리케이션 복잡성을 줄이기 위해 컴포넌트 기반 애플리케이션 전략을 사용하길 원한다. JARs, WARs, EARs 등과 같이 플러그할 수 있는 컴포넌트 아카이브를 개발하는 것이 이 전략의 관건이 될 것이다.

그러나 J2EE에서의 컴포넌트 기반 애플리케이션 시스템 개발과 배포를 둘러싼 많은 함정이 도사리고 있다. 중요 함정 중 한가지는 Java 버추얼 머신에서 클래스 로더의 경계를 교차하여 기능하기 위한 컴포넌트 시스템을 얻는데 따르는 어려움이다.

클래스 로더는 환경 구획의 의미로 생각하면 된다. 명심해야 할 것은 클래스 로더는 하위 클래스 로더들을 생성할 수 있으며, 따라서 하위환경을 만들어낼 수 있다는 것이다. 이 하위 클래스 로더 환경의 클래스들은 윗 계급인 시스템 클래스 로더쪽을 볼 수 있지만 더 하위 계급의 클래스들은 볼 수 없다.

이런 종류의 다단계적 환경 구조는J2EE 서버 환경에서 매우 보편적이며 심지어 J2EE 기술을 둘러싼 다양한 규격에는 권장되고 있는 사항이다. 예를 들어 서블렛들은 각각 WAR 파일에 패키지화되어 있으며, 오버롤 시스템의 각각의 클래스 로더 컨텍스트에 디폴트값으로 주어져있다. 이는 WEB-INF/lib 디렉토리에 포함되어 있는 JAR 파일은 다른 웹 아카이브의 JAR 파일 안에 저장되어 있는 클래스들에 접근하지 못한다는 것을 의미한다. 단일 애플리케이션에 패키징하기 위해 WAR을 사용할 때 이 배열은 허용가능하나 올인원 전략을 넘어서서 좀 더 컴포넌트 기반 애플리케이션 아키텍처로 나아간다면 바로 문제가 되어버릴 것이다.

이런 문제들의 증상은 확실하지 않을 때가 많으므로, 클래스 로더 경계를 교차하여 컴포넌트를 전달하지 못한다는 것을 진단하기는 매우 어렵다. 예를 들어 웹 애플리케이션 아카이브의 서블렛들 사이로 전달시키고자 하는 Foo라는 이름의 오브젝트가 있다고 하자(어느 한 웹 아카이브 안의 서블렛에서부터 다른 웹 파카이브의 서블렛으로 전달됨을 의미). Foo컴포넌트를 위한 클래스 파일은 JAR 파일에 패키징되어 있으며 JAR 파일의 동일한 복사본이 각 웹 아카이브의 /WEB-INF/lib 디렉토리 안에 있다. 다음의 코드를 작성하자.

   /* This code runs in a servlet in WAR #1 */
   SystemScopeObjectCache cache = 
       SystemScopeObjectCacheFactory.getInstance();

   WARScopeFoo foo = new WARScopeFoo ();
   System.out.println(foo);
   cache.addToCache("myFooObject", foo);

   /* This code runs in a servlet in WAR #2 */
   SystemScopeObjectCache cache = 
       SystemScopeObjectCacheFactory.getInstance();
   Object o = cache.getFromCache("myFooObject");

   try {
     // the following throws a ClassCastException! 
     WARScopeFoo foo = (WARScopeFoo)o; 
        
   } catch(ClassCastException e) {
     e.printStackTrace();
   }

각 웹 아카이브의 서블렛에 접근가능한 WARScopeFoo 오브젝트를 위한 컴포넌트 캐시를 쉽게 생성할 수 있다. 그러나 만약 서블렛 A가 오브젝트의 인스턴스를 중앙 캐시로 전달하고, 다른 WAR의 서블렛 B가 캐시로부터 인스턴스를 꺼내 Object에서 WARScopeFoo로 전달하려한다면 시스템은 ClassCastException을 전달하게 될 것이다.

이 상황은 클래스 로더를 고려한 것이 아니라면 아무 의미가 없다. 서블렛 A 에서 참조하는 WARScopeFoo 클래스는 서블렛 B에서 참조하는 WARScopeFoo클래스와 전혀 연관 없는 다른 클래스 로더로부터 생성된다. 정확히 얘기하자면, 그 둘은 의도적으로 전혀 연관되어 있지 않다. 이것은 같은 서블렛 컨테이너에서 구동되는 웹 애플리케이션 간의 네임스페이스 보전성을 강화하기 위한 안전한 매커니즘이다.

클래스 로더가 충돌한다는 또 다른 신호는 시스템의 단일 클래스에서 다중 인스턴스를 찾았을 때이다. (단일 클래스에는 단 한 개의 클래스 인스턴스가 생성되어야 한다.) 기술적으로 단일 인스턴스는 그 클래스 로더 안에서만 독자적일 뿐이다. 따라서 클래스 로더 단계에서 단일성에 의지하는 것은 위험하다. 다음의 예제를 보자.

   /* MyServlet in WAR #1 */
   WARScopeSingleton cache = WARScopeSingleton.getInstance();
   WARScopeFoo foo = new WARScopeFoo ();
   cache.add("myFooObject", foo);
   System.out.println(cache.length()); //output is 1

   /* MyOtherServlet in WAR #2 */
   WARScopeSingleton cache = WARScopeSingleton.getInstance();
   System.out.println(cache.length()); //output is 0!

이 예제에서 코드는 단일 클래스에서의 오브젝트들을 저장한다. 그러나 단일 클래스에서의 스코프는 WAR 클래스 로더를 필연적으로 발생시킨다.

다행히 엔터프라이즈 Java 개발자들을 위해 이런 장애들을 극복할 몇 가지 방법이 있다. 첫번째 단계는 어떤 클래스 로더 경계가 늘 존재하는 것이 보장되는지 확인하고 그에 대한 전략을 계획하는 것이다. 모든 J2EE 환경에는 세 개의 클래스 로더 레벨이 구축되어 있다. 시스템 단계의 컨텍스트는 대부분 VM을 교차하며 J2SE와 J2EE 플랫폼의 클래스와 호환된다. 이것은 애플리케이션 서버가 자체적으로 구동하는 레이어이다.

다음 단계는 Enterprise Archive 컨텍스트인데, 이는 엔터프라이즈 애플리케이션의 모든 JAR와 WAR를 포함하고 있다.

마지막 단계는 Web Archive 컨텍스트이며, 이는 WAR 파일 /WEB-INF/classes디렉토리의 모든 파일과 /WEB-INF/lib 디렉토리의 모든 JAR 파일을 포함하고 있다. WAR 파일 안에 로딩된 모든 클래스가 상호 접근 가능함은 물론이고 EAR 파일과 System 클래스 로더의 클래스들과도 접근가능하지만 다른 WAR 파일 안에 로딩된 클래스들과는 접근될 수 없다.

따라서 웹 아카이브 간의 사용자 비즈니스 오브젝트를 공유하고자 한다면 오브젝트의 JAR 파일을 EAR 클래스 로더 컨텍스트에 위치시키고 WAR 파일의 /WEB-INF/lib 디렉토리는 피하는 게 좋다. 다음은 그 예이다.

   /* MyServlet in WAR #1 */
   EARScopeCache cache =EARScopeCache.getInstance();
   EARScopeFoo foo = new EARScopeFoo();
   cache.add("MyFooObject", foo);

   /* MyServlet in WAR #2 */
   EARScopeCache cache = EARScopeCache.getInstance();
   Object o = cache.get("myFooObject");
   EARScopeFoo foo = (EARScopeFoo)o; //SUCCESS!

이 작업의 이유는 각각의 서블렛은 상위 계급의 클래스 로더를 추구하고 WAR 클래스 로더 컨텍스트에 클래스들을 로딩하는 대신 같은 EARScopeCacheEARScopeFoo오브젝트를 찾는다는 데에 있다.

그러나, EAR 파일을 조합하는 것은 서블렛 규격의 참조 구현인 Tomcat 같은 어떤 컨테이너 에서는 옵션이 아니다. Tomcat은 EAR 파일에서 클래스들을 로딩하는 정보처리 기능이 없으며 따라서 다중 웹 아카이브에 클래스들을 교차할 수 있게 만들지 못한다. 그러나 Tomcat은 일반 클래스 로더를 보유하여 /common디렉토리의 모든 JAR 파일을 모든 웹 아카이브 컨텍스트위에 직접적으로 존재하여 접근가능한 클래스 로더 스페이스에 로딩한다.

생각해볼 수 있는 다른 기술로는 서로 다른 컴포넌트 하위 시스템 간에 데이터를 왕복전달하기 위해Java 배열을 사용하는 것이 있다. 두개의 애플리케이션으로부터의 컴포넌트가 바이트로 배열된 데이터를 저장할 수 있는 공유 장소가 있고, 버전 충돌이 잠재적으로 있다는 사실을 배제하면 이 전략은 빠르고 효과적이다.

원문 출처 : http://kr.sun.com/developers/techtips/e2004_0824.html#2

2007/07/22 13:39 2007/07/22 13:39
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

공연 티켓이 하늘에서 떨어졌다..


타악뮤지컬 '야단법석' 공연티켓이 생겼는데
같이 갈 사람이 없다. 이런 짜짜로니 같은 상황이...

티켓만 주지말구 같이 갈 사람도 좀 주면 안되겠니?

이노무 좁고 얇은 인간 관계에 대해 다시 한번
생각 해 봐야 겠다.

누구 나랑 같이 공연 보러 갈 사람 없음둥?

2007/07/21 22:09 2007/07/21 22:09
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. 저랑 가요~

  2. 아미료님의 관심에 마음 속 깊은 곳부터 감사드립니다.
    진작에 연락 드려볼걸 그랬나 봅니다. 하하..
    아쉽게도 어제 날짜의 공연이었고 홀로 다녀왔습니다.

    다음번에 비슷한 기회로 아미료님께 실례가 될지 모르는 부탁을
    드리면 그 때도 한번 생각 해 봐 주시겠습니까?

  3. 앗, 그냥 드린 말씀인데ㅎㅎ
    혼자 가셨다니..;; 재미는 있으셨어요?

  4. 빈말이라도 고마워요. ^^
    타악이라든지 퍼포먼스 공연이 는 탓인지
    신선한 맛은 없었지만, 공연은 나름 재미있었습니다.

    사진 몇컷 담아올 요량으로 사진기를 챙겨 갔는데
    사진 촬영을 일절 허용하지 않아 못내 아쉬웠습니다. ㅎ

  5. 부담 느끼지 마시란 의미였어요.ㅎ
    나중에 좋은 기회가 있겠죠?

    공연이고 전시회고 사진 촬영은 소규모 갤러리나 가능한 것 같아요. 심지어 명동성당조차 촬영 금지잖아요.ㅎㅎ

Adobe AIR 에 낚이다.. 퍼덕퍼덕..

요 며칠간 집중적으로  Adobe AIR ( Adobe Integrated Runtime ) 에 대해 조사 해 볼 일이 있었습니다.

어도비 에어는 간단히 말해 웹브라우저를 뛰쳐나와 단독 어플리케이션으로 실행 되는 플레시를 위한
실행 환경 정도로 이해 할 수 있겠습니다.
아직 정식 버전이 출시 되지 않았고 이전에는 Apollo 라는 코드명으로 불렸습니다.

플렉스의 신선한 UI로 데스크탑 어플리케이션을 작성 하고 실행 할 수 있는 환경을 제공한다는 점에서
많은 개발사/개발자의 주목을 받고 있는 adobe 사의 다음세대 전략 상품 중의 하나 입니다.


에어가 서서히 그 모습을 드러냄에 따라 저희 회사에서는,
국내 모 기업의 모 데스크탑 어플리케이션 업그레이드와 관련하여 향후 비전으로  AIR로
밑그림을 그린 로드맵을 제안 했고 그 이야기의 진척이 생각보다 빨라 발걸음이 빨라진 덕분이죠.

본격적으로 AIR에 대한 가능 조사가 이루어짐과 동시에 모 기업으로부터 기술적으로 구현
가능여부를 묻는  몇가지 질문리스트를 받았습니다.

참고로 그 어플리케이션은 Windows 어플리케이션으로 다수의 서드파티 dll, com이 연동되며
윈도우 api 호출이 있는 프로그램입니다.

서드파티 모듈들도 산재하고 있기 때문에 모든 내무 모듈을  AIR로 전환하는건 어렵다고 판단,
쉽진 않겠지만 AIR에서 기존 모듈을 호출하는 방향으로 개발을 진행 하자는것까지도 내부 협의가
이루어 진 상태 였습니다.

이 시점에서 제가 조사해야 하는 부분이 AIR와 네이티브 코드와의 연동을 어떻게 하는가
- 정말, 지금 생각 하면 air에 대해 아무것도 몰랐다 라고 밖에 할 수 없는 대목 입니다. ㅋ -
였습니다.

Adobe에서 데스크탑 실행 환경을 위한 런타임과 개발 환경을 공개하고 있는 마당에
- JAVA에는 네이티브 코드 호출을 위해 JNI라는 기술이 있습니다. -
설마 JNI와 유사한 기법이 있지 않겠느냐는 순진한 생각을 하고 있었던거죠..

관련 문서와 API, Sample Code를 보면서 점점 위에 생각들이 얼마나 부질 없는 상상의 나래 였는지
깨닫는데는 그닥 긴 시간이 필요치 않았습니다.

종극에는 AIR에서 자바스크립트로 ActiveX를 호출하자는 방안까지 나왔으나 이는 구현의 분량이나
기술적 위험부담이 너무 커 접기로 했죠..

이 문제로 오늘 한국 어도비의 옥상훈 차장님과 회의를 가졌습니다.
옥 차장님도 AIR이외의 라이브러리 호출에 관한 고객의 Needs는 국외에도 있지만
AIR 1.0 버전에서는 그런 요구에 대한 지원은 없을것이라는게 확인 된 사항이고
차기 버전에서는 수용이 가능하지 않겠는냐 하는 말씀을 하시더군요..
지금은 Adobe 본사도 AIR의 4사분기 출시에 신경을 쓰고 있는 상황이지 새로운 규격을
포함 할 시기는 아닌 거죠.

그랬던겁니다. AIR는 지금까지의 웹어플리케이션을 데스크탑 어플리케이션으로
끌어오는데 적합한 기술이지 데스크탑 어플리케이션을 작성하기위한 기술이 아니었던 겁니다.


현재까지 AIR가 데스크탑 어플리케이션을 위해 지원하는 api는 File IO와 내장 DB를 활용 하는 수준에
그치고 있었던 겁니다.
이런 빈약한 API로 어떻게 데스크탑 어플리케이션을 작성 한단 말입니까...
메모장만 만들고 있을까요?

물론, AIR의 실체에 대한 정확한 이해 없이 과대 평가한 건 저희쪽의 실수입니다.
하지만 개발자라면, 데스크탑 어플리케이션을 작성할때 기본적으로 이러이런건 되야지 않겠는가
라고 당연히 생각 할 수 있는 부분을 Adobe AIR는 수용하지 못하고 있다는 사실입니다.

AIR의 잠재력은 높이 평가하고 있고, 그 행보도 예의주시 하고 있습니다.
차기 버전에서는 외부라이브러리 호출을 위한 길을 터 주던지 아니면, 그에 준하는 풍부한 API지원이
실현 되었으면 합니다.

2007/07/19 22:07 2007/07/19 22:07
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. 2007/07/20 06:04

모든 파일의 확장자를 jpg.jpg.jpg로 바꾸고 용량을501kb로 변환하는 악성 스크립트

파코즈의 모 회원분이 p2p프로그램으로 애니메이션을 받았는데,
곰플레이어에서 '코덱을 찾을 수 없다.' 길래 윈도우 미디어 플레이어로
재생 하는순간 하드디스크의 모든 파일 확장자가 jpg.jpg.jpg 로 바뀌며 파일
사이즈가 501kb가 되어 버렸다고 합니다.

현재 일본에서 극성중인 악성 스크립트라고 하는데요...

원문살짝..



p2p를 통해 영상물이나 음악파일등을 받는게 올바른 행위가 아님은 잘 알지만
p2p를 전혀 사용하지 않는 생활을 상상 할 수 없는 현실을 고려 한다면 저런
악성 스크립트는 스스로 조심 하는 수 밖에 없는것 같습니다.

원문은 : http://www.parkoz.com 입니다.
2007/07/15 20:26 2007/07/15 20:26
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. 2007/07/16 01:12
    파일을 파괴하는 일본산 악성코드 Tracked from 하늘과 바람과 별과 시
  1. 저도 한번 걸려봤었죠. Winny의 영상 받는데요. 여러가지 분석 한 결과 파일 관련 레지스트가 자동으로 등록됩니다. 또, Windows 폴더에 보시면 문서파일이 몇개있습니다. 확장자가 txt인데요, 그것을 jpg바꾸면 또 저런 그림으로 바뀝니다. 저도 음악 받아놓은거 다 날라갈뻔 했고요, 포맷밖에 없습니다... Share는 바이러스 없더군요. 수고하세요..

  2. 유메노세카이님 직접 겪으셨다니..
    직접 격는다면 정신적 대미지가 상당 할것 같습니다.
    사라진 음악 파일에 심심한 위로를 드립니다.

다음 애드클릭스로 인한 페이지 로딩 속도 저하

어제 오후께부터 제 블로그 페이지 로딩이 심각하게 느려지는 현상이 보이기 시작 했습니다.
오페라 브라우저의 전송속도 표시부를 보면 초당 10kByte 미만의 전송 속도를 보이더군요..
처음엔 제 계정을 서비스하고 있는 호스팅 업체쪽의 문제인 줄 알았습니다.
[ 해외 호스팅을 이용하고 있기 때문에 제일 먼저 그쪽을 의심 하게 되더군요 ]

하지만, 제 갤러리쪽을 접근 해 보면 이 블로그 만큼 느리다는 느낌을 받을 수 없었습니다.

그렇다면.. 외부 서비스 때문일 가능성이 높아지는데요...
현재 제 블로그에서 이용 하고 있는 외부 서비스는 애드센스, 애드클릭스, Spotplex
구글 애널리틱스 정도 입니다.
이녀석 들 중 하나가 페이지 로딩을 방해 하고 있는 거겠죠..
이 중에 갤러리에서 이용하고 있지 않은 서비스가 애드클릭스 입니다.

시험삼아 페이지에서 애드클릭스 스크립트를 주석 처리하였더니 페이지 로딩 속도가
예전 수준으로 돌아가는군요..

주말을 이용해 다음쪽에서 어떤 작업을 진행 중인건지..
애드클릭스를 이용하시는 다른 블로거분들은 자신의 블로그 잘 열리시나요?

일단은 애드클릭스 스크립트는 막아뒀다가 주중에 다시 활성화 해 봐야겠습니다.
2007/07/15 17:47 2007/07/15 17:47
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

아.. 날씨 좋다..

아래 지방은 태풍이 온다는데 여기는 폭풍전주(周) 인지 하늘 빛 부터 구름 색까지..
너무 맑고 청명 하네요..
크~~~ 이런 날 그녀와 바람쐬러 가지 않으면 도대체 언제 바깥구경을 한단 말입니까?
하지만 짝이 없다는거~~
어째, 우울한날 보다 이런날 짝이 없는게 더 안타까워요...

어제 오이도 같이 가자던 직장 후배의 제안을 거절한게 후회 되네요. ^^;;
카메라 둘러메고 가까운 공원이라도 나가 봐야 겠어요..

여러분도 오늘 같은날은 잠시 컴퓨터를 끄고 바깥 공기를 쐬어 보시는건 어떠세요?

2007/07/14 14:04 2007/07/14 14:04
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다
  1. 아, 어제 날씨 최고 좋았어요. 햇살은 굉장히 강한게 바람 불어서 나름 선선하더군요. 아는 오빠네 집 놀러갔다가 밥 먹으러 나오는데 날이 너무 좋은거에요. 사진 찍으러가고 싶다고 둘이 막 그랬는데 뒷 약속이 있어서 못갔어요. 서비님은 사진 좀 찍으셨나요?ㅎㅎ

  2. 옙~ 저는 하늘공원 다녀왔답니다..
    공원에 올라가니까 공기도 맑은데다 빛도 좋아서
    서울 건물들이 예쁘게 보이더라구요..

에반게리온 新극장판: 서(序) 트레일러, 우타다 히카루의 Fly Me To The Moon ( In Other World )

에바 에반게리온


조금만 더 기다리면 에바의 새로운 이야기를 볼 수 있겠군요..
능력이 되면 일본 개봉 할 때 가서 보고 싶지만.. 그건 어려울 듯 하고..
국내에서 개봉 할 여지는 거의 없어보이고..


아래는 에반게리온 신극장판: 서(序) 트레일러입니다.
두곡의 주제가를 이번에는 우타다 히카루양이 부르죠.
우타다 히카루양도 스스로 에바오타쿠라 칭할정도로 에반게리온을 좋아한다고 하던데
자신이 좋아하는 애니메이션의 주제가를 부를 수 있는것도 행복한 일이겠죠?
히카루양 노래도 곧잘 듣지만 Fly me to the moon 은 예전 에바 tv 판 쪽이
제 귀에는 잘 맞는것 같습니다.

 

[Flash]


Beautiful_World :: Utada Hikaru

more..




Fly Me To The Moon :: Utada Hikaru
2007/07/12 05:49 2007/07/12 05:49
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

넷빈즈에서 루비 에디팅 하기 :: NetBeans Ruby Editing

넷빈즈 6.0 출시를 앞두고 마이스톤 10까지 발표된 현재, netbeans.org에 넷빈즈6.0 와 JDK6.0에 포함 되는 루비에 대해 넷빈즈에서는 어떻게 지원이 되고 있는지에 대한 기사가 올라 왔습니다.
기사 내용을 보면 일반적인 IDE의 에디터가 제공하는 거의 모든 기능을 제공하고 있는 듯 합니다.


Syntax Highlighting

Lexical scanning is done with JRuby's scanner, which identifies elements like global variables and instance variables. As in the Java editor, fields are shown in green. The editor also recognizes Ruby's identifiers, so double clicking in the editor to select the symbol under the mouse pointer includes non-Java identifier characters like @, $, and so on.

Note: You can change the font used in the editor by choosing Tools > Options > Fonts and Colors. In this Options dialog box, by default the Syntax tab and the Default category are selected. Change the font for the Default category to change the font in the editor.

Navigation Display

The Navigator window displays the structure of the file from modules down to individual methods, fields and attributes. Double-clicking an element in the Navigator window, shown in the figure below, displays its source in the editor.

Figure 1: Navigator Window
Figure 1: Navigator Window

The structure analyzer is aware of Ruby constructs. For example, attr, attr_accessor, attr_reader, and module_function will properly construct fields, singleton methods, and so on that are included in navigation and code completion.

The Filters buttons at the bottom of the window enable you to filter out private methods, fields, and so on.

Code Folding

Modules, classes and methods can be folded, as shown in the next figure.

Figure 2: Code Folding
Figure 2: Code Folding

Background Error Parsing

The JRuby parser is run in the background when the user stops typing. It provides error messages as error annotations. On a successful parse, the parse tree is used to drive additional features. (And in the future, JRuby will hopefully provide partial parse trees even on erroneous Ruby files.)

Figure 3: Error Annotation
Figure 3: Error Annotation

Semantic Syntax Highlighting

This feature identifies method calls and definitions, parameters, and unused variables.

Figure 4: Semantic Syntax Highlighting
Figure 4: Semantic Syntax Highlighting

Mark Occurrences

Positioning the edit cursor on an element (such as a local variable, dynamic variable, instance variable, global variable, method call, or class reference) highlights all other references as well as redefinitions of the current symbol.

The first example shows how parameters are highlighted when you position the cursor on one of them:

Figure 5: Highlighted Parameters
Figure 5: Highlighted Parameters

The next figure shows method calls and method definitions that are highlighted when the cursor is positioned on the second method from the bottom. The editor uses method arity to select which of the overloaded methods apply.

Figure 6:  Highlighted Methods
Figure 6: Highlighted Methods

There is additional highlighting behavior. If you place the cursor on a method definition, the editor highlights all the potential exit points - the last statement of the method as well as any return, yield, raise, or fail statements.

Go To Declaration

If you right-click an element and choose Go To > Declaration, the editor will go to the declaration for the element if possible. If you hold down the Ctrl key (or the Command key on the Macintosh) and drag the mouse pointer over the source code, identifiers are highlighted as hyperlinks. Clicking a hyperlink goes to its declaration if possible.

Figure 7: Ctrl-Drag Shows Go To Declaration Hyperlinks

Figure 7: Ctrl-Drag Shows Go To Declaration Hyperlinks

Note: This feature always works for local variables and dynamic variables, but it is not as reliable for methods, classes, and such because it requires the type inference engine as well as some other facilities for finding references in the built-in libraries.

Instant Rename

Renaming a local or dynamic variable is done in place, and all references are updated on the fly. To invoke this feature, right click the element and chose Instant Rename, or press Ctrl-R on Microsoft Windows systems or Command-R on Macintosh systems. All instances to be renamed are selected, as shown in the figure below, and when you type the new name, all are updated.

Figure 8: Instant Rename

Figure 8: Instant Rename

Code Completion

Some basic code completion is provided. As you are typing, if you press Ctrl-Space, completion is provided for local variables and dynamic variables in the current block, as well as method names, class names, and constants in the same file. In addition, various Ruby built-ins, such as keywords and predefined constants, are provided.

If you try code completion on any complicated arbitrary expression, it will show you a number of possible method completions along with the corresponding class, as shown in the following figure. This feature gives you much the same information as ri, the Ruby Interactive Reference.

Figure 9: Code Completion:

Figure 9: Code Completion: All Matches

In many contexts, you know the exact type. For example, if you type File.c and invoke code completion, the editor shows you only the singleton methods of class File that start with c, as well as inherited methods and module mixins.

Figure 10: Code Completion: Singleton

Figure 10: Code Completion: Singleton

In some cases, the editor can detect that it is dealing with an instance of an object, so it has more information than just the class. In that case, it can show all the instance methods too, not just the class methods.

In the following figure, code completion is being applied to a regular expression literal. Code completion works for all kinds of literals in your code: strings, regular expressions, arrays, hashes, symbols, numbers, and so on, and you can even use it with the nil keyword. For example, with arrays, try code completion with [1,2,3].e to see the each method and its documentation.

Figure 11: Code Completion: Instance
Figure 11: Code Completion: Instance

When there is associated Ruby documentation (rdoc) for a program element, it is displayed in a documentation popup below the code completion window, as you can see in the previous figure. There is also documentation for some built-in keywords that is based on the Ruby spec at http://www.headius.com/rubyspec/index.php/Ruby_Language, as shown for the yield keyword in the next figure.

Figure 12: Code Completion: Keyword Documentation
Figure 12: Code Completion: Keyword Documentation

Code completion also provides help in specific contexts. For example, if you invoke code completion within the string of a require or load statement, you see a list of available imports:

Figure 13: Code Completion: Require Statement

Figure 13: Code Completion: Require Statement


If you invoke code completion while typing a regular expression, you get help with regular expression syntax, as shown in the following figure.

Figure 14: Code Completion: Regular Expression
Figure 14: Code Completion: Regular Expression

If you're typing Ruby code and can't remember the names or meanings of dollar variables or what the escape codes are following a percent sign, use code completion as shown in the following two figures.

Figure 15: Code Completion: Dollar Variable
Figure 15: Code Completion: Dollar Variable

Figure 16: Code Completion: Dollar Variable
Figure 16: Code Completion: Percent Symbol

There are more scenarios. For example, invoking code completion after a def keyword lists only the inherited methods from the superclasses. For more applications of code completion, see Tor Norbye's blog Ruby Screenshot of the Week #10: Taking Up The Gauntlet.

Pair Matching

The editor automatically highlights matching parentheses (), braces {}, brackets [], string delimiters " ', regular expression delimiters %r{}, and so on. In addition, as you're editing, the editor tries to automatically insert and remove matching delimiters automatically without getting in the way. For example, if you type %x{, the editor modifies the document to contain %x{|}, and if you then type the closing }, it removes the previously added } so the document contains only one closing brace. The important part here is that while you're editing, the file stays valid so that code completion and similar features will work.

Pair Matching works on blocks as well. If you type for something or def (something) and press Enter, the editor automatically adds an end statement for you if one is needed, inserts a line above it, and positions the cursor on that line. The feature works similarly for closing braces in blocks. It also works on =begin/=end pairs. If you type =begin and press Enter, the editor automatically adds =end for you if it is needed. Additionally, if you put the cursor on an end statement, the editor highlights the statement that began the block.

Figure 18: Matching End to Beginnning of a Block
Figure 18: Matching End to Beginning of a Block

Smart Indent

Pressing Enter to create a new line causes the new line to be indented appropriately, either with the same indent as the previous line or further indented if establishing a new block, such as with an if statement or case statement

Smart indent also works in other cases. For example, if you type end at the beginning of a line, the editor indents the line to align the end with the corresponding opening statement, such as class, def, for, and so on. If you continue typing more characters after end (for example, end is the first three characters of endiandCheck()), the line is indented to its original position immediately.

Figure 17: Smart Indent
Figure 17: Smart Indent

Smart Selection

If you press Alt-Shift-Up Arrow or Alt-Shift-Down Arrow on a Microsoft Windows machine or Ctrl-Shift-Up Arrow/Down Arrow on a Macintosh, the editor selects progressively larger (Up Arrow) or smaller (Down Arrow) code blocks around the cursor. For example, if you're in a for block that is inside an if block, on the first press of Alt-Shift-Up Arrow, the for block is selected, then on subsequent key presses the surrounding if block is selected, then the method definition, then the class, then the module. In a comment, first the line is selected, then the whole comment block, then whatever logical code block surrounds the comment.

Formatting

The Reformat Code command reformats the source code by using the same line indenting logic that Smart Indent uses. To automatically reformat your code, right-click and choose Reformat Code, or press Ctrl-Shift-F. There is also a Pretty Printer, which will go a bit further in reorganizing code, adding or removing parentheses, and so on. The Pretty Printer is incomplete and is not yet enabled.

RDoc Support and String Support

RDoc is the Ruby Documentation System. In the Ruby Editor, comments containing RDoc tags or directives will show the RDoc directives as highlighted. Similarly, quoted strings will show the escape sequences in bold.

Note: As mentioned previously under Code Completion, if there is rdoc support for an element, you see the rdoc when you display the code completion pop-up. This section discusses code editor support for your rdoc comments in your code, not the rdoc displayed by the editor for code completion.

Figure 23: RDoc Comments and Quoted Strings
Figure 23: RDoc Comments and Quoted Strings

Embedded code fragments within String literals and regular expressions are also supported, as shown in the next figure.

Figure 24: Embedded Code Fragment Support in Strings and Regular Expressions

Figure 24
: Embedded Code Fragment Support in Strings and Regular Expressions


원문 출처 : http://www.netbeans.org/kb/60/ruby-editing.html
2007/07/10 18:21 2007/07/10 18:21
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다