本文整理汇总了Java中org.openide.util.ChangeSupport类的典型用法代码示例。如果您正苦于以下问题:Java ChangeSupport类的具体用法?Java ChangeSupport怎么用?Java ChangeSupport使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChangeSupport类属于org.openide.util包,在下文中一共展示了ChangeSupport类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: R
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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));
}
示例2: ResultImpl
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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<>();
}
示例3: R
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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));
}
示例4: R
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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));
}
示例5: CosAction
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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));
}
示例6: AttachmentsPanel
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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);
}
}
示例7: AttachmentPanel
import org.openide.util.ChangeSupport; //导入依赖的package包/类
public AttachmentPanel(AttachmentsPanel.NBBugzillaCallback nbCallback) {
this.nbCallback = nbCallback;
this.supp = new ChangeSupport(this);
initComponents();
setBackground( UIUtils.getSectionPanelBackground() );
initFileTypeCombo();
attachListeners();
}
示例8: ClasspathInfoListener
import org.openide.util.ChangeSupport; //导入依赖的package包/类
ClasspathInfoListener (
@NonNull final ChangeSupport changedSupport,
@NullAllowed final Runnable callBack) {
assert changedSupport != null;
this.changeSupport = changedSupport;
this.callBack = callBack;
}
示例9: TargetChooserPanel
import org.openide.util.ChangeSupport; //导入依赖的package包/类
public TargetChooserPanel(Project project, SourceGroup[] folders ,
T id )
{
myChangeSupport = new ChangeSupport( this );
myFolders = folders;
myProject = project;
myId = id;
loadProvider( );
getProvider().init( this );
}
示例10: setUp
import org.openide.util.ChangeSupport; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
source = new Object();
cs = new ChangeSupport(source);
l = new MockChangeListener();
cs.addChangeListener(l);
}
示例11: LogicalView
import org.openide.util.ChangeSupport; //导入依赖的package包/类
@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));
}
示例12: ResultImpl
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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);
}
示例13: JavadocResult
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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);
}
}
示例14: Nodes
import org.openide.util.ChangeSupport; //导入依赖的package包/类
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);
}
示例15: ResultImpl
import org.openide.util.ChangeSupport; //导入依赖的package包/类
ResultImpl(
@NonNull final PropertyEvaluator eval,
@NonNull final String additionalCompilerOptionsProperty) {
this.eval = eval;
this.additionalCompilerOptionsProperty = additionalCompilerOptionsProperty;
this.listeners = new ChangeSupport(this);
this.eval.addPropertyChangeListener(this);
}