-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes to make plugin compatible with current IntelliJ 13 EAP build (i…
- Loading branch information
Showing
27 changed files
with
233 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
13 changes: 13 additions & 0 deletions
13
intellij-adapter-11/src/com/cholick/idea/spock/GrLabeledStatementAdapter11.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,13 @@ | ||
package com.cholick.idea.spock; | ||
|
||
import com.intellij.psi.PsiElement; | ||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrLabeledStatement; | ||
|
||
public class GrLabeledStatementAdapter11 extends GrLabeledStatementAdapter { | ||
|
||
@Override | ||
public PsiElement getLabel(GrLabeledStatement labeledStatement) { | ||
return labeledStatement.getLabel(); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
intellij-adapter-11/src/com/cholick/idea/spock/HighlightInfoFactory11.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,16 @@ | ||
package com.cholick.idea.spock; | ||
|
||
import com.intellij.codeInsight.daemon.impl.HighlightInfo; | ||
import com.intellij.codeInsight.daemon.impl.HighlightInfoType; | ||
import com.intellij.openapi.editor.markup.TextAttributes; | ||
import com.intellij.psi.PsiElement; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class HighlightInfoFactory11 extends HighlightInfoFactory { | ||
|
||
public HighlightInfo createHighlightInfo(@NotNull HighlightInfoType type, @NotNull PsiElement element, @Nullable String message, @Nullable TextAttributes attributes) { | ||
return HighlightInfo.createHighlightInfo(type, element, message, attributes); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
</content> | ||
<orderEntry type="jdk" jdkName="$idea_sdk_name_13$" jdkType="IDEA JDK" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="module-library" scope="PROVIDED"> | ||
<library name="groovy_plugin"> | ||
<CLASSES> | ||
<root url="file://$idea_sdk_13$/plugins/Groovy/lib" /> | ||
</CLASSES> | ||
<JAVADOC /> | ||
<SOURCES /> | ||
<jarDirectory url="file://$idea_sdk_13$/plugins/Groovy/lib" recursive="false" /> | ||
</library> | ||
</orderEntry> | ||
<orderEntry type="library" scope="PROVIDED" name="groovy-1.8.9" level="application" /> | ||
<orderEntry type="module" module-name="intellij-adapter-api" /> | ||
</component> | ||
</module> | ||
|
13 changes: 13 additions & 0 deletions
13
intellij-adapter-13/src/com/cholick/idea/spock/GrLabeledStatementAdapter13.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,13 @@ | ||
package com.cholick.idea.spock; | ||
|
||
import com.intellij.psi.PsiElement; | ||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrLabeledStatement; | ||
|
||
public class GrLabeledStatementAdapter13 extends GrLabeledStatementAdapter { | ||
|
||
@Override | ||
public PsiElement getLabel(GrLabeledStatement labeledStatement) { | ||
return labeledStatement.getLabel(); | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
intellij-adapter-13/src/com/cholick/idea/spock/HighlightInfoFactory13.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,26 @@ | ||
package com.cholick.idea.spock; | ||
|
||
import com.intellij.codeInsight.daemon.impl.HighlightInfo; | ||
import com.intellij.codeInsight.daemon.impl.HighlightInfoType; | ||
import com.intellij.openapi.editor.markup.TextAttributes; | ||
import com.intellij.psi.PsiElement; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import static com.intellij.codeInsight.daemon.impl.HighlightInfo.Builder; | ||
|
||
public class HighlightInfoFactory13 extends HighlightInfoFactory { | ||
|
||
@Override | ||
public HighlightInfo createHighlightInfo(@NotNull HighlightInfoType type, @NotNull PsiElement element, @Nullable String message, @Nullable TextAttributes attributes) { | ||
Builder builder = HighlightInfo.newHighlightInfo(type) | ||
.range(element); | ||
if(message != null) { | ||
builder.description(message); | ||
} | ||
if(attributes != null) { | ||
builder.textAttributes(attributes); | ||
} | ||
return builder.create(); | ||
} | ||
} |
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: 15 additions & 0 deletions
15
intellij-adapter-api/src/com/cholick/idea/spock/GrLabeledStatementAdapter.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,15 @@ | ||
package com.cholick.idea.spock; | ||
|
||
import com.intellij.openapi.components.ServiceManager; | ||
import com.intellij.psi.PsiElement; | ||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrLabeledStatement; | ||
|
||
public abstract class GrLabeledStatementAdapter { | ||
|
||
public static GrLabeledStatementAdapter getInstance() { | ||
return ServiceManager.getService(GrLabeledStatementAdapter.class); | ||
} | ||
|
||
public abstract PsiElement getLabel(GrLabeledStatement labeledStatement); | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
intellij-adapter-api/src/com/cholick/idea/spock/HighlightInfoFactory.groovy
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,19 @@ | ||
package com.cholick.idea.spock | ||
|
||
import com.intellij.codeInsight.daemon.impl.HighlightInfo | ||
import com.intellij.codeInsight.daemon.impl.HighlightInfoType | ||
import com.intellij.openapi.components.ServiceManager | ||
import com.intellij.openapi.editor.markup.TextAttributes | ||
import com.intellij.psi.PsiElement | ||
import org.jetbrains.annotations.NotNull | ||
import org.jetbrains.annotations.Nullable | ||
|
||
abstract class HighlightInfoFactory { | ||
|
||
public static HighlightInfoFactory getInstance() { | ||
return ServiceManager.getService(HighlightInfoFactory.class); | ||
} | ||
|
||
abstract HighlightInfo createHighlightInfo(@NotNull HighlightInfoType type, @NotNull PsiElement element, @Nullable String message, @Nullable TextAttributes attributes); | ||
|
||
} |
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
Oops, something went wrong.