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


Java BaseRefactoringProcessor.ConflictsInTestsException方法代码示例

本文整理汇总了Java中com.intellij.refactoring.BaseRefactoringProcessor.ConflictsInTestsException方法的典型用法代码示例。如果您正苦于以下问题:Java BaseRefactoringProcessor.ConflictsInTestsException方法的具体用法?Java BaseRefactoringProcessor.ConflictsInTestsException怎么用?Java BaseRefactoringProcessor.ConflictsInTestsException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.refactoring.BaseRefactoringProcessor的用法示例。


在下文中一共展示了BaseRefactoringProcessor.ConflictsInTestsException方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testIndirectGlobReferencesNotIncluded

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
@Test
public void testIndirectGlobReferencesNotIncluded() {
  PsiFile javaFile =
      workspace.createPsiFile(
          new WorkspacePath("com/google/Test.java"),
          "package com.google;",
          "public class Test {}");

  PsiClass javaClass = PsiUtils.findFirstChildOfClassRecursive(javaFile, PsiClass.class);

  createBuildFile(
      new WorkspacePath("com/google/BUILD"),
      "java_library(",
      "    name = 'lib'",
      "    srcs = glob(['*.java'])",
      ")");

  try {
    SafeDeleteHandler.invoke(getProject(), new PsiElement[] {javaClass}, true);
  } catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    Assert.fail("Glob reference was incorrectly included");
  }
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:24,代码来源:SafeDeleteTest.java

示例2: doTestConflict

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
private void doTestConflict() {
  try {
    doTest(null, null, null, new ParameterInfoImpl[] {new ParameterInfoImpl(-1, "b", PsiType.BOOLEAN)}, new ThrownExceptionInfo[0], false);
    fail("Conflict expected");
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ChangeSignatureTouchLambdaTest.java

示例3: testVisibilityConflict

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testVisibilityConflict() throws Exception {
  try {
    doTest(0, PsiModifier.PRIVATE);
    fail("Conflict was not detected");
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Method <b><code>Test.foo(Bar)</code></b> is private and will not be accessible from instance initializer of class class <b><code>Test</code></b>.", e.getMessage()); 
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ConvertToInstanceMethodTest.java

示例4: testMethodReference

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testMethodReference() throws Exception {
  try {
    doTest(true, 0);
    fail("Conflict was not detected");
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Method reference would be broken after move", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:MoveInstanceMethodTest.java

示例5: testRefOuterThis

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefOuterThis() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on this which is not available inside the method and cannot be inlined", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例6: testRefNewInner

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNewInner() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on class <b><code>User.Local</code></b> which is not available inside method and cannot be inlined", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例7: testRefNewInnerFromMethod

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNewInnerFromMethod() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on class <b><code>Local</code></b> which is not available inside method and cannot be inlined", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例8: testRefNewLocal

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNewLocal() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on class <b><code>Local</code></b> which is not available inside method and cannot be inlined", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例9: testRefArrayAccess

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefArrayAccess() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on value which is not available inside method and cannot be inlined", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例10: testFunctionalExpressions

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testFunctionalExpressions() {
  try {
    doTest();
    fail("Conflict not detected");
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Functional expression in Test will not compile after converting class <b><code>FunctionalExpressions</code></b> to a class", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ConvertInterfaceToClassTest.java

示例11: testRefNonStatic

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNonStatic() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on method <b><code>provideObject()</code></b> which is not available inside the static method", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例12: testRefNonStaticClass

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNonStaticClass() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on non static class which is not available inside static method", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例13: testRefThisFromStatic

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefThisFromStatic() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on this which is not available inside the static method", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例14: testVisibility

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testVisibility() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on value which is not available inside method", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java

示例15: testWriteAccess

import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testWriteAccess() throws Exception {
  try {
    doTest(false);
  }
  catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
    assertEquals("Parameter initializer depends on value which is not available inside method and cannot be inlined", e.getMessage());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InlineParameterTest.java


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