Posted title : 태그 : plugin
2008/11/13   [PMD] eclipse PMD 플러그인
2008/08/26   [pathtool] eclipse plugin 소개
2008/06/01   [jsunit] javascript 테스팅프레임웍
2007/11/25   [Ruby] Ruby 설치
Posted
2008년 11월 13일 Posted title : [PMD] eclipse PMD 플러그인

eclipse plugin 설치

To install the PMD plugin for Eclipse:

  • Start Eclipse and open a project
  • Select "Help"->"Software Updates"->"Find and Install"
  • Click "Next", then click "New remote site"
  • Enter "PMD" into the Name field and "http://pmd.sf.net/eclipse" into the URL field
  • Click through the rest of the dialog boxes to install the plugin

Package Explorer에서 프로젝트 선택후 마우스 우클릭 PMD -> Check Code with PMD 실행



Violance Overview(우측하단그림)에 소스파일에 대해 체크한 내용들이 출력된다.
그중 하나를 선택(TooFewBranchesForSwitch..) 를 클릭하면
Violance OutLine에 (좌측하단그림)에 그 에러에 대해 하이라이팅되면서 설명을 볼 수 있다.
TooFewBranchesForSwitch에 대한 에러설명은 A switch with less than 3 branches is inefficient, use a if statement instead.
라고 출력된다.

Violance OutLine

에서 마우스 우측버튼을 누르면 Show Detail 항목으로 자세한 에러의 자세한 내역을 알 수 있다.


Posted by 지니짱 | 2008/11/13 09:58 | - 이클립스 | 트랙백
2008년 08월 26일 Posted title : [pathtool] eclipse plugin 소개

이클립스에서 현재 열고 있는 파일의 경로를 클립보드에 복사하거나

그 위치에서 탐색기를 열거나, 다른 에디터로 열 수 있게 해주는 플러그인

 

http://code.google.com/p/pathtools/

 

설치: 이클립스 버전에 따라 jar를 다운받아 eclipse의 plugin 디렉토리에 복사하고

리스타트 하면 설치 끝

 

설정: Window -> Preference -> PathTool

에서 설정을 바꾸어 notepad대신 editplus를 explorer대신 total commander를 띄우게 수정할 수도 있다.

툴바에 나오게 하려면 마우스 우측버튼으로 Customize Perspective에서

Commands 탭에서 PathTool s 체크

사용1 : Package Explore에서 사용시 상단 툴바가 활성화된다.

사용2: 에디터 화면에서는 마우스 우측 팝업메뉴로 경로를 복사하거나 탐색기를 띄울수 있다.

(이 기능 처음버전에는 없었는데 메일로 기능추가해달라고 하니 바로 추가해주었다 ^^;)

 

Posted by 지니짱 | 2008/08/26 14:02 | - 이클립스 | 트랙백
2008년 06월 01일 Posted title : [jsunit] javascript 테스팅프레임웍
홈페이지 http://www.jsunit.net/
다운로드 https://sourceforge.net/project/showfiles.php?group_id=28041
(이클립스 플러그인은 수동으로 plugin 디렉토리에 복사)
예제 http://www.jsunit.net/examples/index.html

참고할 만한 사이트: http://webjoy.kr/132
http://wiki.javajigi.net/pages/viewpage.action?pageId=4497

<html>
 <head>
  <title>Test Page for multiplyAndAddFive(value1, value2)</title>
  <script language="javascript" src="jsUnitCore.js"></script>
  <script language="javascript" src="myJsScripts.js"></script>
 </head>
 <body>
  <script language="javascript">
    function testWithValidArgs() {
        assertEquals("2 times 3 plus 5 is 11", 11, multiplyAndAddFive(2, 3));
        assertEquals("Should work with negative numbers", -15, multiplyAndAddFive(-4, 5));
    }
    function testWithInvalidArgs() {
        assertNull("A null argument should result in null", multiplyAndAddFive(2, null));
        assertNull("A string argument should result in null", multiplyAndAddFive(2, "a string"));
    }
    function testStrictReturnType() {
        assertNotEquals("Should return a number, not a string", "11", multiplyAndAddFive(2, 3));
    }
    function testWithUndefinedValue() {
        assertNull("An undefined argument should result in null", multiplyAndAddFive(2, JSUNIT_UNDEFINED_VALUE));
    }
  </script>
 </body>
</html>


의 형태로 테스트 코드 작성


