mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: Moved reusable bits of code from the inspection quick fix to the API - simplified. (IDEA-163139)
This commit is contained in:
+2
-2
@@ -21,8 +21,8 @@ import com.intellij.lang.LighterASTNode;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiExportsStatement;
|
||||
import com.intellij.psi.impl.java.stubs.impl.PsiExportsStatementStubImpl;
|
||||
import com.intellij.psi.impl.source.ExportsElement;
|
||||
import com.intellij.psi.impl.source.PsiExportsStatementImpl;
|
||||
import com.intellij.psi.impl.source.tree.CompositeElement;
|
||||
import com.intellij.psi.impl.source.tree.JavaElementType;
|
||||
import com.intellij.psi.impl.source.tree.JavaSourceUtil;
|
||||
import com.intellij.psi.stubs.IndexSink;
|
||||
@@ -46,7 +46,7 @@ public class JavaExportsStatementElementType extends JavaStubElementType<PsiExpo
|
||||
@NotNull
|
||||
@Override
|
||||
public ASTNode createCompositeNode() {
|
||||
return new CompositeElement(this);
|
||||
return new ExportsElement(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
package com.intellij.psi.impl.java.stubs;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.psi.impl.source.ExportsElement;
|
||||
import com.intellij.psi.impl.source.JavaFileElementType;
|
||||
import com.intellij.psi.impl.source.tree.java.*;
|
||||
import com.intellij.psi.tree.IStubFileElementType;
|
||||
@@ -41,14 +40,7 @@ public interface JavaStubElementTypes {
|
||||
JavaImportListElementType IMPORT_LIST = new JavaImportListElementType();
|
||||
JavaModuleElementType MODULE = new JavaModuleElementType();
|
||||
JavaRequiresStatementElementType REQUIRES_STATEMENT = new JavaRequiresStatementElementType();
|
||||
|
||||
JavaExportsStatementElementType EXPORTS_STATEMENT = new JavaExportsStatementElementType() {
|
||||
@NotNull
|
||||
@Override
|
||||
public ASTNode createCompositeNode() {
|
||||
return new ExportsElement();
|
||||
}
|
||||
};
|
||||
JavaExportsStatementElementType EXPORTS_STATEMENT = new JavaExportsStatementElementType();
|
||||
|
||||
JavaClassElementType CLASS = new JavaClassElementType("CLASS") {
|
||||
@NotNull
|
||||
|
||||
@@ -18,9 +18,9 @@ package com.intellij.psi.impl.source;
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.psi.JavaTokenType;
|
||||
import com.intellij.psi.impl.PsiImplUtil;
|
||||
import com.intellij.psi.impl.java.stubs.JavaStubElementTypes;
|
||||
import com.intellij.psi.impl.source.tree.CompositeElement;
|
||||
import com.intellij.psi.impl.source.tree.JavaElementType;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -28,8 +28,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @author Pavel.Dolgov
|
||||
*/
|
||||
public class ExportsElement extends CompositeElement {
|
||||
public ExportsElement() {
|
||||
super(JavaStubElementTypes.EXPORTS_STATEMENT);
|
||||
public ExportsElement(@NotNull IElementType type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user