[hg] main-silver: Issue #239702 - What is Task Repositories in T...

  • From: Tomas Stupka < >
  • To:
  • Subject: [hg] main-silver: Issue #239702 - What is Task Repositories in T...
  • Date: Mon, 06 Jan 2014 19:54:15 +0000

changeset ade6d81af06b in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/ade6d81af06b
description:
        Issue #239702 - What is Task Repositories in Tasks options good for?

diffstat:

 
bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptions.java
      |  11 ++++++++-
 
bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptionsPanel.java
 |  10 +++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)

diffs (48 lines):

diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptions.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptions.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptions.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptions.java
@@ -50,6 +50,7 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Set;
 import java.util.logging.Level;
 import javax.swing.JComponent;
 import org.netbeans.modules.bugtracking.BugtrackingManager;
@@ -103,8 +104,14 @@
         
         @Override
         public JComponent getComponent(Lookup masterLookup) {
-            for(Entry<String, OptionsPanelController> entry : 
categoryToController.entrySet()) {                                
-                panel.addPanel(entry.getKey(), 
entry.getValue().getComponent(masterLookup));
+            final Set<Entry<String, OptionsPanelController>> 
controllerEntries = categoryToController.entrySet();
+            if(controllerEntries.isEmpty()) {
+                panel.setPluginListVisible(false);                
+            } else {
+                panel.setPluginListVisible(true);   
+                for(Entry<String, OptionsPanelController> controllerEntry : 
controllerEntries) {                                
+                    panel.addPanel(controllerEntry.getKey(), 
controllerEntry.getValue().getComponent(masterLookup));
+                }
             }
             return panel;
         }
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptionsPanel.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptionsPanel.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptionsPanel.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/settings/BugtrackingOptionsPanel.java
@@ -70,6 +70,16 @@
         containerPanel.add(name, component);
     }
     
+    void setPluginListVisible(boolean visible) {
+        jScrollPane1.setVisible(visible);
+        containerPanel.setVisible(visible);
+        jLabel5.setVisible(visible);
+        jSeparator3.setVisible(visible);
+                
+        jLabel4.setVisible(visible);
+        jSeparator2.setVisible(visible);
+    }
+    
     /** This method is called from within the constructor to
      * initialize the form.
      * WARNING: Do NOT modify this code. The content of this method is

[hg] main-silver: Issue #239702 - What is Task Repositories in T...

Tomas Stupka 01/06/2014

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close