Java Code Examples for org.eclipse.ui.services.IEvaluationService#addEvaluationListener()

The following examples show how to use org.eclipse.ui.services.IEvaluationService#addEvaluationListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractViewInstance.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
private void attachVisibleExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getVisibleExpression () != null )
    {
        this.visibileRef = evaluationService.addEvaluationListener ( descriptor.getVisibleExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_VISIBLE.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setVisibleState ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_VISIBLE );
    }
    else
    {
        setVisibleState ( true );
    }
}
 
Example 2
Source File: AbstractViewInstance.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
private void attachLazyExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getLazyExpression () != null )
    {
        this.lazyRef = evaluationService.addEvaluationListener ( descriptor.getLazyExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_LAZY.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setLazy ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_LAZY );
    }
    else
    {
        setLazy ( false );
    }
}
 
Example 3
Source File: AbstractViewInstance.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
private void attachDefaultInstanceExpression ( final ViewInstanceDescriptor descriptor, final IEvaluationService evaluationService )
{
    if ( descriptor.getDefaultInstanceExpression () != null )
    {
        this.defaultInstanceRef = evaluationService.addEvaluationListener ( descriptor.getDefaultInstanceExpression (), new IPropertyChangeListener () {

            @Override
            public void propertyChange ( final PropertyChangeEvent event )
            {
                if ( PROP_DEFAULT_INSTANCE.equals ( event.getProperty () ) && event.getNewValue () instanceof Boolean )
                {
                    setDefaultInstance ( (Boolean)event.getNewValue () );
                }
            }
        }, PROP_DEFAULT_INSTANCE );
    }
    else
    {
        setDefaultInstance ( descriptor.isDefaultInstance () );
    }
}