本文整理汇总了Java中com.intellij.codeInsight.CodeInsightSettings.NO属性的典型用法代码示例。如果您正苦于以下问题:Java CodeInsightSettings.NO属性的具体用法?Java CodeInsightSettings.NO怎么用?Java CodeInsightSettings.NO使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.codeInsight.CodeInsightSettings
的用法示例。
在下文中一共展示了CodeInsightSettings.NO属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reset
public void reset() {
CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
DaemonCodeAnalyzerSettings daemonSettings = DaemonCodeAnalyzerSettings.getInstance();
switch (codeInsightSettings.ADD_IMPORTS_ON_PASTE) {
case CodeInsightSettings.YES:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_ALWAYS);
break;
case CodeInsightSettings.NO:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_NONE);
break;
case CodeInsightSettings.ASK:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_ASK);
break;
}
myCbShowImportPopup.setSelected(daemonSettings.isImportHintEnabled());
myCbOptimizeImports.setSelected(codeInsightSettings.OPTIMIZE_IMPORTS_ON_THE_FLY);
myCbAddUnambiguousImports.setSelected(codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY);
myExcludePackagesTable.reset();
}
示例2: getSmartPasteValue
private int getSmartPasteValue()
{
Object selectedItem = mySmartPasteCombo.getSelectedItem();
if(INSERT_IMPORTS_ALWAYS.equals(selectedItem))
{
return CodeInsightSettings.YES;
}
else if(INSERT_IMPORTS_NONE.equals(selectedItem))
{
return CodeInsightSettings.NO;
}
else
{
return CodeInsightSettings.ASK;
}
}
示例3: collectTransferableData
@NotNull
@Override
public List<ReferenceTransferableData> collectTransferableData(PsiFile file, final Editor editor, final int[] startOffsets, final int[] endOffsets) {
if (CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE == CodeInsightSettings.NO) {
return Collections.emptyList();
}
if (file instanceof PsiCompiledFile) {
file = ((PsiCompiledFile) file).getDecompiledPsiFile();
}
if (!(file instanceof PsiClassOwner)) {
return Collections.emptyList();
}
final ArrayList<ReferenceData> array = new ArrayList<ReferenceData>();
for (int j = 0; j < startOffsets.length; j++) {
final int startOffset = startOffsets[j];
for (final PsiElement element : CollectHighlightsUtil.getElementsInRange(file, startOffset, endOffsets[j])) {
addReferenceData(file, startOffset, element, array);
}
}
if (array.isEmpty()) {
return Collections.emptyList();
}
return Collections.singletonList(new ReferenceTransferableData(array.toArray(new ReferenceData[array.size()])));
}
示例4: getSmartPasteValue
private int getSmartPasteValue() {
Object selectedItem = mySmartPasteCombo.getSelectedItem();
if (INSERT_IMPORTS_ALWAYS.equals(selectedItem)) {
return CodeInsightSettings.YES;
}
else if (INSERT_IMPORTS_NONE.equals(selectedItem)) {
return CodeInsightSettings.NO;
}
else {
return CodeInsightSettings.ASK;
}
}
示例5: reset
public void reset() {
CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
DaemonCodeAnalyzerSettings daemonSettings = DaemonCodeAnalyzerSettings.getInstance();
switch (codeInsightSettings.ADD_IMPORTS_ON_PASTE) {
case CodeInsightSettings.YES:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_ALWAYS);
break;
case CodeInsightSettings.NO:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_NONE);
break;
case CodeInsightSettings.ASK:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_ASK);
break;
}
myCbShowImportPopup.setSelected(daemonSettings.isImportHintEnabled());
myCbOptimizeImports.setSelected(codeInsightSettings.OPTIMIZE_IMPORTS_ON_THE_FLY);
myCbAddUnambiguousImports.setSelected(codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY);
myExcludePackagesModel = new DefaultListModel();
for (String aPackage : codeInsightSettings.EXCLUDED_PACKAGES) {
myExcludePackagesModel.add(myExcludePackagesModel.size(), aPackage);
}
myExcludePackagesList.setModel(myExcludePackagesModel);
}
示例6: collectTransferableData
@NotNull
@Override
public List<ReferenceTransferableData> collectTransferableData(PsiFile file, final Editor editor, final int[] startOffsets,
final int[] endOffsets)
{
if(CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE == CodeInsightSettings.NO)
{
return Collections.emptyList();
}
if(file instanceof PsiCompiledFile)
{
file = ((PsiCompiledFile) file).getDecompiledPsiFile();
}
if(!(file instanceof PsiClassOwner))
{
return Collections.emptyList();
}
final ArrayList<ReferenceData> array = new ArrayList<ReferenceData>();
for(int j = 0; j < startOffsets.length; j++)
{
final int startOffset = startOffsets[j];
for(final PsiElement element : CollectHighlightsUtil.getElementsInRange(file, startOffset, endOffsets[j]))
{
addReferenceData(file, startOffset, element, array);
}
}
if(array.isEmpty())
{
return Collections.emptyList();
}
return Collections.singletonList(new ReferenceTransferableData(array.toArray(new ReferenceData[array.size()])));
}
示例7: reset
@RequiredDispatchThread
@Override
public void reset()
{
CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
DaemonCodeAnalyzerSettings daemonSettings = DaemonCodeAnalyzerSettings.getInstance();
switch(codeInsightSettings.ADD_IMPORTS_ON_PASTE)
{
case CodeInsightSettings.YES:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_ALWAYS);
break;
case CodeInsightSettings.NO:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_NONE);
break;
case CodeInsightSettings.ASK:
mySmartPasteCombo.setSelectedItem(INSERT_IMPORTS_ASK);
break;
}
myCbShowImportPopup.setSelected(daemonSettings.isImportHintEnabled());
myCbOptimizeImports.setSelected(codeInsightSettings.OPTIMIZE_IMPORTS_ON_THE_FLY);
myCbAddUnambiguousImports.setSelected(codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY);
myCbAddMethodImports.setSelected(codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY);
myExcludePackagesTable.reset();
}
示例8: setUp
@Override
public void setUp() throws Exception {
super.setUp();
myPrevValue = CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE;
CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE = CodeInsightSettings.NO;
}