diff --git a/build.xml b/build.xml deleted file mode 100755 index 3b1c46b..0000000 --- a/build.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/issues/libpit/0000bs5.rst b/issues/libpit/0000bs5.rst deleted file mode 100644 index 11e6e5d..0000000 --- a/issues/libpit/0000bs5.rst +++ /dev/null @@ -1,13 +0,0 @@ -FileIssue is not formatting output in the same way it parses input. -=================================================================== - -`FileIssue.formatIssue(Issue)` introduces at least one extra line to the end -of the issue body compared to what is parsed in using the PegParser. - - ----- - -========= =================== -Created : 2011-12-18T22:53:45 -Resolved: 2011-12-19T16:09:50 -========= =================== diff --git a/jdb-build-1.6.xml b/jdb-build-1.6.xml deleted file mode 100644 index 0d2fa8e..0000000 --- a/jdb-build-1.6.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libpit/build.xml b/libpit/build.xml deleted file mode 100755 index 707f4d0..0000000 --- a/libpit/build.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libpit/doc/grammar.txt b/libpit/doc/grammar.txt deleted file mode 100644 index ed6f2f6..0000000 --- a/libpit/doc/grammar.txt +++ /dev/null @@ -1,7 +0,0 @@ -IssueFile - Title Body PropertyBlock? -Title - ONE_LINE TITLE_SEPARATOR -Body - ANY_LINE+ -Separator - DASH{4} NEW_LINE -PropertyBlock - HorizontalRule TableSeparator PropertyDefinition+ TableSeparator -TableSeparator - -PropertyDefinition - PropertyKey COLON PropertyValue diff --git a/libpit/lib/compile/jar/joda-time-2.0.jar b/libpit/lib/compile/jar/joda-time-2.0.jar deleted file mode 100644 index 169a7a4..0000000 Binary files a/libpit/lib/compile/jar/joda-time-2.0.jar and /dev/null differ diff --git a/libpit/lib/compile/jar/parboiled-core-1.0.2.jar b/libpit/lib/compile/jar/parboiled-core-1.0.2.jar deleted file mode 100644 index b5bbb59..0000000 Binary files a/libpit/lib/compile/jar/parboiled-core-1.0.2.jar and /dev/null differ diff --git a/libpit/lib/compile/jar/parboiled-java-1.0.2.jar b/libpit/lib/compile/jar/parboiled-java-1.0.2.jar deleted file mode 100644 index 8584b87..0000000 Binary files a/libpit/lib/compile/jar/parboiled-java-1.0.2.jar and /dev/null differ diff --git a/libpit/lib/compile/jar/slf4j-api-1.6.1.jar b/libpit/lib/compile/jar/slf4j-api-1.6.1.jar deleted file mode 100644 index 42e0ad0..0000000 Binary files a/libpit/lib/compile/jar/slf4j-api-1.6.1.jar and /dev/null differ diff --git a/libpit/lib/runtime/jar/joda-time-2.0.jar b/libpit/lib/runtime/jar/joda-time-2.0.jar deleted file mode 100644 index 169a7a4..0000000 Binary files a/libpit/lib/runtime/jar/joda-time-2.0.jar and /dev/null differ diff --git a/libpit/lib/runtime/jar/logback-classic-0.9.26.jar b/libpit/lib/runtime/jar/logback-classic-0.9.26.jar deleted file mode 100644 index b900b64..0000000 Binary files a/libpit/lib/runtime/jar/logback-classic-0.9.26.jar and /dev/null differ diff --git a/libpit/lib/runtime/jar/logback-core-0.9.26.jar b/libpit/lib/runtime/jar/logback-core-0.9.26.jar deleted file mode 100644 index d50f3cd..0000000 Binary files a/libpit/lib/runtime/jar/logback-core-0.9.26.jar and /dev/null differ diff --git a/libpit/lib/runtime/jar/parboiled-core-1.0.2.jar b/libpit/lib/runtime/jar/parboiled-core-1.0.2.jar deleted file mode 100644 index b5bbb59..0000000 Binary files a/libpit/lib/runtime/jar/parboiled-core-1.0.2.jar and /dev/null differ diff --git a/libpit/lib/runtime/jar/parboiled-java-1.0.2.jar b/libpit/lib/runtime/jar/parboiled-java-1.0.2.jar deleted file mode 100644 index 8584b87..0000000 Binary files a/libpit/lib/runtime/jar/parboiled-java-1.0.2.jar and /dev/null differ diff --git a/libpit/lib/runtime/jar/slf4j-api-1.6.1.jar b/libpit/lib/runtime/jar/slf4j-api-1.6.1.jar deleted file mode 100644 index 42e0ad0..0000000 Binary files a/libpit/lib/runtime/jar/slf4j-api-1.6.1.jar and /dev/null differ diff --git a/libpit/project.properties b/libpit/project.properties deleted file mode 100755 index 1b89ad7..0000000 --- a/libpit/project.properties +++ /dev/null @@ -1,13 +0,0 @@ -#Thu, 26 Mar 2015 19:51:28 -0500 -#Sat Apr 24 17:08:00 CDT 2010 -build.dir=build -src.dir=src -lib.shared.dir=../shared-libs -test.dir=test -build.number=8 -version=3.3.3 -name=libpit -lib.dir=lib -lib.local=true -release.dir=release -release.jar=pit-${application.version}.jar diff --git a/libpit/resources/main/test.groovy b/libpit/resources/main/test.groovy deleted file mode 100644 index e1ff4fc..0000000 --- a/libpit/resources/main/test.groovy +++ /dev/null @@ -1,13 +0,0 @@ -import com.jdbernard.pit.* -import com.jdbernard.pit.file.* - -import org.parboiled.Parboiled -import org.parboiled.parserunners.ReportingParseRunner -import org.parboiled.parserunners.RecoveringParseRunner - -parser = Parboiled.createParser(IssuePegParser.class) -parseRunner = new ReportingParseRunner(parser.IssueFile()) -issueFile = new File('/Volumes/NO NAME/Dropbox/tasks/0015tn3.rst') -issueText = issueFile.text -result = parseRunner.run(issueText) -issueMap = result.valueStack.pop() diff --git a/libpit/session.vim b/libpit/session.vim deleted file mode 100755 index c9499bd..0000000 --- a/libpit/session.vim +++ /dev/null @@ -1,1835 +0,0 @@ -let SessionLoad = 1 -if &cp | set nocp | endif -let s:cpo_save=&cpo -set cpo&vim -inoremap  -nmap v :call Screen_Vars() -nmap  vip -vmap  "ry :call Send_to_Screen(@r) -nmap gx NetrwBrowseX -nnoremap NetrwBrowseX :call netrw#NetrwBrowseX(expand(""),0) -let &cpo=s:cpo_save -unlet s:cpo_save -set autoindent -set backspace=indent,eol,start -set expandtab -set fileencodings=ucs-bom,utf-8,default,latin1 -set helplang=en -set history=50 -set hlsearch -set incsearch -set nomodeline -set printoptions=paper:letter -set ruler -set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after -set shiftwidth=4 -set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc -set tabstop=4 -let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 -let v:this_session=expand(":p") -silent only -cd ~/projects/personal-issue-tracker/libpit -if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' - let s:wipebuf = bufnr('%') -endif -set shortmess=aoO -badd +1 build.xml -badd +1 project.properties -badd +1 src/com/jdbernard/pit/Category.groovy -badd +1 test/com/jdbernard/pit/CategoryTest.groovy -badd +1 src/com/jdbernard/pit/Filter.groovy -badd +1 test/com/jdbernard/pit/FilterTest.groovy -badd +1 src/com/jdbernard/pit/Issue.groovy -badd +1 test/com/jdbernard/pit/IssueTest.groovy -badd +6 src/com/jdbernard/pit/Project.groovy -badd +1 test/com/jdbernard/pit/ProjectTest.groovy -badd +1 src/com/jdbernard/pit/FileIssue.groovy -badd +1 test/com/jdbernard/pit/FileIssueTest.groovy -badd +1 src/com/jdbernard/pit/FileProject.groovy -badd +1 test/com/jdbernard/pit/FileProjectTest.groovy -badd +1 src/com/jdbernard/pit/Status.groovy -badd +1 test/com/jdbernard/pit/StatusTest.groovy -badd +5 src/com/jdbernard/pit/FlatProjectView.groovy -args build.xml -edit build.xml -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'ant' -setlocal filetype=ant -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'ant' -setlocal syntax=ant -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -argglobal -edit project.properties -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'jproperties' -setlocal filetype=jproperties -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'jproperties' -setlocal syntax=jproperties -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/Category.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -argglobal -edit test/com/jdbernard/pit/CategoryTest.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/Status.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -argglobal -edit test/com/jdbernard/pit/StatusTest.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/Filter.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -argglobal -edit test/com/jdbernard/pit/FilterTest.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/Issue.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -argglobal -edit src/com/jdbernard/pit/Project.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/FileIssue.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 9 - ((8 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -9 -normal! 0 -wincmd w -argglobal -edit test/com/jdbernard/pit/FileIssueTest.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/FileProject.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -argglobal -edit test/com/jdbernard/pit/FileProjectTest.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 1 - ((0 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -1 -normal! 0 -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabedit src/com/jdbernard/pit/FlatProjectView.groovy -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -set nosplitbelow -set nosplitright -wincmd t -set winheight=1 winwidth=1 -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -argglobal -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 26 - ((25 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -26 -normal! 061l -wincmd w -argglobal -edit src/com/jdbernard/pit/Project.groovy -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal balloonexpr= -setlocal nobinary -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal nocindent -setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinwords=if,else,while,do,for,switch -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t,i -setlocal completefunc= -setlocal nocopyindent -setlocal nocursorcolumn -setlocal nocursorline -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'groovy' -setlocal filetype=groovy -endif -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -setlocal foldmethod=manual -setlocal foldminlines=1 -setlocal foldnestmax=20 -setlocal foldtext=foldtext() -setlocal formatexpr= -setlocal formatoptions=tcq -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal grepprg= -setlocal iminsert=2 -setlocal imsearch=2 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -setlocal nolinebreak -setlocal nolisp -setlocal nolist -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=octal,hex -set number -setlocal number -setlocal numberwidth=4 -setlocal omnifunc= -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal shiftwidth=4 -setlocal noshortname -setlocal nosmartindent -setlocal softtabstop=0 -setlocal nospell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=en -setlocal statusline= -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'groovy' -setlocal syntax=groovy -endif -setlocal tabstop=4 -setlocal tags= -setlocal textwidth=0 -setlocal thesaurus= -setlocal nowinfixheight -setlocal nowinfixwidth -setlocal wrap -setlocal wrapmargin=0 -silent! normal! zE -let s:l = 6 - ((5 * winheight(0) + 39) / 79) -if s:l < 1 | let s:l = 1 | endif -exe s:l -normal! zt -6 -normal! 04l -wincmd w -exe 'vert 1resize ' . ((&columns * 91 + 91) / 182) -exe 'vert 2resize ' . ((&columns * 90 + 91) / 182) -tabnext 8 -if exists('s:wipebuf') - silent exe 'bwipe ' . s:wipebuf -endif -unlet! s:wipebuf -set winheight=1 winwidth=20 shortmess=filnxtToO -let s:sx = expand(":p:r")."x.vim" -if file_readable(s:sx) - exe "source " . fnameescape(s:sx) -endif -let &so = s:so_save | let &siso = s:siso_save -doautoall SessionLoadPost -unlet SessionLoad -" vim: set ft=vim : diff --git a/libpit/src/main/com/jdbernard/pit/Category.groovy b/libpit/src/main/com/jdbernard/pit/Category.groovy deleted file mode 100755 index 32575c8..0000000 --- a/libpit/src/main/com/jdbernard/pit/Category.groovy +++ /dev/null @@ -1,17 +0,0 @@ -package com.jdbernard.pit - -public enum Category { - BUG, - FEATURE, - TASK - - public static Category toCategory(String s) { - for(c in Category.values()) - if (c.name().startsWith(s.toUpperCase())) return c - throw new IllegalArgumentException("No category matches ${s}.") - } - - public String getSymbol() { toString()[0].toLowerCase() } - - public String toString() { return "${name()[0]}${name()[1..-1].toLowerCase()}" } -} diff --git a/libpit/src/main/com/jdbernard/pit/ExtendedPropertyHelp.groovy b/libpit/src/main/com/jdbernard/pit/ExtendedPropertyHelp.groovy deleted file mode 100644 index 5aeb92a..0000000 --- a/libpit/src/main/com/jdbernard/pit/ExtendedPropertyHelp.groovy +++ /dev/null @@ -1,81 +0,0 @@ -package com.jdbernard.pit - -import org.joda.time.DateMidnight -import org.joda.time.DateTime - -import java.text.SimpleDateFormat - -public enum ExtendedPropertyHelp { - - // Property types should be ordered here in order of decreasing specificity. - // That is, subclasses should come before the more general class so that - // objects are converted using the most specific class that - // ExtendedPropertyHelp knows how to work with. - DATE_MIDNIGHT(/^\d{4}-\d{2}-\d{2}$/, DateMidnight, - { v -> DateMidnight.parse(v) }, - { d -> d.toString("YYYY-MM-dd") }), - DATETIME(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, DateTime, - { v -> DateTime.parse(v) }, - { d -> d.toString("YYYY-MM-dd'T'HH:mm:ss") }), - // We never want to parse a value into a java.util.Date or - // java.util.Calendar object (we are using Joda Time instead of the - // standard Java Date and Calendar objects) but we do want to be able to - // handle if someone gives us a Date or Calendar object. - DATE(NEVER_MATCH, Date, - { v -> v }, // never called - { d -> dateFormat.format(d) }), - CALENDAR(NEVER_MATCH, Calendar, - { v -> v }, // never called - { c -> - def df = dateFormat.clone() - df.calendar = c - df.format(c.time) }), - - INTEGER(NEVER_MATCH, Integer, - { v -> v as Integer }, // never called - { i -> i as String }), - LONG(/^\d+$/, Long, - { v -> v as Long }, - { l -> l as String }), - FLOAT(NEVER_MATCH, Float, - { v -> v as Float}, // never called - { f -> f as String}), - DOUBLE(/^\d+\.\d+$/, Double, - { v -> v as Double }, - { d -> d as String }); - - String pattern; - Class klass; - def parseFun, formatFun; - - private static SimpleDateFormat dateFormat = - new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); - - // This pattern for can never match (is uses negative lookahead to - // contradict itself). - private static String NEVER_MATCH = /(?!x)x/; - - - public ExtendedPropertyHelp(String pattern, Class klass, def parseFun, - def formatFun) { - this.pattern = pattern - this.klass = klass - this.parseFun = parseFun - this.formatFun = formatFun } - - public boolean matches(String prop) { return prop ==~ pattern } - - public boolean matches(Class klass) { return this.klass == klass } - - public static Object parse(String value) { - def propertyType = ExtendedPropertyHelp.values().find { - it.matches(value) } - - return propertyType ? propertyType.parseFun(value) : value } - - public static String format(def object) { - def propertyType = ExtendedPropertyHelp.values().find { - it.klass.isInstance(object) } - - return propertyType ? propertyType.formatFun(object) : object.toString() } -} diff --git a/libpit/src/main/com/jdbernard/pit/Filter.groovy b/libpit/src/main/com/jdbernard/pit/Filter.groovy deleted file mode 100755 index 3a2025e..0000000 --- a/libpit/src/main/com/jdbernard/pit/Filter.groovy +++ /dev/null @@ -1,42 +0,0 @@ -package com.jdbernard.pit - -class Filter { - - List categories = null - List status = null - List projects = null - List ids = null - Map extendedProperties = null - int priority = 9 - boolean acceptProjects = true - def issueSorter = defaultIssueSorter - def projectSorter = defaultProjectSorter - - public static Closure defaultIssueSorter = { it.id.toInteger() } - public static Closure defaultProjectSorter = { it.name } - - public boolean accept(Issue i) { - return ( - // Needs to meet the priority threshold. - i.priority <= priority && - // Needs to be in one of the filtered categories (if given) - (!categories || categories.contains(i.category)) && - // Needs to have one of the filtered statuses (if given) - (!status || status.contains(i.status)) && - // Needs to be one of the filtered ids (if given) - (!ids || ids.contains(i.id)) && - // Needs to have all of the extended properties (if given) - (!extendedProperties || - extendedProperties.every { name, value -> i[name] == value })) - } - - public boolean accept(Project p) { - return (acceptProjects && - (!projects || projects.contains(p.name))) - } - - public boolean accept(String name) { - return (acceptProjects && - (!projects || projects.contains(name))) - } -} diff --git a/libpit/src/main/com/jdbernard/pit/FlatProjectView.groovy b/libpit/src/main/com/jdbernard/pit/FlatProjectView.groovy deleted file mode 100755 index f415c62..0000000 --- a/libpit/src/main/com/jdbernard/pit/FlatProjectView.groovy +++ /dev/null @@ -1,37 +0,0 @@ -package com.jdbernard.pit - -public class FlatProjectView extends Project { - - public FlatProjectView(String name) { super(name) } - - public Issue createNewIssue(Map options) { - throw new UnsupportedOperationException("The FlatProjectView is " + - "read-only.") - } - - public Project createNewProject(String name) { - throw new UnsupportedOperationException("The FlatProjectView is " + - "read-only.") - } - - public boolean deleteIssue(Issue issue) { return false } - public boolean deleteProject(Project project) { return false } - - public boolean delete() { return true } - - public void eachIssue(Filter filter = null, Closure closure) { - def sorter = filter?.issueSorter ?: Filter.defaultIssueSorter - def gatherIssues - def gatheredIssues = [] - - gatherIssues = { project, f -> - project.eachIssue(f) { gatheredIssues << it } - project.eachProject(f) { gatherIssues(it, f) } - } - for (p in projects.values()) - if (!filter || filter.accept(p)) - gatherIssues(p, filter) - - gatheredIssues.sort(sorter).each(closure) - } -} diff --git a/libpit/src/main/com/jdbernard/pit/Issue.groovy b/libpit/src/main/com/jdbernard/pit/Issue.groovy deleted file mode 100755 index d699ceb..0000000 --- a/libpit/src/main/com/jdbernard/pit/Issue.groovy +++ /dev/null @@ -1,74 +0,0 @@ -package com.jdbernard.pit - -import java.lang.IllegalArgumentException as IAE - -public class Issue { - - protected String id - protected Category category - protected Status status - protected int priority - protected String text - protected String title - - Map extendedProperties = [:] - - Issue(Map props) { - this.id = props.id - this.category = props.category ?: Category.TASK - this.status = props.status ?: Status.NEW - this.priority = props.priority ?: 5 - this.title = props.title ?: '' - this.text = props.text ?: '' - - // Put all the non-native properties into our extendedProperties map. - def nativeProps = - ["id", "category", "status", "priority", "title", "text"] - extendedProperties.putAll(props.findAll { - !nativeProps.contains(it.key) })} - - public String getId() { return id; } - - public Category getCategory() { return category } - - public void setCategory(Category c) throws IOException { - if (c == null) - throw new IAE("Category cannot be null.") - - this.category = c - } - - public Status getStatus() { return status } - - public void setStatus(Status s) throws IOException { - if (s == null) - throw new IAE("Status cannot be null.") - - this.status = s - } - - public int getPriority() { return priority } - - public void setPriority(int p) throws IOException { - priority = Math.min(9, Math.max(0, p)) - } - - public String getTitle() { return title } - - public void setTitle(String t) throws IOException { title = t } - - public String getText() { return text } - - public void setText(String t) throws IOException { text = t } - - public def propertyMissing(String name) { extendedProperties[name] } - - public def propertyMissing(String name, def value) { - extendedProperties[name] = value } - - @Override - public String toString() { - return "${id}(${priority}-${status}): ${category} ${title}" - } - -} diff --git a/libpit/src/main/com/jdbernard/pit/Project.groovy b/libpit/src/main/com/jdbernard/pit/Project.groovy deleted file mode 100755 index 9135f23..0000000 --- a/libpit/src/main/com/jdbernard/pit/Project.groovy +++ /dev/null @@ -1,60 +0,0 @@ -package com.jdbernard.pit - -public abstract class Project { - - protected String name - Map issues = [:] - Map projects = [:] - - Project(String name) { this.name = name } - - public void eachIssue(Filter filter = null, Closure c) { - def sorter = filter?.issueSorter ?: Filter.defaultIssueSorter - for (i in sort(issues.values(), sorter)) - if (!filter || filter.accept(i)) - c.call(i) } - - public void eachProject(Filter filter = null, Closure c) { - def sorter = filter?.projectSorter ?: Filter.defaultProjectSorter - for (p in sort(projects.values(), sorter)) - if (!filter || filter.accept(p)) - c.call(p) } - - // walk every issue and project in this project recursively and execute the - // given closure on each issue that meets the filter criteria - public void walkProject(Filter filter, Closure c) { - this.eachIssue(filter, c) - this.eachProject(filter) { p -> p.walkProject(filter, c) } } - - // This get all issues, including subissues - public List getAllIssues(Filter filter = null) { - def sorter = filter?.issueSorter ?: Filter.defaultIssueSorter - - List allIssues = this.issues.values().findAll { - filter ? filter.accept(it) : true } - - this.eachProject(filter) { p -> allIssues += p.getAllIssues(filter) } - - return sort(allIssues, sorter) } - - public void setName(String name) { this.name = name } - - public String getName() { return name } - - @Override - String toString() { return name } - - public abstract Issue createNewIssue(Map options) - - public abstract Project createNewProject(String name) - - public abstract boolean deleteIssue(Issue issue) - - public abstract boolean deleteProject(Project project) - - protected List sort(def collection, def sorter) { - if (sorter instanceof Closure) { - return collection.sort(sorter) } - else if (sorter instanceof List) { - return sorter.reverse().inject(collection) { c, s -> c.sort(s) }}} -} diff --git a/libpit/src/main/com/jdbernard/pit/Repository.groovy b/libpit/src/main/com/jdbernard/pit/Repository.groovy deleted file mode 100755 index 7851a57..0000000 --- a/libpit/src/main/com/jdbernard/pit/Repository.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package com.jdbernard.pit - -public abstract class Repository { - - public abstract void persist() - public abstract Project[] getRootProjects() - public abstract Project createNewProject(String name) -} diff --git a/libpit/src/main/com/jdbernard/pit/Status.groovy b/libpit/src/main/com/jdbernard/pit/Status.groovy deleted file mode 100755 index 1779370..0000000 --- a/libpit/src/main/com/jdbernard/pit/Status.groovy +++ /dev/null @@ -1,41 +0,0 @@ -package com.jdbernard.pit - -public enum Status { - REASSIGNED('a'), - REJECTED('j'), - NEW('n'), - RESOLVED('s'), - VALIDATION_REQUIRED('v') - - String symbol - - protected Status(String s) { symbol = s } - - public static Status toStatus(String str) { - // Try to match based on symbol - def match = Status.values().find {it.symbol.equalsIgnoreCase(str)} - if (match) { return match } - - // No match on the symbol, look for the status name (or abbreviations) - match = Status.values().findAll { - it.name().startsWith(str.toUpperCase()) } - - // No matching status, oops. - if (match.size() == 0) { - throw new IllegalArgumentException("No status matches '${str}'") } - - // More than one matching status, oops. - else if (match.size() > 1) { - throw new IllegalArgumentException("Request string is" + - " ambigous, '${str}' could represent any of ${match}.")} - - // Only one matching status, yay! - else { return match[0] }} - - public String toString() { - def words = name().split("_") - String result = "" - words.each { result += "${it[0]}${it[1..-1].toLowerCase()} " } - return result[0..-2] - } -} diff --git a/libpit/src/main/com/jdbernard/pit/file/FileIssue.groovy b/libpit/src/main/com/jdbernard/pit/file/FileIssue.groovy deleted file mode 100755 index 387a39b..0000000 --- a/libpit/src/main/com/jdbernard/pit/file/FileIssue.groovy +++ /dev/null @@ -1,189 +0,0 @@ -package com.jdbernard.pit.file - -import com.jdbernard.pit.* - -import java.lang.IllegalArgumentException as IAE - -import org.parboiled.Parboiled -import org.parboiled.parserunners.ReportingParseRunner - -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -public class FileIssue extends Issue { - - protected File source - private Logger log = LoggerFactory.getLogger(getClass()) - - public static final String fileExp = /(\d+)([bft])([ajnsv])(\d).*/ - - protected static parseRunner - - static { - def parser = Parboiled.createParser(IssuePegParser) - parseRunner = new ReportingParseRunner(parser.IssueFile()) } - - public FileIssue(File file) { - - super(id: -1, title: 'REPLACE_ME') - - if (log.isDebugEnabled()) { - log.debug("Loading a FileIssue from '{}'", file.canonicalPath) } - - def matcher = file.name =~ fileExp - if (!matcher) - throw new IllegalArgumentException("${file} " + - "is not a valid Issue file.") - - // Read issue attributes from the filename. - super.id = matcher[0][1] - super.category = Category.toCategory(matcher[0][2]) - super.status = Status.toStatus(matcher[0][3]) - super.priority = matcher[0][4].toInteger() - - log.debug("id: {}\tcategory: {}\tstatus: {}\tpriority: {}", - super.id, super.category, super.status, super.priority) - - this.source = file - - // Parse the file and extract the title, text, and extended properties - // TODO: guard against parsing problems (null/empty value stack, etc.) - def parsedIssue = parseRunner.run(file.text).valueStack.pop() - - super.text = parsedIssue.body - super.title = parsedIssue.title - - // Add the extended properties - parsedIssue.extProperties.each { key, value -> - key = key.toLowerCase().replaceAll(/\s/, '_') - super.extendedProperties[key] = - ExtendedPropertyHelp.parse(value) } - } - - public void setCategory(Category c) throws IOException { - - File newSource = new File(source.canonicalFile.parentFile, - makeFilename(id, c, status, priority)) - - if (source.renameTo(newSource)) { - source = newSource - super.setCategory(c) } - else { throw new IOException("I was unable to set the category. " - + "I need to rename the file for this issue, but something is " - + "preventing me from doing so (maybe the path to the file is " - + "no longer valid, or maybe the file is currently open in " - + "some other program).") }} - - public void setStatus(Status s) throws IOException { - File newSource = new File(source.canonicalFile.parentFile, - makeFilename(id, category, s, priority)) - - if (source.renameTo(newSource)) { - source = newSource - super.setStatus(s) } - else { throw new IOException("I was unable to set the status. " - + "I need to rename the file for this issue, but something is " - + "preventing me from doing so (maybe the path to the file is " - + "no longer valid, or maybe the file is currently open in " - + "some other program).") }} - - public void setPriority(int p) throws IOException { - - File newSource = new File(source.canonicalFile.parentFile, - makeFilename(id, category, status, p)) - - if (source.renameTo(newSource)) { - source = newSource - super.setPriority(p) } - else { throw new IOException("I was unable to set the priority. " - + "I need to rename the file for this issue, but something is " - + "preventing me from doing so (maybe the path to the file is " - + "no longer valid, or maybe the file is currently open in " - + "some other program).") }} - - public String getFilename() { - return makeFilename(id, category, status, priority) } - - public void setTitle(String title) throws IOException { - super.setTitle(title) - writeFile() } - - public void setText(String text) throws IOException { - super.setText(text) - writeFile() } - - public def propertyMissing(String name, def value) { - super.propertyMissing(name, value) - writeFile() } - - boolean deleteFile() { return source.deleteDir() } - - public static boolean isValidFilename(String name) { - return name ==~ fileExp } - - public static String makeFilename(String id, Category category, - Status status, int priority) { - - // bounds check priority - priority = Math.min(9, Math.max(0, priority)) - - //check for valid values of cateogry and id - if (category == null) - throw new IAE("Category must be non-null.") - if (status == null) - throw new IAE("Status must be non-null.") - if (!(id ==~ /\d+/)) - throw new IAE( "'${id}' is not a legal value for id.") - - return id + category.symbol + status.symbol + priority + ".rst" } - - public static String formatIssue(Issue issue) { - def result = new StringBuilder() - result.append(issue.title) - result.append("\n") - result.append("=".multiply(issue.title.length())) - result.append("\n\n") - result.append(issue.text) - - // If there are any extended properties, let's write those. - if (issue.extendedProperties.size() > 0) { - result.append("\n----\n\n") - def extOutput = [:] - def maxKeyLen = 0 - def maxValLen = 0 - - // Find the longest key and value, convert all to strings. - issue.extendedProperties.each { key, val -> - def ks = key.toString().split('_').collect({it.capitalize()}).join(' ') - def vs = ExtendedPropertyHelp.format(val) - - extOutput[ks] = vs - if (ks.length() > maxKeyLen) { maxKeyLen = ks.length() } - if (vs.length() > maxValLen) { maxValLen = vs.length() } } - - result.append("=".multiply(maxKeyLen + 1)) - result.append(" ") - result.append("=".multiply(maxValLen)) - result.append("\n") - - extOutput.sort().each { key, val -> - result.append(key.padRight(maxKeyLen)) - result.append(": ") - result.append(val.padRight(maxValLen)) - result.append("\n") } - - result.append("=".multiply(maxKeyLen + 1)) - result.append(" ") - result.append("=".multiply(maxValLen)) - result.append("\n") } - - return result.toString()} - - protected void writeFile() { - try { source.write(formatIssue(this)) } - catch (IOException ioe) { - throw new IOException("I could not save the new text for this " - + "issue. I can not write to the file for this issue. I do not" - + " know why, I am sorry (maybe the file can not be reached).") } } - -} diff --git a/libpit/src/main/com/jdbernard/pit/file/FileProject.groovy b/libpit/src/main/com/jdbernard/pit/file/FileProject.groovy deleted file mode 100755 index b8b481a..0000000 --- a/libpit/src/main/com/jdbernard/pit/file/FileProject.groovy +++ /dev/null @@ -1,107 +0,0 @@ -package com.jdbernard.pit.file - -import com.jdbernard.pit.* - -class FileProject extends Project { - - protected File source - - public FileProject(File dir) { - super(dir.canonicalFile.name) - - if (!dir.isDirectory()) - throw new IllegalArgumentException( - "${dir.name} is not a directory.") - - this.source = dir - - dir.eachFile { child -> - - // add sub projects - if (child.isDirectory()) { - if (child.name ==~ /\d+/ || - child.isHidden()) return // just an issue folder - - // otherwise build and add to list - projects[(child.name)] = new FileProject(child) } - else if (child.isFile() && - FileIssue.isValidFilename(child.name)) { - def issue - - // if exception, then not an issue - try { issue = new FileIssue(child) } catch (all) { return } - - issues[(issue.id)] = issue } }} - - public void setName(String name) { - super.setName(name) - source.renameTo(new File(source.canonicalFile.parentFile, name)) } - - public FileIssue createNewIssue(Map options) { - Issue issue - File issueFile - - if (!options) options = [:] - - // We want some different defaults for issues due to the parser being - // unable to handle empty title or text. - if (!options.title) options.title = "Default issue title." - if (!options.text) options.text = "Describe the issue here." - - // We are also going to find the next id based on the issues already in the - // project. - if (issues.size() == 0) options.id = '0000' - else { - def lastId = (issues.values().max { it.id.toInteger() }).id - options.id = (lastId.toInteger() + 1).toString().padLeft( - lastId.length(), '0') } - - // Create an Issue object from the options (we will discard it later). - issue = new Issue(options) - - // Create the filename and File object based on the options given. - issueFile = new File(source, FileIssue.makeFilename( - issue.id, issue.category, issue.status, issue.priority)) - - // Create the actual file on the system - issueFile.createNewFile() - - // Write the issue to the file created. - issueFile.write(FileIssue.formatIssue(issue)) - - // Read that new file back in as a FileIssue - issue = new FileIssue(issueFile) - - // Add the issue to our collection. - issues[(issue.id)] = issue - - return issue } - - public FileProject createNewProject(String name) { - def newDir = new File(source, name) - newDir.mkdirs() - - return new FileProject(newDir) } - - public boolean deleteIssue(Issue issue) { - if (!issues[(issue.id)]) return false - - issues.remove(issue.id) - if (issue instanceof FileIssue) - return issue.deleteFile() - - else return true } - - public boolean deleteProject(Project project) { - if (!projects[(project.name)]) return false - - projects.remove(project.name) - if (project instanceof FileProject) - return project.source.delete() - - return true } - - @Override - public String toString() { return name } - -} diff --git a/libpit/src/main/com/jdbernard/pit/file/FileRepository.groovy b/libpit/src/main/com/jdbernard/pit/file/FileRepository.groovy deleted file mode 100755 index 6b19aa1..0000000 --- a/libpit/src/main/com/jdbernard/pit/file/FileRepository.groovy +++ /dev/null @@ -1,22 +0,0 @@ -package com.jdbernard.pit.file - -import com.jdbernard.pit.* - -public class FileRepository extends Repository { - - @Delegate FileProject fileProject - - public FileRepository(File dir) { - assert dir.isDirectory() - fileProject = new FileProject(dir) - } - - public void persist() {} // nothing to do - public Project[] getRootProjects() { - return [fileProject] as Project[] - } - - public FileProject createNewProject(String name) { - return fileProject.createNewProject() - } -} diff --git a/libpit/src/main/com/jdbernard/pit/file/IssuePegParser.java b/libpit/src/main/com/jdbernard/pit/file/IssuePegParser.java deleted file mode 100644 index 03fce38..0000000 --- a/libpit/src/main/com/jdbernard/pit/file/IssuePegParser.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.jdbernard.pit.file; - -import java.util.HashMap; -import java.util.Map; - -import org.parboiled.Action; -import org.parboiled.BaseParser; -import org.parboiled.Context; -import org.parboiled.Rule; -import org.parboiled.annotations.*; - -@BuildParseTree -public class IssuePegParser extends BaseParser { - - public Rule IssueFile() { - return Sequence(push(makeNode()), - Title(), Body(), Optional(PropertyBlock())); } - - Rule Title() { - return Sequence( - OneOrMore(NOT_EOL), addToNode("title", match()), EOL, - HorizontalRule(), EOL, - ZeroOrMore(SPACE), EOL); } - - Rule Body() { return Sequence(OneOrMore(Sequence( - TestNot(PropertyBlock()), ANY)), addToNode("body", match())); } - - Rule PropertyBlock() { - return Sequence(push(makeNode()), - EOL, HorizontalRule(), OneOrMore(EOL), TableSeparator(), - EOL, OneOrMore(PropertyDefinition()), TableSeparator(), - addToNode("extProperties", pop())); } - - Rule PropertyDefinition() { - return Sequence( - PropertyKey(), push(match()), COLON, - PropertyValue(), push(match()), EOL, - swap(), addToNode(popAsString().trim(), popAsString().trim())); } - - Rule PropertyKey() { return OneOrMore(Sequence(TestNot(COLON), NOT_EOL)); } - - Rule PropertyValue() { return OneOrMore(NOT_EOL); } - - Rule TableSeparator() { - return Sequence(OneOrMore(SEPARATOR_CHAR), OneOrMore(SPACE), - OneOrMore(SEPARATOR_CHAR)); } - - Rule HorizontalRule() { - return Sequence(SEPARATOR_CHAR, SEPARATOR_CHAR, SEPARATOR_CHAR, - OneOrMore(SEPARATOR_CHAR)); } - - Rule EOL = Ch('\n'); - Rule NOT_EOL = Sequence(TestNot(EOL), ANY); - Rule SEPARATOR_CHAR = AnyOf("\"'`~:-_=+*^#<>"); - Rule SPACE = AnyOf(" \t"); - Rule COLON = Ch(':'); - - Map makeNode() { return new HashMap(); } - - boolean addToNode(Object key, Object val) { - Map node = (Map) pop(); - node.put(key, val); - push(node); - return true; } - - String popAsString() { return (String) pop(); } -} diff --git a/libpit/src/main/com/jdbernard/pit/util/Convert1_2.groovy b/libpit/src/main/com/jdbernard/pit/util/Convert1_2.groovy deleted file mode 100755 index d1f230e..0000000 --- a/libpit/src/main/com/jdbernard/pit/util/Convert1_2.groovy +++ /dev/null @@ -1,36 +0,0 @@ -package com.jdbernard.pit.util - -import com.jdbernard.pit.* - -if (args.size() != 1) { - println "Usage: Convert1_2 [dir]" - System.exit(1) -} - -File rootDir = new File(args[0]) -Scanner scan = new Scanner(System.in) - -rootDir.eachFileRecurse { file -> - def m = file.name =~ /(\d+)([bcft])(\d).*/ - if (m && file.isFile()) { - println m[0][0] - def parentFile = file.canonicalFile.parentFile - def c - def s - switch(m[0][2]) { - case "c": - println file.readLines()[0] - print "Issue was closed, was category does it belong in?" - c = Category.toCategory(scan.nextLine()) - s = Status.RESOLVED - break - default: - c = Category.toCategory(m[0][2]) - s = Status.NEW - break - } - println "${m[0][2]}: ${c}" - file.renameTo(new File(parentFile, - FileIssue.makeFilename(m[0][1], c, s, m[0][3].toInteger()))) - } -} diff --git a/libpit/src/main/com/jdbernard/pit/xml/XmlIssue.groovy b/libpit/src/main/com/jdbernard/pit/xml/XmlIssue.groovy deleted file mode 100755 index 049e7cf..0000000 --- a/libpit/src/main/com/jdbernard/pit/xml/XmlIssue.groovy +++ /dev/null @@ -1,74 +0,0 @@ -package com.jdbernard.pit.xml - -import com.jdbernard.pit.* - -public class XmlIssue extends Issue { - - def issueNode - XmlProject project - XmlRepository repository - - XmlIssue(def issueNode, XmlRepository repository, XmlProject project) { - super(issueNode.@id, issueNode.@category ?: Category.TASK, - issueNode.@status ?: Status.NEW, issueNode.@priority ?: 9) - - this.issueNode = issueNode - this.project = project - this.repository = repository - } - - XmlIssue(String id, Category c = Category.TASK, Status s = Status.NEW, - int p = 9, String title, String text, XmlRepository repository, - XmlProject project) { - super(id, c, s, p) - - this.project = project - this.repository = repository - - // Node constructor adds the node to the parent node - issueNode = new Node(project.projectNode, "Issue", - [id: id, category: c, status: s, priority: p, title: title]) - - super.@title = title - super.@text = text - issueNode.value = text - - repository.persist() - } - - public void setCategory(Category c) { - super.setCategory(c) - - issueNode.@category = c.name() - repository.persist() - } - - public void setStatus(Status s) { - super.setStatus(s) - - issueNode.@status = s.name() - repository.persist() - } - - public void setPriority(int p) { - super.setPriority(p) - - issueNode.@priority = p - repository.persist() - } - - public void setText(String t) { - super.setText(t) - - issueNode.value = t - repository.persist() - } - - public void setTitle(String t) { - super.setTitle(t) - - issueNode.@title = t - repository.persist() - } - -} diff --git a/libpit/src/main/com/jdbernard/pit/xml/XmlProject.groovy b/libpit/src/main/com/jdbernard/pit/xml/XmlProject.groovy deleted file mode 100755 index 868d503..0000000 --- a/libpit/src/main/com/jdbernard/pit/xml/XmlProject.groovy +++ /dev/null @@ -1,83 +0,0 @@ -package com.jdbernard.pit.xml - -import com.jdbernard.pit.* - -public class XmlProject extends Project { - - def projectNode - XmlRepository repository - - XmlProject(def projectNode, XmlRepository repository) { - super(projectNode.@name) - - this.projectNode = projectNode - this.repository = repository - } - - XmlProject(String name, def parentProject, XmlRepository repository) { - super(name) - - // Node constructor adds the node to the parent node - projectNode = new Node(parentProject.projectNode, "Project", - [name: name]) - - repository.persist() - } - - public void setName(String name) { - super.setName(name) - - projectNode.@name = name - repository.persist() - } - - public XmlIssue createNewIssue(Map options) { - if (!options) options = [:] - if (!options.category) options.category = Category.TASK - if (!options.status) options.status = Status.NEW - if (!options.priority) options.priority = 5 - if (!options.text) options.text = "Default issue title.\n" + - "====================\n" - - String id - if (issues.size() == 0) id = "0000" - else { - id = (issues.values().max { it.id.toInteger() }).id - id = (id.toInteger() + 1).toString().padLeft(id.length(), '0') - } - - // XmlIssue constructor will persist XML data - issues[(id)] = new XmlIssue(id, options.category, options.status, - options.priority, options.text, repository, this) - - return issues[(id)] - } - - public XmlProject createNewProject(String name) { - // XmlProject constructor persists the XML data - projects[(name)] = new XmlProject(name, this, repository) - return projects[(name)] - } - - public boolean deleteIssue(Issue issue) { - if (!issues[(issue.id)]) return false - - issues.remove(issue.id) - if (issue instanceof XmlIssue) - projectNode.remove(issue.issueNode) - - repository.persist() - - return true - } - - public boolean deleteProject(Project project) { - if (!projects[(project.name)]) return false - - projects.remove(project.name) - if (project instanceof XmlProject) - projectNode.remove(project.projectNode) - - repository.persist() - } -} diff --git a/libpit/src/main/com/jdbernard/pit/xml/XmlRepository.groovy b/libpit/src/main/com/jdbernard/pit/xml/XmlRepository.groovy deleted file mode 100755 index 54d0aac..0000000 --- a/libpit/src/main/com/jdbernard/pit/xml/XmlRepository.groovy +++ /dev/null @@ -1,47 +0,0 @@ -package com.jdbernard.pit.xml - -import com.jdbernard.pit.* -import groovy.xml.XmlUtil - -public class XmlRepository extends Repository { - - def repository - def projects = [] - File repoFile - - public XmlRepository(File repoFile) { - - this.repoFile = repoFile - repository = new XmlParser().parse(repoFile) - - repository.Project.each { projectNode -> - projects << new XmlProject(projectNode) - } - - } - - public synchronized void persist() { - repoFile.withOutputStream { XmlUtil.serialize(repository, it) } - } - - public Project[] getRootProjects() { - return projects as XmlProject[] - } - - public XmlProject createNewProject(String name) { - def newProject = new XmlProject(name, this, null) - repository << newProject.projectNode - - persist() - return newProject - } - - public boolean deleteProject(Project p) { - if (!projects.contains(p)) return false - - projects.remove(p) - repository.remove(p.projectNode) - - return true - } -} diff --git a/libpit/src/test/com/jdbernard/pit/CategoryTest.groovy b/libpit/src/test/com/jdbernard/pit/CategoryTest.groovy deleted file mode 100755 index b58b938..0000000 --- a/libpit/src/test/com/jdbernard/pit/CategoryTest.groovy +++ /dev/null @@ -1,32 +0,0 @@ -package com.jdbernard.pit - -import org.junit.Test -import static org.junit.Assert.assertEquals - -import static com.jdbernard.pit.Category.toCategory - -class CategoryTest { - - @Test void testToCategory() { - - assertEquals toCategory("BUG"), Category.BUG - assertEquals toCategory("FEATURE"), Category.FEATURE - assertEquals toCategory("TASK"), Category.TASK - - assertEquals toCategory("bug"), Category.BUG - assertEquals toCategory("feature"), Category.FEATURE - assertEquals toCategory("task"), Category.TASK - - assertEquals toCategory("b"), Category.BUG - assertEquals toCategory("f"), Category.FEATURE - assertEquals toCategory("t"), Category.TASK - - } - - @Test void testGetSymbol() { - - assertEquals Category.BUG.symbol, "b" - assertEquals Category.FEATURE.symbol, "f" - assertEquals Category.TASK.symbol, "t" - } -} diff --git a/libpit/src/test/com/jdbernard/pit/FilterTest.groovy b/libpit/src/test/com/jdbernard/pit/FilterTest.groovy deleted file mode 100755 index f5bfa94..0000000 --- a/libpit/src/test/com/jdbernard/pit/FilterTest.groovy +++ /dev/null @@ -1,127 +0,0 @@ -package com.jdbernard.pit - -import org.junit.Test -import org.junit.Before -import org.junit.After - -import static org.junit.Assert.assertTrue -import static org.junit.Assert.assertFalse - -class FilterTest { - - Project proj - - @Before void setUpIssues() { - - proj = new MockProject('proj1') - - def issue = new MockIssue( '0000', Category.TASK, Status.NEW, 5) - proj.issues['0000'] = issue - - issue = new MockIssue('0001', Category.BUG, Status.REJECTED, 3) - proj.issues['0001'] = issue - - issue = new MockIssue('0002', Category.BUG, Status.RESOLVED, 9) - proj.issues['0002'] = issue - - issue = new MockIssue('0003', Category.FEATURE, Status.REASSIGNED, 0) - proj.issues['0003'] = issue - - def subProj = new MockProject('subproj1') - proj.projects['subproj1'] = subProj - - subProj = new MockProject('subproj2') - proj.projects['subproj2'] = subProj - - } - - @Test void testDefaultFilter() { - Filter f = new Filter() - - proj.issues.values().each { assertTrue f.accept(it) } - proj.projects.values().each { assertTrue f.accept(it) } - } - - @Test void testPriorityIssueFilter() { - Filter f = new Filter(priority: 9) - - proj.eachIssue { assertTrue f.accept(it) } - - f.priority = 6 - assertTrue f.accept(proj.issues['0000']) - assertTrue f.accept(proj.issues['0001']) - assertFalse f.accept(proj.issues['0002']) - assertTrue f.accept(proj.issues['0003']) - - f.priority = 5 - assertTrue f.accept(proj.issues['0000']) - assertTrue f.accept(proj.issues['0001']) - assertFalse f.accept(proj.issues['0002']) - assertTrue f.accept(proj.issues['0003']) - - f.priority = 0 - assertFalse f.accept(proj.issues['0000']) - assertFalse f.accept(proj.issues['0001']) - assertFalse f.accept(proj.issues['0002']) - assertTrue f.accept(proj.issues['0003']) - - } - - @Test void testCategoryFilter() { - Filter f = new Filter(categories: - [Category.BUG, Category.FEATURE]) - - assertFalse f.accept(proj.issues['0000']) - assertTrue f.accept(proj.issues['0001']) - assertTrue f.accept(proj.issues['0002']) - assertTrue f.accept(proj.issues['0003']) - - f.categories = [ Category.TASK ] - assertTrue f.accept(proj.issues['0000']) - assertFalse f.accept(proj.issues['0001']) - assertFalse f.accept(proj.issues['0002']) - assertFalse f.accept(proj.issues['0003']) - - f.categories = [ Category.BUG, Category.TASK ] - assertTrue f.accept(proj.issues['0000']) - assertTrue f.accept(proj.issues['0001']) - assertTrue f.accept(proj.issues['0002']) - assertFalse f.accept(proj.issues['0003']) - - } - - @Test void testStatusFilter() { - Filter f = new Filter(status: - [Status.NEW, Status.REASSIGNED, Status.REJECTED]) - - assertTrue f.accept(proj.issues['0000']) - assertTrue f.accept(proj.issues['0001']) - assertFalse f.accept(proj.issues['0002']) - assertTrue f.accept(proj.issues['0003']) - - f.status = [ Status.RESOLVED ] - assertFalse f.accept(proj.issues['0000']) - assertFalse f.accept(proj.issues['0001']) - assertTrue f.accept(proj.issues['0002']) - assertFalse f.accept(proj.issues['0003']) - - f.status = [ Status.NEW, Status.RESOLVED ] - assertTrue f.accept(proj.issues['0000']) - assertFalse f.accept(proj.issues['0001']) - assertTrue f.accept(proj.issues['0002']) - assertFalse f.accept(proj.issues['0003']) - } - - @Test void testProjectFilter() { - - } - - @Test void testAcceptsProjectsFilter() { - - } - - @Test void testCompositeFilter() { - - } - -} diff --git a/libpit/src/test/com/jdbernard/pit/MockIssue.groovy b/libpit/src/test/com/jdbernard/pit/MockIssue.groovy deleted file mode 100755 index b03abfc..0000000 --- a/libpit/src/test/com/jdbernard/pit/MockIssue.groovy +++ /dev/null @@ -1,8 +0,0 @@ -package com.jdbernard.pit - -public class MockIssue extends Issue { - public MockIssue(String id, Category c, Status s, int p) { - super ([id: id, category: c, status: s, priority: p]) - } - public boolean delete() { return true } -} diff --git a/libpit/src/test/com/jdbernard/pit/MockProject.groovy b/libpit/src/test/com/jdbernard/pit/MockProject.groovy deleted file mode 100755 index b4aafed..0000000 --- a/libpit/src/test/com/jdbernard/pit/MockProject.groovy +++ /dev/null @@ -1,20 +0,0 @@ -package com.jdbernard.pit - -class MockProject extends Project { - - public MockProject(String name) { super(name) } - - public Issue createNewIssue(Map options) { - return new MockIssue(options.id ?: 'n/a', - options.c ?: Category.TASK, options.s ?: Status.NEW, - options.p ?: 5) - } - - public Project createNewProject(String name) { - return new MockProject(name) - } - - public boolean delete() { return true } - public boolean deleteProject(Project project) { return true } - public boolean deleteIssue(Issue issue) { return true } -} diff --git a/libpit/src/test/com/jdbernard/pit/MockRepository.groovy b/libpit/src/test/com/jdbernard/pit/MockRepository.groovy deleted file mode 100755 index a1d880c..0000000 --- a/libpit/src/test/com/jdbernard/pit/MockRepository.groovy +++ /dev/null @@ -1,12 +0,0 @@ -package com.jdbernard.pit - -class MockRepository extends Repository { - - public void persist() {} - - public Project[] getRootProjects() { return [] as Project[] } - - public Project createNewProject(String name) { - return new MockProject(name) - } -} diff --git a/libpit/src/test/com/jdbernard/pit/StatusTest.groovy b/libpit/src/test/com/jdbernard/pit/StatusTest.groovy deleted file mode 100755 index bdf72ac..0000000 --- a/libpit/src/test/com/jdbernard/pit/StatusTest.groovy +++ /dev/null @@ -1,54 +0,0 @@ -package com.jdbernard.pit - -import org.junit.Test -import static org.junit.Assert.assertEquals - -import static com.jdbernard.pit.Status.toStatus - -public class StatusTest { - - @Test void testToStatus() { - - assertEquals Status.REASSIGNED, toStatus('REASSIGNED') - assertEquals Status.REJECTED, toStatus('REJECTED') - assertEquals Status.NEW, toStatus('NEW') - assertEquals Status.RESOLVED , toStatus('RESOLVED') - assertEquals Status.VALIDATION_REQUIRED, - toStatus('VALIDATION_REQUIRED') - - assertEquals Status.REASSIGNED, toStatus('REA') - assertEquals Status.REJECTED, toStatus('REJ') - assertEquals Status.NEW, toStatus('NEW') - assertEquals Status.RESOLVED , toStatus('RES') - assertEquals Status.VALIDATION_REQUIRED, - toStatus('VAL') - - assertEquals Status.REASSIGNED, toStatus('reassigned') - assertEquals Status.REJECTED, toStatus('rejected') - assertEquals Status.NEW, toStatus('new') - assertEquals Status.RESOLVED , toStatus('resolved') - assertEquals Status.VALIDATION_REQUIRED, - toStatus('validation_required') - - assertEquals Status.REASSIGNED, toStatus('rea') - assertEquals Status.REJECTED, toStatus('rej') - assertEquals Status.NEW, toStatus('new') - assertEquals Status.RESOLVED , toStatus('res') - assertEquals Status.VALIDATION_REQUIRED, - toStatus('val') - - assertEquals Status.REASSIGNED, toStatus('A') - assertEquals Status.REJECTED, toStatus('J') - assertEquals Status.NEW, toStatus('N') - assertEquals Status.RESOLVED , toStatus('S') - assertEquals Status.VALIDATION_REQUIRED, toStatus('V') - - assertEquals Status.REASSIGNED, toStatus('a') - assertEquals Status.REJECTED, toStatus('j') - assertEquals Status.NEW, toStatus('n') - assertEquals Status.RESOLVED , toStatus('s') - assertEquals Status.VALIDATION_REQUIRED, toStatus('v') - - } - -} diff --git a/libpit/src/test/com/jdbernard/pit/file/FileIssueTest.groovy b/libpit/src/test/com/jdbernard/pit/file/FileIssueTest.groovy deleted file mode 100755 index 122fee3..0000000 --- a/libpit/src/test/com/jdbernard/pit/file/FileIssueTest.groovy +++ /dev/null @@ -1,228 +0,0 @@ -package com.jdbernard.pit.file - -import com.jdbernard.pit.* -import org.junit.* -import static org.junit.Assert.assertTrue -import static org.junit.Assert.assertFalse -import static org.junit.Assert.assertEquals - -class FileIssueTest { - - def issues - File testDir - - @Before void makeIssueFiles() { - File issueFile - issues = [] - - testDir = new File('testdir') - testDir.mkdirs() - - issueFile = new File(testDir, '0001fn1.rst') - issueFile.write( - "Add the killer feature to the killer app.\n" + - "=========================================\n\n" + - "Make our killer app shine!.") - issues << new FileIssue(issueFile) - - issueFile = new File(testDir, '0002ts5.rst') - issueFile.write( - "Obtain donuts.\n" + - "==============\n\n" + - "The office is seriously lacking in sugary donuts.\n\n" + - "We must rectify this at once!") - issues << new FileIssue(issueFile) - } - - @After void deleteIssueFiles() { - assert testDir.deleteDir() - } - - @Test void testSetCategory() { - - assertEquals issues[0].category, Category.FEATURE - assertEquals issues[1].category, Category.TASK - - try { - issues[0].category = Category.TASK - issues[1].category = Category.BUG - } catch (Exception e) { - Assert.fail("An unexpected Exception occurred: " - + e.getLocalizedMessage()) - } - - assertEquals issues[0].category, Category.TASK - assertEquals issues[1].category, Category.BUG - - assertTrue new File(testDir, '0001tn1.rst').exists() - assertTrue new File(testDir, '0002bs5.rst').exists() - assertFalse new File(testDir, '0001fn1.rst').exists() - assertFalse new File(testDir, '0002ts5.rst').exists() - - } - - @Test void testSetCategoryFails() { - FileInputStream fin - try { - // get a lock to the file to prevent the rename - def issueFile = new File('0001fn1.rst') - fin = new FileInputStream(issueFile) - - // try to set the category - issues[0].category = Category.TASK - - // should throw IOE before here - Assert.fail() - } catch (IOException ioe) { - } catch (Exception e) { - Assert.fail("Unexpected exception: " + e.getLocalizedMessage()) - } finally { - if (fin != null) fin.close() - } - } - - @Test void testSetStatus() { - - assertEquals issues[0].status, Status.NEW - assertEquals issues[1].status, Status.RESOLVED - - try { - issues[0].status = Status.RESOLVED - issues[1].status = Status.REJECTED - } catch (Exception e) { - Assert.fail("An unexpected Exception occurred: " - + e.getLocalizedMessage()) - } - - assertTrue new File(testDir, '0001fs1.rst').exists() - assertTrue new File(testDir, '0002tj5.rst').exists() - assertFalse new File(testDir, '0001fn1.rst').exists() - assertFalse new File(testDir, '0002ts5.rst').exists() - } - - @Test void testSetStatusFails() { - FileInputStream fin - try { - // get a lock to the file to prevent the rename - def issueFile = new File('0001fn1.rst') - fin = new FileInputStream(issueFile) - - // try to set the status - issues[0].status = Status.REJECTED - - // should throw IOE before here - Assert.fail() - } catch (IOException ioe) { - } catch (Exception e) { - Assert.fail("Unexpected exception: " + e.getLocalizedMessage()) - } finally { - if (fin != null) fin.close() - } - } - - @Test void testSetPriority() { - - assertEquals issues[0].priority, 1 - assertEquals issues[1].priority, 5 - - try { - issues[0].priority = 2 - issues[1].priority = 9 - } catch (Exception e) { - Assert.fail("An unexpected Exception occurred: " - + e.getLocalizedMessage()) - } - - assertEquals issues[0].priority, 2 - assertEquals issues[1].priority, 9 - - assertTrue new File(testDir, '0001fn2.rst').exists() - assertTrue new File(testDir, '0002ts9.rst').exists() - assertFalse new File(testDir, '0001fn1.rst').exists() - assertFalse new File(testDir, '0002ts5.rst').exists() - } - - @Test void testSetPriorityFails() { - FileInputStream fin - try { - // get a lock to the file to prevent the rename - def issueFile = new File('0001fn1.rst') - fin = new FileInputStream(issueFile) - - // try to set the priority - issues[0].priority = 9 - - // should throw IOE before here - Assert.fail() - } catch (IOException ioe) { - } catch (Exception e) { - Assert.fail("Unexpected exception: " + e.getLocalizedMessage()) - } finally { - if (fin != null) fin.close() - } - } - - @Test void testConstruction() { - File issueFile = new File(testDir, '0001fn1.rst') - Issue issue = new FileIssue(issueFile) - - assertEquals issue.id , "0001" - assertEquals issue.category , Category.FEATURE - assertEquals issue.status , Status.NEW - assertEquals issue.priority , 1 - assertEquals issue.title , "Add the killer feature to the killer app." - assertEquals issue.text , "Make our killer app shine!." - assertEquals issue.source , issueFile - } - - @Test void testSetTextFails() { - try { - // make the issue file un-writable - def issueFile = new File('0001fn1.rst') - if (issueFile.setReadOnly()) { - - // try to write something - issues[0].text = "This should fail to be written." - - // should throw IOE before here - Assert.fail() - } else { - println "Could not run testSetTextFails, unable to change " + - "the test isseu file's permissions." - } - } catch (IOException ioe) { - } catch (Exception e) { - Assert.fail("Unexpected exception: " + e.getLocalizedMessage()) - } - } - - @Test void testMakeFilename() { - assertEquals FileIssue.makeFilename('0001', Category.BUG, - Status.NEW, 5), '0001bn5.rst' - assertEquals FileIssue.makeFilename('0010', Category.FEATURE, - Status.REASSIGNED, 1), '0010fa1.rst' - assertEquals FileIssue.makeFilename('0002', Category.FEATURE, - Status.REJECTED, 3), '0002fj3.rst' - assertEquals FileIssue.makeFilename('0001', Category.BUG, - Status.RESOLVED, -2), '0001bs0.rst' - assertEquals FileIssue.makeFilename('0001', Category.TASK, - Status.VALIDATION_REQUIRED, 10) , '0001tv9.rst' - assertEquals FileIssue.makeFilename('00101', Category.BUG, - Status.NEW, 5), '00101bn5.rst' - - try { - FileIssue.makeFilename('badid', Category.BUG, Status.NEW, 5) - assertTrue 'Issue.makeFilename() succeeded with bad id input.', false - } catch (IllegalArgumentException iae) {} - - try { - FileIssue.makeFilename('0002', null, Status.NEW, 5) - assertTrue 'Issue.makeFilename() succeeded given no Category.', false - } catch (IllegalArgumentException iae) {} - - try { - FileIssue.makeFilename('0002', Category.BUG, null, 5) - assertTrue 'Issue.makeFilename() succeeded given no Status.', false - } catch (IllegalArgumentException iae) {} - } -} diff --git a/libpit/src/test/com/jdbernard/pit/file/FileProjectTest.groovy b/libpit/src/test/com/jdbernard/pit/file/FileProjectTest.groovy deleted file mode 100755 index 51a99e3..0000000 --- a/libpit/src/test/com/jdbernard/pit/file/FileProjectTest.groovy +++ /dev/null @@ -1,162 +0,0 @@ -package com.jdbernard.pit.file - -import com.jdbernard.pit.* -import org.junit.After -import org.junit.Before -import org.junit.Test -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertFalse -import static org.junit.Assert.assertNotNull -import static org.junit.Assert.assertTrue - -class FileProjectTest { - - File testDir - Project rootProj - - @Before void createTestProjects() { - - testDir = new File('testdir') - assert !testDir.exists() - testDir.mkdirs() - - /* TEST SUITE: - /testdir/ - 0001t5.rst - 0002b5.rst - 0003f2.rst - - subproj1/ - 0001f3.rst - 0002b4.rst - - emptyproj/ - - */ - - def issueFile = new File(testDir, '0001tn5.rst') - issueFile.createNewFile() - issueFile.write('Test Issue 1\n' + - '============\n\n' + - 'This is the first test issue.') - - issueFile = new File(testDir, '0002ba5.rst') - issueFile.createNewFile() - issueFile.write('Test Bug\n' + - '========\n\n' + - 'Yeah, it is a test bug.') - - issueFile = new File(testDir, '0003fs2.rst') - issueFile.createNewFile() - issueFile.write('Important Feature Request\n' + - '=========================\n\n' + - 'Here is our sweet feature. Please implement it!') - - def subDir = new File(testDir, 'subproj1') - subDir.mkdirs() - - issueFile = new File(subDir, '0001fv3.rst') - issueFile.createNewFile() - issueFile.write('First feature in subproject\n' + - '===========================\n\n' + - 'Please make the grubblers grobble.') - - issueFile = new File(subDir, '0002bj4.rst') - issueFile.createNewFile() - issueFile.write('Zippners are not zippning.\n' + - '==========================\n\n' + - 'For some reason, the Zippners are bilperring, not zippning.') - - subDir = new File(testDir, 'emptyproj') - subDir.mkdirs() - - rootProj = new FileProject(testDir) - } - - @After void deleteTestProjects() { - assert testDir.deleteDir() - - if (rootProj.source.exists()) - assert rootProj.source.deleteDir() - } - - @Test void testConstruction() { - Project proj = new FileProject(testDir) - - assertEquals proj.name, 'testdir' - assertEquals proj.issues.size(), 3 - assertEquals proj.projects.size(), 2 - - // Issue construction in general is under test in IssueTest - // just check that the issues actually exists - assertEquals proj.issues['0001'].id, '0001' - assertEquals proj.issues['0001'].title, 'Test Issue 1' - - assertEquals proj.issues['0002'].id, '0002' - assertEquals proj.issues['0002'].title, 'Test Bug' - - assertEquals proj.issues['0003'].id, '0003' - assertEquals proj.issues['0003'].title, 'Important Feature Request' - - // check sub-project behaviour - assertNotNull proj.projects.subproj1 - assertEquals proj.projects.subproj1.name, 'subproj1' - assertEquals proj.projects.subproj1.issues.size(), 2 - assertEquals proj.projects.subproj1.projects.size(), 0 - assertEquals proj.projects.subproj1.issues['0001'].id, '0001' - assertEquals proj.projects.subproj1.issues['0002'].id, '0002' - assertEquals proj.projects.subproj1.issues['0001'].title, - 'First feature in subproject' - assertEquals proj.projects.subproj1.issues['0002'].title, - 'Zippners are not zippning.' - - assertNotNull proj.projects.emptyproj - assertEquals proj.projects.emptyproj.issues.size(), 0 - assertEquals proj.projects.emptyproj.projects.size(), 0 - } - - @Test void testRename() { - assert rootProj.name == 'testdir' - - rootProj.name = 'renamedTestDir' - - assertEquals rootProj.name, 'renamedTestDir' - assertTrue new File('renamedTestDir').exists() - - assert rootProj.source.deleteDir() - } - - @Test void testCreateNewIssue() { - - // test correct increment of id, application of values - def newIssue = rootProj.createNewIssue(category: Category.BUG, - status: Status.REASSIGNED, priority: 4, - text: 'A newly made bug report.\n'+ - '========================\n\n' + - 'Testing the Project.createNewIssue() method.') - - assertEquals newIssue.id, '0004' - assertEquals newIssue.category, Category.BUG - assertEquals newIssue.status, Status.REASSIGNED - assertEquals newIssue.priority, 4 - assertEquals newIssue.text, 'A newly made bug report.\n'+ - '========================\n\n' + - 'Testing the Project.createNewIssue() method.' - assertEquals rootProj.issues[(newIssue.id)], newIssue - - //test defaults and creation of issue in an empty project - newIssue = rootProj.projects.emptyproj.createNewIssue() - - assertEquals newIssue.id, '0000' - assertEquals newIssue.priority, 5 - assertEquals newIssue.category, Category.TASK - assertEquals newIssue.status, Status.NEW - assertEquals newIssue.text, 'Default issue title.\n' + - '====================\n' - - assertEquals rootProj.projects.emptyproj.issues[(newIssue.id)], - newIssue - - } - -} diff --git a/libpit/src/test/com/jdbernard/pit/xml/XmlIssueTest.groovy b/libpit/src/test/com/jdbernard/pit/xml/XmlIssueTest.groovy deleted file mode 100755 index c973662..0000000 --- a/libpit/src/test/com/jdbernard/pit/xml/XmlIssueTest.groovy +++ /dev/null @@ -1,27 +0,0 @@ -package com.jdbernard.pit.xml - -import com.jdbernard.pit.* -import groovy.util.Node -import org.junit.Test -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertFalse -import static org.junit.Assert.assertTrue - -public class XmlIssueTest { - - Node issueNode = new Node(null, 'Issue', - [id: '0000', category: 'BUG', status: 'RESOLVED', priority: 1], - 'Test Issue') - - @Test public void testDummyTest() {} - - /*@Test public void testNodeConstructor() { - XmlIssue issue = new XmlIssue(issueNode) - - assertEquals issue.text, 'Test Issue' - assertEquals issue.id, '0000' - assertEquals issue.category, Category.BUG - assertEquals issue.status, Status.RESOLVED - assertEquals issue.priority, 1 - }*/ -} diff --git a/pit-cli/build.xml b/pit-cli/build.xml deleted file mode 100755 index 7080a9b..0000000 --- a/pit-cli/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pit-cli/lib/compile/jar/joda-time-2.0.jar b/pit-cli/lib/compile/jar/joda-time-2.0.jar deleted file mode 100644 index 169a7a4..0000000 Binary files a/pit-cli/lib/compile/jar/joda-time-2.0.jar and /dev/null differ diff --git a/pit-cli/lib/compile/jar/slf4j-api-1.6.1.jar b/pit-cli/lib/compile/jar/slf4j-api-1.6.1.jar deleted file mode 100644 index 42e0ad0..0000000 Binary files a/pit-cli/lib/compile/jar/slf4j-api-1.6.1.jar and /dev/null differ diff --git a/pit-cli/lib/runtime/jar/commons-cli-1.2.jar b/pit-cli/lib/runtime/jar/commons-cli-1.2.jar deleted file mode 100755 index ce4b9ff..0000000 Binary files a/pit-cli/lib/runtime/jar/commons-cli-1.2.jar and /dev/null differ diff --git a/pit-cli/lib/runtime/jar/joda-time-2.0.jar b/pit-cli/lib/runtime/jar/joda-time-2.0.jar deleted file mode 100644 index 169a7a4..0000000 Binary files a/pit-cli/lib/runtime/jar/joda-time-2.0.jar and /dev/null differ diff --git a/pit-cli/lib/runtime/jar/logback-classic-0.9.26.jar b/pit-cli/lib/runtime/jar/logback-classic-0.9.26.jar deleted file mode 100644 index b900b64..0000000 Binary files a/pit-cli/lib/runtime/jar/logback-classic-0.9.26.jar and /dev/null differ diff --git a/pit-cli/lib/runtime/jar/logback-core-0.9.26.jar b/pit-cli/lib/runtime/jar/logback-core-0.9.26.jar deleted file mode 100644 index d50f3cd..0000000 Binary files a/pit-cli/lib/runtime/jar/logback-core-0.9.26.jar and /dev/null differ diff --git a/pit-cli/lib/runtime/jar/slf4j-api-1.6.1.jar b/pit-cli/lib/runtime/jar/slf4j-api-1.6.1.jar deleted file mode 100644 index 42e0ad0..0000000 Binary files a/pit-cli/lib/runtime/jar/slf4j-api-1.6.1.jar and /dev/null differ diff --git a/pit-cli/project.properties b/pit-cli/project.properties deleted file mode 100755 index 8275f81..0000000 --- a/pit-cli/project.properties +++ /dev/null @@ -1,12 +0,0 @@ -#Thu, 26 Mar 2015 19:51:28 -0500 -build.dir=build -src.dir=src -build.jar=pit-cli-${application.version}.${build.number}.jar -build.number=2 -version=3.3.3 -name=pit-cli -lib.dir=lib -lib.local=true -release.dir=release -release.jar=pit-cli-${application.version}.jar -main.class=com.jdbernard.pit.PersonalIssueTrackerCLI diff --git a/pit-cli/src/main/com/jdbernard/pit/PersonalIssueTrackerCLI.groovy b/pit-cli/src/main/com/jdbernard/pit/PersonalIssueTrackerCLI.groovy deleted file mode 100644 index 3505986..0000000 --- a/pit-cli/src/main/com/jdbernard/pit/PersonalIssueTrackerCLI.groovy +++ /dev/null @@ -1,631 +0,0 @@ -/** - * # Personal Issue Tracker Command Line Interface - * @author Jonathan Bernard - * @copyright 2009-2012 Jonathan Bernard - * - * This is a command-line interface to my personal issue tracker system. - */ -package com.jdbernard.pit - -import com.jdbernard.pit.file.* - -import org.joda.time.DateMidnight -import org.joda.time.DateTime -import org.slf4j.LoggerFactory - -import static java.lang.Math.max -import static java.lang.Math.min - -def log = LoggerFactory.getLogger(getClass()) - -/// ## Command Line Options ## -/// -------------------------- -/// @org cli-options -def cli = new CliBuilder(usage: 'pit-cli [options]') - -/// -h,--help -/// : Show help information -cli.h(longOpt: 'help', 'Show help information.') - -/// -v,--verbose -/// : Show verbose task information. -cli.v(longOpt: 'verbose', 'Show verbose task information') - -/// -l,--list -/// : List issues in the current project. -cli.l(longOpt: 'list', 'List issues in the current project.') - -/// -i,--id -/// : Filter issues by id. Accepts a comma-delimited list. -/// *Example:* `pit -l -i 0001,0002` -cli.i(argName: 'id', longOpt: 'id', args: 1, - 'Filter issues by id. Accepts a comma-delimited list.') - -/// -c,--category -/// : Filter issues by category (bug, feature, task). Accepts a -/// comma-delimited list. By default all categories are selected. The full -/// category name is not required, just enough to be uniquely identifiable. -/// *Example:* `pit -l -c bug,t # List bugs and tasks.` -cli.c(argName: 'category', longOpt: 'category', args: 1, - 'Filter issues by category (bug, feature, task). Accepts a ' - + 'comma-delimited list. By default all categories are selected.') - -/// -s,--status -/// : Filter issues by status (new, reassigned, rejected, resolved, -/// validation_required). The full status is not required, just enough to -/// uniquely identify the status. -/// *Example:* `pit -l -s reas,rej # List Reassigned and Rejected issues.` -cli.s(argName: 'status', longOpt: 'status', args: 1, - 'Filter issues by status (new, reassigned, rejected, resolved, ' + - 'validation_required)') - -/// -p,--priority -/// : Filter issues by priority. This acts as a threshhold, listing all -/// issues greater than or equal to the given priority. -/// *Example:* `pit -l -p 5 # List all issues with priority >= 5` -cli.p(argName: 'priority', longOpt: 'priority', args: 1, - 'Filter issues by priority. This acts as a threshhold, listing all issues ' - + 'greater than or equal to the given priority.') - -/// -r,--project -/// : Filter issues by project (relative to the current directory). Accepts a -/// comma-delimited list. This option should be used in conjunction with the -/// `R,--recursive` option. -/// *Example:* `pit -l -R --project ` -cli.r(argName: 'project', longOpt: 'project', args: 1, - 'Filter issues by project (relative to the current directory). Accepts a ' - + 'comma-delimited list.') - -/// -R,--recursive -/// : Recursively include subprojects. -cli.R(longOpt: 'recursive', 'Include subprojects.') - -/// -e,--extended-property -/// : Filter for issues by extended property. Format is -/// `-e =`. -cli.e(argName: 'extended-property', args: 1, 'Filter for issues by extended ' + - 'property. Format is "-e =".') - -/*cli.s(longOpt: 'show-subprojects', - 'Include sup projects in listing (default behaviour)') -cli.S(longOpt: 'no-subprojects', 'Do not list subprojects.')*/ // TODO: figure out better flags for these options. - -/// -P,--set-priority -/// : Modify the priority of the selected issues. Requires a value from 0-9. -cli.P(argName: 'new-priority', longOpt: 'set-priority', args: 1, - 'Modify the priority of the selected issues.') - -/// -C,--set-category -/// : Modify the category of the selected issues. -cli.C(argName: 'new-category', longOpt: 'set-category', args: 1, - 'Modify the category of the selected issues.') - -/// -S,--set-status -/// : Modify the status of the selected issues. -cli.S(argName: 'new-status', longOpt: 'set-status', args: 1, - 'Modify the status of the selected issues.') - -/// -E,--new-issue -/// : Modify the extended property of the selected issues. Format is -/// `-E =` -cli.E(argName: 'new-extended-property', longOpt: 'set-extended-property', - args: 1, 'Modify the extended property of the selected issues. Format ' + - 'is "-E ="') - -/// -n,--new-issue -/// : Create a new issue -cli.n(longOpt: 'new-issue', 'Create a new issue.') - -/// --title -/// : Give the title for a new issue or modify the title for an existing -/// issue. By default the title for a new issue is expected on stanard -/// input. -cli._(longOpt: 'title', args: 1, argName: 'title', 'Give the title for a new' + - ' issue or modify the title for an existing issue. By default the title' + - ' for a new issue is expected on stanard input.') - -/// --text -/// : Give the text for a new issue or modify the text for an exising -/// issue. By default the text for a new issue is expected on standard -/// input. -cli._(longOpt: 'text', args: 1, argName: 'text', 'Give the text for a new' + - ' issue or modify the text for an exising issue. By default the text for' + - ' a new issue is expected on standard input.') - -/** -o,--order - * : Order (sort) the results by the given properties. Provide a - * comma-seperated list of property names to sort by in order of - * importance. The basic properties (id, category, status, and priority) - * can be given using their one-letter forms (i,c,s,p) for brevity. For - * example: `-o Due,p,c` would sort first by the extended property `Due`, - * then for items that have the same `Due` value it would sort by - * priority, then by category. */ -cli.o(longOpt: 'order', argName: 'order', args: 1, required: false, - 'Order (sort) the results by the given properties. Provide a comma-' + - 'seperated list of property names to sort by in order of importance. The' + - ' basic properties (id, category, status, and priority) can be given' + - ' using their one-letter forms (i,c,s,p) for brevity. For example:' + - ' "-o Due,p,c" would sort first by the extended property "Due", then for' + - ' items that have the same "Due" value it would sort by priority, then' + - ' by category.') - -/// -d,--dir -/// : Use `` as the base directory (defaults to current directory). -cli.d(longOpt: 'dir', argName: 'dir', args: 1, required: false, - 'Use as the base directory (defaults to current directory).') - -/// -D,--daily-list -/// : Print a Daily Task list based on issue Due, Scheduled, and Reminder -/// extended properties. -cli.D(longOpt: 'daily-list', 'Print a Daily Task list based on issue Due and' + - ' Reminder properties.') - -/// --dl-scheduled -/// : Show scheduled tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-scheduled', 'Show scheduled tasks in the daily list (all' + - ' are shown by default).') - -/// --dl-due -/// : Show due tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-due', 'Show due tasks in the daily list (all are shown by' + - ' default).') - -/// --dl-upcoming -/// : Show upcoming tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-upcoming', 'Show upcoming tasks in the daily list (all ' + - ' are shown by default).') - -/// --dl-open -/// : Show open tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-open', 'Show open tasks in the daily list (all are shown ' + - ' by default).') - -/// --dl-hide-scheduled -/// : Hide scheduled tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-hide-scheduled', 'Hide scheduled tasks in the daily list' + - ' (all are shown by default).') - -/// --dl-hide-due -/// : Show due tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-hide-due', 'Show due tasks in the daily list (all are' + - ' shown by default).') - -/// --dl-hide-upcoming -/// : Show upcoming tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-hide-upcoming', 'Show upcoming tasks in the daily list' + - ' (all are shown by default).') - -/// --dl-hide-open -/// : Show open tasks in the daily list (all are shown by default). -cli._(longOpt: 'dl-hide-open', 'Show open tasks in the daily list (all are' + - ' shown by default).') - -/// --dl-upcoming-days -/// : The upcoming tasks section in the daily list includes any tasks due -/// within the next seven days by default. This option overrides that -/// default and allows you to specify the number of days ahead the upcoming -/// section looks. -cli._(longOpt: 'dl-upcoming-days', argName: 'num-days', args:1, required: false, - 'The upcoming tasks section in the daily list includes any tasks due ' + - 'within the next seven days by default. This option overrides that ' + - 'default and allows you to specify the number of days ahead the upcoming ' + - 'section looks.') - -/// --version -/// : Display PIT version information. -cli._(longOpt: 'version', 'Display PIT version information.') - -/// ## Parse CLI Options ## -/// ----------------------- - -log.trace("Parsing options.") - -def VERSION = "3.3.3" -def opts = cli.parse(args) -def issuedb = [:] -def workingDir = new File('.') - -/// Defaults for the issue filter/selector. -def selectOpts = [ - categories: ['bug', 'feature', 'task'], - status: ['new', 'reassigned', 'rejected', - 'resolved', 'validation_required'], - priority: 9, - projects: [], - ids: [], - extendedProperties: [:], - acceptProjects: true] - -/// Defaults for changing properties of issue(s) -def assignOpts = [:] - -if (!opts || opts.h) { - cli.usage() - System.exit(0) } - -///Read the `-c` option: category filter designation(s). -if (opts.c) { - if (opts.c =~ /all/) {} // no-op, same as defaults - else { selectOpts.categories = opts.c.split(/[,\s]/) } } - -/// Parse the categories names into Category objects. -try { selectOpts.categories = - selectOpts.categories.collect { Category.toCategory(it) } } -catch (Exception e) { - println "Invalid category option: '-c ${e.localizedMessage}'." - println "Valid options are: \n${Category.values().join(', ')}" - println " (abbreviations are accepted)." - System.exit(1) } - -/// Read the `-s` option: status filter designation(s). -if (opts.s) { - // -s all - if (opts.s =~ /all/) selectOpts.status = ['new', 'reassigned', 'rejected', - 'resolved', 'validation_required'] - // - else selectOpts.status = opts.s.split(/[,\s]/) } - -/// Parse the statuses into Status objects. -try { selectOpts.status = - selectOpts.status.collect { Status.toStatus(it) } } -catch (Exception e) { - println "Invalid status option: '-s ${e.localizedMessage}'." - print "Valid options are: \n${Status.values().join(', ')}" - println " (abbreviations are accepted.)" - System.exit(1) } - -/// Read and parse the `-p` option: priority filter. -if (opts.p) try { - selectOpts.priority = opts.p.toInteger() } -catch (NumberFormatException nfe) { - println "Not a valid priority value: '-p ${opts.p}'." - println "Valid values are: 0-9" - System.exit(1) } - -/// Read and parse the `-r` option: projects filter. -if (opts.r) { selectOpts.projects = - opts.r.toLowerCase().split(/[,\s]/).asType(List.class) } - -/// Read and parse the `-i` option: id filter. -if (opts.i) { selectOpts.ids = opts.i.split(/[,\s]/).asType(List.class) } - -/// Read and parse the `-o` option: sort criteria. -if (opts.o) { - def sortProps = opts.o.split(',') - selectOpts.issueSorter = sortProps.collect { prop -> - switch (prop) { - case ~/^i$/: return { issue -> issue.id } - case ~/^p$/: return { issue -> issue.priority } - case ~/^s$/: return { issue -> issue.status } - case ~/^c$/: return { issue -> issue.category } - default: return { issue -> issue[prop] } }}} - -/// Read and parse any extended property selection criteria. -if (opts.e) { - opts.es.each { option -> - def parts = option.split("=") - selectOpts.extendedProperties[parts[0]] = - ExtendedPropertyHelp.parse(parts[1]) }} - -/// Read and parse the `-C` option: category to assign. -if (opts.C) try { assignOpts.category = Category.toCategory(opts.C) } -catch (Exception e) { - println "Invalid category option: '-C ${e.localizedMessage}'." - println "Valid categories are: \n${Category.values().join(', ')}" - println " (abbreviations are accepted)." - System.exit(1) } - -/// Read and parse the `-S` option: status to assign. -if (opts.S) try { assignOpts.status = Status.toStatus(opts.S) } -catch (Exception e) { - println "Invalid status option: '-S ${e.localizedMessage}'." - println "Valid stasus options are: \n${Status.values().join(', ')}" - println " (abbreviations are accepted)." - System.exit(1) } - -/// Read and parse the `-P` option: priority to assign. -if (opts.P) try {assignOpts.priority = opts.P.toInteger() } -catch (NumberFormatException nfe) { - println "Not a valid priority value: '-P ${opts.P}'." - println "Valid values are: 0-9" - System.exit(1) } - -/// Read an parse any extended properties to be set. -if (opts.E) { - opts.Es.each { option -> - def parts = option.split("=") - assignOpts[parts[0]] = ExtendedPropertyHelp.parse(parts[1]) }} - -/// Read the title if given. -if (opts.title) { assignOpts.title = opts.title } - -/// Read the text if given. -if (opts.text) { assignOpts.text = opts.text } - -/// Set the project working directory. -if (opts.d) { - workingDir = new File(opts.d.trim()) - if (!workingDir.exists()) { - println "Directory '${workingDir}' does not exist." - return -1 } } - -def EOL = System.getProperty('line.separator') - -log.debug("Finished parsing options:\nworkingDir: {}\nselectOpts: {}\nassignOpts: {}", - workingDir.canonicalPath, selectOpts, assignOpts) - -/// ## Actions ## -/// ------------- - -/// ### Version information. -if (opts.version) { - - println "PIT CLI Version ${VERSION}" - println "Written by Jonathan Bernard\n" } - - -/// ---- -else { - -/// Build issue list. -log.trace("Building issue database.") -issuedb = new FileProject(workingDir) - -/// Build filter from options. -log.trace("Defining the filter.") -def filter = new Filter(selectOpts) - -/// ### List -if (opts.l) { - - log.trace("Listing issues.") - - /// Local function (closure) to print a single issue. - def printIssue = { issue, offset -> - println "${offset}${issue}" - if (opts.v) { - println "" - issue.text.eachLine { println "${offset} ${it}" } - println "" - issue.extendedProperties.each { name, value -> - def formattedValue = ExtendedPropertyHelp.format(value) - println "${offset} * ${name}: ${formattedValue}"} - println ""}} - - /// Local function (closure) to print a project and all visible subprojects. - def printProject - printProject = { project, offset -> - println "\n${offset}${project.name}" - println "${offset}${'-'.multiply(project.name.length())}" - project.eachIssue(filter) { printIssue(it, offset) } - project.eachProject(filter) { printProject(it, offset + " ") } } - - /// Print all the issues in the root of this db. - issuedb.eachIssue(filter) { printIssue(it, "") } - - /// If the user set the recursive flag print all projects. - if (opts.R) { - issuedb.eachProject(filter) { printProject(it, "") }} } - -/// ### Daily List -else if (opts.D) { - - log.trace("Showing a daily list.") - - /// Set up our time intervals. - def today = new DateMidnight() - def tomorrow = today.plusDays(1) - - /// #### Parse daily list specific display options. - def visibleSections = [] - def suppressedSections - def upcomingCutoff = today.plusDays(7) - - /// Check for a custom upcoming section cutoff date. - if (opts.'dl-upcoming-days') { - int numDays = opts.'dl-upcoming-days' as int - upcomingCutoff = today.plusDays(numDays) } - - /// Parse the additive options first. - if (opts.'dl-scheduled') { visibleSections << 'scheduled' } - if (opts.'dl-due') { visibleSections << 'due' } - if (opts.'dl-upcoming') { visibleSections << 'upcoming' } - if (opts.'dl-open') { visibleSections << 'open' } - - /// If the user did not add any sections assume they want them all. - if (visibleSections.size() == 0) { - visibleSections = ['scheduled', 'due', 'upcoming', 'open'] } - - /// Now go through the negative options. - if (opts.'dl-hide-scheduled') { visibleSections -= 'scheduled' } - if (opts.'dl-hide-due') { visibleSections -= 'due' } - if (opts.'dl-hide-upcoming') { visibleSections -= 'upcoming' } - if (opts.'dl-hide-open') { visibleSections -= 'open' } - - /// If the user did not specifically ask for a status filter, we want a - /// different default filter when we are doing a daily list. - if (!opts.s) { filter.status = [Status.NEW, Status.VALIDATION_REQUIRED] } - - /// If the user did not give a specific sorting order, define our own: due - /// date, then priority, then id. - if (!opts.o) { filter.issueSorter = [ {it.due}, {it.priority}, {it.id} ] } - - /// #### Get all the issues involved. - def allIssues = opts.R ? - /// If `-R` passed, get all issues, including subprojects. - issuedb.getAllIssues(filter) : - /// Otherwise, just use the issues for this project. - issuedb.issues.values().findAll { filter ? filter.accept(it) : true } - - /// We are going to sort the issues into these buckets based on when they are - /// scheduled, when they are due and if they have a reminder set. - def scheduledToday = [] - def dueToday = [] - def upcoming = [] - def notDueOrReminder = [] - - /// Helper closure to print an issue. - def printIssue = { issue -> - if (issue.due) println "${issue.due.toString('EEE, MM/dd')} -- ${issue}" - else println " -- ${issue}" } - - /// A sorter which sorts by date first, then by priority. - def priorityDateSorter = { i1, i2 -> - if (i1.priority == i2.priority) { - def d1 = i1.due ?: new DateTime() - def d2 = i2.due ?: new DateTime() - - return d1.compareTo(d2) } - else { return i1.priority - i2.priority }} - - /// #### Categorize and sort the issues. - /// Sort the issues into seperate lists based on their due dates and - /// reminders. - allIssues.each { issue -> - /// * Find the issues that are scheduled for today. - if (issue.scheduled && issue.scheduled < tomorrow) { - scheduledToday << issue } - - /// * Find the issues that are due today or are past due. - else if (issue.due && issue.due < tomorrow) { dueToday << issue } - - /// * Find the issues that are not yet due but have a reminder for - /// today or days past as well as issues that are due before the - /// `upcomingCutoff` date. - else if ((issue.reminder && issue.reminder < tomorrow) || - (issue.due && issue.due < upcomingCutoff)) { - upcoming << issue } - - /// * All the others (not due and no reminder). - else notDueOrReminder << issue } - - /// #### Print the issues - if (visibleSections.contains('scheduled') && scheduledToday.size() > 0) { - println "Tasks Scheduled for Today" - println "-------------------------" - - scheduledToday.sort(priorityDateSorter).each { printIssue(it) } - - println "" } - - if (visibleSections.contains('due') && dueToday.size() > 0) { - println "Tasks Due Today" - println "---------------" - - dueToday.sort(priorityDateSorter).each { printIssue(it) } - - println ""} - - if (visibleSections.contains('upcoming') && upcoming.size() > 0) { - println "Upcoming Tasks" - println "--------------" - - upcoming.sort(priorityDateSorter).each { printIssue(it) } - - println ""} - - if (visibleSections.contains('open') && notDueOrReminder.size() > 0) { - println "Other Open Issues" - println "-----------------" - - notDueOrReminder.sort(priorityDateSorter).each { printIssue(it) } - - println "" }} - -/// ### Create a New Issue. -else if (opts.n) { - - log.trace("Creating a new issue.") - - Issue issue - def sin = System.in.newReader() - - /// Set the created extended property. - assignOpts.created = new DateTime() - - /// Prompt for the different options if they were not given on the command - /// line. We will loop until they have entered a valid value. How it works: - /// In the body of the loop we will try to read the input, parse it and - /// assign it to a variable. If the input is invalid it will throw an - /// exception before the assignment happens, the variable will still be - /// null, and we will prompt the user again. - - /// Prompt for category. - while(!assignOpts.category) { - try { - print "Category (bug, feature, task): " - assignOpts.category = Category.toCategory(sin.readLine()) - break } - catch (e) { - println "Invalid category: " + e.getLocalizedMessage() - println "Valid options are: \n${Category.values().join(', ')}" - println " (abbreviations are accepted)." } } - - /// Prompt for the priority. - while (!assignOpts.priority) { - try { - print "Priority (0-9): " - assignOpts.priority = max(0, min(9, sin.readLine().toInteger())) - break } - catch (e) { println "Not a valid value." } } - - /// Prompt for the issue title. No need to loop as the input does not need - /// to be validated. - if (!assignOpts.title) { - println "Issue title: " - assignOpts.title = sin.readLine().trim() } - - /// Prompt for the issue text. - if (!assignOpts.text) { - assignOpts.text = "" - println "Enter issue text (use EOF to stop): " - try { - def line = "" - while(true) { - line = sin.readLine() - - // Stop when they enter EOF - if (line ==~ /^EOF$/) break - - assignOpts.text += line + EOL } } - catch (e) {} } - - /// Create the issue. - issue = issuedb.createNewIssue(assignOpts) - - println "New issue created: " - println issue } - -/// ### Change Existing Issues. -else if (assignOpts.size() > 0) { - - log.trace("Changing existing issues.") - - /// We are going to add some extra properties if the status is being changed, - /// because we are nice like that. - if (assignOpts.status) { switch (assignOpts.status) { - case Status.RESOLVED: assignOpts.resolved = new DateTime(); break - case Status.REJECTED: assignOpts.rejected = new DateTime(); break - default: break }} - - /// #### processIssue - /// A local function to handle the changes for one issue. - def processIssue = { issue -> - println issue - /// Walk the assigned options map and set the properties on the issue. - assignOpts.each { propName, value -> - issue[propName] = value - def formattedValue = ExtendedPropertyHelp.format(value) - println " set ${propName} to ${formattedValue}" } } - - /// If the user passed `-R`, walk the whole project, including subprojects. - if (opts.R) { issuedb.walkProject(filter, processIssue) } - /// Otherwise, just process the issues in this project. - else { - issuedb.issues.values() - .findAll { filter ? filter.accept(it) : true } - .each(processIssue) }} -/// ### Invalid Input -else { - log.trace("Unknown request.") - cli.usage(); return -1 }} diff --git a/pit-swing/application.properties b/pit-swing/application.properties deleted file mode 100755 index 6a7b93e..0000000 --- a/pit-swing/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Griffon Metadata file -#Thu Aug 05 10:29:59 CDT 2010 -app.archetype=default -app.griffon.version=0.9 -app.name=pit-swing -app.version=2.5.1 diff --git a/pit-swing/griffon-app/conf/Application.groovy b/pit-swing/griffon-app/conf/Application.groovy deleted file mode 100755 index 6bd908b..0000000 --- a/pit-swing/griffon-app/conf/Application.groovy +++ /dev/null @@ -1,33 +0,0 @@ -application { - title = 'PitSwing' - startupGroups = ['PIT'] - - // Should Griffon exit when no Griffon created frames are showing? - autoShutdown = true - - // If you want some non-standard application class, apply it here - //frameClass = 'javax.swing.JFrame' -} -mvcGroups { - // MVC Group for "ProjectPanel" - 'ProjectPanel' { - model = 'com.jdbernard.pit.swing.ProjectPanelModel' - view = 'com.jdbernard.pit.swing.ProjectPanelView' - controller = 'com.jdbernard.pit.swing.ProjectPanelController' - } - - // MVC Group for "NewIssueDialog" - 'NewIssueDialog' { - model = 'com.jdbernard.pit.swing.NewIssueDialogModel' - view = 'com.jdbernard.pit.swing.NewIssueDialogView' - controller = 'com.jdbernard.pit.swing.NewIssueDialogController' - } - - // MVC Group for "PIT" - 'PIT' { - model = 'com.jdbernard.pit.swing.PITModel' - view = 'com.jdbernard.pit.swing.PITView' - controller = 'com.jdbernard.pit.swing.PITController' - } - -} diff --git a/pit-swing/griffon-app/conf/BuildConfig.groovy b/pit-swing/griffon-app/conf/BuildConfig.groovy deleted file mode 100755 index 6c5673b..0000000 --- a/pit-swing/griffon-app/conf/BuildConfig.groovy +++ /dev/null @@ -1,135 +0,0 @@ -// key signing information -environments { - development { - signingkey { - params { - sigfile = 'GRIFFON' - keystore = "${basedir}/griffon-app/conf/keys/devKeystore" - alias = 'development' - storepass = 'BadStorePassword' - keypass = 'BadKeyPassword' - lazy = true // only sign when unsigned - } - } - - } - test { - griffon { - jars { - sign = false - pack = false - } - } - } - production { - signingkey { - params { - sigfile = 'GRIFFON' - keystore = 'CHANGE ME' - alias = 'CHANGE ME' - // NOTE: for production keys it is more secure to rely on key prompting - // no value means we will prompt //storepass = 'BadStorePassword' - // no value means we will prompt //keypass = 'BadKeyPassword' - lazy = false // sign, regardless of existing signatures - } - } - - griffon { - jars { - sign = true - pack = true - destDir = "${basedir}/staging" - } - webstart { - codebase = 'CHANGE ME' - } - } - } -} - -griffon { - memory { - //max = '64m' - //min = '2m' - //maxPermSize = '64m' - } - jars { - sign = false - pack = false - destDir = "${basedir}/staging" - jarName = "${appName}.jar" - } - extensions { - jarUrls = [] - jnlpUrls = [] - /* - props { - someProperty = 'someValue' - } - resources { - linux { // windows, macosx, solaris - jars = [] - nativelibs = [] - props { - someProperty = 'someValue' - } - } - } - */ - } - webstart { - codebase = "${new File(griffon.jars.destDir).toURI().toASCIIString()}" - jnlp = 'application.jnlp' - } - applet { - jnlp = 'applet.jnlp' - html = 'applet.html' - } -} - -// required for custom environments -signingkey { - params { - def env = griffon.util.Environment.current.name - sigfile = 'GRIFFON-' + env - keystore = "${basedir}/griffon-app/conf/keys/${env}Keystore" - alias = env - // storepass = 'BadStorePassword' - // keypass = 'BadKeyPassword' - lazy = true // only sign when unsigned - } -} - -griffon.project.dependency.resolution = { - // inherit Griffon' default dependencies - inherits("global") { - } - log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' - repositories { - griffonPlugins() - griffonHome() - griffonCentral() - - // uncomment the below to enable remote dependency resolution - // from public Maven repositories - //mavenLocal() - //mavenCentral() - //mavenRepo "http://snapshots.repository.codehaus.org" - //mavenRepo "http://repository.codehaus.org" - //mavenRepo "http://download.java.net/maven/2/" - //mavenRepo "http://repository.jboss.com/maven2/" - } - dependencies { - // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. - - // runtime 'mysql:mysql-connector-java:5.1.5' - } -} - -griffon { - doc { - logo = 'The Griffon Framework' - sponsorLogo = "
" - footer = "

