本文整理了Java中org.eclipse.core.databinding.observable.set.WritableSet
类的一些代码示例,展示了WritableSet
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableSet
类的具体详情如下:
包路径:org.eclipse.core.databinding.observable.set.WritableSet
类名称:WritableSet
[英]Mutable (writable) implementation of IObservableSet.
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.
[中]IObservableSet的可变(可写)实现。
这个类是线程安全的。必须从#isCurrent()领域调用所有状态访问方法。可以从任何线程调用添加和删除侦听器的方法。
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
public TreeNodeImpl ( final Realm realm, final TreeNode parentNode, final String name )
{
this.parentNode = parentNode;
this.name = name;
this.children = new WritableSet ( realm );
this.connections = new WritableSet ( realm );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.client.dataitem.details
@Override
public void dispose ()
{
this.entries.dispose ();
super.dispose ();
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@Override
public boolean add ( final Object o )
{
return this.data.add ( o );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
public void dispose ()
{
this.connectionHolders.clear ();
this.connectionHolders.dispose ();
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@Override
public synchronized void folderChanged ( final Collection<Entry> added, final Collection<String> removed, final boolean full )
{
if ( this.data.isDisposed () )
{
logger.debug ( "Folder already disposed" );
return;
}
this.data.getRealm ().asyncExec ( new Runnable () {
@Override
public void run ()
{
handleChange ( added, removed, full );
}
} );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
private void createDiscoverers ()
final WritableSet resultDiscoverers = new WritableSet ( DisplayRealm.getRealm ( getWorkbench ().getDisplay () ) );
final WritableSet resultStores = new WritableSet ( DisplayRealm.getRealm ( getWorkbench ().getDisplay () ) );
resultDiscoverers.add ( bean );
resultStores.add ( bean );
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
private synchronized void handleChange ( final Collection<Entry> added, final Collection<String> removed, final boolean full )
if ( this.data.isDisposed () )
this.data.setStale ( true );
this.data.clear ();
if ( entry != null )
this.data.remove ( entry );
if ( oldEntry != null )
this.data.remove ( oldEntry );
this.data.add ( newEntry );
this.data.setStale ( false );
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
protected void handleDiscoveryUpdate ( final ConnectionDescriptor[] added, final ConnectionDescriptor[] removed )
{
if ( removed != null )
{
for ( final ConnectionDescriptor info : removed )
{
final ConnectionHolder holder = this.connections.remove ( info );
if ( holder != null )
{
this.knownConnections.remove ( holder );
holder.dispose ();
}
}
}
if ( added != null )
{
for ( final ConnectionDescriptor info : added )
{
final ConnectionHolder holder = new ConnectionHolder ( this, info );
this.knownConnections.add ( holder );
this.connections.put ( info, holder );
}
}
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection.login
this.dataSet.setStale ( true );
this.dataSet.remove ( entry );
this.dataSet.add ( entry );
this.dataSet.setStale ( false );
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
protected void removePath ( final List<String> path, final ConnectionHolder holder )
{
if ( path.isEmpty () )
{
// remove
this.implNode.getConnections ().remove ( holder );
if ( this.implNode.getConnections ().isEmpty () && this.parentNode != null )
{
this.parentNode.notifyEmpty ( this, this.implNode.getName () );
}
}
else
{
// pass on
final String name = path.remove ( 0 );
final GroupChildNode child = this.children.get ( name );
if ( child != null )
{
child.removePath ( path, holder );
}
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@Override
public void clear ()
{
this.data.clear ();
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@Override
public boolean remove ( final Object o )
{
return this.data.remove ( o );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
@Override
public void handleSetChange ( final SetChangeEvent event )
{
this.implNode.getConnections ().removeAll ( event.diff.getRemovals () );
this.implNode.getConnections ().addAll ( event.diff.getAdditions () );
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@Override
public Realm getRealm ()
{
return this.data.getRealm ();
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@SuppressWarnings ( "rawtypes" )
@Override
public boolean addAll ( final Collection c )
{
return this.data.addAll ( c );
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@Override
public boolean isEmpty ()
{
return this.data.isEmpty ();
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.connection
@SuppressWarnings ( "rawtypes" )
@Override
public boolean removeAll ( final Collection c )
{
return this.data.removeAll ( c );
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
private void createDiscoverers ()
final WritableSet resultDiscoverers = new WritableSet ( DisplayRealm.getRealm ( getWorkbench ().getDisplay () ) );
final WritableSet resultStores = new WritableSet ( DisplayRealm.getRealm ( getWorkbench ().getDisplay () ) );
resultDiscoverers.add ( bean );
resultStores.add ( bean );
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
public void dispose ()
{
this.connectionHolders.clear ();
this.connectionHolders.dispose ();
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.core.ui.connection
protected void handleDiscoveryUpdate ( final ConnectionDescriptor[] added, final ConnectionDescriptor[] removed )
{
if ( removed != null )
{
for ( final ConnectionDescriptor info : removed )
{
final ConnectionHolder holder = this.connections.remove ( info );
if ( holder != null )
{
this.knownConnections.remove ( holder );
holder.dispose ();
}
}
}
if ( added != null )
{
for ( final ConnectionDescriptor info : added )
{
final ConnectionHolder holder = new ConnectionHolder ( this, info );
this.knownConnections.add ( holder );
this.connections.put ( info, holder );
}
}
}
内容来源于网络,如有侵权,请联系作者删除!