diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressSize.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressSize.java index 404966a..5f3c0f4 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressSize.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressSize.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kAddressSize extends PsiElement { +public interface M68kAddressSize extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressingMode.java index 792ded4..127f4e5 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressingMode.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressingMode.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kAddressingMode extends PsiElement { +public interface M68kAddressingMode extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java index 49b0882..f36e159 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java @@ -1,12 +1,11 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import java.util.List; -public interface M68kAsmInstruction extends PsiElement { +public interface M68kAsmInstruction extends M68kPsiElement { @NotNull List getAddressingModeList(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOp.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOp.java index d891e4a..1f7d5be 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOp.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOp.java @@ -1,10 +1,9 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.Nullable; -public interface M68kAsmOp extends PsiElement { +public interface M68kAsmOp extends M68kPsiElement { @Nullable M68kOperandSize getOperandSize(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAssignment.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAssignment.java index a48d5e3..ac47cda 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAssignment.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAssignment.java @@ -1,10 +1,9 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; -public interface M68kAssignment extends PsiElement { +public interface M68kAssignment extends M68kPsiElement { @NotNull M68kSymbolDefinition getSymbolDefinition(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataWidth.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataWidth.java index 6b973d7..29865db 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataWidth.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataWidth.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kDataWidth extends PsiElement { +public interface M68kDataWidth extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kExpr.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kExpr.java index 99b8a9a..60bc3b1 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kExpr.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kExpr.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kExpr extends PsiElement { +public interface M68kExpr extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java index 0b57829..ec1bd90 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java @@ -2,10 +2,12 @@ package de.platon42.intellij.plugins.m68k.psi; import com.intellij.psi.PsiElement; +import com.intellij.psi.StubBasedPsiElement; +import de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStub; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -public interface M68kGlobalLabel extends M68kLabel, M68kNamedElement { +public interface M68kGlobalLabel extends M68kLabel, M68kNamedElement, StubBasedPsiElement { @Nullable String getName(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLabel.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLabel.java index 51aec5c..b4d2dae 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLabel.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLabel.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kLabel extends PsiElement { +public interface M68kLabel extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMacroCall.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMacroCall.java index 7016abf..3ac9374 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMacroCall.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMacroCall.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kMacroCall extends PsiElement { +public interface M68kMacroCall extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kOperandSize.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kOperandSize.java index c3a6f0b..62cd8c6 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kOperandSize.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kOperandSize.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kOperandSize extends PsiElement { +public interface M68kOperandSize extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java index 51456be..e657690 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java @@ -1,13 +1,12 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; -public interface M68kPreprocessorDirective extends PsiElement { +public interface M68kPreprocessorDirective extends M68kPsiElement { @Nullable M68kLabel getLabel(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterReference.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterReference.java index 13c3211..d556489 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterReference.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterReference.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kProgramCounterReference extends PsiElement { +public interface M68kProgramCounterReference extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kRegister.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kRegister.java index 778d82b..5f1220b 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kRegister.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kRegister.java @@ -1,8 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; - -public interface M68kRegister extends PsiElement { +public interface M68kRegister extends M68kPsiElement { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kStatement.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kStatement.java index a7de51a..76c840c 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kStatement.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kStatement.java @@ -1,10 +1,9 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.Nullable; -public interface M68kStatement extends PsiElement { +public interface M68kStatement extends M68kPsiElement { @Nullable M68kAsmInstruction getAsmInstruction(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kSymbolReference.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kSymbolReference.java index c1d3407..9f9bb0c 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kSymbolReference.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kSymbolReference.java @@ -1,10 +1,9 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; -public interface M68kSymbolReference extends PsiElement { +public interface M68kSymbolReference extends M68kPsiElement { @NotNull String getSymbolName(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java index c595573..896ade2 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java @@ -5,6 +5,7 @@ import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.tree.IElementType; import de.platon42.intellij.plugins.m68k.psi.impl.*; +import de.platon42.intellij.plugins.m68k.stubs.M68kStubElementTypeFactory; public interface M68kTypes { @@ -45,7 +46,7 @@ public interface M68kTypes { IElementType DATA_REGISTER_DIRECT_ADDRESSING_MODE = new M68kElementType("DATA_REGISTER_DIRECT_ADDRESSING_MODE"); IElementType DATA_WIDTH = new M68kElementType("DATA_WIDTH"); IElementType EXPR = new M68kElementType("EXPR"); - IElementType GLOBAL_LABEL = new M68kElementType("GLOBAL_LABEL"); + IElementType GLOBAL_LABEL = M68kStubElementTypeFactory.stubFactory("GLOBAL_LABEL"); IElementType IMMEDIATE_DATA = new M68kElementType("IMMEDIATE_DATA"); IElementType LABEL = new M68kElementType("LABEL"); IElementType LITERAL_EXPR = new M68kElementType("LITERAL_EXPR"); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java index 5059f40..2de06c1 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java @@ -1,7 +1,6 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import org.jetbrains.annotations.NotNull; @@ -266,7 +265,7 @@ public class M68kVisitor extends PsiElementVisitor { visitPsiElement(o); } - public void visitPsiElement(@NotNull PsiElement o) { + public void visitPsiElement(@NotNull M68kPsiElement o) { visitElement(o); } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAbsoluteAddressAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAbsoluteAddressAddressingModeImpl.java index 15fd252..d7ec3e4 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAbsoluteAddressAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAbsoluteAddressAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAbsoluteAddressAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kAddressSize; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; @@ -30,13 +31,13 @@ public class M68kAbsoluteAddressAddressingModeImpl extends M68kAddressingModeImp @Override @Nullable public M68kAddressSize getAddressSize() { - return findChildByClass(M68kAddressSize.class); + return PsiTreeUtil.getChildOfType(this, M68kAddressSize.class); } @Override @NotNull public M68kExpr getExpr() { - return findNotNullChildByClass(M68kExpr.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterDirectAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterDirectAddressingModeImpl.java index fc23a66..807a1fe 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterDirectAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterDirectAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterDirectAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kAddressRegisterDirectAddressingModeImpl extends M68kAddressingM @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectAddressingModeImpl.java index 660c5a6..c87a01a 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kAddressRegisterIndirectAddressingModeImpl extends M68kAddressin @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPostIncAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPostIncAddressingModeImpl.java index 6ef45a9..b2edddf 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPostIncAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPostIncAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectPostIncAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kAddressRegisterIndirectPostIncAddressingModeImpl extends M68kAd @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPreDecAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPreDecAddressingModeImpl.java index 506a01f..6e2d7da 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPreDecAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPreDecAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectPreDecAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kAddressRegisterIndirectPreDecAddressingModeImpl extends M68kAdd @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl.java index 9591c42..93f4a11 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectWithDisplacementNewAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; @@ -29,13 +30,13 @@ public class M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl ex @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } @Override @NotNull public M68kExpr getExpr() { - return findNotNullChildByClass(M68kExpr.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl.java index 6d0669e..f600641 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectWithDisplacementOldAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; @@ -29,13 +30,13 @@ public class M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl ex @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } @Override @NotNull public M68kExpr getExpr() { - return findNotNullChildByClass(M68kExpr.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl.java index d8570d0..53c3d54 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,25 +28,25 @@ public class M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl extends M @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } @Override @Nullable public M68kDataWidth getDataWidth() { - return findChildByClass(M68kDataWidth.class); + return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class); } @Override @NotNull public M68kRegister getRegister() { - return findNotNullChildByClass(M68kRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class)); } @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl.java index 4165d04..a29dcfc 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,25 +28,25 @@ public class M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl extends M @Override @NotNull public M68kAddressRegister getAddressRegister() { - return findNotNullChildByClass(M68kAddressRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); } @Override @Nullable public M68kDataWidth getDataWidth() { - return findChildByClass(M68kDataWidth.class); + return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class); } @Override @NotNull public M68kRegister getRegister() { - return findNotNullChildByClass(M68kRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class)); } @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java index 02820b3..c5abd46 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java @@ -38,7 +38,7 @@ public class M68kAsmInstructionImpl extends ASTWrapperPsiElement implements M68k @Override @NotNull public M68kAsmOp getAsmOp() { - return findNotNullChildByClass(M68kAsmOp.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAsmOp.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOpImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOpImpl.java index 1a8cba8..179ce43 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOpImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOpImpl.java @@ -4,6 +4,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAsmOp; import de.platon42.intellij.plugins.m68k.psi.M68kOperandSize; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kAsmOpImpl extends ASTWrapperPsiElement implements M68kAsmOp { @Override @Nullable public M68kOperandSize getOperandSize() { - return findChildByClass(M68kOperandSize.class); + return PsiTreeUtil.getChildOfType(this, M68kOperandSize.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAssignmentImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAssignmentImpl.java index b4311b3..1a71373 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAssignmentImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAssignmentImpl.java @@ -4,6 +4,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kAssignment; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kSymbolDefinition; @@ -29,13 +30,13 @@ public class M68kAssignmentImpl extends ASTWrapperPsiElement implements M68kAssi @Override @NotNull public M68kSymbolDefinition getSymbolDefinition() { - return findNotNullChildByClass(M68kSymbolDefinition.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kSymbolDefinition.class)); } @Override @NotNull public M68kExpr getExpr() { - return findNotNullChildByClass(M68kExpr.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataRegisterDirectAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataRegisterDirectAddressingModeImpl.java index e40d318..3dd7d95 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataRegisterDirectAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataRegisterDirectAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kDataRegister; import de.platon42.intellij.plugins.m68k.psi.M68kDataRegisterDirectAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kDataRegisterDirectAddressingModeImpl extends M68kAddressingMode @Override @NotNull public M68kDataRegister getDataRegister() { - return findNotNullChildByClass(M68kDataRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kDataRegister.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java index ae4dcd4..d9e5f47 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java @@ -4,10 +4,12 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.stubs.IStubElementType; import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabel; import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin; import de.platon42.intellij.plugins.m68k.psi.M68kPsiImplUtil; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; +import de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStub; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -17,6 +19,10 @@ public class M68kGlobalLabelImpl extends M68kGlobalLabelMixin implements M68kGlo super(node); } + public M68kGlobalLabelImpl(@NotNull M68kGlobalLabelStub stub, @NotNull IStubElementType nodeType) { + super(stub, nodeType); + } + public void accept(@NotNull M68kVisitor visitor) { visitor.visitGlobalLabel(this); } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kImmediateDataImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kImmediateDataImpl.java index 41e97f3..51bfb25 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kImmediateDataImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kImmediateDataImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kImmediateData; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kImmediateDataImpl extends M68kAddressingModeImpl implements M68 @Override @NotNull public M68kExpr getExpr() { - return findNotNullChildByClass(M68kExpr.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kParenExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kParenExprImpl.java index 5b33c4f..d753d20 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kParenExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kParenExprImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kParenExpr; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kParenExprImpl extends M68kExprImpl implements M68kParenExpr { @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java index 0bd82cf..9d85b3d 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java @@ -33,7 +33,7 @@ public class M68kPreprocessorDirectiveImpl extends ASTWrapperPsiElement implemen @Override @Nullable public M68kLabel getLabel() { - return findChildByClass(M68kLabel.class); + return PsiTreeUtil.getChildOfType(this, M68kLabel.class); } @Override diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl.java index 921b8d3..4105416 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterIndirectWithDisplacementNewAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl ext @Override @NotNull public M68kExpr getExpr() { - return findNotNullChildByClass(M68kExpr.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl.java index 7397aaf..232f5d0 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterIndirectWithDisplacementOldAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl ext @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexNewAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexNewAddressingModeImpl.java index b561a0d..02ce155 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexNewAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexNewAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,19 +28,19 @@ public class M68kProgramCounterIndirectWithIndexNewAddressingModeImpl extends M6 @Override @Nullable public M68kDataWidth getDataWidth() { - return findChildByClass(M68kDataWidth.class); + return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class); } @Override @NotNull public M68kRegister getRegister() { - return findNotNullChildByClass(M68kRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class)); } @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexOldAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexOldAddressingModeImpl.java index d430aab..309996c 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexOldAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexOldAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,19 +28,19 @@ public class M68kProgramCounterIndirectWithIndexOldAddressingModeImpl extends M6 @Override @Nullable public M68kDataWidth getDataWidth() { - return findChildByClass(M68kDataWidth.class); + return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class); } @Override @NotNull public M68kRegister getRegister() { - return findNotNullChildByClass(M68kRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class)); } @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRefExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRefExprImpl.java index 02d9dce..ea28870 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRefExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRefExprImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterReference; import de.platon42.intellij.plugins.m68k.psi.M68kRefExpr; import de.platon42.intellij.plugins.m68k.psi.M68kSymbolReference; @@ -30,13 +31,13 @@ public class M68kRefExprImpl extends M68kExprImpl implements M68kRefExpr { @Override @Nullable public M68kProgramCounterReference getProgramCounterReference() { - return findChildByClass(M68kProgramCounterReference.class); + return PsiTreeUtil.getChildOfType(this, M68kProgramCounterReference.class); } @Override @Nullable public M68kSymbolReference getSymbolReference() { - return findChildByClass(M68kSymbolReference.class); + return PsiTreeUtil.getChildOfType(this, M68kSymbolReference.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kSpecialRegisterDirectAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kSpecialRegisterDirectAddressingModeImpl.java index 8f749be..1814ed6 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kSpecialRegisterDirectAddressingModeImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kSpecialRegisterDirectAddressingModeImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kSpecialRegister; import de.platon42.intellij.plugins.m68k.psi.M68kSpecialRegisterDirectAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -28,7 +29,7 @@ public class M68kSpecialRegisterDirectAddressingModeImpl extends M68kAddressingM @Override @NotNull public M68kSpecialRegister getSpecialRegister() { - return findNotNullChildByClass(M68kSpecialRegister.class); + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kSpecialRegister.class)); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kStatementImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kStatementImpl.java index b628311..84e3c48 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kStatementImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kStatementImpl.java @@ -4,6 +4,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -27,31 +28,31 @@ public class M68kStatementImpl extends ASTWrapperPsiElement implements M68kState @Override @Nullable public M68kAsmInstruction getAsmInstruction() { - return findChildByClass(M68kAsmInstruction.class); + return PsiTreeUtil.getChildOfType(this, M68kAsmInstruction.class); } @Override @Nullable public M68kAssignment getAssignment() { - return findChildByClass(M68kAssignment.class); + return PsiTreeUtil.getChildOfType(this, M68kAssignment.class); } @Override @Nullable public M68kLabel getLabel() { - return findChildByClass(M68kLabel.class); + return PsiTreeUtil.getChildOfType(this, M68kLabel.class); } @Override @Nullable public M68kMacroCall getMacroCall() { - return findChildByClass(M68kMacroCall.class); + return PsiTreeUtil.getChildOfType(this, M68kMacroCall.class); } @Override @Nullable public M68kPreprocessorDirective getPreprocessorDirective() { - return findChildByClass(M68kPreprocessorDirective.class); + return PsiTreeUtil.getChildOfType(this, M68kPreprocessorDirective.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryComplExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryComplExprImpl.java index 27f49e3..c3e1cee 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryComplExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryComplExprImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kUnaryComplExpr; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kUnaryComplExprImpl extends M68kExprImpl implements M68kUnaryCom @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryMinusExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryMinusExprImpl.java index ad2a682..08848d0 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryMinusExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryMinusExprImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kUnaryMinusExpr; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kUnaryMinusExprImpl extends M68kExprImpl implements M68kUnaryMin @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryNotExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryNotExprImpl.java index 2586cae..2024d0a 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryNotExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryNotExprImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kUnaryNotExpr; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kUnaryNotExprImpl extends M68kExprImpl implements M68kUnaryNotEx @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryPlusExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryPlusExprImpl.java index ca3e56c..3f41485 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryPlusExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryPlusExprImpl.java @@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; import de.platon42.intellij.plugins.m68k.psi.M68kUnaryPlusExpr; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; @@ -29,7 +30,7 @@ public class M68kUnaryPlusExprImpl extends M68kExprImpl implements M68kUnaryPlus @Override @Nullable public M68kExpr getExpr() { - return findChildByClass(M68kExpr.class); + return PsiTreeUtil.getChildOfType(this, M68kExpr.class); } } diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/M68kFileElementType.kt b/src/main/java/de/platon42/intellij/plugins/m68k/M68kFileElementType.kt index 7153b05..98df13d 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/M68kFileElementType.kt +++ b/src/main/java/de/platon42/intellij/plugins/m68k/M68kFileElementType.kt @@ -13,7 +13,8 @@ class M68kFileElementType private constructor() : IStubFileElementType, M68kGlobalLabel { + + constructor(node: ASTNode) : super(node) + + constructor(stub: M68kGlobalLabelStub, nodeType: IStubElementType<*, *>) : super(stub, nodeType) override fun getPresentation(): ItemPresentation? { - return PresentationData(name, containingFile?.name, getIcon(0), null) + return PresentationData(name, containingFile.name, getIcon(0), null) } override fun getIcon(flags: Int): Icon? { return M68kIcons.GLOBAL_LABEL } + + override fun toString(): String { + return javaClass.simpleName + "(GLOBAL_LABEL)" + } } \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.kt index 00e54c5..eca1b50 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.kt +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.kt @@ -3,4 +3,4 @@ package de.platon42.intellij.plugins.m68k.psi import com.intellij.psi.NavigatablePsiElement import com.intellij.psi.PsiNameIdentifierOwner -interface M68kNamedElement : PsiNameIdentifierOwner, NavigatablePsiElement \ No newline at end of file +interface M68kNamedElement : M68kPsiElement, PsiNameIdentifierOwner, NavigatablePsiElement \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kPsiElement.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kPsiElement.kt new file mode 100644 index 0000000..d69ca66 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kPsiElement.kt @@ -0,0 +1,5 @@ +package de.platon42.intellij.plugins.m68k.psi + +import com.intellij.psi.PsiElement + +interface M68kPsiElement : PsiElement \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/refs/M68kGlobalLabelSymbolReference.kt b/src/main/java/de/platon42/intellij/plugins/m68k/refs/M68kGlobalLabelSymbolReference.kt index d576e89..608dd56 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/refs/M68kGlobalLabelSymbolReference.kt +++ b/src/main/java/de/platon42/intellij/plugins/m68k/refs/M68kGlobalLabelSymbolReference.kt @@ -36,7 +36,7 @@ class M68kGlobalLabelSymbolReference(element: M68kSymbolReference) : val project = ref.element.project val targets: MutableList = SmartList() PsiSearchHelper.getInstance(project).processElementsWithWord( - { elem, offset -> + { elem, _ -> when (elem) { is M68kGlobalLabel, is M68kSymbolDefinition -> targets.add(elem) } diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kElementTypes.kt b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kElementTypes.kt new file mode 100644 index 0000000..16062ce --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kElementTypes.kt @@ -0,0 +1,44 @@ +package de.platon42.intellij.plugins.m68k.stubs + +import com.intellij.lang.LighterAST +import com.intellij.lang.LighterASTNode +import com.intellij.psi.PsiElement +import com.intellij.psi.impl.source.tree.LightTreeUtil +import com.intellij.psi.stubs.* +import com.intellij.psi.tree.ILightStubFileElementType +import de.platon42.intellij.plugins.m68k.MC68000Language.Companion.INSTANCE +import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabel +import de.platon42.intellij.plugins.m68k.psi.M68kTypes +import de.platon42.intellij.plugins.m68k.psi.impl.M68kGlobalLabelImpl +import de.platon42.intellij.plugins.m68k.stubs.impl.M68kGlobalLabelStubImpl +import java.io.IOException + +interface M68kElementTypes { + companion object { + @JvmField + val FILE = ILightStubFileElementType(INSTANCE) + + @JvmField + val GLOBAL_LABEL: IStubElementType = + object : M68kStubElementType("GLOBAL_LABEL") { + override fun createPsi(stub: M68kGlobalLabelStub): M68kGlobalLabel = M68kGlobalLabelImpl(stub, this) + + override fun createStub(psi: M68kGlobalLabel, parentStub: StubElement): M68kGlobalLabelStub = + M68kGlobalLabelStubImpl(parentStub, this, psi.name!!) + + override fun createStub(tree: LighterAST, node: LighterASTNode, parentStub: StubElement<*>): M68kGlobalLabelStub { + val idNode = LightTreeUtil.requiredChildOfType(tree, node, M68kTypes.GLOBAL_LABEL_DEF) + return M68kGlobalLabelStubImpl(parentStub, this, LightTreeUtil.toFilteredString(tree, idNode, null)) + } + + @Throws(IOException::class) + override fun serialize(stub: M68kGlobalLabelStub, dataStream: StubOutputStream) = dataStream.writeName(stub.name) + + @Throws(IOException::class) + override fun deserialize(dataStream: StubInputStream, parentStub: StubElement<*>): M68kGlobalLabelStub = + M68kGlobalLabelStubImpl(parentStub, this, dataStream.readName()!!) + + override fun indexStub(stub: M68kGlobalLabelStub, sink: IndexSink) = sink.occurrence(M68kGlobalLabelStubIndex.KEY, stub.name!!) + } + } +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kGlobalLabelStub.kt b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kGlobalLabelStub.kt new file mode 100644 index 0000000..8bf139e --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kGlobalLabelStub.kt @@ -0,0 +1,6 @@ +package de.platon42.intellij.plugins.m68k.stubs + +import com.intellij.psi.stubs.NamedStub +import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabel + +interface M68kGlobalLabelStub : NamedStub \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kGlobalLabelStubIndex.kt b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kGlobalLabelStubIndex.kt new file mode 100644 index 0000000..58087ca --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kGlobalLabelStubIndex.kt @@ -0,0 +1,16 @@ +package de.platon42.intellij.plugins.m68k.stubs + +import com.intellij.psi.stubs.StringStubIndexExtension +import com.intellij.psi.stubs.StubIndexKey +import de.platon42.intellij.plugins.m68k.M68kFileElementType +import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabel + +class M68kGlobalLabelStubIndex : StringStubIndexExtension() { + override fun getKey(): StubIndexKey = KEY + + override fun getVersion(): Int = M68kFileElementType.STUB_VERSION + + companion object { + val KEY = StubIndexKey.createIndexKey("mc68000.globallabel.index") + } +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kStubElementType.kt b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kStubElementType.kt new file mode 100644 index 0000000..b1f0df9 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kStubElementType.kt @@ -0,0 +1,13 @@ +package de.platon42.intellij.plugins.m68k.stubs + +import com.intellij.psi.stubs.ILightStubElementType +import com.intellij.psi.stubs.StubElement +import de.platon42.intellij.plugins.m68k.M68kFileElementType +import de.platon42.intellij.plugins.m68k.MC68000Language.Companion.INSTANCE +import de.platon42.intellij.plugins.m68k.psi.M68kPsiElement + +abstract class M68kStubElementType, PSI_TYPE : M68kPsiElement>(debugName: String) : + + ILightStubElementType(debugName, INSTANCE) { + override fun getExternalId(): String = M68kFileElementType.STUB_EXTERNAL_ID_PREFIX + this +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kStubElementTypeFactory.kt b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kStubElementTypeFactory.kt new file mode 100644 index 0000000..608ea03 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kStubElementTypeFactory.kt @@ -0,0 +1,15 @@ +package de.platon42.intellij.plugins.m68k.stubs + +import com.intellij.psi.stubs.IStubElementType +import com.intellij.psi.stubs.StubElement +import de.platon42.intellij.plugins.m68k.psi.M68kPsiElement + +object M68kStubElementTypeFactory { + @JvmStatic + fun stubFactory(name: String): IStubElementType, out M68kPsiElement> { + when (name) { + "GLOBAL_LABEL" -> return M68kElementTypes.GLOBAL_LABEL + else -> throw RuntimeException("Unknown element type '$name'") + } + } +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/stubs/impl/M68kGlobalLabelStubImpl.kt b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/impl/M68kGlobalLabelStubImpl.kt new file mode 100644 index 0000000..a1ddd98 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/stubs/impl/M68kGlobalLabelStubImpl.kt @@ -0,0 +1,13 @@ +package de.platon42.intellij.plugins.m68k.stubs.impl + +import com.intellij.psi.stubs.IStubElementType +import com.intellij.psi.stubs.NamedStubBase +import com.intellij.psi.stubs.StubElement +import com.intellij.util.io.StringRef +import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabel +import de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStub + +class M68kGlobalLabelStubImpl : NamedStubBase, M68kGlobalLabelStub { + constructor(parent: StubElement<*>, elementType: IStubElementType<*, *>, name: StringRef) : super(parent, elementType, name) + constructor(parent: StubElement<*>, elementType: IStubElementType<*, *>, name: String) : super(parent, elementType, name) +} \ No newline at end of file diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 6735f77..590646f 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -29,7 +29,8 @@ - + +