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


Java CodeInsightSettings.NO属性代码示例

本文整理汇总了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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:JavaAutoImportOptions.java

示例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;
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:JavaAutoImportConfigurable.java

示例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()])));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:CopyPasteReferenceProcessor.java

示例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;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JavaAutoImportOptions.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:JavaAutoImportOptions.java

示例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()])));
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:36,代码来源:CopyPasteReferenceProcessor.java

示例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();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:30,代码来源:JavaAutoImportConfigurable.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CopyActionSimpleHandlerTest.java


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