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


Java PropertiesComponent.isValueSet方法代码示例

本文整理汇总了Java中com.intellij.ide.util.PropertiesComponent.isValueSet方法的典型用法代码示例。如果您正苦于以下问题:Java PropertiesComponent.isValueSet方法的具体用法?Java PropertiesComponent.isValueSet怎么用?Java PropertiesComponent.isValueSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ide.util.PropertiesComponent的用法示例。


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

示例1: start

import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
public static void start () {
    PropertiesComponent prop = PropertiesComponent.getInstance();
    int interval = prop.getInt(Settings.INTERVAL, 0);
    if (runningInterval == interval || interval == 0) {
        return;
    }
    if (service != null) {
        stop();
    }
    RandomBackgroundTask task = new RandomBackgroundTask();
    service = Executors.newSingleThreadScheduledExecutor();
    try {
        int delay = prop.isValueSet(IdeBackgroundUtil.EDITOR_PROP)
                ? interval
                : 0;
        service.scheduleAtFixedRate(task, delay, interval, TimeUnit.MINUTES);
        runningInterval = interval;
    } catch (RejectedExecutionException e) {
        stop();
    }
}
 
开发者ID:lachlankrautz,项目名称:backgroundImagePlus,代码行数:22,代码来源:BackgroundService.java

示例2: setupPlatform

import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
private static void setupPlatform(@NotNull Module module) {
  String targetHashString = getTargetHashStringFromPropertyFile(module);
  if (targetHashString != null && findAndSetSdkWithHashString(module, targetHashString)) {
    return;
  }

  PropertiesComponent component = PropertiesComponent.getInstance();
  if (component.isValueSet(DEFAULT_PLATFORM_NAME_PROPERTY)) {
    String defaultPlatformName = component.getValue(DEFAULT_PLATFORM_NAME_PROPERTY);
    Sdk defaultLib = ProjectJdkTable.getInstance().findJdk(defaultPlatformName, AndroidSdkType.getInstance().getName());
    if (defaultLib != null && tryToSetAndroidPlatform(module, defaultLib)) {
      return;
    }
  }
  for (Sdk sdk : getAllAndroidSdks()) {
    AndroidPlatform platform = AndroidPlatform.getInstance(sdk);

    if (platform != null &&
        checkSdkRoots(sdk, platform.getTarget(), false) &&
        tryToSetAndroidPlatform(module, sdk)) {
      component.setValue(DEFAULT_PLATFORM_NAME_PROPERTY, sdk.getName());
      return;
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AndroidSdkUtils.java

示例3: loadSettings

import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
private void loadSettings() {
  final PropertiesComponent properties = PropertiesComponent.getInstance(myProject);
  if (properties.isValueSet(SINGLE_FILE_PROPERTY)) {
    final boolean singleFile = properties.isTrueValue(SINGLE_FILE_PROPERTY);
    myRbGenerateSingleFileBuild.setSelected(singleFile);
    myRbGenerateMultipleFilesBuild.setSelected(!singleFile);
  }
  if (properties.isValueSet(UI_FORM_PROPERTY)) {
    myCbEnableUIFormsCompilation.setSelected(properties.isTrueValue(UI_FORM_PROPERTY));
  }
  if (properties.isValueSet(FORCE_TARGET_JDK_PROPERTY)) {
    myCbForceTargetJdk.setSelected(properties.isTrueValue(FORCE_TARGET_JDK_PROPERTY));
  }
  if (properties.isValueSet(BACKUP_FILES_PROPERTY)) {
    final boolean backup = properties.isTrueValue(BACKUP_FILES_PROPERTY);
    myRbBackupFiles.setSelected(backup);
    myRbOverwriteFiles.setSelected(!backup);
  }
  if (properties.isValueSet(INLINE_RUNTIME_CLASSPATH_PROPERTY)) {
    myCbInlineRuntimeClasspath.setSelected(properties.isTrueValue(INLINE_RUNTIME_CLASSPATH_PROPERTY));
  }
  if (properties.isValueSet(GENERATE_IDEA_HOME_PROPERTY)) {
    myGenerateIdeaHomeProperty.setSelected(properties.isTrueValue(GENERATE_IDEA_HOME_PROPERTY));
  }
  if (properties.isValueSet(OUTPUT_FILE_NAME_PROPERTY)) {
    myOutputFileNameField.setText(properties.getValue(OUTPUT_FILE_NAME_PROPERTY));
  }
  else {
    myOutputFileNameField.setText(BuildProperties.getProjectBuildFileName(myProject));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:GenerateAntBuildDialog.java

示例4: PyCharmInitialConfigurator

import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
public PyCharmInitialConfigurator(MessageBus bus, final PropertiesComponent propertiesComponent, final FileTypeManager fileTypeManager) {
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration", "true");
    EditorSettingsExternalizable.getInstance().setVirtualSpace(false);
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V2")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V2", true);
    final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance().getCurrentSettings();
    settings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
    settings.getCommonSettings(PythonLanguage.getInstance()).ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
    UISettings.getInstance().SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES = true;
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V3")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V3", "true");
    UISettings.getInstance().SHOW_MEMORY_INDICATOR = false;
    final String ignoredFilesList = fileTypeManager.getIgnoredFilesList();
    ApplicationManager.getApplication().invokeLater(new Runnable() {
      @Override
      public void run() {
        ApplicationManager.getApplication().runWriteAction(new Runnable() {
          @Override
          public void run() {
            FileTypeManager.getInstance().setIgnoredFilesList(ignoredFilesList + ";*$py.class");
          }
        });
      }
    });
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V4")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V4", true);
    PyCodeInsightSettings.getInstance().SHOW_IMPORT_POPUP = false;
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V5")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V5", true);
    CodeInsightSettings.getInstance().REFORMAT_ON_PASTE = CodeInsightSettings.NO_REFORMAT;
  }
  if (!propertiesComponent.isValueSet(DISPLAYED_PROPERTY)) {
    bus.connect().subscribe(AppLifecycleListener.TOPIC, new AppLifecycleListener.Adapter() {
      @Override
      public void welcomeScreenDisplayed() {
        ApplicationManager.getApplication().invokeLater(new Runnable() {
          public void run() {
            propertiesComponent.setValue(DISPLAYED_PROPERTY, "true");
            showInitialConfigurationDialog();
          }
        });
      }
    });
  }

  Registry.get("ide.scratch.enabled").setValue(true);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:53,代码来源:PyCharmInitialConfigurator.java


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