Made with Griffon (0.9)" - } -} diff --git a/pit-swing/griffon-app/conf/Builder.groovy b/pit-swing/griffon-app/conf/Builder.groovy deleted file mode 100755 index 55a7c1d..0000000 --- a/pit-swing/griffon-app/conf/Builder.groovy +++ /dev/null @@ -1,9 +0,0 @@ -root { - 'groovy.swing.SwingBuilder' { - controller = ['Threading'] - view = '*' - } - 'griffon.app.ApplicationBuilder' { - view = '*' - } -} \ No newline at end of file diff --git a/pit-swing/griffon-app/conf/Config.groovy b/pit-swing/griffon-app/conf/Config.groovy deleted file mode 100755 index f4318bf..0000000 --- a/pit-swing/griffon-app/conf/Config.groovy +++ /dev/null @@ -1,19 +0,0 @@ -// log4j configuration -log4j { - appender.stdout = 'org.apache.log4j.ConsoleAppender' - appender.'stdout.layout'='org.apache.log4j.PatternLayout' - appender.'stdout.layout.ConversionPattern'='[%r] %c{2} %m%n' - appender.errors = 'org.apache.log4j.FileAppender' - appender.'errors.layout'='org.apache.log4j.PatternLayout' - appender.'errors.layout.ConversionPattern'='[%r] %c{2} %m%n' - appender.'errors.File'='stacktrace.log' - rootLogger='error,stdout' - logger { - griffon='error' - StackTrace='error,errors' - org { - codehaus.griffon.commons='info' // core / classloading - } - } - additivity.StackTrace=false -} diff --git a/pit-swing/griffon-app/conf/Events.groovy b/pit-swing/griffon-app/conf/Events.groovy deleted file mode 100755 index d2dbc49..0000000 --- a/pit-swing/griffon-app/conf/Events.groovy +++ /dev/null @@ -1,5 +0,0 @@ -import org.slf4j.LoggerFactory - -onNewInstance = { klass, type, instance -> - instance.metaClass.logger = LoggerFactory.getLogger(klass.name) -} diff --git a/pit-swing/griffon-app/conf/webstart/applet.html b/pit-swing/griffon-app/conf/webstart/applet.html deleted file mode 100755 index 1d3b0ec..0000000 --- a/pit-swing/griffon-app/conf/webstart/applet.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - diff --git a/pit-swing/griffon-app/conf/webstart/applet.jnlp b/pit-swing/griffon-app/conf/webstart/applet.jnlp deleted file mode 100755 index d648c61..0000000 --- a/pit-swing/griffon-app/conf/webstart/applet.jnlp +++ /dev/null @@ -1,59 +0,0 @@ - - - - - @griffonAppName@ - @griffonAppName@ - - - @griffonAppName@ - @griffonAppName@ - @griffonAppName@ - @griffonAppName@ - - - - - - - - - - - - - - - - - - - - -@jnlpJars@ - -@jnlpExtensions@ -@jnlpProperties@ - -@jnlpResources@ - - - - -@applet.tag.params@ - - diff --git a/pit-swing/griffon-app/conf/webstart/application.jnlp b/pit-swing/griffon-app/conf/webstart/application.jnlp deleted file mode 100755 index 8635143..0000000 --- a/pit-swing/griffon-app/conf/webstart/application.jnlp +++ /dev/null @@ -1,54 +0,0 @@ - - - - - @griffonAppName@ - @griffonAppName@ - - - @griffonAppName@ - @griffonAppName@ - @griffonAppName@ - @griffonAppName@ - - - - - - - - - - - - - - - - - - - -@jnlpJars@ - -@jnlpExtensions@ -@jnlpProperties@ - -@jnlpResources@ - - - - -@applet.tag.params@ - - diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-128x128.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-128x128.png deleted file mode 100755 index b0b4327..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-128x128.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-16x16.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-16x16.png deleted file mode 100755 index 90e269e..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-16x16.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-24x24.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-24x24.png deleted file mode 100755 index 0d1bb73..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-24x24.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-256x256.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-256x256.png deleted file mode 100755 index 3cdabd2..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-256x256.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-32x32.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-32x32.png deleted file mode 100755 index 2c9c1e1..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-32x32.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-48x48.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-48x48.png deleted file mode 100755 index 3577b8e..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-48x48.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon-icon-64x64.png b/pit-swing/griffon-app/conf/webstart/griffon-icon-64x64.png deleted file mode 100755 index fe403f8..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon-icon-64x64.png and /dev/null differ diff --git a/pit-swing/griffon-app/conf/webstart/griffon.png b/pit-swing/griffon-app/conf/webstart/griffon.png deleted file mode 100755 index 4a38291..0000000 Binary files a/pit-swing/griffon-app/conf/webstart/griffon.png and /dev/null differ diff --git a/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/NewIssueDialogController.groovy b/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/NewIssueDialogController.groovy deleted file mode 100755 index 3e59ef6..0000000 --- a/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/NewIssueDialogController.groovy +++ /dev/null @@ -1,26 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Status - -class NewIssueDialogController { - // these will be injected by Griffon - def model - def view - - void mvcGroupInit(Map args) { - // this method is called after model and view are injected - } - - def show = { - view.titleTextField.text = "" - model.text = "" - view.categoryComboBox.selectedItem = Category.BUG - model.category = Category.BUG - view.statusComboBox.selectedItem = Status.NEW - model.status = Status.NEW - view.prioritySpinner.setValue(5) - model.priority = 5 - view.dialog.visible = true - } -} diff --git a/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/PITController.groovy b/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/PITController.groovy deleted file mode 100755 index 0eeb499..0000000 --- a/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/PITController.groovy +++ /dev/null @@ -1,172 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.FileProject -import javax.swing.JFileChooser -import javax.swing.SwingUtilities - -class PITController { - - // these will be injected by Griffon - def model - def view - - void mvcGroupInit(Map args) { - - model.newIssueDialogMVC = buildMVCGroup('NewIssueDialog') - - SwingUtilities.invokeAndWait { - model.issueListRenderer = new IssueTableCellRenderer() - - File pitHome, pitrcFile, pitswingrcFile - boolean logDbg = logger.isDebugEnabled() - Properties config = new Properties() - - // look for config directory - pitHome = new File(System.getProperty('user.home'), '.pit') - if (logDbg) logger.debug("$pitHome is " + - (pitHome.exists() ? '' : 'not ') + "present.") - - // look for general config options - pitrcFile = new File(pitHome, 'pitrc') - if (logDbg) logger.debug("$pitrcFile is " + - (pitrcFile.exists() ? '' : 'not ') + "present.") - - // load general config (if present) - if (pitrcFile.exists() && pitrcFile.canRead()) { - pitrcFile.withInputStream { config.load(it) } - if (logDbg) logger.debug("Loaded pitrc") - } - - // look for swing specific config - pitswingrcFile = new File(pitHome, 'pitswingrc') - if (logDbg) logger.debug("$pitswingrcFile is " + - (pitswingrcFile.exists() ? '' : 'not ') + "present.") - - // load swing specific config (if present) - if (pitswingrcFile.exists() && pitswingrcFile.canRead()) { - pitswingrcFile.withInputStream { config.load(it) } - if (logDbg) logger.debug("Loaded pitswingrc") - } - - // Process configurable options - // ---------------------------- - - if (logDbg) { - logger.debug("Configurable properties:") - config.keySet().each { logger.debug(it) } - } - - // add custom category templates - Category.values().each { category -> - def expectedKey = "issue." + category.name().toLowerCase() + - ".template" - if (logDbg) logger.debug("Looking for key: $expectedKey") - - config.keySet().each { currentKey -> - if (currentKey == expectedKey) - model.templates[(category)] = - config.getProperty(expectedKey, "") - if (logDbg) logger.debug("Template for category $category: '" + - model.templates[(category)] + "'") - } - - } - - // load custom issueListRenderer - // TODO: not yet supported (maybe no need) - - // load initial repositories - if (config.containsKey('initial-repositories')) { - def initRepos = config.getProperty('initial-repositories', '') - initRepos = initRepos.split(/[:;,]/) - initRepos.each { repoPath -> loadProject(new File(repoPath)) } - if (logDbg) logger.debug("Init repos: '$initRepos'") - } - - // load custom issue css - if (config.containsKey('issue.display.css')) { - def issueCSS = config.getProperty('issue.display.css', "") - - // look for a file relative to the pit home directory - def cssFile - - // use short-circuit logic to test several possible locations - if ((cssFile = new File(pitHome, issueCSS)).exists() || - (cssFile = new File(pitHome.parentFile(), issueCSS)).exists() || - (cssFile = new File(issueCSS)).exists()) - issueCSS = cssFile.text - - if (logDbg) logger.debug("CSS for issue display: $issueCSS") - model.issueCSS = issueCSS - } - - } - } - - void refreshIssues() { - model.projectPanelMVCs.each { title, mvc -> - mvc.controller.refreshIssues() - } - } - - def openProject = { evt = null -> - if (view.openDialog.showOpenDialog(view.frame) != - JFileChooser.APPROVE_OPTIONS) return - - loadProject(view.openDialog.selectedFile) - } - - def loadProject = { File projectDir -> - def newMVC - - // if this is not a valid directory, do nothing - // TODO: log to the user that this is not a valid directory - if (!projectDir.exists() || !projectDir.isDirectory()) return - - // create new ProjectPanel MVC - newMVC = buildMVCGroup('ProjectPanel', - mainMVC: [model: model, view: view, controller: this], - newIssueDialogMVC: model.newIssueDialogMVC, - issueCellRenderer: model.issueListRenderer, - issueCSS: model.issueCSS, - rootProject: new FileProject(projectDir)) - newMVC.model.id = projectDir.name - - // if we already have a tab with this id - if (model.projectPanelMVCs[(newMVC.model.id)]) { - - // try using the canonical path - newMVC.model.id = projectDir.canonicalPath - - // still not unique? - if (model.projectPanelMVCs[(newMVC.model.id)]) { - - // first time this has happened? - if (!model.projectIdMap[(newMVC.model.id)]) - model.projectIdMap[(newMVC.model.id)] = 0 - - // no? increment - else model.projectIdMap[(newMVC.model.id)] = - model.projectIdMap[(newMVC.model.id)] + 1 - - // use our new, unique id - newMVC.model.id += "-" + model.projectIdMap[(newMVC.model.id)] - } - } - - model.projectPanelMVCs[(newMVC.model.id)] = newMVC - view.mainTabbedPane.addTab(newMVC.model.id, newMVC.view.panel) - } - - def closeProject = { evt = null -> - model.projectPanelMVCs.remove(view.mainTabbedPane.getTitleAt( - view.mainTabbedPane.selectedIndex)) - view.mainTabbedPane.remove(view.mainTabbedPane.selectedComponent) - } - - def shutdown = { evt = null -> - app.shutdown() - } - -} diff --git a/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/ProjectPanelController.groovy b/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/ProjectPanelController.groovy deleted file mode 100755 index 9ede085..0000000 --- a/pit-swing/griffon-app/controllers/com/jdbernard/pit/swing/ProjectPanelController.groovy +++ /dev/null @@ -1,222 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.FileProject -import com.jdbernard.pit.FlatProjectView -import com.jdbernard.pit.Issue -import com.jdbernard.pit.Project -import com.jdbernard.pit.Status -import javax.swing.DefaultListModel -import javax.swing.JOptionPane -import javax.swing.tree.DefaultMutableTreeNode -import javax.swing.tree.DefaultTreeModel -import org.dom4j.Document -import org.dom4j.io.OutputFormat -import org.dom4j.io.XMLWriter -import org.nuiton.jrst.JRSTGenerator -import org.nuiton.jrst.JRSTReader - -class ProjectPanelController { - // these will be injected by Griffon - def model - def view - - def jrstReader - def jrstGen - - static URL rst2htmlXSL = - ProjectPanelController.class.getResource("/rst2xhtml.xsl") - - void mvcGroupInit(Map args) { - jrstReader = new JRSTReader() - jrstGen = new JRSTGenerator() - - refreshProject() - } - - /** - * displayProject - * @param project Project to display - */ - void displayProject(Project project) { - if (!project) return - - view.issueTextArea.text = "" - view.issueTextDisplay.text = "" - view.issueTextPanelLayout.show(view.issueTextPanel, 'display') - - // build a new IssueTableModel if none cached - if (!model.projectTableModels[(project.name)]) { - def itm = new IssueTableModel(project, - model.filter ?: model.mainMVC.model.filter) - itm.categoryIcons = model.mainMVC.model.categoryIcons - itm.statusIcons = model.mainMVC.model.statusIcons - model.projectTableModels[(project.name)] = itm - } - - view.issueTable.setModel(model.projectTableModels[(project.name)]) - - def tcm = view.issueTable.columnModel - tcm.getColumn(0).maxWidth = 24 - tcm.getColumn(1).maxWidth = 40 - tcm.getColumn(2).maxWidth = 35 - if (view.issueTable.model.columnCount == 5) - tcm.getColumn(4).maxWidth = 150 - } - - void displayIssue(Issue issue) { - if (!issue) return - - // hack because binding view.issueTextArea.font to - // mainMVC.model.issueDetailFont causes problems - if (view.issueTextArea.font != model.mainMVC.model.issueDetailFont) - view.issueTextArea.font = model.mainMVC.model.issueDetailFont - - view.issueTextArea.text = issue.text - view.issueTextArea.caretPosition = 0 - view.issueTextDisplay.text = rst2html(issue.text) - view.issueTextDisplay.caretPosition = 0 - view.issueTextPanelLayout.show(view.issueTextPanel, 'display') - } - - void showProejctPopup(Project project, def x, def y) { - model.popupProject = project - view.projectPopupMenu.show(view.projectTree, x, y) - } - - void showIssuePopup(Issue issue, def x, def y) { - model.popupIssue = issue - view.issuePopupMenu.show(view.issueTable, x, y) - } - - void refreshProject() { - if (model.rootProject) { - def rootNode = new DefaultMutableTreeNode() - def flatview = new FlatProjectView('All Issues') - flatview.projects[(model.rootProject.name)] = model.rootProject - rootNode.add(new DefaultMutableTreeNode(flatview)) - rootNode.add(makeNodes(model.rootProject)) - view.projectTree.model = new DefaultTreeModel(rootNode) - } else { - view.projectTree.model = new DefaultTreeModel( - new DefaultMutableTreeNode()) - } - } - - void refreshIssues() { - model.projectTableModels.clear() - displayProject(model.selectedProject) - } - - def makeNodes(Project project) { - def rootNode = new DefaultMutableTreeNode(project) - project.eachProject(model.filter ?: model.mainMVC.model.filter) - { rootNode.add(makeNodes(it)) } - return rootNode - } - - def newProject = { evt -> - def name = JOptionPane.showInputDialog(model.mainMVC.view.frame, - 'Project name:', 'New Project...', JOptionPane.QUESTION_MESSAGE) - - def project - - if (evt.source == view.newProjectButton) - project = model.selectedProject ?: model.rootProject - else project = model.popupProject ?: model.rootProject - def newProject = project.createNewProject(name) - - project.projects[(newProject.name)] = newProject - refreshProject() - } - - def deleteProject = { evt -> - def project - - if (evt.source == view.deleteProjectButton) - project = model.selectedProject ?: model.rootProject - else project = model.popupProject ?: model.rootProject - - project.delete() - - model.rootProject = new FileProject(model.rootProject.source) - } - - def newIssue = { evt = null -> - model.newIssueDialogMVC.controller.show() - if (model.newIssueDialogMVC.model.accept) { - def nidModel = model.newIssueDialogMVC.model - def issueText = nidModel.text - - if (model.mainMVC.model.templates[(nidModel.category)]) { - issueText = model.mainMVC.model.templates[(nidModel.category)] - issueText = issueText.replaceFirst(/TITLE/, - nidModel.text) - } - - def issue = model.selectedProject.createNewIssue( - category: nidModel.category, - status: nidModel.status, - priority: nidModel.priority, - text: issueText) - model.projectTableModels[(model.selectedProject.name)] = null - displayProject(model.selectedProject) - } - } - - def deleteIssue = { evt -> - def issue - if (evt.source == view.deleteIssueButton) - issue = getSelectedIssue() - else issue = model.popupIssue - - model.selectedProject.issues.remove(issue.id) - view.issueTable.model.issues.remove(issue) - - issue.delete() - view.issueTable.invalidate() - } - - def getSelectedIssue() { - if (view.issueTable.selectionModel.isSelectionEmpty()) - return null - - return view.issueTable.model.issues[view.issueTable. - convertRowIndexToModel(view.issueTable.selectedRow)] - } - - String rst2html(String rst) { - Document doc - StringWriter outString - StringBuilder result = new StringBuilder() - - // read the RST in with the RST parser - new StringReader(rst).withReader { doc = jrstReader.read(it) } - - // transform to XHTML - doc = jrstGen.transform(doc, rst2htmlXSL) - - // write to the StringWriter - outString = new StringWriter() - outString.withWriter { new XMLWriter(it, new OutputFormat("", true)).write(doc) } - - // java's embeded html is primitive, we need to massage the results - outString.toString().eachLine { line -> - - // remove the XML version and encoding, title element, meta elems - if (line =~ /<\?.*\?>/ || line =~ /.*)/) - if (m) line = m[0][1] + m[0][4] - - result.append(line) - - // add in the CSS information to the head - if (line =~ //) result.append('') - } - - return result.toString() - } -} diff --git a/pit-swing/griffon-app/i18n/messages.properties b/pit-swing/griffon-app/i18n/messages.properties deleted file mode 100755 index e69de29..0000000 diff --git a/pit-swing/griffon-app/lifecycle/Initialize.groovy b/pit-swing/griffon-app/lifecycle/Initialize.groovy deleted file mode 100755 index 8245163..0000000 --- a/pit-swing/griffon-app/lifecycle/Initialize.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This script is executed inside the UI thread, so be sure to call - * long running code in another thread. - * - * You have the following options - * - execOutside { // your code } - * - execFuture { // your code } - * - Thread.start { // your code } - * - * You have the following options to run code again inside the UI thread - * - execAsync { // your code } - * - execSync { // your code } - */ - -import groovy.swing.SwingBuilder -import griffon.util.GriffonPlatformHelper -import static griffon.util.GriffonApplicationUtils.* - -GriffonPlatformHelper.tweakForNativePlatform(app) -SwingBuilder.lookAndFeel('org.pushingpixels.substance.api.skin.SubstanceCremeCoffeeLookAndFeel', 'nimbus', ['metal', [boldFonts: false]]) - -// make config directory -def confDir = new File(System.getProperty('user.home'), '.pit') -if (!confDir.exists()) confDir.mkdirs() diff --git a/pit-swing/griffon-app/lifecycle/Ready.groovy b/pit-swing/griffon-app/lifecycle/Ready.groovy deleted file mode 100755 index 9b165e4..0000000 --- a/pit-swing/griffon-app/lifecycle/Ready.groovy +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This script is executed inside the UI thread, so be sure to call - * long running code in another thread. - * - * You have the following options - * - execOutside { // your code } - * - execFuture { // your code } - * - Thread.start { // your code } - * - * You have the following options to run code again inside the UI thread - * - execAsync { // your code } - * - execSync { // your code } - */ diff --git a/pit-swing/griffon-app/lifecycle/Shutdown.groovy b/pit-swing/griffon-app/lifecycle/Shutdown.groovy deleted file mode 100755 index 9b165e4..0000000 --- a/pit-swing/griffon-app/lifecycle/Shutdown.groovy +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This script is executed inside the UI thread, so be sure to call - * long running code in another thread. - * - * You have the following options - * - execOutside { // your code } - * - execFuture { // your code } - * - Thread.start { // your code } - * - * You have the following options to run code again inside the UI thread - * - execAsync { // your code } - * - execSync { // your code } - */ diff --git a/pit-swing/griffon-app/lifecycle/Startup.groovy b/pit-swing/griffon-app/lifecycle/Startup.groovy deleted file mode 100755 index 9b165e4..0000000 --- a/pit-swing/griffon-app/lifecycle/Startup.groovy +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This script is executed inside the UI thread, so be sure to call - * long running code in another thread. - * - * You have the following options - * - execOutside { // your code } - * - execFuture { // your code } - * - Thread.start { // your code } - * - * You have the following options to run code again inside the UI thread - * - execAsync { // your code } - * - execSync { // your code } - */ diff --git a/pit-swing/griffon-app/lifecycle/Stop.groovy b/pit-swing/griffon-app/lifecycle/Stop.groovy deleted file mode 100755 index 9b165e4..0000000 --- a/pit-swing/griffon-app/lifecycle/Stop.groovy +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This script is executed inside the UI thread, so be sure to call - * long running code in another thread. - * - * You have the following options - * - execOutside { // your code } - * - execFuture { // your code } - * - Thread.start { // your code } - * - * You have the following options to run code again inside the UI thread - * - execAsync { // your code } - * - execSync { // your code } - */ diff --git a/pit-swing/griffon-app/models/com/jdbernard/pit/swing/NewIssueDialogModel.groovy b/pit-swing/griffon-app/models/com/jdbernard/pit/swing/NewIssueDialogModel.groovy deleted file mode 100755 index 5c3eaaf..0000000 --- a/pit-swing/griffon-app/models/com/jdbernard/pit/swing/NewIssueDialogModel.groovy +++ /dev/null @@ -1,13 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Status -import groovy.beans.Bindable - -class NewIssueDialogModel { - @Bindable boolean accept - String text - Category category - Status status - int priority -} diff --git a/pit-swing/griffon-app/models/com/jdbernard/pit/swing/PITModel.groovy b/pit-swing/griffon-app/models/com/jdbernard/pit/swing/PITModel.groovy deleted file mode 100755 index 6bd877a..0000000 --- a/pit-swing/griffon-app/models/com/jdbernard/pit/swing/PITModel.groovy +++ /dev/null @@ -1,34 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Filter -import com.jdbernard.pit.Issue -import com.jdbernard.pit.Project -import com.jdbernard.pit.Status -import groovy.beans.Bindable -import java.awt.Font -import javax.swing.ImageIcon - -class PITModel { - - // filter for projects and classes - Filter filter = new Filter(categories: [], - status: [Status.NEW, Status.VALIDATION_REQUIRED]) - - def issueListRenderer - - // map of category -> issue template - Map templates = [:] - - String issueCSS = getClass().getResourceAsStream("/default-issue.css").text - - Map categoryIcons = [:] - Map statusIcons = [:] - - def newIssueDialogMVC - Map projectPanelMVCs = [:] - - Map projectIdMap = [:] - - @Bindable Font issueDetailFont = new Font(Font.MONOSPACED, Font.PLAIN, 10) -} diff --git a/pit-swing/griffon-app/models/com/jdbernard/pit/swing/ProjectPanelModel.groovy b/pit-swing/griffon-app/models/com/jdbernard/pit/swing/ProjectPanelModel.groovy deleted file mode 100755 index 048f90e..0000000 --- a/pit-swing/griffon-app/models/com/jdbernard/pit/swing/ProjectPanelModel.groovy +++ /dev/null @@ -1,29 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Filter -import com.jdbernard.pit.Issue -import com.jdbernard.pit.Project -import groovy.beans.Bindable - -class ProjectPanelModel { - - // other GUI components - def mainMVC - def newIssueDialogMVC - - // data owned by this panel - String id - @Bindable Project rootProject - @Bindable Project popupProject = null - @Bindable Project selectedProject = null - @Bindable Issue popupIssue = null - - String issueCSS = "" - - // cache the models - def projectTableModels = [:] - def issueCellRenderer - - // local filter for projects and issues - Filter filter -} diff --git a/pit-swing/griffon-app/resources/add.png b/pit-swing/griffon-app/resources/add.png deleted file mode 100755 index 6332fef..0000000 Binary files a/pit-swing/griffon-app/resources/add.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/bug.gif b/pit-swing/griffon-app/resources/bug.gif deleted file mode 100755 index c1f62f5..0000000 Binary files a/pit-swing/griffon-app/resources/bug.gif and /dev/null differ diff --git a/pit-swing/griffon-app/resources/bug.png b/pit-swing/griffon-app/resources/bug.png deleted file mode 100755 index 2d5fb90..0000000 Binary files a/pit-swing/griffon-app/resources/bug.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/cancel.png b/pit-swing/griffon-app/resources/cancel.png deleted file mode 100755 index c149c2b..0000000 Binary files a/pit-swing/griffon-app/resources/cancel.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/default-issue.css b/pit-swing/griffon-app/resources/default-issue.css deleted file mode 100755 index 69bbaa0..0000000 --- a/pit-swing/griffon-app/resources/default-issue.css +++ /dev/null @@ -1,22 +0,0 @@ -body { - font-size: small; -} -h1 { - font-size: medium; - text-decoration: underline; -} -h2 { - font-size: small; -} -h3 { - font-size: small; - font-style: italic; -} -h4 { - font-size: small; - font-weight: normal; - font-style: italic; -} -table,th,td{ - border-style: solid; -} diff --git a/pit-swing/griffon-app/resources/delete.png b/pit-swing/griffon-app/resources/delete.png deleted file mode 100755 index 08f2493..0000000 Binary files a/pit-swing/griffon-app/resources/delete.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/feature.png b/pit-swing/griffon-app/resources/feature.png deleted file mode 100755 index b88c857..0000000 Binary files a/pit-swing/griffon-app/resources/feature.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/folder.png b/pit-swing/griffon-app/resources/folder.png deleted file mode 100755 index 784e8fa..0000000 Binary files a/pit-swing/griffon-app/resources/folder.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/icon16x16.png b/pit-swing/griffon-app/resources/icon16x16.png deleted file mode 100755 index 01a8bd5..0000000 Binary files a/pit-swing/griffon-app/resources/icon16x16.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/icon32x32.png b/pit-swing/griffon-app/resources/icon32x32.png deleted file mode 100755 index 19171d2..0000000 Binary files a/pit-swing/griffon-app/resources/icon32x32.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/icon64x64.png b/pit-swing/griffon-app/resources/icon64x64.png deleted file mode 100755 index 0ee0fdb..0000000 Binary files a/pit-swing/griffon-app/resources/icon64x64.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/log4j.properties b/pit-swing/griffon-app/resources/log4j.properties deleted file mode 100755 index e942907..0000000 --- a/pit-swing/griffon-app/resources/log4j.properties +++ /dev/null @@ -1,10 +0,0 @@ -log4j.rootLogger=DEBUG,stdout,fileout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout - -log4j.appender.fileout=org.apache.log4j.FileAppender -log4j.appender.fileout.file=pit-swing.log -log4j.appender.fileout.layout=org.apache.log4j.PatternLayout -log4j.appender.fileout.layout.ConversionPattern=%-5p %C %d{DATE}: %m%n -log4j.appender.fileout.threshold=INFO diff --git a/pit-swing/griffon-app/resources/new.png b/pit-swing/griffon-app/resources/new.png deleted file mode 100755 index ade56ca..0000000 Binary files a/pit-swing/griffon-app/resources/new.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/reassigned.png b/pit-swing/griffon-app/resources/reassigned.png deleted file mode 100755 index a6fc5cb..0000000 Binary files a/pit-swing/griffon-app/resources/reassigned.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/rejected.png b/pit-swing/griffon-app/resources/rejected.png deleted file mode 100755 index da658cd..0000000 Binary files a/pit-swing/griffon-app/resources/rejected.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/resolved.png b/pit-swing/griffon-app/resources/resolved.png deleted file mode 100755 index 923f749..0000000 Binary files a/pit-swing/griffon-app/resources/resolved.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/rst2xhtml.xsl b/pit-swing/griffon-app/resources/rst2xhtml.xsl deleted file mode 100755 index b752a40..0000000 --- a/pit-swing/griffon-app/resources/rst2xhtml.xsl +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - - - - - - <xsl:value-of select="title"/> - - - - - - - - - - - - - - - - - -

