Package org.eclipse.ecf.presence.im

Examples of org.eclipse.ecf.presence.im.IChatMessage$Type


        getClient(1).getConnectedID(), sendthreadid,
        IChatMessage.Type.CHAT, "subject1", "uvwxyz", sendprops);
    sleep(SLEEPTIME);

    assertHasEvent(receivedChatMessages, IChatMessage.class);
    final IChatMessage message = (IChatMessage) receivedChatMessages.get(0);
    // For some reason, the smack library doesn't seem to get this right.
    // assertTrue(message.getThreadID().equals(sendthreadid));
    assertTrue(message.getSubject().equals("subject1"));
    assertTrue(message.getBody().equals("uvwxyz"));
    assertTrue(message.getType().equals(IChatMessage.Type.CHAT));
    final Map props = message.getProperties();
    assertNotNull(props);
    assertTrue(props.size() == 1);
    final String val = (String) props.get("prop1");
    assertNotNull(val);
    assertEquals(val, "this");
View Full Code Here


        getClient(1).getConnectedID(), null, IChatMessage.Type.CHAT,
        null, null, sendprops);
    sleep(SLEEPTIME);

    assertHasEvent(receivedChatMessages, IChatMessage.class);
    final IChatMessage message = (IChatMessage) receivedChatMessages.get(0);
    assertNull(message.getSubject());
    assertTrue(message.getBody().equals(""));
    assertTrue(message.getType().equals(IChatMessage.Type.CHAT));
    final Map props = message.getProperties();
    assertNotNull(props);
    assertTrue(props.size() == 1);
    final String val = (String) props.get("prop2");
    assertNotNull(val);
    assertEquals(val, "that");
View Full Code Here

      e.printStackTrace();
    }
  }

  private void displayMessage(IChatMessageEvent e) {
    final IChatMessage message = e.getChatMessage();
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
        MessagesView view = (MessagesView) workbench.getActiveWorkbenchWindow().getActivePage().findView(MessagesView.VIEW_ID);
        if (view != null) {
          final IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view.getSite().getAdapter(IWorkbenchSiteProgressService.class);
          view.openTab(icms, itms, targetID, message.getFromID());
          view.showMessage(message);
          service.warnOfContentChange();
        } else {
          try {
            final IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
            view = (MessagesView) page.showView(MessagesView.VIEW_ID, null, IWorkbenchPage.VIEW_CREATE);
            if (!page.isPartVisible(view)) {
              final IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view.getSite().getAdapter(IWorkbenchSiteProgressService.class);
              service.warnOfContentChange();
            }
            view.openTab(icms, itms, targetID, message.getFromID());
            view.showMessage(message);
          } catch (final PartInitException e) {
            e.printStackTrace();
          }
        }
View Full Code Here

    sender = presence.getChatManager().getChatMessageSender();
    // Setup message requestListener to handle incoming messages
    presence.getChatManager().addMessageListener(new IIMMessageListener() {
      public void handleMessageEvent(IIMMessageEvent messageEvent) {
        if (messageEvent instanceof IChatMessageEvent) {
          final IChatMessage m = ((IChatMessageEvent) messageEvent).getChatMessage();
          receiver.handleMessage(m);
        }
      }
    });
  }
View Full Code Here

      presence.getChatManager().addMessageListener(
          new IIMMessageListener() {
            public void handleMessageEvent(
                IIMMessageEvent messageEvent) {
              if (messageEvent instanceof IChatMessageEvent) {
                IChatMessage m = ((IChatMessageEvent) messageEvent)
                    .getChatMessage();
                if (receiver != null) {
                  receiver.handleMessage(m);
                }
              }
View Full Code Here

                    type,
                    MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR,
                    true);
            if (modelElement instanceof Type)
            {
                Type element = (Type)modelElement;
                final Property property = umlClass.createOwnedAttribute(
                        name,
                        element,
                        1,
                        1);
View Full Code Here

        }
        boolean isEntityAssociation = true;
        for (Iterator ends = ((Association)this.metaObject).getMemberEnds().iterator(); ends.hasNext();)
        {
            final Property prop = (Property)ends.next();
            final Type propertyType = prop.getType();
            if (propertyType == null || !UmlUtilities.containsStereotype(
                    propertyType,
                    UMLProfile.STEREOTYPE_ENTITY))
            {
                isEntityAssociation = false;
View Full Code Here

        ElementaryDataItem edi = (ElementaryDataItem)level01.getDataItems()[i];
        String attrName = edi.getDataName();
        DataField dataField = (DataField)edi.interpret();
        if (dataField != null) {
          Property attr = (Property)attrs.get(attrName);
          Type type = dataField.getType() == Integer.class ? integerType : stringType;
          if (attr == null) {
            String timestampFormat = "";
            String dateFormat = "";
            String length = "" + dataField.getLength();
            String fraction = "" + dataField.getFraction();
View Full Code Here

            m.visitCode();

            int index=1;
            m.visitVarInsn(ALOAD,0);
            for (Class param : c.getParameterTypes()) {
                Type t = Type.getType(param);
                m.visitVarInsn(t.getOpcode(ILOAD), index);
                index += t.getSize();
            }
            m.visitMethodInsn(INVOKESPECIAL, Type.getInternalName(base), "<init>", methodDescriptor);
            m.visitInsn(RETURN);
            m.visitMaxs(index,index);
            m.visitEnd();
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.presence.im.IChatMessage$Type

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.