com.intellij.util.xmlb.XmlSerializerUtil Java Examples

The following examples show how to use com.intellij.util.xmlb.XmlSerializerUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FindInProjectSettingsBase.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
public void loadState(FindInProjectSettingsBase state) {
  XmlSerializerUtil.copyBean(state, this);
  //Avoid duplicates
  LinkedHashSet<String> tmp = new LinkedHashSet<>(findStrings);
  findStrings.clear();
  findStrings.addAll(tmp);

  tmp.clear();
  tmp.addAll(replaceStrings);
  replaceStrings.clear();
  replaceStrings.addAll(tmp);

  tmp.clear();
  tmp.addAll(dirStrings);
  dirStrings.clear();
  dirStrings.addAll(tmp);
}
 
Example #2
Source File: HttpConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public HttpConfigurable getState() {
  CommonProxy.isInstalledAssertion();

  HttpConfigurable state = new HttpConfigurable();
  XmlSerializerUtil.copyBean(this, state);
  if (!KEEP_PROXY_PASSWORD) {
    removeSecure("proxy.password");
  }
  correctPasswords(state);
  return state;
}
 
Example #3
Source File: HttpConfigurable.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void loadState(@Nonnull HttpConfigurable state) {
  XmlSerializerUtil.copyBean(state, this);
  if (!KEEP_PROXY_PASSWORD) {
    removeSecure("proxy.password");
  }
  correctPasswords(this);
}
 
Example #4
Source File: AutoSyncSettings.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Override
public void loadState(AutoSyncSettings state) {
  XmlSerializerUtil.copyBean(state, this);

  // temporary migration code. Load order guaranteed by plugin xml.
  // TODO(brendandouglas): Remove migration code in August 2019
  BlazeUserSettings settings = BlazeUserSettings.getInstance();
  migrateOldSettings(settings.getResyncAutomatically(), settings.getResyncOnProtoChanges());
}
 
Example #5
Source File: NoSqlConfiguration.java    From nosql4idea with Apache License 2.0 4 votes vote down vote up
public void loadState(NoSqlConfiguration noSqlConfiguration) {
    XmlSerializerUtil.copyBean(noSqlConfiguration, this);
}
 
Example #6
Source File: CertificateManager.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(Config state) {
  XmlSerializerUtil.copyBean(state, myConfig);
}
 
