当前位置: 首页>>代码示例>>Java>>正文


Java SaveSchemeDialog类代码示例

本文整理汇总了Java中com.intellij.application.options.SaveSchemeDialog的典型用法代码示例。如果您正苦于以下问题:Java SaveSchemeDialog类的具体用法?Java SaveSchemeDialog怎么用?Java SaveSchemeDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SaveSchemeDialog类属于com.intellij.application.options包,在下文中一共展示了SaveSchemeDialog类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onSaveAs

import com.intellij.application.options.SaveSchemeDialog; //导入依赖的package包/类
private void onSaveAs() {
  if (mySchemesTableModel.isProjectScheme(getSelectedScheme())) {
    int rowToSelect = mySchemesTableModel.exportProjectScheme();
    if (rowToSelect > 0) {
      mySchemesTable.getSelectionModel().setSelectionInterval(rowToSelect, rowToSelect);
    }
  }
  else {
    CodeStyleScheme[] schemes = CodeStyleSchemes.getInstance().getSchemes();
    ArrayList<String> names = new ArrayList<String>();
    for (CodeStyleScheme scheme : schemes) {
      names.add(scheme.getName());
    }
    String selectedName = getSelectedScheme().getName();
    SaveSchemeDialog saveDialog =
      new SaveSchemeDialog(myParent, ApplicationBundle.message("title.save.code.style.scheme.as"), names, selectedName);
    if (saveDialog.showAndGet()) {
      int row = mySchemesTableModel.createNewScheme(getSelectedScheme(), saveDialog.getSchemeName());
      mySchemesTable.getSelectionModel().setSelectionInterval(row, row);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ManageCodeStyleSchemesDialog.java

示例2: onSaveAs

import com.intellij.application.options.SaveSchemeDialog; //导入依赖的package包/类
private void onSaveAs() {
  if (mySchemesTableModel.isProjectScheme(getSelectedScheme())) {
    int rowToSelect = mySchemesTableModel.exportProjectScheme();
    if (rowToSelect > 0) {
      mySchemesTable.getSelectionModel().setSelectionInterval(rowToSelect, rowToSelect);
    }
  }
  else {
    CodeStyleScheme[] schemes = CodeStyleSchemes.getInstance().getSchemes();
    ArrayList<String> names = new ArrayList<String>();
    for (CodeStyleScheme scheme : schemes) {
      names.add(scheme.getName());
    }
    SaveSchemeDialog saveDialog = new SaveSchemeDialog(myParent, ApplicationBundle.message("title.save.code.style.scheme.as"), names);
    saveDialog.show();
    if (saveDialog.isOK()) {
      int row = mySchemesTableModel.createNewScheme(getSelectedScheme(), saveDialog.getSchemeName());
      mySchemesTable.getSelectionModel().setSelectionInterval(row, row);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:ManageCodeStyleSchemesDialog.java

示例3: showSaveAsDialog

import com.intellij.application.options.SaveSchemeDialog; //导入依赖的package包/类
private void showSaveAsDialog() {
  List<String> names = ContainerUtil.newArrayList(myOptions.getSchemeNames());
  String selectedName = myOptions.getSelectedScheme().getName();
  SaveSchemeDialog dialog = new SaveSchemeDialog(this, ApplicationBundle.message("title.save.color.scheme.as"), names, selectedName);
  if (dialog.showAndGet()) {
    myOptions.saveSchemeAs(dialog.getSchemeName());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SchemesPanel.java

示例4: showSaveAsDialog

import com.intellij.application.options.SaveSchemeDialog; //导入依赖的package包/类
private void showSaveAsDialog() {
  ArrayList<String> names = new ArrayList<String>();
  EditorColorsScheme[] allSchemes = EditorColorsManager.getInstance().getAllSchemes();

  for (EditorColorsScheme scheme : allSchemes) {
    names.add(scheme.getName());
  }

  SaveSchemeDialog dialog = new SaveSchemeDialog(this, ApplicationBundle.message("title.save.color.scheme.as"), names);
  dialog.show();
  if (dialog.isOK()) {
    myOptions.saveSchemeAs(dialog.getSchemeName());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:SchemesPanel.java


注:本文中的com.intellij.application.options.SaveSchemeDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。