本文整理了Java中org.eclipse.core.databinding.observable.value.WritableValue
类的一些代码示例,展示了WritableValue
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableValue
类的具体详情如下:
包路径:org.eclipse.core.databinding.observable.value.WritableValue
类名称:WritableValue
[英]Mutable (writable) implementation of IObservableValue that will maintain a value and fire change events when the value changes.
This class is thread safe. All state accessing methods must be invoked from the Realm#isCurrent(). Methods for adding and removing listeners may be invoked from any thread.
[中]IObservableValue的可变(可写)实现,它将维护一个值,并在值更改时触发更改事件。
这个类是线程安全的。必须从#isCurrent()领域调用所有状态访问方法。可以从任何线程调用添加和删除侦听器的方法。
代码示例来源:origin: org.eclipse.fx/org.eclipse.core.databinding.observable
/**
* @param elementType can be <code>null</code>
* @return new instance with the default realm and a value of <code>null</code>
*/
public static WritableValue withValueType(Object elementType) {
return new WritableValue(Realm.getDefault(), null, elementType);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.databinding
@Override
public void run() {
validationStatusObservable.setValue(status);
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.databinding
private void setValidationStatus(final IStatus status) {
validationStatusObservable.getRealm().exec(() -> validationStatusObservable.setValue(status));
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.core.di.context
final WritableValue w = new WritableValue(r);
w.setValue(sourceObject.getValue());
w.addValueChangeListener( event -> sourceObject.publish(event.diff.getNewValue()));
sourceObject.subscribeOnValueChange( value -> w.setValue(value));
sourceObject.subscribeOnDispose(value -> w.dispose());
return w;
代码示例来源:origin: org.eclipse.fx/org.eclipse.core.databinding
private void setValidationStatus(final IStatus status) {
validationStatusObservable.getRealm().exec(new Runnable() {
public void run() {
validationStatusObservable.setValue(status);
}
});
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.databinding
private void setValidationStatus(final IStatus status) {
validationStatusObservable.getRealm().exec(new Runnable() {
@Override
public void run() {
validationStatusObservable.setValue(status);
}
});
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.databinding
@Override
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue(context
.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor
@Override
public void handleChange ( final ChangeEvent event )
{
ConfigurationEditorInput.this.dirtyValue.setValue ( true );
}
} );
代码示例来源:origin: org.eclipse.fx/org.eclipse.core.databinding
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue(context
.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor
public void insertEntry ( final String key, final String value )
{
this.dataMap.put ( key, value );
this.dirtyValue.setValue ( true );
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.databinding
@Override
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue(context
.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor
public void deleteEntry ( final String key )
{
this.dataMap.remove ( key );
this.dirtyValue.setValue ( true );
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.databinding
@Override
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue(context
.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.recommenders.completion.rcp/calls
@Override
public void selectionChanged(final SelectionChangedEvent event) {
final Optional<Tuple<ClasspathEntryInfo, ModelArchiveMetadata<?, ?>>> e = RCPUtils.first(event
.getSelection());
mValue.setValue(e.get().getSecond());
rValue.setValue(e.get().getFirst());
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.databinding
@Override
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue<>(
context.getValidationRealm(), Status.OK_STATUS,
IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor
public void updateEntry ( final String oldKey, final String key, final String value )
{
this.dataMap.setStale ( true );
this.dataMap.remove ( oldKey );
this.dataMap.put ( key, value );
this.dataMap.setStale ( false );
this.dirtyValue.setValue ( true );
}
代码示例来源:origin: org.eclipse.fx/org.eclipse.core.databinding
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue(context
.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor
protected void setResult ( final ConfigurationInformation configurationInformation )
{
this.dataMap.setStale ( true );
this.dataMap.clear ();
if ( configurationInformation != null )
{
this.dataMap.putAll ( configurationInformation.getData () );
}
this.dataMap.setStale ( false );
this.dirtyValue.setValue ( false );
}
代码示例来源:origin: org.eclipse.fx/org.eclipse.core.databinding
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue(context
.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.databinding
@Override
protected void preInit() {
ObservableTracker.setIgnore(true);
try {
validationStatusObservable = new WritableValue<>(
context.getValidationRealm(), Status.OK_STATUS, IStatus.class);
} finally {
ObservableTracker.setIgnore(false);
}
}
内容来源于网络,如有侵权,请联系作者删除!