샘플
jsUnitMyFirst.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JsUnit Framework tests</title>
    <script language="javascript" type="text/javascript" src="../app/jsUnitCore.js"></script>
    <script language="javascript" type="text/javascript" src="myJsScripts.js"></script>
    <script language="javascript" type="text/javascript">
     function testAdd() {
      assertEquals(5, add(3, 2));
     }
     function testSimple(){
      var d = new Date();      //month는 0부터 시작
      assertEquals(5,d.getMonth());
     }
     function testDate10DaysBeforeAdjustDate(){
      var expectedDate = new Date(2008,5-1,22); //5월 22일
      assertEquals(expectedDate.getDate(),adjustDate('1').getDate());
     }
     function testMonth10DaysBeforeAdjustDate(){
      var expectedDate = new Date(2008,5-1,22); //5월 22일
      assertEquals(expectedDate.getMonth(),adjustDate('1').getMonth());
     }
     function testDateOneMonthsBeforeAdjustDate(){
      var expectedDate = new Date(2008,5-1,1); //5월 1 일
      assertEquals(expectedDate.getDate(),adjustDate('2').getDate());
     }
     function testMonthOneMonthsBeforeAdjustDate(){
      var expectedDate = new Date(2008,5-1,1); //5월 1일
      assertEquals(expectedDate.getMonth(),adjustDate('2').getMonth());
     }
     function testDateOneYearsBeforeAdjustDate(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate('3').getYear());
     }
     function testDateOneYearsBeforeAdjustDate(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate('3').getYear());
     }
     function testDate10DaysBeforeAdjustDate2(){
      var expectedDate = new Date(2008,5-1,22); //5월 22일
      assertEquals(expectedDate.getDate(),adjustDate2('10d').getDate());
     }
     function testMonth10DaysBeforeAdjustDate2(){
      var expectedDate = new Date(2008,5-1,22); //5월 22일
      assertEquals(expectedDate.getMonth(),adjustDate2('10d').getMonth());
     }
     function testDateOneMonthsBeforeAdjustDate2(){
      var expectedDate = new Date(2008,5-1,1); //5월 1 일
      assertEquals(expectedDate.getDate(),adjustDate2('1m').getDate());
     }
     function testMonthOneMonthsBeforeAdjustDate2(){
      var expectedDate = new Date(2008,5-1,1); //5월 1일
      assertEquals(expectedDate.getMonth(),adjustDate2('1m').getMonth());
     }
     function testDateOneYearsBeforeAdjustDate2(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate2('1y').getYear());
     }
     function testDateOneYearsBeforeAdjustDate2(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate2('1y').getYear());
      assertEquals(expectedDate.getYear(),adjustDate2('1y').getYear());
     }
     function testDateOneYearsBefore365DaysBeforeAdjustDate3(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate2('1y').getYear());
      assertEquals(adjustDate2('366d').getDate(),adjustDate2('1y').getDate());
     }
     function testDateOneYearsBefore12MonthBeforeAdjustDate3(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate2('1y').getYear());
      assertEquals(adjustDate2('12m').getDate(),adjustDate2('1y').getDate());
     }
     function testDateOneYearsBefore11 MonthBeforeAdjustDate3(){
      var expectedDate = new Date(2007,5-1,1); //2007년 5월 1 일
      assertEquals(expectedDate.getYear(),adjustDate2('1y').getYear());
      assertEquals(adjustDate2('11m').getMonth(),adjustDate2('1y').getMonth());
     }
     function testPeriod2date(){
      assertEquals(10, period2date("10d"));
     }
     function testLastChar(){
      assertEquals("m",lastChar("3m"));
      assertEquals("y",lastChar("1y"));
      assertEquals("d",lastChar("30d"));
      assertEquals("m",lastChar("2m"));
      
     }
    </script>
</head>   
<body>
</body>
</html>

myJsScripts.js

function add(a, b) {
 return a + b;
}

function adjustDate(period){
 var today = new Date();
 var yesterday;
 var year = today.getYear();
 var month = today.getMonth(); // getMonth()는 index를 return(0,1)
 var date = today.getDate();

 if(period =='1'){
     yesterday = new Date(year, month, date-10);
 }
 if(period =='2'){
     yesterday = new Date(year, month-1, date);
 }
 if(period =='3'){
     yesterday = new Date(year-1, month, date);
 }
 return yesterday;
}

function adjustDate2(period){
 //period가 유효하지 않은 경우 디폴트로 30일 전
 //period 형태는 -10d, -1m, -1y
 if(!period || period.length<1){
  period = "-10d";
 }
 
 var today = new Date();
 var yesterday;
 var year = today.getYear();
 var month = today.getMonth(); // getMonth()는 index를 return(0,1)
 var date = today.getDate();
 var idx = -1;

  
 if( period.indexOf('d')>-1){
  var str = parseInt(period.substr(0,period.indexOf('d')));
     yesterday = new Date(year, month, date-str);
 }else if( period.indexOf('m')>-1){
  var str = parseInt(period.substr(0,period.indexOf('m')));
     yesterday = new Date(year, month-str, date);
 }else if( period.indexOf('y')>-1){
  var str = parseInt(period.substr(0,period.indexOf('y')));
     yesterday = new Date(year-str, month, date);
 }
 return yesterday;
}

function period2date(period){
 var str = parseInt(period.substr(0,period.indexOf('d')));
 return str;
}
function lastChar(str){
 if(str){
  return str.charAt(str.length-1);
 }else{
  return null;
 }
 return
}

정상적으로 수행된 경우


