NetBeans IDE
NetBeans Platform
Plugins
Docs & Support
Community
Partners
HOME
/ Bugzilla
[?]
|
New
|
Browse
|
Search
|
Reports
|
Help
|
Log In
Please use the Apache issue tracking system for new NetBeans issues (
https://issues.apache.org/jira/projects/NETBEANS0/issues
) !!
[patch]
Proposed patch
InstanceNodeChildren-224587.diff (text/plain), 3.07 KB, created by
Jesse Glick
on 2013-01-07 19:21 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jesse Glick
Created:
2013-01-07 19:21 UTC
Size:
3.07 KB
patch
obsolete
># HG changeset patch ># Parent 227aecbed8340dd1605f5d2d9200bca9abd381e8 ># User Jesse Glick <jglick@netbeans.org> >#224587: connect as needed when instance node expanded. >Also removing gratuitous old calls to Node.setChildren; >the Children field should normally be considered final. > > >diff --git a/hudson/src/org/netbeans/modules/hudson/ui/nodes/HudsonInstanceNode.java b/hudson/src/org/netbeans/modules/hudson/ui/nodes/HudsonInstanceNode.java >--- a/hudson/src/org/netbeans/modules/hudson/ui/nodes/HudsonInstanceNode.java >+++ b/hudson/src/org/netbeans/modules/hudson/ui/nodes/HudsonInstanceNode.java >@@ -77,7 +77,6 @@ > private static final String ICON_BASE = "org/netbeans/modules/hudson/ui/resources/instance.png"; // NOI18N > > private HudsonInstanceImpl instance; >- private InstanceNodeChildren children; > > private boolean warn = false; > private boolean run = false; >@@ -86,10 +85,8 @@ > private boolean version = false; > > public HudsonInstanceNode(final HudsonInstanceImpl instance) { >- super(new Children.Array(), Lookups.singleton(instance)); >+ super(new InstanceNodeChildren(instance), Lookups.singleton(instance)); > >- children = new InstanceNodeChildren(instance); >- > setName(instance.getUrl()); > setDisplayName(instance.getName()); > setShortDescription(instance.getUrl()); >@@ -168,13 +165,6 @@ > forbidden = instance.isForbidden(); > version = Utilities.isSupportedVersion(instance.getVersion()); > >- // Refresh children >- if (!alive || !version) { >- setChildren(new Children.Array()); >- } else if (getChildren().getNodesCount() == 0) { >- setChildren(children); >- } >- > // Fire changes if any > fireDisplayNameChange(null, getHtmlDisplayName()); > } >@@ -207,9 +197,9 @@ > > private static class InstanceNodeChildren extends Children.Keys<HudsonJob> implements HudsonChangeListener { > >- private final HudsonInstance instance; >+ private final HudsonInstanceImpl instance; > >- InstanceNodeChildren(HudsonInstance instance) { >+ InstanceNodeChildren(HudsonInstanceImpl instance) { > this.instance = instance; > instance.addHudsonChangeListener(this); > instance.prefs().addPreferenceChangeListener(new PreferenceChangeListener() { >@@ -226,7 +216,12 @@ > @Override > protected void addNotify() { > super.addNotify(); >- refreshKeys(); >+ if (!instance.isConnected()/* && seems undesirable: !instance.isForbidden()*/) { >+ setKeys(Collections.<HudsonJob>emptySet()); >+ instance.synchronize(true); >+ } else { >+ refreshKeys(); >+ } > } > > @Override >@@ -257,7 +252,9 @@ > setKeys(jobs); > } > >- @Override public void stateChanged() {} >+ @Override public void stateChanged() { >+ refreshKeys(); >+ } > > @Override public void contentChanged() { > refreshKeys();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 224587
: 129974
SiteMap
About Us
Contact
Legal & Licences
By use of this website, you agree to the
NetBeans Policies and Terms of Use
. © 2014, Oracle Corporation and/or its affiliates. Sponsored by