This repository has been archived by the owner on Nov 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'backport_intellij_2017.2' into backport_intellij_2017.1
- Loading branch information
Showing
19 changed files
with
298 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...st/java/de/plushnikov/intellij/plugin/extension/SneakyThrowsExceptionAddQuickFixTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package de.plushnikov.intellij.plugin.extension; | ||
|
||
import com.intellij.codeInsight.intention.IntentionAction; | ||
import com.intellij.openapi.editor.Editor; | ||
import com.intellij.psi.PsiFile; | ||
import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl; | ||
import de.plushnikov.intellij.plugin.AbstractLombokLightCodeInsightTestCase; | ||
|
||
import java.util.List; | ||
|
||
public class SneakyThrowsExceptionAddQuickFixTest extends AbstractLombokLightCodeInsightTestCase { | ||
|
||
@Override | ||
protected String getBasePath() { | ||
return super.getBasePath() + "/extension"; | ||
} | ||
|
||
public void testCheckedExeptionQuickFixExample() { | ||
myFixture.configureByFile(getBasePath() + '/' + getTestName(false) + ".java"); | ||
|
||
final List<IntentionAction> availableActions = getAvailableActions(); | ||
assertTrue("Intention to add @SneakyThrows was not presented", | ||
availableActions.stream().anyMatch(action -> action.getText().contains("@SneakyThrows"))); | ||
} | ||
|
||
protected List<IntentionAction> getAvailableActions() { | ||
final Editor editor = getEditor(); | ||
final PsiFile file = getFile(); | ||
CodeInsightTestFixtureImpl.instantiateAndRun(file, editor, new int[0], false); | ||
return CodeInsightTestFixtureImpl.getAvailableIntentions(editor, file); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 10 additions & 5 deletions
15
test-manual/src/main/java/de/plushnikov/bug/issue634/LinkedListImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package de.plushnikov.bug.issue634; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public class LinkedListImpl { | ||
|
||
private Node first; | ||
private Node last; | ||
public void add(Object o) { | ||
Node node = new Node(o, first); | ||
} | ||
private Node first; | ||
private Node.NodeBuilder last; | ||
|
||
public void add(Node o1) { | ||
Node node = new Node(o1, last); | ||
} | ||
|
||
} |
Oops, something went wrong.