Package at.bestsolution.efxclipse.runtime.demo.contacts

Examples of at.bestsolution.efxclipse.runtime.demo.contacts.Group


  public VCardContactsResource() {
    super(URI.createPlatformResourceURI("at.bestsolution.efxclipse.runtime.demo.contacts/vcards", false));
   
    try {
      Group rootGroup = ContactsFactory.eINSTANCE.createGroup();
      for (File file : getContacts()) {
        Contact contact = readFromVCard(file.getAbsolutePath());
        rootGroup.getContacts().add(contact);
      }
      getContents().add(rootGroup);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here


  @Inject
  ContactsManager contactsManager;

  @Execute
  void execute() {
    Group group = ContactsFactory.eINSTANCE.createGroup();
    group.setName("New Group");
    Command command = AddCommand.create(contactsManager.getEditingDomain(), contactsManager.getRootGroup(), ContactsPackage.Literals.GROUP__GROUPS, group);
    if (command != null && command.canExecute())
      contactsManager.getEditingDomain().getCommandStack().execute(command);
  }
View Full Code Here

    this.contactsManager = contactsManager;
  }

  @CanExecute
  public boolean canExecute(@Optional Object selectedItem) {
    Group group = null;

    if (selectedItem instanceof Contact)
      // get containing Group if selection is a Contact
      group = (Group) ((Contact) selectedItem).eContainer();
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.runtime.demo.contacts.Group

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.