Package net.sphene.goim.rcp.extensionpoints

Examples of net.sphene.goim.rcp.extensionpoints.IContactListView


      public void handleEvent(Event event) {
        System.out.println("Show Menu...");
        try {
          Object obj = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
          if(obj instanceof IContactListView) {
            final IContactListView listView = (IContactListView)obj;
            GOIMAccountList accountList = listView.getAccountList();
            if(accountList == null) {
              Menu accMenu = listView.getActiveAccountContextMenu(null);//.setVisible(true);
  //            menu.getParent().setMenu(accMenu);
  //            menu.setVisible(false);
              //accMenu.getItems();
  //            accMenu.setVisible(true);
              copyMenu(accMenu,menu);
            } else {
              for(GOIMAccount account : accountList) {
                final GOIMAccount acc = account;
                MenuItem accountItem = new MenuItem(menu,SWT.CASCADE);
                accountItem.setText(account.name + " (" + account.jid + ")");
               
                final Menu accountMenu = new Menu(accountItem);
                accountItem.setMenu(accountMenu);
                accountMenu.addListener(SWT.Show,new Listener() {
                  public void handleEvent(Event event) {
                    Menu accMenu = listView.getActiveAccountContextMenu(acc);
                    copyMenu(accMenu,accountMenu);
                  } });
                accountMenu.addListener(SWT.Hide,new Listener() {
                  public void handleEvent(Event event) {
                    for(MenuItem item : accountMenu.getItems()) {
View Full Code Here


          if(roster != null) {
            RosterEntry stats = roster.getEntry(STATSCONTACTJID);
            if(stats == null) {
              if(noStatsContactAdding) return;
              Shell parent = null;
              IContactListView contactList = GOIMPlugin.getDefault().getContactList(GOIMAccount.this);
              if(contactList != null)
                parent = contactList.getShell();
              Display display = (parent == null ? Display.getDefault() : parent.getDisplay());
              final Shell shellParent = parent;
              display.asyncExec(new Runnable() { public void run() {
                boolean answer = MessageDialog.openConfirm(shellParent,"Adding Stats Contact to Roster","Would you like to add " + STATSCONTACTJID + " to your roster (this will enable more advanced features, but will publish your status to the web)");
                if(answer)
View Full Code Here

    if(registeredContactLists.get(account) != part) return false;
    registeredContactLists.remove(account);
    return true;
  }
  public IContactListView getContactList(GOIMAccount account) {
    IContactListView contactList = registeredContactLists.get(account);
    if(contactList != null) return contactList;
    return registeredContactListOfAllAccounts;
  }
View Full Code Here

TOP

Related Classes of net.sphene.goim.rcp.extensionpoints.IContactListView

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.