R( @NonNull final URL url, @NonNull final MultiModule modules, @NonNull final String moduleName, @NonNull final String[] templates) { Parameters.notNull("url", url); //NOI18N Parameters.notNull("modules", modules); //NOI18N Parameters.notNull("moduleName", moduleName); //NOI18N Parameters.notNull("templates", templates); //NOI18N this.url = url; this.pp = new EvaluatorPropertyProvider(MultiModuleBinaryForSourceQueryImpl.this.evaluator); this.evaluator = PropertyUtils.sequentialPropertyEvaluator( PropertyUtils.fixedPropertyProvider(Collections.singletonMap("module.name",moduleName)), //NOI18N pp); this.modules = modules; this.moduleName = moduleName; this.templates = templates; this.cache = new AtomicReference(); this.listeners = new ChangeSupport(this); this.propsCache = new AtomicReference<>(); this.scp = new AtomicReference<>(); MultiModuleBinaryForSourceQueryImpl.this.evaluator.addPropertyChangeListener(WeakListeners.propertyChange(this, MultiModuleBinaryForSourceQueryImpl.this.evaluator)); this.modules.addPropertyChangeListener(WeakListeners.propertyChange(this, this.modules)); }
ResultImpl( @NonNull final Project project, @NonNull final MultiModule sourceModules, @NonNull final MultiModule testModules) { Parameters.notNull("project", project); //NOI18N Parameters.notNull("sourceModules", sourceModules); //NOI18N Parameters.notNull("testModules", testModules); //NOI18N this.sourceModules = sourceModules; this.testModules = testModules; this.slRes = SourceLevelQuery.getSourceLevel2(project.getProjectDirectory()); this.listeners = new ChangeSupport(this); this.sourceModules.addPropertyChangeListener(WeakListeners.propertyChange(this, this.sourceModules)); this.testModules.addPropertyChangeListener(WeakListeners.propertyChange(this, this.testModules)); this.currentCps = new ArrayList<>(); this.currentModuleInfos = new HashSet<>(); }
R( @NonNull final URI artefact, @NonNull final ClassPath srcPath, @NonNull final PropertyEvaluator eval, @NonNull final AntProjectHelper helper, @NonNull final String moduleName, @NonNull final String prop) { Parameters.notNull("artefact", artefact); //NOI18N Parameters.notNull("srcPath", srcPath); //NOI18N Parameters.notNull("eval", eval); //NOI18N Parameters.notNull("helper", helper); //NOI18N Parameters.notNull("moduleName", moduleName); //NOI18N Parameters.notNull("prop", prop); //NOI18N this.artefact = artefact; this.srcPath = srcPath; this.eval = eval; this.helper = helper; this.moduleName = moduleName; this.prop = prop; this.listeners = new ChangeSupport(this); this.srcPath.addPropertyChangeListener(WeakListeners.propertyChange(this, this.srcPath)); this.eval.addPropertyChangeListener(WeakListeners.propertyChange(this, this.eval)); }
R( @NonNull final AntProjectHelper helper, @NonNull final PropertyEvaluator eval, @NonNull final SourceRoots sources, @NonNull final String manifestProp) { this.helper = helper; this.eval = eval; this.sources = sources; this.manifestProp = manifestProp; this.listeners = new ChangeSupport(this); Set<FCL.Op> filter = EnumSet.allOf(FCL.Op.class); filter.remove(FCL.Op.FILE_ATTR_CHANGED); this.manifestListener = new FCL(this::reset, filter); filter = EnumSet.allOf(FCL.Op.class); filter.remove(FCL.Op.FILE_ATTR_CHANGED); filter.remove(FCL.Op.FILE_CHANGED); this.modInfoListener = new FCL(this::reset, filter); this.eval.addPropertyChangeListener(WeakListeners.propertyChange(this, this.eval)); this.sources.addPropertyChangeListener(WeakListeners.propertyChange(this, this.sources)); }
private CosAction( @NonNull final J2SEActionProvider owner, @NonNull final PropertyEvaluator eval, @NonNull final SourceRoots src, @NonNull final SourceRoots tests) { this.owner = owner; this.eval = eval; this.src = src; this.tests = tests; this.mapper = new BuildArtifactMapper(); this.currentListeners = new HashMap<>(); this.cs = new ChangeSupport(this); this.importantFilesCache = new AtomicReference<>(Pair.of(null,null)); this.eval.addPropertyChangeListener(WeakListeners.propertyChange(this, this.eval)); this.src.addPropertyChangeListener(WeakListeners.propertyChange(this, this.src)); this.tests.addPropertyChangeListener(WeakListeners.propertyChange(this, this.tests)); updateRootsListeners(); instances.put(owner.getProject(), new WeakReference<>(this)); }
public AttachmentsPanel(JComponent parentPanel) { this.parentPanel = parentPanel; this.supp = new ChangeSupport(this); setBackground(UIManager.getColor("TextArea.background")); // NOI18N ResourceBundle bundle = NbBundle.getBundle(AttachmentsPanel.class); noneLabel = new JLabel(bundle.getString("AttachmentsPanel.noneLabel.text")); // NOI18N createNewButton = new LinkButton(new CreateNewAction()); createNewButton.getAccessibleContext().setAccessibleDescription(bundle.getString("AttachmentPanels.createNewButton.AccessibleContext.accessibleDescription")); // NOI18N try { maxMethod = GroupLayout.Group.class.getDeclaredMethod("calculateMaximumSize", int.class); // NOI18N maxMethod.setAccessible(true); } catch (NoSuchMethodException nsmex) { LOG.log(Level.INFO, nsmex.getMessage(), nsmex); } }
public AttachmentPanel(AttachmentsPanel.NBBugzillaCallback nbCallback) { this.nbCallback = nbCallback; this.supp = new ChangeSupport(this); initComponents(); setBackground( UIUtils.getSectionPanelBackground() ); initFileTypeCombo(); attachListeners(); }
ClasspathInfoListener ( @NonNull final ChangeSupport changedSupport, @NullAllowed final Runnable callBack) { assert changedSupport != null; this.changeSupport = changedSupport; this.callBack = callBack; }
public TargetChooserPanel(Project project, SourceGroup[] folders , T id ) { myChangeSupport = new ChangeSupport( this ); myFolders = folders; myProject = project; myId = id; loadProvider( ); getProvider().init( this ); }
@Override protected void setUp() throws Exception { super.setUp(); source = new Object(); cs = new ChangeSupport(source); l = new MockChangeListener(); cs.addChangeListener(l); }
@SuppressWarnings("LeakingThisInConstructor") LogicalView(@NonNull final Project project, @NonNull final ProjectConvertor.Result result) { Parameters.notNull("project", project); //NOI18N Parameters.notNull("result", result); //NOI18N this.project = project; this.result = result; this.support = new ChangeSupport(this); this.eventSource = project.getLookup().lookupResult(LogicalViewProvider.class); this.eventSource.addLookupListener(WeakListeners.create(LookupListener.class, this, this.eventSource)); }
ResultImpl(@NonNull final Collection<? extends JavaPlatform> platforms) { Parameters.notNull("platforms", platforms); //NOI18N this.plaforms = platforms; for (JavaPlatform jp : this.plaforms) { jp.addPropertyChangeListener(WeakListeners.propertyChange(this, jp)); } this.support = new ChangeSupport(this); }
JavadocResult(@NullAllowed String groupId, @NullAllowed String artifactId, @NullAllowed String version, @NullAllowed String classifier, @NonNull URL binary, @NullAllowed File javadocJar, @NonNull Function<File, List<Coordinates>> coorProvider) { javadocJarFile = javadocJar; this.groupId = groupId; this.artifactId = artifactId; this.version = version; this.binary = binary; this.classifier = classifier; this.gav = MavenFileOwnerQueryImpl.cacheKey(groupId, artifactId, version); this.coorProvider = coorProvider; support = new ChangeSupport(this); mfoListener = new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { //external root in local repository changed.. checkChanges(); } }; projectListener = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { if (NbMavenProject.PROP_PROJECT.equals(event.getPropertyName())) { checkChanges(); } } }; javadocJarChangeListener = new FileChangeAdapter() { @Override public void fileDataCreated(FileEvent fe) { //source jar was created.. checkChanges(); } }; MavenFileOwnerQueryImpl.getInstance().addChangeListener( WeakListeners.create(ChangeListener.class, mfoListener, MavenFileOwnerQueryImpl.getInstance())); if (javadocJarFile != null) { FileUtil.addFileChangeListener(javadocJarChangeListener, javadocJarFile); } }
Nodes( @NonNull final Project project, @NonNull final ProcessorGeneratedSources procGenSrc, @NullAllowed final MultiModule sourceModules, @NullAllowed final MultiModule testModules, @NullAllowed final LibrariesSupport libsSupport) { Parameters.notNull("project", project); //NOI18N Parameters.notNull("procGenSrc", procGenSrc); this.project = project; this.procGenSrc = procGenSrc; this.sourceModules = sourceModules; this.testModules = testModules; this.libsSupport = libsSupport; this.listeners = new ChangeSupport(this); }
ResultImpl( @NonNull final PropertyEvaluator eval, @NonNull final String additionalCompilerOptionsProperty) { this.eval = eval; this.additionalCompilerOptionsProperty = additionalCompilerOptionsProperty; this.listeners = new ChangeSupport(this); this.eval.addPropertyChangeListener(this); }
ResultImpl( @NonNull final PropertyEvaluator eval, @NonNull final SourceRoots srcRoots, @NonNull final SourceRoots testRoots) { this.eval = eval; this.srcRoots = srcRoots; this.testRoots = testRoots; this.cs = new ChangeSupport(this); this.reenter = new ThreadLocal<>(); this.moduleInfoListeners = new HashSet<>(); }
ModuleInfoAccessibilityQueryImpl( @NullAllowed final SourceRoots sourceModules, @NonNull final SourceRoots sources, @NullAllowed final SourceRoots testModules, @NonNull final SourceRoots tests) { Parameters.notNull("sources", sources); //NOI18N Parameters.notNull("tests", tests); //NOI18N this.sourceModules = sourceModules; this.sources = sources; this.testModules = testModules; this.tests = tests; this.moduleInfoListeners = new HashSet<>(); this.listeners = new ChangeSupport(this); }
R( @NonNull final URI artefact, @NonNull final String jdocProperty, @NonNull final MultiModule modules, @NonNull final PropertyEvaluator evaluator, @NonNull final AntProjectHelper helper, @NonNull final String moduleName, @NonNull final String prop) { Parameters.notNull("artefact", artefact); //NOI18N Parameters.notNull("jdocProperty", jdocProperty); //NOI18N Parameters.notNull("modules", modules); //NOI18N Parameters.notNull("evaluator", evaluator); //NOI18N Parameters.notNull("helper", helper); //NOI18N Parameters.notNull("moduleName", moduleName); //NOI18N Parameters.notNull("prop", prop); //NOI18N this.artefact = artefact; this.jdocProperty = jdocProperty; this.modules = modules; this.evaluator = evaluator; this.helper = helper; this.moduleName = moduleName; this.prop = prop; this.listeners = new ChangeSupport(this); this.cache = new AtomicReference<>(); this.currentModuleExists = new AtomicBoolean(true); this.modules.addPropertyChangeListener(WeakListeners.propertyChange(this, this.modules)); this.evaluator.addPropertyChangeListener(WeakListeners.propertyChange(this, this.evaluator)); }
AddSubtaskPanel () { initComponents(); support = new ChangeSupport(this); qs = IssueQuickSearch.create(); qs.setChangeListener(this); GroupLayout layout = (GroupLayout) getLayout(); layout.replace(issuePanel, qs.getComponent()); }
/** Creates a new instance of JsfIndex */ private CssIndex(Project project) throws IOException { //QuerySupport now refreshes the roots indexes so it can held until the source roots are valid sourceRoots = QuerySupport.findRoots(project, null /* all source roots */, Collections.<String>emptyList(), Collections.<String>emptyList()); this.querySupport = QuerySupport.forRoots(CssIndexer.Factory.NAME, CssIndexer.Factory.VERSION, sourceRoots.toArray(new FileObject[]{})); this.changeSupport = new ChangeSupport(this); }
/** * Constructor * * @param lookup the associated lookup */ public NodeProvider(Lookup lookup) { this.lookup = lookup; changeSupport = new ChangeSupport(this); nodeSet = new TreeSet<Node>(new Comparator<Node>() { @Override public int compare(Node n1, Node n2) { return n1.getDisplayName().compareTo(n2.getDisplayName()); } }); }
@SuppressWarnings("LeakingThisInConstructor") public WhiteListImplementationMerged( @NonNull final Lookup.Result<WhiteListQueryImplementation> lr, @NonNull final FileObject file) { this.lr = lr; this.file = file; this.changeSupport = new ChangeSupport(this); this.lr.addLookupListener(WeakListeners.create(LookupListener.class, this, this.lr)); }
/** * Creates new form ResolveMissingRuntimePlatform */ private ResolveBrokenRuntimePlatform( @NonNull final Type type, @NonNull final Project prj, @NonNull final Union2<String,RuntimePlatformProblemsProvider.InvalidPlatformData> data) { Parameters.notNull("type", type); //NOI18N Parameters.notNull("prj", prj); //NOI18N Parameters.notNull("data", data); //NOI18N this.type = type; this.prj = prj; this.data = data; this.changeSupport = new ChangeSupport(this); initComponents(); platforms.setRenderer(new PlatformRenderer()); platforms.setModel(new DefaultComboBoxModel<JavaPlatform>()); updatePlatforms(); final ActionListener specificPlatformListener = new ActionListener() { @Override public void actionPerformed(@NullAllowed final ActionEvent e) { platforms.setEnabled(specificPlatform.isSelected()); create.setEnabled(specificPlatform.isSelected()); sourceLevelWarning.setEnabled(sourceLevel.isSelected()); changeSupport.fireChange(); } }; specificPlatform.addActionListener(specificPlatformListener); projectPlatform.addActionListener(specificPlatformListener); sourceLevel.addActionListener(specificPlatformListener); specificPlatformListener.actionPerformed(null); projectPlatform.setSelected(true); if (type == Type.MISSING_PLATFORM) { sourceLevel.setVisible(false); sourceLevelWarning.setVisible(false); } }
ResultImpl( @NonNull final FileObject artifact, @NonNull final Lookup lookup) { this.artifact = artifact; this.providers = lookup.lookupResult(CompilerOptionsQueryImplementation.class); this.listeners = new ChangeSupport(this); this.providers.addLookupListener(WeakListeners.create(LookupListener.class, this, providers)); checkProviders(); }
ProxyAction( @NonNull final URL root, @NonNull final Collection<CompileOnSaveAction> current, @NonNull final Lookup.Result<CompileOnSaveAction.Provider> eventSource) { this.root = root; this.active = new AtomicReference<>(current); this.listeners = new ChangeSupport(this); instances.addLookupListener(WeakListeners.create( LookupListener.class, this, instances)); getActions(ALL) .forEach((a) -> a.addChangeListener(WeakListeners.change(this, a))); }
private SymbolComparator( final boolean caseSensitive, final boolean preferOpPrjs) { this.caseSensitive = caseSensitive; this.preferOpPrjs = preferOpPrjs; this.support = new ChangeSupport(this); }
private FileComarator( final boolean usePreferred, final boolean caseSensitive, final boolean preferOpPrjs) { this.caseSensitive = caseSensitive; this.usePreferred = usePreferred; this.preferOpPrjs = preferOpPrjs; this.support = new ChangeSupport(this); }
ChainedFilter(@NonNull final Filter<T>... filters) { this.changeSupport = new ChangeSupport(this); this.filters = Arrays.asList(filters); for (Filter<T> filter : this.filters) { filter.addChangeListener(this); } }
private TypeComparator( final boolean caseSensitive, final boolean preferOpPrjs) { this.caseSensitive = caseSensitive; this.preferOpPrjs = preferOpPrjs; this.support = new ChangeSupport(this); }
/** Creates a new instance of JsfIndex */ private HtmlIndex(Project project) throws IOException { //QuerySupport now refreshes the roots indexes so it can held until the source roots are valid Collection<FileObject> sourceRoots = QuerySupport.findRoots(project, null /* all source roots */, Collections.<String>emptyList(), Collections.<String>emptyList()); this.querySupport = QuerySupport.forRoots(HtmlIndexer.Factory.NAME, HtmlIndexer.Factory.VERSION, sourceRoots.toArray(new FileObject[]{})); this.changeSupport = new ChangeSupport(this); }
public PluginVisualPanelPrimaryFiles( Project project, SourceGroupSupport sourceGroupSupport, ChangeSupport changeSupport ) { this.project = project; this.sourceGroupSupport = sourceGroupSupport; this.changeSupport = changeSupport; initComponents(); initComponents2(); }
ImportDataProviderAdapter(String id, String name, boolean dsRequired, Icon icon, ImportDataProvider delegate) { this.id = id; this.name = name; this.dsRequired = dsRequired; this.icon = icon; this.delegate = delegate; cs = new ChangeSupport(this); delegate.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { cs.fireChange(); } }); }
DefaultCompileOnSaveAction(@NonNull final URL root) { this.root = root; this.cs = new ChangeSupport(this); }
ClassParser() { this.changeSupport = new ChangeSupport(this); this.cpInfoListener = new ClasspathInfoListener(this.changeSupport, null); }
BinR( @NonNull final URL src) { this.src = src; this.listeners = new ChangeSupport(this); }
SrcR( @NonNull final URL bin) { this.bin = bin; this.listeners = new ChangeSupport(this); }
private R() { this.listeners = new ChangeSupport(this); }
public DocumentViewModel(FileObject file) { this.file = file; changeSupport = new ChangeSupport(this); needsRefresh = true; }
protected LibraryTypeRegistry () { this.changeSupport = new ChangeSupport(this); }