本文整理汇总了Java中org.eclipse.core.runtime.preferences.IEclipsePreferences.removeNodeChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java IEclipsePreferences.removeNodeChangeListener方法的具体用法?Java IEclipsePreferences.removeNodeChangeListener怎么用?Java IEclipsePreferences.removeNodeChangeListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.runtime.preferences.IEclipsePreferences
的用法示例。
在下文中一共展示了IEclipsePreferences.removeNodeChangeListener方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeNodeListeners
import org.eclipse.core.runtime.preferences.IEclipsePreferences; //导入方法依赖的package包/类
protected void removeNodeListeners() {
for (IScopeContext scopeContext : SCOPE_CONTEXTS) {
try {
IEclipsePreferences node = scopeContext.getNode("");
node.removeNodeChangeListener(nodeListener);
node.accept((curNode) -> {
curNode.removePreferenceChangeListener(changeListener);
return true;
});
} catch (BackingStoreException e) {
PrefEditorPlugin.log(e);
}
}
}
示例2: endRecording
import org.eclipse.core.runtime.preferences.IEclipsePreferences; //导入方法依赖的package包/类
/**
* Ends the recording process. No other changes to the preference tree are
* recorded after this method is called.
*
* @throws IllegalStateException if {@code startRecording()} had not been
* previously called, or if recording has already completed on this
* object.
*/
public void endRecording() {
synchronized (lock) {
Preconditions.checkState(currState == State.RECORDING, "Recorder object is not currently recording");
currState = State.COMPLETE;
for (IEclipsePreferences node : recordedNodes) {
node.removeNodeChangeListener(listener);
node.removePreferenceChangeListener(listener);
}
recordedNodes.clear();
}
}
示例3: disposeNodeChangeListener
import org.eclipse.core.runtime.preferences.IEclipsePreferences; //导入方法依赖的package包/类
/**
* Dispose the node change listener.
*/
private void disposeNodeChangeListener() {
if (nodeChangeListener != null) {
IEclipsePreferences preferences = getStorePreferences();
if (preferences == null) {
return;
}
IEclipsePreferences parent = (IEclipsePreferences) preferences.parent();
if (parent == null)
return;
parent.removeNodeChangeListener(nodeChangeListener);
nodeChangeListener = null;
}
}