@Override public void addNotify() { projectSources.addChangeListener(changeListener); }
@Override public void addNotify() { Sources srcs = ProjectUtils.getSources(project); srcs.addChangeListener(this); }
@Override public void addNotify() { Sources srcs = ProjectUtils.getSources(project); srcs.addChangeListener(this); }
@Override public void addNotify() { getSources().addChangeListener(this); }
public void addNotify() { getSources().addChangeListener(this); }
public void addNotify() { getSources().addChangeListener(this); }
public void addNotify() { getSources().addChangeListener(this); }
@Override public synchronized SourceGroup[] getSourceGroups(String type) { if (delegate == null) { delegate = initSources(); delegate.addChangeListener(this); } return delegate.getSourceGroups(type); }
protected final void setProjectFiles(Project project) { Sources sources = ProjectUtils.getSources(project); // returns singleton if (sourcesListener == null) { sourcesListener = WeakListeners.change(this, sources); sources.addChangeListener(sourcesListener); } setGroups(Arrays.asList(sources.getSourceGroups(Sources.TYPE_GENERIC))); }
protected void setProjectFiles(Project project) { Sources sources = ProjectUtils.getSources(project); // returns singleton if (sourcesListener == null) { sourcesListener = WeakListeners.change(this, sources); sources.addChangeListener(sourcesListener); } setGroups(Arrays.asList(sources.getSourceGroups(Sources.TYPE_GENERIC))); }
private Iterable<? extends FileObject> getRoots() { Sources _src = null; synchronized (this) { if (this.roots != null) { return this.roots; } if (this.src == null) { this.src = this.project.getLookup().lookup(Sources.class); this.src.addChangeListener(sourcesChangeListener); } _src = this.src; } assert _src != null; final SourceGroup[] sgs = _src.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA); final List<FileObject> _roots = new ArrayList<FileObject>(sgs.length); for (SourceGroup sg : sgs) { final FileObject root = sg.getRootFolder(); if (UnitTestForSourceQuery.findSources(root).length == 0) { _roots.add(root); } } synchronized (this) { if (this.roots == null) { this.roots = _roots; } return this.roots; } }