本文整理匯總了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");
}