Search in sources :

Example 1 with Transient

use of com.intellij.util.xmlb.annotations.Transient in project intellij-community by JetBrains.

the class Course method setAuthorsAsString.

@Transient
public void setAuthorsAsString(String[] authors) {
    this.authors = new ArrayList<>();
    for (String name : authors) {
        final List<String> firstLast = StringUtil.split(name, " ");
        if (!firstLast.isEmpty()) {
            final StepicUser stepicUser = new StepicUser();
            stepicUser.setFirstName(firstLast.remove(0));
            if (firstLast.size() > 0) {
                stepicUser.setLastName(StringUtil.join(firstLast, " "));
            }
            this.authors.add(stepicUser);
        }
    }
}
Also used : StepicUser(com.jetbrains.edu.learning.stepic.StepicUser) Transient(com.intellij.util.xmlb.annotations.Transient)

Example 2 with Transient

use of com.intellij.util.xmlb.annotations.Transient in project intellij-community by JetBrains.

the class ProjectDictionaryState method setProjectDictionary.

@Transient
public void setProjectDictionary(ProjectDictionary projectDictionary) {
    dictionaryStates.clear();
    Set<EditableDictionary> projectDictionaries = projectDictionary.getDictionaries();
    if (projectDictionaries != null) {
        for (EditableDictionary dic : projectDictionary.getDictionaries()) {
            dictionaryStates.add(new DictionaryState(dic));
        }
    }
}
Also used : EditableDictionary(com.intellij.spellchecker.dictionary.EditableDictionary) Transient(com.intellij.util.xmlb.annotations.Transient)

Example 3 with Transient

use of com.intellij.util.xmlb.annotations.Transient in project intellij-plugins by JetBrains.

the class LibraryBundlificationRule method getAdditionalPropertiesMap.

/**
   * Returns a map with properties to be added to the bundle manifest definition of all libraries which this rule applies to.
   */
@Transient
public Map<String, String> getAdditionalPropertiesMap() {
    try {
        Properties p = new Properties();
        p.load(new ByteArrayInputStream(myAdditionalProperties.getBytes(CharsetToolkit.UTF8_CHARSET)));
        Map<String, String> result = ContainerUtil.newHashMap();
        for (Map.Entry<Object, Object> entry : p.entrySet()) {
            result.put(String.valueOf(entry.getKey()), String.valueOf(entry.getValue()));
        }
        return result;
    } catch (IOException ignored) {
    }
    return Collections.emptyMap();
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) IOException(java.io.IOException) Properties(java.util.Properties) Map(java.util.Map) Transient(com.intellij.util.xmlb.annotations.Transient)

Aggregations

Transient (com.intellij.util.xmlb.annotations.Transient)3 EditableDictionary (com.intellij.spellchecker.dictionary.EditableDictionary)1 StepicUser (com.jetbrains.edu.learning.stepic.StepicUser)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 Map (java.util.Map)1 Properties (java.util.Properties)1