- -

-
- - - - title - - - - - - - - -
- - - - - - - - - - - - - - - - - -
-
- - - - - : - - - - - - - - - - - - : - - - - - - - - - - - - authors : - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - -

-
- - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
- - -
    - - - 1 - - - a - - - A - - - i - - - I - - - - -
-
- - -
  • -
    - - -
    -
    - - - - -
    -
    - - - - - : - - - - - - - -
    - - - - - - - - - - -
    -
    - - - - - - -
    -
    - - - - - - - - - - - - -
    -
    - - - - -
    - - - -
    -
    - - - - - - -
    - -
    -
    - - - -
    -
    - - - - - - - - - - - - - -
    - -
    - - -

    -
    -
    - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -

    - -

    -

    - -

    -
    -
    -
    - - -
    -

    :

    -

    - -

    -
    -
    - - - -
    - -

    -

    - -

    -
    - - - -
    - -
    - - -
    -			
    -		
    -
    - - -
    - -
    -
    - - -
    - -
    -
    - - - - - - -
    -

    - -

    - -
    -
    - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - , - - - - - - - - - - - - - - - -
    - - [] - - - - -
    -
    - - - - [] - - - -
    \ No newline at end of file diff --git a/pit-swing/griffon-app/resources/shutdown.png b/pit-swing/griffon-app/resources/shutdown.png deleted file mode 100755 index 2541d2b..0000000 Binary files a/pit-swing/griffon-app/resources/shutdown.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/splash.png b/pit-swing/griffon-app/resources/splash.png deleted file mode 100755 index 6bb0bdf..0000000 Binary files a/pit-swing/griffon-app/resources/splash.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/splash.xcf b/pit-swing/griffon-app/resources/splash.xcf deleted file mode 100755 index 4d1e8c2..0000000 Binary files a/pit-swing/griffon-app/resources/splash.xcf and /dev/null differ diff --git a/pit-swing/griffon-app/resources/task.png b/pit-swing/griffon-app/resources/task.png deleted file mode 100755 index 7851cf3..0000000 Binary files a/pit-swing/griffon-app/resources/task.png and /dev/null differ diff --git a/pit-swing/griffon-app/resources/validation_required.png b/pit-swing/griffon-app/resources/validation_required.png deleted file mode 100755 index fb8b417..0000000 Binary files a/pit-swing/griffon-app/resources/validation_required.png and /dev/null differ diff --git a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/NewIssueDialogView.groovy b/pit-swing/griffon-app/views/com/jdbernard/pit/swing/NewIssueDialogView.groovy deleted file mode 100755 index 30ccd5c..0000000 --- a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/NewIssueDialogView.groovy +++ /dev/null @@ -1,65 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Status -import java.awt.GridBagConstraints as GBC -import javax.swing.DefaultComboBoxModel - -dialog = dialog(title: 'New Task...', modal: true, pack: true, - locationRelativeTo: null) { - - gridBagLayout() - - label('Title/Summary:', - constraints: gbc(gridx: 0, gridy: 0, gridwidth: 3, - insets: [5, 5, 0, 5], fill: GBC.HORIZONTAL)) - titleTextField = textField( - constraints: gbc(gridx: 0, gridy: 1, gridwidth: 3, - insets: [0, 10, 0, 5], fill: GBC.HORIZONTAL)) - - label('Category:', - constraints: gbc(gridx: 0, gridy: 2, insets: [5, 5, 0, 0], - fill: GBC.HORIZONTAL)) - categoryComboBox = comboBox( - constraints: gbc(gridx: 1, gridy: 2, insets: [5, 5, 0, 5], - fill: GBC.HORIZONTAL), - model: new DefaultComboBoxModel(Category.values()), - editable: false, - itemStateChanged: { model.category = categoryComboBox.selectedItem }) - - label('Status:', - constraints: gbc(gridx: 0, gridy: 3, insets: [5, 5, 0, 0], - fill: GBC.HORIZONTAL)) - statusComboBox = comboBox( - constraints: gbc(gridx: 1, gridy: 3, insets: [5, 5, 0, 5], - fill: GBC.HORIZONTAL), - model: new DefaultComboBoxModel(Status.values()), - editable: false, - itemStateChanged: { model.status = statusComboBox.selectedItem }) - - label('Priority (0-9, 0 is highest priority):', - constraints: gbc(gridx: 0, gridy: 4, insets: [5, 5, 0, 0], - fill: GBC.HORIZONTAL)) - prioritySpinner = spinner( - constraints: gbc( gridx: 1, gridy: 4, insets: [5, 5, 0, 5], - fill: GBC.HORIZONTAL), - model: spinnerNumberModel(maximum: 9, minimum: 0), - stateChanged: { model.priority = prioritySpinner.value }) - - button('Cancel', - actionPerformed: { - model.accept = false - dialog.visible = false - }, - constraints: gbc(gridx: 0, gridy: 5, insets: [5, 5, 5, 5], - anchor: GBC.EAST)) - button('Create Issue', - actionPerformed: { - model.text = titleTextField.text - model.accept = true - dialog.visible = false - }, - constraints: gbc(gridx: 1, gridy: 5, insets: [5, 5, 5, 5], - anchor: GBC.WEST)) - -} diff --git a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/PITView.groovy b/pit-swing/griffon-app/views/com/jdbernard/pit/swing/PITView.groovy deleted file mode 100755 index b8114eb..0000000 --- a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/PITView.groovy +++ /dev/null @@ -1,167 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Status -import com.jdbernard.pit.Filter -import com.jdbernard.pit.Issue -import com.jdbernard.pit.Project -import com.jdbernard.pit.FileProject -import groovy.beans.Bindable -import java.awt.BorderLayout as BL -import java.awt.Color -import java.awt.GridBagConstraints as GBC -import javax.swing.DefaultComboBoxModel -import javax.swing.DefaultListModel -import javax.swing.JDialog -import javax.swing.JFileChooser -import javax.swing.JOptionPane -import net.miginfocom.swing.MigLayout - - -actions { - action( - id: 'openProject', - name: 'Open...', - icon: imageIcon('/folder.png'), - accelerator: shortcut('O'), - closure: controller.openProject - ) - - action( - id: 'closeProject', - name: 'Close', - enabled: bind { projectPanelMVCs.size() > 0 }, - closure: controller.closeProject - ) - - action( - id: 'shutdown', - name: 'Exit', - icon: imageIcon('/shutdown.png'), - accelerator: shortcut('x'), - closure: controller.shutdown - ) -} - -// initialize category-related view data -Category.values().each { - model.categoryIcons[(it)] = imageIcon("/${it.name().toLowerCase()}.png") - model.filter.categories.add(it) -} - -Status.values().each { - model.statusIcons[(it)] = imageIcon("/${it.name().toLowerCase()}.png") -} - -frame = application(title: 'Personal Issue Tracker', - minimumSize: [400, 200], - preferredSize: [800, 500], - pack: true, - locationRelativeTo: null, - iconImage: imageIcon('/icon64x64.png').image, - iconImages: [imageIcon('/icon64x64.png').image, - imageIcon('/icon32x32.png').image, - imageIcon('/icon16x16.png').image] -) { - - // main menu - menuBar() { - menu("File") { - menuItem(openProject) - menuItem(closeProject) - separator() - menuItem(shutdown) - } - - menu("View") { - menu('Category') { - Category.values().each { cat -> - checkBoxMenuItem(cat.toString(), - selected: model.filter.categories.contains(cat), - actionPerformed: { - if (model.filter.categories.contains(cat)) { - model.filter.categories.remove(cat) - evt.source.selected = false - } else { - model.filter.categories.add(cat) - evt.source.selected = true - } - controller.refreshIssues() - }) - } - } - - menu('Status') { - Status.values().each { st -> - checkBoxMenuItem(st.toString(), - selected: model.filter.status.contains(st), - actionPerformed: { evt -> - if (model.filter.status.contains(st)) { - model.filter.status.remove(st) - evt.source.selected = false - } else { - model.filter.status.add(st) - evt.source.selected = true - } - controller.refreshIssues() - }) - } - } - - separator() - - menuItem('Detail Text Size...', - actionPerformed: { - def newSize = JOptionPane.showInputDialog(frame, - 'New text size: ', 'Change Issue Detail Text Size...', - JOptionPane.QUESTION_MESSAGE) - if (newSize == null || !newSize.isFloat()) - JOptionPane.showMessageDialog(frame, - '$newSize is not a valid size.', - 'Change Issue Detail Size...', - JOptionPane.ERROR_MESSAGE) - else model.issueDetailFont = model.issueDetailFont - .deriveFont(newSize.toFloat()) - }) - } - - menu("Sort") { - sortMenuButtonGroup = buttonGroup() - checkBoxMenuItem('By ID', - buttonGroup: sortMenuButtonGroup, - actionPerformed: { - model.filter.issueSorter = { it.id } - controller.refreshIssues() - }) - checkBoxMenuItem('By Category', - buttonGroup: sortMenuButtonGroup, - actionPerformed: { - model.filter.issueSorter = { it.category } - controller.refreshIssues() - }) - checkBoxMenuItem('By Status', - buttonGroup: sortMenuButtonGroup, - actionPerformed: { - model.filter.issueSorter = { it.status } - controller.refreshIssues() - }) - checkBoxMenuItem('By Priority', - buttonGroup: sortMenuButtonGroup, - actionPerformed: { - model.filter.issueSorter = { it.priority } - controller.refreshIssues() - }) - checkBoxMenuItem('By Title', - buttonGroup: sortMenuButtonGroup, - actionPerformed: { - model.filter.issueSorter = { it.title } - controller.refreshIssues() - }) - - } - } - - mainTabbedPane = tabbedPane() { - - } -} diff --git a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/ProjectPanelView.groovy b/pit-swing/griffon-app/views/com/jdbernard/pit/swing/ProjectPanelView.groovy deleted file mode 100755 index 7264b26..0000000 --- a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/ProjectPanelView.groovy +++ /dev/null @@ -1,298 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Status -import com.jdbernard.pit.Project -import com.jdbernard.pit.FlatProjectView -import java.awt.Font -import java.awt.GridBagConstraints as GBC -import java.awt.Point -import java.awt.event.MouseEvent -import javax.swing.JOptionPane -import javax.swing.JSplitPane -import javax.swing.JLabel -import javax.swing.JScrollPane -import javax.swing.JTable -import javax.swing.JTextField -import javax.swing.ListSelectionModel -import javax.swing.table.TableCellRenderer -import javax.swing.tree.DefaultMutableTreeNode -import javax.swing.tree.DefaultTreeCellRenderer -import javax.swing.tree.DefaultTreeModel -import javax.swing.tree.TreeSelectionModel - -actions { - action ( - id: 'newIssue', - name: 'New Issue', - icon: imageIcon("/add.png"), - accelerator: shortcut('N'), - closure: controller.newIssue, - enabled: bind { model.selectedProject != null } - ) - - action ( - id: 'newProject', - name: 'New Project...', - icon: imageIcon("/add.png"), - closure: controller.newProject - ) - - action ( - id: 'deleteProject', - name: 'Delete Project', - closure: controller.deleteProject, - enabled: bind { model.selectedProject != null } - ) - - action ( - id: 'deleteProjectPop', - name: 'Delete Project', - icon: imageIcon("/delete.png"), - closure: controller.deleteProject, - enabled: bind { model.popupProject != null } - ) - - action ( - id: 'deleteIssue', - name: 'Delete Issue', - icon: imageIcon("/delete.png"), - closure: controller.deleteIssue, - ) - - action ( - id: 'deleteIssuePop', - name: 'Delete Issue', - icon: imageIcon("/delete.png"), - closure: controller.deleteIssue, - enabled: bind { model.popupIssue != null } - ) -} - -// popup menu for projects -projectPopupMenu = popupMenu() { - menuItem(newProject) - menuItem(deleteProjectPop) -} - -// popup menu for issues -issuePopupMenu = popupMenu() { - menuItem(newIssue) - menuItem(deleteIssuePop) - separator() - - menu('Change Category', enabled: bind { model.popupIssue != null }) { - Category.values().each { category -> - menuItem(category.toString(), - icon: model.mainMVC.model.categoryIcons[(category)], - enabled: bind { model.popupIssue != null }, - actionPerformed: { - try { - model.popupIssue.category = category - controller.refreshIssues() - } catch (IOException ioe) { - JOptionPane.showMessage(mainMVC.view.frame, - ioe.getLocalizedMessage(), "Change Category", - JOptionPane.ERROR_MESSAGE) - } - }) - } - } - - menu('Change Status', enabled: bind { model.popupIssue != null}) { - Status.values().each { status -> - menuItem(status.toString(), - icon: model.mainMVC.model.statusIcons[(status)], - enabled: bind { model.popupIssue != null }, - actionPerformed: { - try { - model.popupIssue.status = status - controller.refreshIssues() - } catch (IOException ioe) { - JOptionPane.showMessage(model.mainMVC.view.frame, - ioe.getLocalizedMessage(), 'Change Status', - JOptionPane.ERROR_MESSAGE) - } - }) - } - } - - menuItem('Change Priority...', - enabled: bind { model.popupIssue != null }, - actionPerformed: { - def newPriority = JOptionPane.showInputDialog(mainMVC.view.frame, - 'New priority (0-9)', 'Change Priority...', - JOptionPane.QUESTION_MESSAGE) - try { model.popupIssue.priority = newPriority.toInteger() } - catch (NumberFormatException nfe) { - JOptionPane.showMessageDialog(mainMVC.view.frame, - 'The priority value must be an integer in [0-9].', - 'Change Priority...', JOptionPane.ERROR_MESSAGE) - return - } catch (IOException ioe) { - JOptionPane.showMessageDialog(model.mainMVC.view.frame, - ioe.getLocalizedMessage(), 'Change Priority...', - JOptionPane.ERROR_MESSAGE) - } - controller.refreshIssues() - }) -} - -// main split view -panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT, - dividerLocation: 200, - oneTouchExpandable: true, - constraints: gbc(fill: GBC.BOTH, insets: [10, 10, 10, 10], - weightx: 2, weighty: 2)) { - - // left side (project tree and buttons - panel(constraints: 'left') { - gridBagLayout() - - // tree view of projects - scrollPane(constraints: gbc(fill: GBC.BOTH, gridx: 0, gridy: 0, - gridwidth: 2, weightx: 2, weighty: 2)) { - treeCellRenderer = new DefaultTreeCellRenderer() - treeCellRenderer.leafIcon = treeCellRenderer.closedIcon - - projectTree = tree(cellRenderer: treeCellRenderer, - model: bind(source: model, sourceProperty: 'rootProject', - sourceValue: { - if (model.rootProject) { - def rootNode = new DefaultMutableTreeNode() - def flatview = new FlatProjectView('All Issues') - flatview.projects[(model.rootProject.name)] = - model.rootProject - rootNode.add(new DefaultMutableTreeNode(flatview)) - rootNode.add(controller.makeNodes(model.rootProject)) - new DefaultTreeModel(rootNode) - } else { - new DefaultTreeModel(new DefaultMutableTreeNode()) - } - }), - valueChanged: { evt -> - model.selectedProject = evt?.newLeadSelectionPath?. - lastPathComponent?.userObject ?: model.rootProject - controller.displayProject(model.selectedProject) - }, - mouseClicked: { evt -> - if (evt.button == MouseEvent.BUTTON3) { - controller.showProjectPopup( - projectTree.getPathForLocation(evt.x, evt.y)?. - lastPathComponent?.userObject, - evt.x, evt.y) - } - }) - projectTree.rootVisible = false - - projectTree.selectionModel.selectionMode = - TreeSelectionModel.SINGLE_TREE_SELECTION - } - - newProjectButton = button(newProject, - constraints: gbc(fill: GBC.NONE, gridx: 0, gridy: 1, - anchor: GBC.WEST)) - deleteProjectButton = button(deleteProject, - constraints: gbc(fill: GBC.NONE, gridx: 1, gridy: 1, - anchor: GBC.WEST)) - } - - // split between issues list and issue details - splitPane(orientation: JSplitPane.VERTICAL_SPLIT, - dividerLocation: 200, constraints: "right") { - - panel(constraints: "top") { - gridBagLayout() - - scrollPane(constraints: gbc(fill: GBC.BOTH, weightx: 2, - weighty: 2, gridx: 0, gridy: 0, gridwidth: 3)) { - - issueTable = table( - autoCreateRowSorter: true, - autoResizeMode: JTable.AUTO_RESIZE_LAST_COLUMN, - cellSelectionEnabled: false, - columnSelectionAllowed: false, - dragEnabled: false, - rowSelectionAllowed: true, - showHorizontalLines: false, - showVerticalLines: false, - mouseClicked: { evt -> - if (evt.button == MouseEvent.BUTTON3) { - def translatedPoint = evt.locationOnScreen.clone() - translatedPoint.translate(-issueTable.locationOnScreen.@x, - -issueTable.locationOnScreen.@y) - def row = issueTable.rowAtPoint(translatedPoint) - - issueTable.setRowSelectionInterval(row, row) - - controller.showIssuePopup( - controller.getSelectedIssue(), evt.x, evt.y) - } - }) - - issueTable.setDefaultRenderer(Object.class, - model.issueCellRenderer) - issueTable.selectionModel.valueChanged = { evt -> - if (evt.valueIsAdjusting) return - controller.displayIssue(controller.getSelectedIssue()) - } - - } - - wordWrapCheckBox = checkBox('Word wrap', - constraints: gbc(gridx: 0, gridy: 1, weightx: 2, - anchor: GBC.WEST), selected: true) - button(newIssue, - constraints: gbc(gridx: 1, gridy: 1, anchor: GBC.EAST)) - - deleteIssueButton = button(deleteIssue, - constraints: gbc(gridx: 2, gridy: 1, anchor: GBC.EAST), - enabled: bind(source: issueTable.selectionModel, - sourceEvent: 'valueChanged', - sourceValue: { !issueTable.selectionModel.isSelectionEmpty() })) - } - - scrollPane(constraints: "bottom", - horizontalScrollBarPolicy: JScrollPane.HORIZONTAL_SCROLLBAR_NEVER) { - issueTextPanel = panel { - issueTextPanelLayout = cardLayout() - - def leavingEditorClosure = { - def issue = controller.getSelectedIssue() - if (issue == null) return - if (issueTextArea.text != issue.text) { - issue.text = issueTextArea.text - issueTextDisplay.text = controller.rst2html( - issueTextArea.text) - } - issueTextPanelLayout.show(issueTextPanel, 'display') - } - - issueTextArea = textArea( - constraints: 'editor', - wrapStyleWord: true, - lineWrap: bind(source: wordWrapCheckBox, - sourceProperty: 'selected'), - editable: bind(source: issueTable.selectionModel, - sourceEvent: 'valueChanged', - sourceValue: - { !issueTable.selectionModel.isSelectionEmpty() }), - font: model.mainMVC.model.issueDetailFont, - focusGained: {}, - focusLost: leavingEditorClosure, - mouseExited: leavingEditorClosure) - - issueTextDisplay = editorPane(contentType: 'text/html', - constraints: 'display', - editable: false, - preferredSize: [10, 10], - mouseClicked: {evt -> - if (evt.clickCount > 1) - issueTextPanelLayout.show(issueTextPanel, 'editor') - }) - } - - issueTextPanelLayout.show(issueTextPanel, "display") - } - } -} diff --git a/pit-swing/griffonw b/pit-swing/griffonw deleted file mode 100755 index 81f7bab..0000000 --- a/pit-swing/griffonw +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash - -############################################################################## -## ## -## Griffon wrapper script for UN*X ## -## ## -############################################################################## - -# Uncomment those lines to set JVM options. GRIFFON_OPTS and JAVA_OPTS can be used together. -# GRIFFON_OPTS="$GRIFFON_OPTS -Xmx512" -# JAVA_OPTS="$JAVA_OPTS -Xmx512" - -GRIFFON_APP_NAME=Griffon - -warn ( ) { - echo "${PROGNAME}: $*" -} - -die ( ) { - warn "$*" - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set JAVA_HOME if it's not already set. -if [ -z "$JAVA_HOME" ] ; then - if $darwin ; then - [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home" - [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home" - else - javaExecutable="`which javac`" - [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME." - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME." - javaExecutable="`readlink -f \"$javaExecutable\"`" - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - export JAVA_HOME="$javaHome" - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"` - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -STARTER_MAIN_CLASS=org.gradle.wrapper.GriffonWrapperMain -CLASSPATH=`dirname "$0"`/wrapper/griffon-wrapper.jar -WRAPPER_PROPERTIES=`dirname "$0"`/wrapper/griffon-wrapper.properties -# Determine the Java command to use to start the JVM. -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="java" - fi -fi -if [ ! -x "$JAVACMD" ] ; then - die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD" -fi -if [ -z "$JAVA_HOME" ] ; then - warn "JAVA_HOME environment variable is not set" -fi - -# For Darwin, add GRIFFON_APP_NAME to the JAVA_OPTS as -Xdock:name -if $darwin; then - JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRIFFON_APP_NAME" -# we may also want to set -Xdock:image -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRIFFON_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRIFFON_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -"$JAVACMD" $JAVA_OPTS $GRIFFON_OPTS \ - -classpath "$CLASSPATH" \ - -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \ - $STARTER_MAIN_CLASS \ - "$@" diff --git a/pit-swing/griffonw.bat b/pit-swing/griffonw.bat deleted file mode 100755 index 91d70fe..0000000 --- a/pit-swing/griffonw.bat +++ /dev/null @@ -1,126 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem ## -@rem Griffon startup script for Windows ## -@rem ## -@rem ########################################################################## - -@rem -@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $ -@rem - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Uncomment those lines to set JVM options. GRIFFON_OPTS and JAVA_OPTS can be used together. -@rem set GRIFFON_OPTS=%GRIFFON_OPTS% -Xmx512 -@rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512 - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=.\ - -@rem Determine the command interpreter to execute the "CD" later -set COMMAND_COM="cmd.exe" -if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe" -if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com" - -@rem Use explicit find.exe to prevent cygwin and others find.exe from being used -set FIND_EXE="find.exe" -if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe" -if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe" - -:check_JAVA_HOME -@rem Make sure we have a valid JAVA_HOME -if not "%JAVA_HOME%" == "" goto have_JAVA_HOME - -echo. -echo ERROR: Environment variable JAVA_HOME has not been set. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. -echo. -goto end - -:have_JAVA_HOME -@rem Validate JAVA_HOME -%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul -if not errorlevel 1 goto init - -echo. -echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation if there are problems. -echo. - -:init -@rem get name of script to launch with full path -@rem Get command-line arguments, handling Windowz variants -SET _marker=%JAVA_HOME: =% -@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems. - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%eval[2+2]" == "4" goto 4NT_args - -IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args - -set _FIXPATH= -call :fixpath "%JAVA_HOME%" -set JAVA_HOME=%_FIXPATH:~1% - -goto win9xME_args - -:fixpath -if not %1.==. ( -for /f "tokens=1* delims=;" %%a in (%1) do ( -call :shortfilename "%%a" & call :fixpath "%%b" -) -) -goto :EOF -:shortfilename -for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi -goto :EOF - - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set STARTER_MAIN_CLASS=org.gradle.wrapper.GriffonWrapperMain -set CLASSPATH=%DIRNAME%\wrapper\griffon-wrapper.jar -set WRAPPER_PROPERTIES=%DIRNAME%\wrapper\griffon-wrapper.properties -set JAVA_EXE=%JAVA_HOME%\bin\java.exe - -set GRIFFON_OPTS=%JAVA_OPTS% %GRIFFON_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%" - -"%JAVA_EXE%" %GRIFFON_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1 - -rem Set variable GRIFFON_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRIFFON_EXIT_CONSOLE%" exit "%ERRORLEVEL%" -exit /b "%ERRORLEVEL%" - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/pit-swing/lib/commons-lang-2.4.jar b/pit-swing/lib/commons-lang-2.4.jar deleted file mode 100755 index 532939e..0000000 Binary files a/pit-swing/lib/commons-lang-2.4.jar and /dev/null differ diff --git a/pit-swing/lib/commons-logging-1.1.1.jar b/pit-swing/lib/commons-logging-1.1.1.jar deleted file mode 100755 index 1deef14..0000000 Binary files a/pit-swing/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/pit-swing/lib/commons-primitives-1.0.jar b/pit-swing/lib/commons-primitives-1.0.jar deleted file mode 100755 index 299648d..0000000 Binary files a/pit-swing/lib/commons-primitives-1.0.jar and /dev/null differ diff --git a/pit-swing/lib/dom4j-1.6.1.jar b/pit-swing/lib/dom4j-1.6.1.jar deleted file mode 100755 index c8c4dbb..0000000 Binary files a/pit-swing/lib/dom4j-1.6.1.jar and /dev/null differ diff --git a/pit-swing/lib/jaxen-1.1.1.jar b/pit-swing/lib/jaxen-1.1.1.jar deleted file mode 100755 index b633631..0000000 Binary files a/pit-swing/lib/jaxen-1.1.1.jar and /dev/null differ diff --git a/pit-swing/lib/jrst-1.1.1.jar b/pit-swing/lib/jrst-1.1.1.jar deleted file mode 100755 index 0846e94..0000000 Binary files a/pit-swing/lib/jrst-1.1.1.jar and /dev/null differ diff --git a/pit-swing/lib/log4j-1.2.15.jar b/pit-swing/lib/log4j-1.2.15.jar deleted file mode 100755 index c930a6a..0000000 Binary files a/pit-swing/lib/log4j-1.2.15.jar and /dev/null differ diff --git a/pit-swing/lib/miglayout-3.7.1-swing.jar b/pit-swing/lib/miglayout-3.7.1-swing.jar deleted file mode 100755 index 5a762c8..0000000 Binary files a/pit-swing/lib/miglayout-3.7.1-swing.jar and /dev/null differ diff --git a/pit-swing/lib/nuiton-i18n-1.1.jar b/pit-swing/lib/nuiton-i18n-1.1.jar deleted file mode 100755 index e5bff59..0000000 Binary files a/pit-swing/lib/nuiton-i18n-1.1.jar and /dev/null differ diff --git a/pit-swing/lib/pit-2.3.1.jar b/pit-swing/lib/pit-2.3.1.jar deleted file mode 100755 index bf362a5..0000000 Binary files a/pit-swing/lib/pit-2.3.1.jar and /dev/null differ diff --git a/pit-swing/lib/slf4j-api-1.6.0.jar b/pit-swing/lib/slf4j-api-1.6.0.jar deleted file mode 100755 index db92f9a..0000000 Binary files a/pit-swing/lib/slf4j-api-1.6.0.jar and /dev/null differ diff --git a/pit-swing/lib/slf4j-log4j12-1.6.0.jar b/pit-swing/lib/slf4j-log4j12-1.6.0.jar deleted file mode 100755 index 42cca51..0000000 Binary files a/pit-swing/lib/slf4j-log4j12-1.6.0.jar and /dev/null differ diff --git a/pit-swing/lib/substance.jar b/pit-swing/lib/substance.jar deleted file mode 100755 index 9282a92..0000000 Binary files a/pit-swing/lib/substance.jar and /dev/null differ diff --git a/pit-swing/lib/trident.jar b/pit-swing/lib/trident.jar deleted file mode 100755 index 8d41a06..0000000 Binary files a/pit-swing/lib/trident.jar and /dev/null differ diff --git a/pit-swing/src/main/com/jdbernard/pit/swing/CompositeIcon.groovy b/pit-swing/src/main/com/jdbernard/pit/swing/CompositeIcon.groovy deleted file mode 100755 index e3d4b46..0000000 --- a/pit-swing/src/main/com/jdbernard/pit/swing/CompositeIcon.groovy +++ /dev/null @@ -1,60 +0,0 @@ -package com.jdbernard.pit.swing - -import java.awt.Component -import java.awt.Graphics -import javax.swing.Icon - -/** - * This class provides a composite icon. A composite icon - * draws its parts one on the other, all aligned to the - * left top corner. The size of the compsite icon is the - * max size of its parts. - * - */ -public class CompositeIcon implements Icon { - List icons - - /** - * Construct a composite icon. - * - * @param i The parts. - */ - public CompositeIcon(List i) { icons = i; } - - /** - * Draw the icon at the specified location. Icon implementations - * may use the Component argument to get properties useful for - * painting, e.g. the foreground or background color. - * - * @param c The component to take attributes from. - * @param g The graphics port to draw into. - * @param x The x drawing coordinate. - * @param y The y drawing coordinate. - */ - public void paintIcon(Component c, Graphics g, int x, int y) { - icons.each { it.paintIcon(c, g, x, y) } - } - - /** - * Returns the icon's width. - * - * @return an int specifying the fixed width of the icon. - */ - public int getIconWidth() { - int width = 0; - icons.each { width = Math.max(width, it.iconWidth) } - return width; - } - - /** - * Returns the icon's height. - * - * @return an int specifying the fixed height of the icon. - */ - public int getIconHeight() { - int height = 0; - icons.each { height = Math.max(height, it.iconHeight) } - return height; - } - -} diff --git a/pit-swing/src/main/com/jdbernard/pit/swing/IssueListCellRenderer.groovy b/pit-swing/src/main/com/jdbernard/pit/swing/IssueListCellRenderer.groovy deleted file mode 100755 index 9accec8..0000000 --- a/pit-swing/src/main/com/jdbernard/pit/swing/IssueListCellRenderer.groovy +++ /dev/null @@ -1,33 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Category -import com.jdbernard.pit.Status -import java.awt.Component -import javax.swing.Icon -import javax.swing.JList -import javax.swing.DefaultListCellRenderer - -public class IssueListCellRenderer extends DefaultListCellRenderer { - - Map categoryIcons - Map statusIcons - - public Component getListCellRendererComponent(JList list, Object value, - int index, boolean selected, boolean hasFocus) { - def component = super.getListCellRendererComponent(list, value, index, - selected, hasFocus) - def icon - if (categoryIcons[(value.category)]) { - icon = categoryIcons[(value.category)] - - if (statusIcons[(value.status)]) - icon = new CompositeIcon([icon, statusIcons[(value.status)]]) - } - - if (icon) setIcon(icon) - - component.text = "${value.id} (${value.priority}): " + - "${value.title}" - return component - } -} diff --git a/pit-swing/src/main/com/jdbernard/pit/swing/IssueTableCellRenderer.groovy b/pit-swing/src/main/com/jdbernard/pit/swing/IssueTableCellRenderer.groovy deleted file mode 100755 index 2039ee8..0000000 --- a/pit-swing/src/main/com/jdbernard/pit/swing/IssueTableCellRenderer.groovy +++ /dev/null @@ -1,61 +0,0 @@ -package com.jdbernard.pit.swing - -import java.awt.Color -import java.awt.Component -import java.awt.Dimension -import java.awt.Font -import javax.swing.Icon -import javax.swing.JLabel -import javax.swing.JTable -import javax.swing.table.DefaultTableCellRenderer - -public class IssueTableCellRenderer extends DefaultTableCellRenderer { - - public static List textColors = [ - Color.getHSBColor(0f, 1f, 0.8f), // 0 - Highest priority - Color.getHSBColor(0f, 1f, 0.6f), // 1 - High priority - Color.getHSBColor(0f, 1f, 0.4f), - Color.getHSBColor(0f, 1f, 0.2f), // 3 - Medium-high priority - Color.getHSBColor(0f, 0f, 0f), - Color.getHSBColor(0f, 0f, 0f), // 5 - Medium priority - Color.getHSBColor(0f, 0f, 0.1f), - Color.getHSBColor(0f, 0f, 0.2f), // 7 - Medium-low priority - Color.getHSBColor(0f, 0f, 0.4f), - Color.getHSBColor(0f, 0f, 0.6f), // 9 - Lowest priority - ] - - private Font boldFont - private Font plainFont - - public IssueTableCellRenderer() { - super() - plainFont = getFont() - boldFont = plainFont.deriveFont(Font.BOLD) - } - - public Component getTableCellRendererComponent(JTable table, Object value, - boolean isSelected, boolean hasFocus, int row, int col) { - super.getTableCellRendererComponent(table, value, isSelected, - hasFocus, row, col) - - // set row color - int modelRow = table.convertRowIndexToModel(row) - int priority = table.model.getValueAt(modelRow, 2)[1..-4].toInteger() - if (priority <= 3) setFont(boldFont) - else setFont(plainFont) - setForeground(textColors[priority]) - - if (value instanceof String) { - if (col > 2) { - setHorizontalAlignment(JLabel.LEADING) - } else { - setText("" + getText() + "") - setHorizontalAlignment(JLabel.TRAILING) - } - - } - - return this - } - -} diff --git a/pit-swing/src/main/com/jdbernard/pit/swing/IssueTableModel.groovy b/pit-swing/src/main/com/jdbernard/pit/swing/IssueTableModel.groovy deleted file mode 100755 index c539dc7..0000000 --- a/pit-swing/src/main/com/jdbernard/pit/swing/IssueTableModel.groovy +++ /dev/null @@ -1,75 +0,0 @@ -package com.jdbernard.pit.swing - -import com.jdbernard.pit.Filter -import com.jdbernard.pit.Issue -import com.jdbernard.pit.Project -import javax.swing.Icon -import javax.swing.table.AbstractTableModel - -public class IssueTableModel extends AbstractTableModel { - - def issues = [] - boolean projectsVisible = false - def categoryIcons = [:] - def statusIcons = [:] - - public IssueTableModel(Project p, Filter f = null) { - p.eachIssue(f) { issues << it } - } - - public int getRowCount() { - return issues.size - } - - public int getColumnCount() { - if (projectsVisible) return 5 - else return 4 - } - - public Object getValueAt(int row, int column) { - if (row >= getRowCount() || column > getColumnCount()) - return null - - switch(column) { - case 0: return getIcon(issues[row]); break - case 1: return issues[row].id; break - case 2: return "(" + issues[row].priority + "): "; break - case 3: return issues[row].title; break - case 4: return issues[row].project.name; break - default: return "Invalid row index."; break - } - } - - public Class getColumnClass(int column) { - switch (column) { - case 0: return Icon.class; break - default: return String.class; break - } - } - - public String getColumnName(int column) { - switch (column) { - case 0: return "C/S"; break - case 1: return "ID"; break - case 2: return "P"; break - case 3: return "Title/Summary"; break - case 4: return "Project"; break - default: return "ERR"; break - } - } - - public boolean isCellEditable(int row, int col) { return false } - - private Icon getIcon(Issue issue) { - def icon - if (categoryIcons[(issue.category)]) { - icon = categoryIcons[(issue.category)] - - if (statusIcons[(issue.status)]) - icon = new CompositeIcon([icon, statusIcons[(issue.status)]]) - } - - return icon - } - -} diff --git a/pit-swing/test/integration/pit/swing/NewIssueDialogTests.groovy b/pit-swing/test/integration/pit/swing/NewIssueDialogTests.groovy deleted file mode 100755 index f80ceff..0000000 --- a/pit-swing/test/integration/pit/swing/NewIssueDialogTests.groovy +++ /dev/null @@ -1,20 +0,0 @@ -package pit.swing - -import griffon.core.GriffonApplication -import griffon.test.* - -class NewIssueDialogTests extends GriffonUnitTestCase { - GriffonApplication app - - protected void setUp() { - super.setUp() - } - - protected void tearDown() { - super.tearDown() - } - - void testSomething() { - - } -} diff --git a/pit-swing/test/integration/pit/swing/PITests.groovy b/pit-swing/test/integration/pit/swing/PITests.groovy deleted file mode 100755 index 94994a6..0000000 --- a/pit-swing/test/integration/pit/swing/PITests.groovy +++ /dev/null @@ -1,20 +0,0 @@ -package pit.swing - -import griffon.core.GriffonApplication -import griffon.test.* - -class PITests extends GriffonUnitTestCase { - GriffonApplication app - - protected void setUp() { - super.setUp() - } - - protected void tearDown() { - super.tearDown() - } - - void testSomething() { - - } -} diff --git a/pit-swing/test/integration/pit/swing/PitSwingTests.groovy b/pit-swing/test/integration/pit/swing/PitSwingTests.groovy deleted file mode 100755 index 2744ef3..0000000 --- a/pit-swing/test/integration/pit/swing/PitSwingTests.groovy +++ /dev/null @@ -1,20 +0,0 @@ -package pit.swing - -import griffon.core.GriffonApplication -import griffon.test.* - -class PitSwingTests extends GriffonUnitTestCase { - GriffonApplication app - - protected void setUp() { - super.setUp() - } - - protected void tearDown() { - super.tearDown() - } - - void testSomething() { - - } -} diff --git a/pit-swing/test/integration/pit/swing/ProjectPanelTests.groovy b/pit-swing/test/integration/pit/swing/ProjectPanelTests.groovy deleted file mode 100755 index 2eb3471..0000000 --- a/pit-swing/test/integration/pit/swing/ProjectPanelTests.groovy +++ /dev/null @@ -1,20 +0,0 @@ -package pit.swing - -import griffon.core.GriffonApplication -import griffon.test.* - -class ProjectPanelTests extends GriffonUnitTestCase { - GriffonApplication app - - protected void setUp() { - super.setUp() - } - - protected void tearDown() { - super.tearDown() - } - - void testSomething() { - - } -} diff --git a/pit-swing/wrapper/griffon-wrapper.jar b/pit-swing/wrapper/griffon-wrapper.jar deleted file mode 100755 index 93aa4fd..0000000 Binary files a/pit-swing/wrapper/griffon-wrapper.jar and /dev/null differ diff --git a/pit-swing/wrapper/griffon-wrapper.properties b/pit-swing/wrapper/griffon-wrapper.properties deleted file mode 100755 index 734a3d6..0000000 --- a/pit-swing/wrapper/griffon-wrapper.properties +++ /dev/null @@ -1,8 +0,0 @@ -distributionBase=GRIFFON_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRIFFON_USER_HOME -distributionVersion=0.9 -zipStorePath=wrapper/dists -urlRoot=http\://dist.codehaus.org/griffon -distributionName=griffon -distributionClassifier=bin diff --git a/version.properties b/version.properties deleted file mode 100755 index af03817..0000000 --- a/version.properties +++ /dev/null @@ -1 +0,0 @@ -application.version=3.3.3