diff --git a/issues/libpit/0022bv3.rst b/issues/libpit/0022bv3.rst new file mode 100644 index 0000000..a64ead1 --- /dev/null +++ b/issues/libpit/0022bv3.rst @@ -0,0 +1,4 @@ +Ignore hidden directories. +========================== + +Directories that are hidden (determined via File.isHidden()) should not be traversed. \ No newline at end of file diff --git a/issues/pit-swing/0008fn7.rst b/issues/pit-swing/0008fn7.rst deleted file mode 100644 index b1ff3db..0000000 --- a/issues/pit-swing/0008fn7.rst +++ /dev/null @@ -1 +0,0 @@ -Add an optional word-wrap at 80 characters for the Issue display \ No newline at end of file diff --git a/issues/pit-swing/0008fs7.rst b/issues/pit-swing/0008fs7.rst new file mode 100644 index 0000000..22da509 --- /dev/null +++ b/issues/pit-swing/0008fs7.rst @@ -0,0 +1,2 @@ +Add an optional word-wrap at 80 characters for the Issue display. +================================================================= \ No newline at end of file diff --git a/issues/pit-swing/0009tn7.rst b/issues/pit-swing/0009ts7.rst similarity index 100% rename from issues/pit-swing/0009tn7.rst rename to issues/pit-swing/0009ts7.rst diff --git a/issues/pit-swing/0011bs3.rst b/issues/pit-swing/0011bs3.rst new file mode 100644 index 0000000..fd950f8 --- /dev/null +++ b/issues/pit-swing/0011bs3.rst @@ -0,0 +1,4 @@ +Ignore Hidden directories. +========================== + +Directories that are hidden should be ignored (File.isHidden() determines). \ No newline at end of file diff --git a/libpit/project.properties b/libpit/project.properties index fa78552..55c74d9 100644 --- a/libpit/project.properties +++ b/libpit/project.properties @@ -1,10 +1,10 @@ -#Fri Feb 26 11:43:12 CST 2010 +#Fri Feb 26 23:58:36 CST 2010 build.dir=build src.dir=src lib.shared.dir=../shared-libs test.dir=test build.number=2 -expected.application.version=2.0.1 +expected.application.version=2.1.0 lib.dir=lib release.dir=release release.jar=pit-${application.version}.jar diff --git a/libpit/release/pit-2.0.1.jar b/libpit/release/pit-2.0.1.jar deleted file mode 100644 index 29aa0f9..0000000 Binary files a/libpit/release/pit-2.0.1.jar and /dev/null differ diff --git a/libpit/release/pit-2.1.0.jar b/libpit/release/pit-2.1.0.jar new file mode 100644 index 0000000..efc09d1 Binary files /dev/null and b/libpit/release/pit-2.1.0.jar differ diff --git a/libpit/src/com/jdbernard/pit/FileProject.groovy b/libpit/src/com/jdbernard/pit/FileProject.groovy index 5d13d98..dd89fa1 100644 --- a/libpit/src/com/jdbernard/pit/FileProject.groovy +++ b/libpit/src/com/jdbernard/pit/FileProject.groovy @@ -17,7 +17,8 @@ class FileProject extends Project { // add sub projects if (child.isDirectory()) { - if ( child.name ==~ /\d+/) return // just an issue folder + if (child.name ==~ /\d+/ || + child.isHidden()) return // just an issue folder // otherwise build and add to list projects[(child.name)] = new FileProject(child) diff --git a/pit-cli/lib/pit-2.0.1.jar b/pit-cli/lib/pit-2.0.1.jar deleted file mode 100644 index 29aa0f9..0000000 Binary files a/pit-cli/lib/pit-2.0.1.jar and /dev/null differ diff --git a/pit-cli/lib/pit-2.1.0.jar b/pit-cli/lib/pit-2.1.0.jar new file mode 100644 index 0000000..efc09d1 Binary files /dev/null and b/pit-cli/lib/pit-2.1.0.jar differ diff --git a/pit-cli/project.properties b/pit-cli/project.properties index cf36d74..2e428ae 100644 --- a/pit-cli/project.properties +++ b/pit-cli/project.properties @@ -1,9 +1,9 @@ -#Fri Feb 26 11:46:27 CST 2010 +#Sat Feb 27 03:01:15 CST 2010 build.dir=build src.dir=src build.jar=pit-cli-${application.version}.${build.number}.jar -build.number=2 -expected.application.version=2.0.1 +build.number=1 +expected.application.version=2.1.0 lib.dir=lib release.dir=release release.jar=pit-cli-${application.version}.jar diff --git a/pit-cli/release/pit-cli-2.0.1.jar b/pit-cli/release/pit-cli-2.1.0.jar similarity index 95% rename from pit-cli/release/pit-cli-2.0.1.jar rename to pit-cli/release/pit-cli-2.1.0.jar index 6b297ab..3fcfcaf 100644 Binary files a/pit-cli/release/pit-cli-2.0.1.jar and b/pit-cli/release/pit-cli-2.1.0.jar differ diff --git a/pit-swing/application.properties b/pit-swing/application.properties index 79f6071..62cbb1c 100644 --- a/pit-swing/application.properties +++ b/pit-swing/application.properties @@ -1,4 +1,4 @@ #Sat Feb 13 08:41:16 CST 2010 -app.version=2.0.1 +app.version=2.1.0 app.griffon.version=0.2.1 app.name=pit-swing diff --git a/pit-swing/griffon-app/resources/add.png b/pit-swing/griffon-app/resources/add.png new file mode 100755 index 0000000..6332fef Binary files /dev/null and b/pit-swing/griffon-app/resources/add.png differ diff --git a/pit-swing/griffon-app/resources/delete.png b/pit-swing/griffon-app/resources/delete.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/pit-swing/griffon-app/resources/delete.png differ 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 index 178abdd..ea9ca4f 100644 --- a/pit-swing/griffon-app/views/com/jdbernard/pit/swing/PITView.groovy +++ b/pit-swing/griffon-app/views/com/jdbernard/pit/swing/PITView.groovy @@ -7,6 +7,7 @@ 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.GridBagConstraints as GBC import java.awt.Font import java.awt.Point @@ -25,6 +26,7 @@ import javax.swing.tree.DefaultTreeModel import javax.swing.tree.TreeSelectionModel import net.miginfocom.swing.MigLayout +import java.awt.Color /* ******************** * VIEW-Specific data * ********************/ @@ -95,12 +97,20 @@ showIssuePopup = { issue, x, y -> issuePopupMenu.show(issueList, x, y) } +newIssue = { evt = null -> + titleTextField.text = "" + categoryComboBox.selectedItem = Category.BUG + statusComboBox.selectedItem = Status.NEW + prioritySpinner.setValue(5) + newIssueDialog.visible = true +} + /* **************** * GUI components * ****************/ openDialog = fileChooser(fileSelectionMode: JFileChooser.DIRECTORIES_ONLY) -newIssueDialog = dialog(title: 'New Task...', modal: true, pack: true,//size: [300,200], +newIssueDialog = dialog(title: 'New Task...', modal: true, pack: true, locationRelativeTo: null) { gridBagLayout() @@ -155,7 +165,7 @@ newIssueDialog = dialog(title: 'New Task...', modal: true, pack: true,//size: [3 } projectPopupMenu = popupMenu() { - menuItem('New Project...', + menuItem('New Project...', icon: imageIcon("/add.png"), actionPerformed: { def name = JOptionPane.showInputDialog(frame, 'Project name:', 'New Project...', JOptionPane.QUESTION_MESSAGE) @@ -167,7 +177,7 @@ projectPopupMenu = popupMenu() { projectTree.model = new DefaultTreeModel( makeNodes(model.rootProject)) }) - menuItem('Delete Project', + menuItem('Delete Project', icon: imageIcon("/delete.png"), actionPerformed: { if (!popupProject) return popupProject.delete() @@ -177,16 +187,10 @@ projectPopupMenu = popupMenu() { } issuePopupMenu = popupMenu() { - menuItem('New Issue...', - actionPerformed: { - titleTextField.text = "" - categoryComboBox.selectedIndex = 0 - statusComboBox.selectedIndex = 0 - prioritySpinner.setValue(5) - newIssueDialog.visible = true - }) + menuItem('New Issue...', icon: imageIcon("/add.png"), + actionPerformed: newIssue) - menuItem('Delete Issue', + menuItem('Delete Issue', icon: imageIcon("/delete.png"), actionPerformed: { if (!popupIssue) return selectedProject.issues.remove(popupIssue.id) @@ -241,11 +245,9 @@ issuePopupMenu = popupMenu() { } frame = application(title:'Personal Issue Tracker', - locationRelativeTo: null, minimumSize: [800, 500], - //size:[320,480], pack:true, - //location:[50,50], + locationRelativeTo: null, iconImage: imageIcon('/icon64x64.png').image, iconImages: [imageIcon('/icon64x64.png').image, imageIcon('/icon32x32.png').image, @@ -313,67 +315,138 @@ frame = application(title:'Personal Issue Tracker', // main split view splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT, - dividerLocation: 200) { + dividerLocation: 280) { - // tree view of projects - scrollPane(constraints: "left") { - treeCellRenderer = new DefaultTreeCellRenderer() - treeCellRenderer.leafIcon = treeCellRenderer.closedIcon + // left side (projects tree and buttons) + panel(constraints: "left") { + gridBagLayout() - projectTree = tree(cellRenderer: treeCellRenderer, - model: bind(source: model, sourceProperty: 'rootProject', - sourceValue: { - if (model.rootProject) { - projectTree.rootVisible = model.rootProject.issues.size() - new DefaultTreeModel(makeNodes(model.rootProject)) - } else { - projectTree.rootVisible = false - new DefaultTreeModel(new DefaultMutableTreeNode()) + // 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) { + projectTree.rootVisible = + model.rootProject.issues.size() + new DefaultTreeModel(makeNodes(model.rootProject)) + } else { + projectTree.rootVisible = false + new DefaultTreeModel(new DefaultMutableTreeNode()) + } + }), + valueChanged: { evt -> + selectedProject = evt?.newLeadSelectionPath?. + lastPathComponent?.userObject ?: model.rootProject + displayProject(selectedProject) + //deleteProjectButton.enabled = selectedProject != null + }, + mouseClicked: { evt -> + if (evt.button == MouseEvent.BUTTON3) { + showProjectPopup( + projectTree.getPathForLocation(evt.x, evt.y) + ?.lastPathComponent?.userObject, + evt.x, evt.y) } - }), - valueChanged: { evt -> - selectedProject = evt?.newLeadSelectionPath?.lastPathComponent?.userObject ?: model.rootProject - displayProject(selectedProject) - }, - mouseClicked: { evt -> - if (evt.button == MouseEvent.BUTTON3) { - showProjectPopup( - projectTree.getPathForLocation(evt.x, evt.y) - ?.lastPathComponent?.userObject, - evt.x, evt.y) - } + }) + projectTree.model = new DefaultTreeModel( + new DefaultMutableTreeNode()) + projectTree.rootVisible = false + + projectTree.selectionModel.selectionMode = + TreeSelectionModel.SINGLE_TREE_SELECTION + } + + // project buttons + button('New Project', icon: imageIcon("/add.png"), + constraints: gbc(fill: GBC.NONE, gridx: 0, gridy: 1, + anchor: GBC.WEST), + actionPerformed: { + def name = JOptionPane.showInputDialog(frame, + 'Project name:', 'New Project...', + JOptionPane.QUESTION_MESSAGE) + + if (!selectedProject) selectedProject = model.rootProject + def newProject = selectedProject.createNewProject(name) + + selectedProject.projects[(newProject.name)] = newProject + projectTree.model = new DefaultTreeModel( + makeNodes(model.rootProject)) + + }) + deleteProjectButton = button('Delete Project', + icon: imageIcon("/delete.png"), + constraints: gbc(fill: GBC.NONE, gridx: 1, gridy: 1, + anchor: GBC.WEST), + enabled: bind(source: projectTree, sourceEvent: 'valueChanged', + sourceValue: { projectTree?.lastSelectedPathComponent != null}), + actionPerformed: { + if (!selectedProject) return + selectedProject.delete() + // do not like, tied to Project implementation + model.rootProject = new FileProject( + model.rootProject.source) }) - projectTree.model = new DefaultTreeModel(new DefaultMutableTreeNode()) - projectTree.rootVisible = false - - projectTree.selectionModel.selectionMode = - TreeSelectionModel.SINGLE_TREE_SELECTION } // split between issue list and issue details splitPane(orientation: JSplitPane.VERTICAL_SPLIT, - dividerLocation: 200, constraints: "") { + dividerLocation: 200, constraints: "right") { - scrollPane(constraints: "top") { - issueList = list( - cellRenderer: new IssueListCellRenderer( - categoryIcons: categoryIcons, - statusIcons: statusIcons), - selectionMode: ListSelectionModel.SINGLE_SELECTION, - valueChanged: { displayIssue(issueList.selectedValue) }, - mouseClicked: { evt -> - if (evt.button == MouseEvent.BUTTON3) { - issueList.selectedIndex = issueList.locationToIndex( - [evt.x, evt.y] as Point) + panel(constraints: "top") { + gridBagLayout() - showIssuePopup(issueList.selectedValue, - evt.x, evt.y) - } + scrollPane(constraints: gbc(fill: GBC.BOTH, weightx: 2, + weighty: 2, gridx: 0, gridy: 0, gridwidth: 3)) { + + issueList = list( + cellRenderer: new IssueListCellRenderer( + categoryIcons: categoryIcons, + statusIcons: statusIcons), + selectionMode: ListSelectionModel.SINGLE_SELECTION, + valueChanged: { displayIssue(issueList.selectedValue) }, + mouseClicked: { evt -> + if (evt.button == MouseEvent.BUTTON3) { + issueList.selectedIndex = issueList.locationToIndex( + [evt.x, evt.y] as Point) + + showIssuePopup(issueList.selectedValue, + evt.x, evt.y) + } + }) + } + + wordWrapCheckBox = checkBox('Word wrap', + constraints: gbc(gridx: 0, gridy: 1, weightx: 2, + anchor: GBC.WEST), selected: true) + button('New Issue', + constraints: gbc(gridx: 1, gridy: 1, anchor: GBC.EAST), + icon: imageIcon("/add.png"), actionPerformed: newIssue) + + deleteIssueButton = button('Delete Issue', + constraints: gbc(gridx: 2, gridy: 1, anchor: GBC.EAST), + enabled: bind(source: issueList, sourceEvent: 'valueChanged', + sourceValue: { issueList.selectedValue != null }), + icon: imageIcon("/delete.png"), + actionPerformed: { + if (!issueList?.selectedIssue) return + selectedProject.issues.remove(issueList.selectedValue) + projectListModels[(selectedProject.name)] + .removeElement(issueList.selectedValue) + issueList.selectedIssue.delete() }) + } scrollPane(constraints: "bottom") { issueTextArea = textArea( - font: new Font(Font.MONOSPACED, Font.PLAIN, 12), + wrapStyleWord: true, + lineWrap: bind(source: wordWrapCheckBox, + sourceProperty: 'selected'), + font: new Font(Font.MONOSPACED, Font.PLAIN, 10), focusGained: {}, focusLost: { if (!issueList?.selectedValue) return diff --git a/pit-swing/lib/pit-2.0.1.jar b/pit-swing/lib/pit-2.0.1.jar deleted file mode 100644 index 29aa0f9..0000000 Binary files a/pit-swing/lib/pit-2.0.1.jar and /dev/null differ diff --git a/pit-swing/lib/pit-2.1.0.jar b/pit-swing/lib/pit-2.1.0.jar new file mode 100644 index 0000000..efc09d1 Binary files /dev/null and b/pit-swing/lib/pit-2.1.0.jar differ diff --git a/release/lib/pit-2.0.1.jar b/release/lib/pit-2.0.1.jar deleted file mode 100644 index 29aa0f9..0000000 Binary files a/release/lib/pit-2.0.1.jar and /dev/null differ diff --git a/release/lib/pit-2.1.0.jar b/release/lib/pit-2.1.0.jar new file mode 100644 index 0000000..efc09d1 Binary files /dev/null and b/release/lib/pit-2.1.0.jar differ diff --git a/version.properties b/version.properties index ff0ed96..23264b8 100644 --- a/version.properties +++ b/version.properties @@ -1 +1 @@ -application.version=2.0.1 +application.version=2.1.0