Package org.eclipse.php.formatter.ui.preferences

Examples of org.eclipse.php.formatter.ui.preferences.ProfileManager$Profile


      }

      if (profiles == null)
        profiles = new ArrayList<Profile>();

      return new ProfileManager(profiles, currContext);
    }
    return null;
  }
View Full Code Here


    PHPCoreTests.waitForIndexer();
    PHPCoreTests.waitForAutoBuild();

    IScopeContext scopeContext = InstanceScope.INSTANCE;
    ProfileManager profileManager = new ProfileManager(
        new ArrayList<Profile>(), scopeContext);
    profileManager.clearAllSettings(scopeContext);
    profileManager.commitChanges(scopeContext);

  }
View Full Code Here

    PHPCoreTests.waitForIndexer();
    PHPCoreTests.waitForAutoBuild();

    IScopeContext scopeContext = InstanceScope.INSTANCE;
    ProfileManager profileManager = new ProfileManager(
        new ArrayList<Profile>(), scopeContext);
    profileManager.clearAllSettings(scopeContext);
    profileManager.commitChanges(scopeContext);

  }
View Full Code Here

    PHPCoreTests.waitForIndexer();
    PHPCoreTests.waitForAutoBuild();

    IScopeContext scopeContext = InstanceScope.INSTANCE;
    ProfileManager profileManager = new ProfileManager(
        new ArrayList<Profile>(), scopeContext);
    profileManager.clearAllSettings(scopeContext);
    profileManager.commitChanges(scopeContext);

  }
View Full Code Here

    protected void setUp() throws Exception {
      setUpSuite();

      if (xmlFile != null) {
        scopeContext = InstanceScope.INSTANCE;
        profileManager = new ProfileManager(new ArrayList<Profile>(),
            scopeContext);

        // apply configuration to the formatter configuration
        // manager
        String abcolutXmlFilePath = null;
View Full Code Here

        result.setError(PacketError.Condition.bad_request);
        return result;
      }
     
      // We fetch the profile of the target user
      Profile profile = ProfileManager.getInstance().getProfile(sender.toBareJID(), target.toBareJID());
     
      // Prepare the result packet
      VCard4DomWriter writer = new DefaultVCard4DomWriter();
      DOMDocument domDocument = new DOMDocument();
      IQ result = IQ.createResultIQ(packet);
View Full Code Here

        return result;
      }

      // Parse the profile
      VCard4DomReader reader = new PersistentVCard4DomReader();
      Profile profile = reader.readProfile(new ElementAdapter(e_profile));
     
      // Commit the profile (this will also trigger the messages)
      try {
        ProfileManager.getInstance().publishProfile(sender.toBareJID(), profile);
      } catch (UserNotFoundException e) {
View Full Code Here

      public void onClick(ClickEvent event) {

        final VCard4Factory profileFactory = OswServiceFactory
            .getService().getProfileFactory();
        final Profile profile = profileFactory.profile();

        try {
          // prepare for updating and check for empty values
          if (avatarF.getAvatarUri().length() > 0)
            profile.addField(profileFactory.photo(avatarF.getAvatarUri()));
          if (displaynameF.getText().length() > 0)
            profile.addField(profileFactory.fullname(displaynameF.getText()));
          if (nameF.getFirstName().length() > 0 || nameF.getLastName().length() > 0)
            profile.addField(profileFactory.name(null, nameF.getFirstName(), nameF.getLastName(), null));
          if (birthdayF.getDate() != null)
            profile.addField(profileFactory.birthday(birthdayF.getDate()));
          if (genderF.getGenderText().length() > 0) {
            if (genderF.getGenderValue().equals(GenderField.Type.MALE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.MALE));
            } else if (genderF.getGenderValue().equals(GenderField.Type.FEMALE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.FEMALE));
            } else if (genderF.getGenderValue().equals(GenderField.Type.NOTKNOWN.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.NOTKNOWN));
            } else if (genderF.getGenderValue().equals(GenderField.Type.NOTAPPLICABLE.toString())) {
              profile.addField(profileFactory.gender(GenderField.Type.NOTAPPLICABLE));
            }
          }
          if (bioF.getText().length() > 0)
            profile.addField(profileFactory.note(bioF.getText()));
          if (emailF.getText().length() > 0)
            profile.addField(profileFactory.email(emailF.getText()));
          if (telF.getText().length() > 0)
            profile.addField(profileFactory.tel(telF.getText()));
          if (urlF.getText().length() > 0)
            profile.addField(profileFactory.url(urlF.getText()));
        } catch (CardinalityException e) {

        } catch (UnsupportedFieldException e) {

        }
View Full Code Here

TOP

Related Classes of org.eclipse.php.formatter.ui.preferences.ProfileManager$Profile

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.