本文整理汇总了Java中com.intellij.ide.util.PropertiesComponent.isTrueValue方法的典型用法代码示例。如果您正苦于以下问题:Java PropertiesComponent.isTrueValue方法的具体用法?Java PropertiesComponent.isTrueValue怎么用?Java PropertiesComponent.isTrueValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.util.PropertiesComponent
的用法示例。
在下文中一共展示了PropertiesComponent.isTrueValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAdText
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
@Nullable
protected String getAdText(final Executor alternateExecutor) {
final PropertiesComponent properties = PropertiesComponent.getInstance();
if (alternateExecutor != null && !properties.isTrueValue(myAddKey)) {
return String
.format("Hold %s to %s", KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke("SHIFT")), alternateExecutor.getActionName());
}
if (!properties.isTrueValue("run.configuration.edit.ad")) {
return String.format("Press %s to Edit", KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke("F4")));
}
if (!properties.isTrueValue("run.configuration.delete.ad")) {
return String.format("Press %s to Delete configuration", KeymapUtil.getKeystrokeText(KeyStroke.getKeyStroke("DELETE")));
}
return null;
}
示例2: removeSelected
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
public void removeSelected() {
final PropertiesComponent propertiesComponent = PropertiesComponent.getInstance();
if (!propertiesComponent.isTrueValue("run.configuration.delete.ad")) {
propertiesComponent.setValue("run.configuration.delete.ad", Boolean.toString(true));
}
final int index = getSelectedIndex();
if (index == -1) {
return;
}
final Object o = getListModel().get(index);
if (o != null && o instanceof ItemWrapper && ((ItemWrapper)o).canBeDeleted()) {
deleteConfiguration(myProject, (RunnerAndConfigurationSettings)((ItemWrapper)o).getValue());
getListModel().deleteItem(o);
final List<Object> values = getListStep().getValues();
values.remove(o);
if (index < values.size()) {
onChildSelectedFor(values.get(index));
}
else if (index - 1 >= 0) {
onChildSelectedFor(values.get(index - 1));
}
}
}
示例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: saveInitialCheckBoxState
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
@Override
public void saveInitialCheckBoxState(boolean state) {
PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(myProject);
if (propertiesComponent.isTrueValue("GoToClass.toSaveIncludeLibraries")) {
propertiesComponent.setValue("GoToFile.includeJavaFiles", Boolean.toString(state));
}
}
示例5: loadInitialCheckBoxState
import com.intellij.ide.util.PropertiesComponent; //导入方法依赖的package包/类
@Override
public boolean loadInitialCheckBoxState() {
PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(myProject);
return propertiesComponent.isTrueValue("GoToClass.toSaveIncludeLibraries") &&
propertiesComponent.isTrueValue("GoToFile.includeJavaFiles");
}