에러난 경우
에러난 부분 설명 (Show selected 나  Show all 클릭시)
Posted by 지니짱 | 2008/06/01 16:55 | 프로그래밍 | 트랙백
2007년 11월 25일 Posted title : [Ruby] Ruby 설치

1. 설치
http://www.rubyonrails.com/down
Ruby => Windows Installer 를 선택하면 http://rubyforge.org/frs/?group_id=167 에서
최신버전의 One-Click Ruby Installer 설치파일인 http://rubyforge.org/frs/download.php/27227/ruby186-26_rc2.exe를 다운받을 수 있다.

F:\ruby 에 설치를 하고, 내컴퓨터 -> 고급 -> 환경변수에 RUBY_HOME=F:\ruby 를 설정

2. 개발툴/플러그인 설정
Intellij Idea
(www.intellij.net/eap) 에서 최신버전의 idea 를 다운받고

http://plugins.intellij.net/plugin/?id=1293에서 최신버전의 Ruby 플러그인(http://plugins.intellij.net/plugin/?action=download&id=4759)  을 다운받아서 idea 의 플러그인 디렉토리(F:\java\idea\plugins)에 푼다.
F:\java\idea\plugins\ruby형태로 풀렸을것이다.

3. idea를 실행하고, New Project  (Create from scratch) 로 Ruby Module를 선택한다.
 JRuby on rails 같은 프로젝트를 구성한다.

4. 프로젝트 뷰에서 루비파일을 선택하고 마우스 오른쪽 버튼 으로 run 을 통해 실행해볼 수 있다.

eclisep로 Ruby 환경 꾸미기
http://www.ibm.com/developerworks/kr/library/os-ecl-radrails/




Posted by 지니짱 | 2007/11/25 14:38 | 프로그래밍 | 트랙백
◀ 이전 페이지 다음 페이지 ▶



지니랜드
by 지니랜드
카테고리
전체
프로그래밍
자바
- 이클립스
- 기타언어 (ruby, php)
웹기술 HTML javascript
컴퓨터
- Unix/Linux
- spring
- 테스팅
툴 프로그램 설치
- 버전관리
영어
동영상
영화 책
일상
여행
아무거나
재테크
펀드
미분류
이글루링크
소스코드위를 걷다.....
life logging
거북거북 월드 (ㅡ.-..
아직 열지 않은 선물
All about IT Trends
까먹지말자!
이규영 연예영화 블로그
ok_code 블러그
최근 등록된 덧글
하핫 그렇군요. 방문 AS..
by 지니랜드 at 12/23
네^^ 제가 직접 찾아올 ..
by 염지홍 at 12/14
카테고리별로 해당되는 ..
by 지니랜드 at 05/22
이 책들을 다 보면... ..
by 랑우 at 04/14
오지천사님 좋은 정보 ..
by 지니랜드 at 03/16
잠깐지나가다가 들렀습니..
by 오지천사 at 03/09
이런 우연이 ㅎㅎㅎ, 저도..
by 지니랜드 at 03/01
저랑 2개나 같이 들으셨군..
by 상욱 at 03/01
아 그러셨구나.. 오늘 못..
by 지니랜드 at 02/28
ㅎㅎㅎ JCO 오시나 보군요..
by 윤걸 at 02/26
FISH RSS
최근 등록된 트랙백
2009 자바 개발자 컨퍼런..
by cutewebi 희정냥★
도서이벤트 4탄 (통계의..
by Korean Healthlog
『프리젠테이션 젠』출간..
by acornLoft
뉴욕의 프로그래머
by The note of Legendre
[책] 뉴욕의 프로그래머
by lovesera.com: ART o..
[행사] 매쉬업 컨퍼런..
by lovesera.com: ART o..
[행사] 매쉬업 엑스..
by lovesera.com: ART o..
루비(Ruby) 설치 및..
by Happy egoist
개발시에 참고하자.. /..
by mcsong's languid aft..
이글루 파인더
라이프로그
프리젠테이션 젠
프리젠테이션 젠

초난감 기업의 조건
초난감 기업의 조건

Stick 스틱!
Stick 스틱!

당신의 기업을 시작하라
당신의 기업을 시작하라

테스트 주도 개발
테스트 주도 개발

조엘 온 소프트웨어
조엘 온 소프트웨어

Head First Design Patterns (Paperback)
Head First Design Patterns (Paperback)

실용예제로 배우는 웹 표준
실용예제로 배우는 웹 표준

아랑은 왜
아랑은 왜

천년전의 글로벌 CEO, 해상왕 장보고
천년전의 글로벌 CEO, 해상왕 장보고

마케팅 천재가 된 맥스
마케팅 천재가 된 맥스

태그
하나은행 아이폰 하나nbank 아이팟 모바일뱅킹 땡땡이 추리소설 옷걸이 hangulime 제주도 dodreams underscore 파일다운로드 웨이브알리미 에도가와란포 독서대 commandpattern 트위터이벤트 space 커맨드패턴 디자인패턴 퀴즈 크롬확장기능 크롬OS IETab 트위터 이벤트 감귤 google chromeos
rss

skin by 에셈