本文整理汇总了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();
}
}
示例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;
}
}
}
示例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));
}
}
示例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);
}