Example #7
Source File: CodeStyleSchemesUIConfiguration.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(CodeStyleSchemesUIConfiguration state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #8
Source File: BackgroundChibiCharaApplicationSettings.java    From intellij-background-chibichara with MIT License 4 votes vote down vote up
@Override
public void loadState(BackgroundChibiCharaSettings settings) {
    XmlSerializerUtil.copyBean(settings, mySettings);
}
 
Example #9
Source File: Settings.java    From jscs-plugin with MIT License 4 votes vote down vote up
@Override
public void loadState(Settings state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #10
Source File: HaxeSdkData.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
public void loadState(HaxeSdkData state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #11
Source File: AwesomeConsoleConfig.java    From intellij-awesome-console with MIT License 4 votes vote down vote up
@Override
public void loadState(@NotNull final AwesomeConsoleConfig state) {
	XmlSerializerUtil.copyBean(state, this);
}
 
Example #12
Source File: ProjectSettings.java    From EclipseCodeFormatter with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(ProjectSettings state) {
	XmlSerializerUtil.copyBean(state, this);
}
 
Example #13
Source File: Settings.java    From PhpMetrics-jetbrains with MIT License 4 votes vote down vote up
@Override
public void loadState(Settings settings) {
    XmlSerializerUtil.copyBean(settings, this);
}
 
Example #14
Source File: XQueryRunVariable.java    From intellij-xquery with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(XQueryRunVariable state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #15
Source File: SvnToolBoxProjectState.java    From SVNToolBox with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(SvnToolBoxProjectState state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #16
Source File: XQueryDataSourcesSettings.java    From intellij-xquery with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(XQueryDataSourcesSettings state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #17
Source File: UISettings.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(UISettings object) {
  XmlSerializerUtil.copyBean(object, this);

  // Check tab placement in editor
  if (EDITOR_TAB_PLACEMENT != PLACEMENT_EDITOR_TAB_NONE &&
      EDITOR_TAB_PLACEMENT != PLACEMENT_EDITOR_TAB_TOP &&
      EDITOR_TAB_PLACEMENT != PLACEMENT_EDITOR_TAB_LEFT &&
      EDITOR_TAB_PLACEMENT != PLACEMENT_EDITOR_TAB_BOTTOM &&
      EDITOR_TAB_PLACEMENT != PLACEMENT_EDITOR_TAB_RIGHT) {
    EDITOR_TAB_PLACEMENT = PLACEMENT_EDITOR_TAB_TOP;
  }

  // Check that alpha delay and ratio are valid
  if (ALPHA_MODE_DELAY < 0) {
    ALPHA_MODE_DELAY = 1500;
  }
  if (ALPHA_MODE_RATIO < 0.0f || ALPHA_MODE_RATIO > 1.0f) {
    ALPHA_MODE_RATIO = 0.5f;
  }

  setSystemFontFaceAndSize();
  // 1. Sometimes system font cannot display standard ASCII symbols. If so we have
  // find any other suitable font withing "preferred" fonts first.
  boolean fontIsValid = isValidFont(new Font(FONT_FACE, Font.PLAIN, FONT_SIZE));
  if (!fontIsValid) {
    @NonNls final String[] preferredFonts = {"dialog", "Arial", "Tahoma"};
    for (String preferredFont : preferredFonts) {
      if (isValidFont(new Font(preferredFont, Font.PLAIN, FONT_SIZE))) {
        FONT_FACE = preferredFont;
        fontIsValid = true;
        break;
      }
    }

    // 2. If all preferred fonts are not valid in current environment
    // we have to find first valid font (if any)
    if (!fontIsValid) {
      String[] fontNames = UIUtil.getValidFontNames(false);
      if (fontNames.length > 0) {
        FONT_FACE = fontNames[0];
      }
    }
  }

  if (MAX_CLIPBOARD_CONTENTS <= 0) {
    MAX_CLIPBOARD_CONTENTS = 5;
  }

  fireUISettingsChanged();
}
 
Example #18
Source File: PhpToolboxApplicationService.java    From idea-php-toolbox with MIT License 4 votes vote down vote up
@Override
public void loadState(PhpToolboxApplicationService applicationService) {
    XmlSerializerUtil.copyBean(applicationService, this);
}
 
Example #19
Source File: ProtobufSettings.java    From protobuf-jetbrains-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(ProtobufSettings state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #20
Source File: DuplocatorSettings.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(@Nonnull DuplocatorSettings object) {
  XmlSerializerUtil.copyBean(object, this);
}
 
Example #21
Source File: GeneralSettings.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(GeneralSettings state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #22
Source File: CrucibleSettings.java    From Crucible4IDEA with MIT License 4 votes vote down vote up
@Override
public void loadState(CrucibleSettings state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #23
Source File: BlazeJavaUserSettings.java    From intellij with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(BlazeJavaUserSettings state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #24
Source File: Settings.java    From WebStormRequireJsPlugin with MIT License 4 votes vote down vote up
@Override
public void loadState(Settings state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #25
Source File: ProblemsViewConfiguration.java    From intellij with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(final ProblemsViewConfiguration state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #26
Source File: Settings.java    From idea-php-annotation-plugin with MIT License 4 votes vote down vote up
@Override
public void loadState(@NotNull Settings settings) {
    XmlSerializerUtil.copyBean(settings, this);
}
 
Example #27
Source File: RefactoringSettings.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(final RefactoringSettings state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #28
Source File: ArchivePackagingElement.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(ArtifactManager artifactManager, ArchivePackagingElement state) {
  XmlSerializerUtil.copyBean(state, this);
}
 
Example #29
Source File: CamelPreferenceService.java    From camel-idea-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(CamelPreferenceService state) {
    XmlSerializerUtil.copyBean(state, this);
}
 
Example #30
Source File: ProjectViewSharedSettings.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void loadState(@Nonnull ProjectViewSharedSettings state) {
  XmlSerializerUtil.copyBean(state, this);
}