Remove obsolete JetNamespaceBody
This commit is contained in:
@@ -105,6 +105,6 @@ abstract public class JetFunctionNotStubbed extends JetTypeParameterListOwnerNot
|
||||
@Override
|
||||
public boolean isLocal() {
|
||||
PsiElement parent = getParent();
|
||||
return !(parent instanceof JetFile || parent instanceof JetClassBody || parent instanceof JetNamespaceBody);
|
||||
return !(parent instanceof JetFile || parent instanceof JetClassBody);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +189,6 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
||||
@Override
|
||||
public boolean isLocal() {
|
||||
PsiElement parent = getParent();
|
||||
return !(parent instanceof JetFile || parent instanceof JetClassBody || parent instanceof JetNamespaceBody);
|
||||
return !(parent instanceof JetFile || parent instanceof JetClassBody);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.lang.ASTNode;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class JetNamespaceBody extends JetElementImpl implements JetDeclarationContainer {
|
||||
public JetNamespaceBody(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<JetDeclaration> getDeclarations() {
|
||||
return PsiTreeUtil.getChildrenOfTypeAsList(this, JetDeclaration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(@NotNull JetVisitorVoid visitor) {
|
||||
visitor.visitNamespaceBody(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitNamespaceBody(this, data);
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
||||
|
||||
public boolean isLocal() {
|
||||
PsiElement parent = getParent();
|
||||
return !(parent instanceof JetFile || parent instanceof JetClassBody || parent instanceof JetNamespaceBody);
|
||||
return !(parent instanceof JetFile || parent instanceof JetClassBody);
|
||||
}
|
||||
|
||||
public boolean isTopLevel() {
|
||||
|
||||
@@ -76,10 +76,6 @@ public class JetVisitor<R, D> extends PsiElementVisitor {
|
||||
return visitJetElement(classBody, data);
|
||||
}
|
||||
|
||||
public R visitNamespaceBody(JetNamespaceBody body, D data) {
|
||||
return visitJetElement(body, data);
|
||||
}
|
||||
|
||||
public R visitModifierList(JetModifierList list, D data) {
|
||||
return visitJetElement(list, data);
|
||||
}
|
||||
|
||||
@@ -66,10 +66,6 @@ public class JetVisitorVoid extends PsiElementVisitor {
|
||||
visitJetElement(classBody);
|
||||
}
|
||||
|
||||
public void visitNamespaceBody(JetNamespaceBody body) {
|
||||
visitJetElement(body);
|
||||
}
|
||||
|
||||
public void visitModifierList(JetModifierList list) {
|
||||
visitJetElement(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user