Package org.eclipse.sapphire.samples.contacts

Examples of org.eclipse.sapphire.samples.contacts.ContactRepository


    }
   
    private void refreshEnablementState()
    {
        final String name = ( (Value<?>) this.property ).text();
        final ContactRepository cdb = this.property.element().nearest( ContactRepository.class );
       
        boolean enabled;
       
        if( name == null )
        {
            enabled = false;
        }
        else
        {
            enabled = true;
           
            for( Contact contact : cdb.getContacts() )
            {
                if( name.equals( contact.getName().text() ) )
                {
                    enabled = false;
                    break;
View Full Code Here


    @Override
    protected Object run( final Presentation context )
    {
        final String name = ( (Value<?>) this.property ).text();
        final ContactRepository cdb = this.property.element().nearest( ContactRepository.class );
       
        final Contact newContact = cdb.getContacts().insert();
        newContact.setName( name );
       
        return null;
    }
View Full Code Here

    {
        final org.eclipse.sapphire.samples.calendar.ICalendar calendarModel
            = org.eclipse.sapphire.samples.calendar.ICalendar.TYPE.instantiate( file );
       
        final IFile contactsFile = file.getParent().getFile( new Path( "contacts.xml" ) );
        final ContactRepository contactsModel = ContactRepository.TYPE.instantiate( contactsFile );
       
        return new CalendarResource( calendarModel, contactsModel );
    }
View Full Code Here

    protected void compute( final Set<String> values )
    {
        values.add( "Personal" );
       
        final Contact c = context( Contact.class );
        final ContactRepository cdb = c.nearest( ContactRepository.class );
       
        if( cdb != null )
        {
            for( Contact contact : cdb.getContacts() )
            {
                if( contact != c )
                {
                    values.add( contact.getCategory().text( true ) );
                }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.samples.contacts.ContactRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.