Remove interface for JetExpressionCodeFragment
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.psi.JavaCodeFragment;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface JetExpressionCodeFragment extends JavaCodeFragment {
|
||||
@Nullable
|
||||
JetExpression getExpression();
|
||||
}
|
||||
|
||||
+3
-3
@@ -23,12 +23,12 @@ import com.intellij.psi.JavaCodeFragment
|
||||
import com.intellij.psi.PsiType
|
||||
import com.intellij.psi.PsiClass
|
||||
|
||||
class JetExpressionCodeFragmentImpl(
|
||||
public class JetExpressionCodeFragment(
|
||||
project: Project,
|
||||
name: String,
|
||||
text: CharSequence,
|
||||
context: PsiElement?
|
||||
) : JetCodeFragment(project, name, text, JetNodeTypes.EXPRESSION_CODE_FRAGMENT, context), JetExpressionCodeFragment {
|
||||
) : JetCodeFragment(project, name, text, JetNodeTypes.EXPRESSION_CODE_FRAGMENT, context), JavaCodeFragment {
|
||||
|
||||
private var _thisType: PsiType? = null
|
||||
private var _superType: PsiType? = null
|
||||
@@ -73,7 +73,7 @@ class JetExpressionCodeFragmentImpl(
|
||||
return true
|
||||
}
|
||||
|
||||
override fun getExpression(): JetExpression? {
|
||||
fun getExpression(): JetExpression? {
|
||||
var resultingExpression: JetExpression? = null
|
||||
this.accept(object: JetTreeVisitor<Void>() {
|
||||
override fun visitExpression(expression: JetExpression, data: Void?): Void? {
|
||||
@@ -339,7 +339,7 @@ public class JetPsiFactory {
|
||||
|
||||
@NotNull
|
||||
public static JetExpressionCodeFragment createExpressionCodeFragment(Project project, String text, PsiElement context) {
|
||||
return new JetExpressionCodeFragmentImpl(project, "fragment.kt", text, context);
|
||||
return new JetExpressionCodeFragment(project, "fragment.kt", text, context);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user