Lines 105-111
Link Here
|
105 |
public class ProjectsRootNode extends AbstractNode { |
105 |
public class ProjectsRootNode extends AbstractNode { |
106 |
|
106 |
|
107 |
private static final Logger LOG = Logger.getLogger(ProjectsRootNode.class.getName()); |
107 |
private static final Logger LOG = Logger.getLogger(ProjectsRootNode.class.getName()); |
108 |
private static final Set<ProjectsRootNode> all = new WeakSet<ProjectsRootNode>(); |
108 |
private static final Set<ProjectsRootNode> all = Collections.synchronizedSet(new WeakSet<ProjectsRootNode>()); |
109 |
|
109 |
|
110 |
static final int PHYSICAL_VIEW = 0; |
110 |
static final int PHYSICAL_VIEW = 0; |
111 |
static final int LOGICAL_VIEW = 1; |
111 |
static final int LOGICAL_VIEW = 1; |
Lines 120-126
Link Here
|
120 |
super( new ProjectChildren( type ) ); |
120 |
super( new ProjectChildren( type ) ); |
121 |
setIconBaseWithExtension( ICON_BASE ); |
121 |
setIconBaseWithExtension( ICON_BASE ); |
122 |
this.type = type; |
122 |
this.type = type; |
123 |
all.add(this); |
123 |
synchronized(all){ |
|
|
124 |
all.add(this); |
125 |
} |
124 |
} |
126 |
} |
125 |
|
127 |
|
126 |
public String getName() { |
128 |
public String getName() { |
Lines 202-214
Link Here
|
202 |
} |
204 |
} |
203 |
|
205 |
|
204 |
static void checkNoLazyNode(Object msg) { |
206 |
static void checkNoLazyNode(Object msg) { |
205 |
for (ProjectsRootNode root : all) { |
207 |
synchronized(all){ |
206 |
for (Node n : root.getChildren().getNodes()) { |
208 |
for (ProjectsRootNode root : all) { |
207 |
if (n.getLookup().lookup(LazyProject.class) != null) { |
209 |
for (Node n : root.getChildren().getNodes()) { |
208 |
LogRecord REC = new LogRecord(Level.WARNING, "LazyProjects remain visible:\n {0}"); // NOI18N |
210 |
if (n.getLookup().lookup(LazyProject.class) != null) { |
209 |
REC.setLoggerName(OpenProjectList.LOGGER.getName()); |
211 |
LogRecord REC = new LogRecord(Level.WARNING, "LazyProjects remain visible:\n {0}"); // NOI18N |
210 |
REC.setParameters(new Object[] { msg }); |
212 |
REC.setLoggerName(OpenProjectList.LOGGER.getName()); |
211 |
OpenProjectList.log(REC); |
213 |
REC.setParameters(new Object[] { msg }); |
|
|
214 |
OpenProjectList.log(REC); |
215 |
} |
212 |
} |
216 |
} |
213 |
} |
217 |
} |
214 |
} |
218 |
} |