changeset: 153540:2d556ab63be9 tag: tip user: Tomas Stupka date: Mon Nov 16 12:57:56 2009 +0100 summary: target milestone for netbeans.org diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/query/Bundle.properties b/bugzilla/src/org/netbeans/modules/bugzilla/query/Bundle.properties --- a/bugzilla/src/org/netbeans/modules/bugzilla/query/Bundle.properties +++ b/bugzilla/src/org/netbeans/modules/bugzilla/query/Bundle.properties @@ -179,3 +179,4 @@ QueryPanel.whiteboardLabel.text=W&hiteboard: QueryPanel.whiteboardTextField.text= QueryPanel.issueTypeLabel.text=I&ssue Type +QueryPanel.tmTypeLabel.text=Target &Milestone diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryController.java b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryController.java --- a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryController.java +++ b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryController.java @@ -125,6 +125,7 @@ private final ListParameter changedFieldsParameter; private final ListParameter severityParameter; private final ListParameter issueTypeParameter; + private final ListParameter tmParameter; private final Map parameters; @@ -181,6 +182,7 @@ panel.severityList.addKeyListener(this); panel.priorityList.addKeyListener(this); panel.changedList.addKeyListener(this); + panel.tmList.addKeyListener(this); panel.summaryTextField.addActionListener(this); panel.commentTextField.addActionListener(this); @@ -207,10 +209,13 @@ changedFieldsParameter = createQueryParameter(ListParameter.class, panel.changedList, "chfield"); // NOI18N if(isNetbeans) { issueTypeParameter = createQueryParameter(ListParameter.class, panel.issueTypeList, "cf_bug_type"); // NOI18N + tmParameter = createQueryParameter(ListParameter.class, panel.tmList, "target_milestone"); // NOI18N severityParameter = null; + } else { severityParameter = createQueryParameter(ListParameter.class, panel.severityList, "bug_severity"); // NOI18N issueTypeParameter = null; + tmParameter = null; } createQueryParameter(TextFieldParameter.class, panel.summaryTextField, "short_desc"); // NOI18N @@ -834,6 +839,7 @@ List newComponents = new ArrayList(); List newVersions = new ArrayList(); + List newTargetMilestone = new ArrayList(); for (String p : products) { List productComponents = bc.getComponents(p); for (String c : productComponents) { @@ -847,10 +853,21 @@ newVersions.add(c); } } + if(isNetbeans) { + List targetMilestone = bc.getTargetMilestones(p); + for (String c : targetMilestone) { + if(!newTargetMilestone.contains(c)) { + newTargetMilestone.add(c); + } + } + } } componentParameter.setParameterValues(toParameterValues(newComponents)); versionParameter.setParameterValues(toParameterValues(newVersions)); + if(isNetbeans) { + tmParameter.setParameterValues(toParameterValues(newTargetMilestone)); + } } private List toParameterValues(List values) { diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.form b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.form --- a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.form +++ b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.form @@ -411,7 +411,12 @@ - + + + + + + @@ -421,6 +426,11 @@ + + + + + @@ -847,6 +857,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1229,9 +1284,6 @@ - - - diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java --- a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java +++ b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java @@ -147,6 +147,7 @@ resolutionList.setCellRenderer(new ParameterValueCellRenderer()); priorityList.setCellRenderer(new QueryParameter.PriorityRenderer()); changedList.setCellRenderer(new ParameterValueCellRenderer()); + tmList.setCellRenderer(new ParameterValueCellRenderer()); saveErrorLabel.setForeground(ERROR_COLOR); Image img = ImageUtilities.loadImage("org/netbeans/modules/bugzilla/resources/error.gif"); //NOI18N @@ -403,11 +404,11 @@ byDetailsPanel.setBackground(javax.swing.UIManager.getDefaults().getColor("TextArea.background")); - productLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + productLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N productLabel.setLabelFor(productList); org.openide.awt.Mnemonics.setLocalizedText(productLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.productLabel.text")); // NOI18N - versionLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + versionLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N versionLabel.setLabelFor(versionList); org.openide.awt.Mnemonics.setLocalizedText(versionLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.versionLabel.text")); // NOI18N @@ -422,7 +423,7 @@ jScrollPane2.setViewportView(versionList); versionList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.versionList.AccessibleContext.accessibleDescription")); // NOI18N - statusLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + statusLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N statusLabel.setLabelFor(statusList); org.openide.awt.Mnemonics.setLocalizedText(statusLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.statusLabel.text")); // NOI18N @@ -437,7 +438,7 @@ jScrollPane3.setViewportView(statusList); statusList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.statusList.AccessibleContext.accessibleDescription")); // NOI18N - resolutionLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + resolutionLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N resolutionLabel.setLabelFor(resolutionList); org.openide.awt.Mnemonics.setLocalizedText(resolutionLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.resolutionLabel.text")); // NOI18N @@ -452,7 +453,7 @@ jScrollPane4.setViewportView(priorityList); priorityList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.priorityList.AccessibleContext.accessibleDescription")); // NOI18N - priorityLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + priorityLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N priorityLabel.setLabelFor(priorityList); org.openide.awt.Mnemonics.setLocalizedText(priorityLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.priorityLabel.text")); // NOI18N @@ -467,7 +468,7 @@ jScrollPane5.setViewportView(resolutionList); resolutionList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.resolutionList.AccessibleContext.accessibleDescription")); // NOI18N - componentLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + componentLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N componentLabel.setLabelFor(componentList); org.openide.awt.Mnemonics.setLocalizedText(componentLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.componentLabel.text")); // NOI18N @@ -493,7 +494,7 @@ jScrollPane7.setViewportView(productList); productList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.productList.AccessibleContext.accessibleDescription")); // NOI18N - severityLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + severityLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N severityLabel.setLabelFor(severityList); org.openide.awt.Mnemonics.setLocalizedText(severityLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.severityLabel.text")); // NOI18N @@ -508,7 +509,7 @@ severityScrollPane.setViewportView(severityList); severityList.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.severityList.AccessibleContext.accessibleDescription")); // NOI18N - issueTypeLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); + issueTypeLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N issueTypeLabel.setLabelFor(severityList); org.openide.awt.Mnemonics.setLocalizedText(issueTypeLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.issueTypeLabel.text")); // NOI18N @@ -522,6 +523,20 @@ issueTypeList.setMinimumSize(new java.awt.Dimension(100, 2)); issueTypeScrollPane.setViewportView(issueTypeList); + tmTypeLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N + tmTypeLabel.setLabelFor(severityList); + org.openide.awt.Mnemonics.setLocalizedText(tmTypeLabel, org.openide.util.NbBundle.getMessage(QueryPanel.class, "QueryPanel.tmTypeLabel.text")); // NOI18N + + issueTypeScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + + tmList.setModel(new javax.swing.AbstractListModel() { + String[] strings = { "" }; + public int getSize() { return strings.length; } + public Object getElementAt(int i) { return strings[i]; } + }); + tmList.setMinimumSize(new java.awt.Dimension(100, 2)); + issueTypeScrollPane1.setViewportView(tmList); + org.jdesktop.layout.GroupLayout byDetailsPanelLayout = new org.jdesktop.layout.GroupLayout(byDetailsPanel); byDetailsPanel.setLayout(byDetailsPanelLayout); byDetailsPanelLayout.setHorizontalGroup( @@ -559,7 +574,11 @@ .add(byDetailsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(issueTypeLabel) .add(issueTypeScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(99, Short.MAX_VALUE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(byDetailsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tmTypeLabel) + .add(issueTypeScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); byDetailsPanelLayout.setVerticalGroup( byDetailsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) @@ -567,6 +586,10 @@ .addContainerGap() .add(byDetailsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(byDetailsPanelLayout.createSequentialGroup() + .add(tmTypeLabel) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(issueTypeScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)) + .add(byDetailsPanelLayout.createSequentialGroup() .add(issueTypeLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(issueTypeScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)) @@ -1274,6 +1297,7 @@ final javax.swing.JLabel issueTypeLabel = new javax.swing.JLabel(); final javax.swing.JList issueTypeList = new javax.swing.JList(); final javax.swing.JScrollPane issueTypeScrollPane = new HackedScrollPane(); + final javax.swing.JScrollPane issueTypeScrollPane1 = new HackedScrollPane(); private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; @@ -1337,6 +1361,8 @@ private javax.swing.JPanel tableHeaderPanel; final javax.swing.JPanel tablePanel = new javax.swing.JPanel(); final javax.swing.JLabel tableSummaryLabel = new javax.swing.JLabel(); + final javax.swing.JList tmList = new javax.swing.JList(); + final javax.swing.JLabel tmTypeLabel = new javax.swing.JLabel(); final javax.swing.JPanel urlPanel = new javax.swing.JPanel(); final javax.swing.JTextField urlTextField = new javax.swing.JTextField(); final org.netbeans.modules.bugtracking.util.LinkButton urlToggleButton = new org.netbeans.modules.bugtracking.util.LinkButton(); @@ -1497,6 +1523,9 @@ severityLabel.setVisible(!visible); severityList.setVisible(!visible); severityScrollPane.setVisible(!visible); + + tmTypeLabel.setVisible(visible); + tmList.setVisible(visible); } public void focusGained(FocusEvent e) {