Added first stubbing and stub index for global labels.
This commit is contained in:
parent
a800b13a3e
commit
83d2ca3304
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kAddressSize extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kAddressSize extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kAddressingMode extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kAddressingMode extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface M68kAsmInstruction extends PsiElement {
|
public interface M68kAsmInstruction extends M68kPsiElement {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
List<M68kAddressingMode> getAddressingModeList();
|
List<M68kAddressingMode> getAddressingModeList();
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public interface M68kAsmOp extends PsiElement {
|
public interface M68kAsmOp extends M68kPsiElement {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
M68kOperandSize getOperandSize();
|
M68kOperandSize getOperandSize();
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public interface M68kAssignment extends PsiElement {
|
public interface M68kAssignment extends M68kPsiElement {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
M68kSymbolDefinition getSymbolDefinition();
|
M68kSymbolDefinition getSymbolDefinition();
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kDataWidth extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kDataWidth extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kExpr extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kExpr extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
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.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public interface M68kGlobalLabel extends M68kLabel, M68kNamedElement {
|
public interface M68kGlobalLabel extends M68kLabel, M68kNamedElement, StubBasedPsiElement<M68kGlobalLabelStub> {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
String getName();
|
String getName();
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kLabel extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kLabel extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kMacroCall extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kMacroCall extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kOperandSize extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kOperandSize extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface M68kPreprocessorDirective extends PsiElement {
|
public interface M68kPreprocessorDirective extends M68kPsiElement {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
M68kLabel getLabel();
|
M68kLabel getLabel();
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kProgramCounterReference extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kProgramCounterReference extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
public interface M68kRegister extends M68kPsiElement {
|
||||||
|
|
||||||
public interface M68kRegister extends PsiElement {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public interface M68kStatement extends PsiElement {
|
public interface M68kStatement extends M68kPsiElement {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
M68kAsmInstruction getAsmInstruction();
|
M68kAsmInstruction getAsmInstruction();
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public interface M68kSymbolReference extends PsiElement {
|
public interface M68kSymbolReference extends M68kPsiElement {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
String getSymbolName();
|
String getSymbolName();
|
||||||
|
@ -5,6 +5,7 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import com.intellij.psi.tree.IElementType;
|
import com.intellij.psi.tree.IElementType;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.impl.*;
|
import de.platon42.intellij.plugins.m68k.psi.impl.*;
|
||||||
|
import de.platon42.intellij.plugins.m68k.stubs.M68kStubElementTypeFactory;
|
||||||
|
|
||||||
public interface M68kTypes {
|
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_REGISTER_DIRECT_ADDRESSING_MODE = new M68kElementType("DATA_REGISTER_DIRECT_ADDRESSING_MODE");
|
||||||
IElementType DATA_WIDTH = new M68kElementType("DATA_WIDTH");
|
IElementType DATA_WIDTH = new M68kElementType("DATA_WIDTH");
|
||||||
IElementType EXPR = new M68kElementType("EXPR");
|
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 IMMEDIATE_DATA = new M68kElementType("IMMEDIATE_DATA");
|
||||||
IElementType LABEL = new M68kElementType("LABEL");
|
IElementType LABEL = new M68kElementType("LABEL");
|
||||||
IElementType LITERAL_EXPR = new M68kElementType("LITERAL_EXPR");
|
IElementType LITERAL_EXPR = new M68kElementType("LITERAL_EXPR");
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// This is a generated file. Not intended for manual editing.
|
// This is a generated file. Not intended for manual editing.
|
||||||
package de.platon42.intellij.plugins.m68k.psi;
|
package de.platon42.intellij.plugins.m68k.psi;
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
import com.intellij.psi.PsiElementVisitor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@ -266,7 +265,7 @@ public class M68kVisitor extends PsiElementVisitor {
|
|||||||
visitPsiElement(o);
|
visitPsiElement(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void visitPsiElement(@NotNull PsiElement o) {
|
public void visitPsiElement(@NotNull M68kPsiElement o) {
|
||||||
visitElement(o);
|
visitElement(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAbsoluteAddressAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressSize;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressSize;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
||||||
@ -30,13 +31,13 @@ public class M68kAbsoluteAddressAddressingModeImpl extends M68kAddressingModeImp
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kAddressSize getAddressSize() {
|
public M68kAddressSize getAddressSize() {
|
||||||
return findChildByClass(M68kAddressSize.class);
|
return PsiTreeUtil.getChildOfType(this, M68kAddressSize.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findNotNullChildByClass(M68kExpr.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAddressRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterDirectAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterDirectAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kAddressRegisterDirectAddressingModeImpl extends M68kAddressingM
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAddressRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kAddressRegisterIndirectAddressingModeImpl extends M68kAddressin
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAddressRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectPostIncAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectPostIncAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kAddressRegisterIndirectPostIncAddressingModeImpl extends M68kAd
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAddressRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectPreDecAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectPreDecAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kAddressRegisterIndirectPreDecAddressingModeImpl extends M68kAdd
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAddressRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectWithDisplacementNewAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectWithDisplacementNewAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
||||||
@ -29,13 +30,13 @@ public class M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl ex
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findNotNullChildByClass(M68kExpr.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAddressRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectWithDisplacementOldAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegisterIndirectWithDisplacementOldAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
||||||
@ -29,13 +30,13 @@ public class M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl ex
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findNotNullChildByClass(M68kExpr.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
import com.intellij.psi.PsiElementVisitor;
|
||||||
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.*;
|
import de.platon42.intellij.plugins.m68k.psi.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -27,25 +28,25 @@ public class M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl extends M
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kDataWidth getDataWidth() {
|
public M68kDataWidth getDataWidth() {
|
||||||
return findChildByClass(M68kDataWidth.class);
|
return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kRegister getRegister() {
|
public M68kRegister getRegister() {
|
||||||
return findNotNullChildByClass(M68kRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
import com.intellij.psi.PsiElementVisitor;
|
||||||
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.*;
|
import de.platon42.intellij.plugins.m68k.psi.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -27,25 +28,25 @@ public class M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl extends M
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAddressRegister getAddressRegister() {
|
public M68kAddressRegister getAddressRegister() {
|
||||||
return findNotNullChildByClass(M68kAddressRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kDataWidth getDataWidth() {
|
public M68kDataWidth getDataWidth() {
|
||||||
return findChildByClass(M68kDataWidth.class);
|
return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kRegister getRegister() {
|
public M68kRegister getRegister() {
|
||||||
return findNotNullChildByClass(M68kRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public class M68kAsmInstructionImpl extends ASTWrapperPsiElement implements M68k
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kAsmOp getAsmOp() {
|
public M68kAsmOp getAsmOp() {
|
||||||
return findNotNullChildByClass(M68kAsmOp.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAsmOp.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAsmOp;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kOperandSize;
|
import de.platon42.intellij.plugins.m68k.psi.M68kOperandSize;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kAsmOpImpl extends ASTWrapperPsiElement implements M68kAsmOp {
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kOperandSize getOperandSize() {
|
public M68kOperandSize getOperandSize() {
|
||||||
return findChildByClass(M68kOperandSize.class);
|
return PsiTreeUtil.getChildOfType(this, M68kOperandSize.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kAssignment;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kSymbolDefinition;
|
import de.platon42.intellij.plugins.m68k.psi.M68kSymbolDefinition;
|
||||||
@ -29,13 +30,13 @@ public class M68kAssignmentImpl extends ASTWrapperPsiElement implements M68kAssi
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kSymbolDefinition getSymbolDefinition() {
|
public M68kSymbolDefinition getSymbolDefinition() {
|
||||||
return findNotNullChildByClass(M68kSymbolDefinition.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kSymbolDefinition.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findNotNullChildByClass(M68kExpr.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kDataRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kDataRegisterDirectAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kDataRegisterDirectAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kDataRegisterDirectAddressingModeImpl extends M68kAddressingMode
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kDataRegister getDataRegister() {
|
public M68kDataRegister getDataRegister() {
|
||||||
return findNotNullChildByClass(M68kDataRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kDataRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,12 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kGlobalLabel;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin;
|
import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kPsiImplUtil;
|
import de.platon42.intellij.plugins.m68k.psi.M68kPsiImplUtil;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
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.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@ -17,6 +19,10 @@ public class M68kGlobalLabelImpl extends M68kGlobalLabelMixin implements M68kGlo
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public M68kGlobalLabelImpl(@NotNull M68kGlobalLabelStub stub, @NotNull IStubElementType<?, ?> nodeType) {
|
||||||
|
super(stub, nodeType);
|
||||||
|
}
|
||||||
|
|
||||||
public void accept(@NotNull M68kVisitor visitor) {
|
public void accept(@NotNull M68kVisitor visitor) {
|
||||||
visitor.visitGlobalLabel(this);
|
visitor.visitGlobalLabel(this);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kImmediateData;
|
import de.platon42.intellij.plugins.m68k.psi.M68kImmediateData;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kImmediateDataImpl extends M68kAddressingModeImpl implements M68
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findNotNullChildByClass(M68kExpr.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kParenExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kParenExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kParenExprImpl extends M68kExprImpl implements M68kParenExpr {
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class M68kPreprocessorDirectiveImpl extends ASTWrapperPsiElement implemen
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kLabel getLabel() {
|
public M68kLabel getLabel() {
|
||||||
return findChildByClass(M68kLabel.class);
|
return PsiTreeUtil.getChildOfType(this, M68kLabel.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterIndirectWithDisplacementNewAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterIndirectWithDisplacementNewAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl ext
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findNotNullChildByClass(M68kExpr.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kExpr.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterIndirectWithDisplacementOldAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterIndirectWithDisplacementOldAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl ext
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
import com.intellij.psi.PsiElementVisitor;
|
||||||
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.*;
|
import de.platon42.intellij.plugins.m68k.psi.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -27,19 +28,19 @@ public class M68kProgramCounterIndirectWithIndexNewAddressingModeImpl extends M6
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kDataWidth getDataWidth() {
|
public M68kDataWidth getDataWidth() {
|
||||||
return findChildByClass(M68kDataWidth.class);
|
return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kRegister getRegister() {
|
public M68kRegister getRegister() {
|
||||||
return findNotNullChildByClass(M68kRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
import com.intellij.psi.PsiElementVisitor;
|
||||||
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.*;
|
import de.platon42.intellij.plugins.m68k.psi.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -27,19 +28,19 @@ public class M68kProgramCounterIndirectWithIndexOldAddressingModeImpl extends M6
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kDataWidth getDataWidth() {
|
public M68kDataWidth getDataWidth() {
|
||||||
return findChildByClass(M68kDataWidth.class);
|
return PsiTreeUtil.getChildOfType(this, M68kDataWidth.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kRegister getRegister() {
|
public M68kRegister getRegister() {
|
||||||
return findNotNullChildByClass(M68kRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kProgramCounterReference;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kRefExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kRefExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kSymbolReference;
|
import de.platon42.intellij.plugins.m68k.psi.M68kSymbolReference;
|
||||||
@ -30,13 +31,13 @@ public class M68kRefExprImpl extends M68kExprImpl implements M68kRefExpr {
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kProgramCounterReference getProgramCounterReference() {
|
public M68kProgramCounterReference getProgramCounterReference() {
|
||||||
return findChildByClass(M68kProgramCounterReference.class);
|
return PsiTreeUtil.getChildOfType(this, M68kProgramCounterReference.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kSymbolReference getSymbolReference() {
|
public M68kSymbolReference getSymbolReference() {
|
||||||
return findChildByClass(M68kSymbolReference.class);
|
return PsiTreeUtil.getChildOfType(this, M68kSymbolReference.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kSpecialRegister;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kSpecialRegisterDirectAddressingMode;
|
import de.platon42.intellij.plugins.m68k.psi.M68kSpecialRegisterDirectAddressingMode;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -28,7 +29,7 @@ public class M68kSpecialRegisterDirectAddressingModeImpl extends M68kAddressingM
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public M68kSpecialRegister getSpecialRegister() {
|
public M68kSpecialRegister getSpecialRegister() {
|
||||||
return findNotNullChildByClass(M68kSpecialRegister.class);
|
return notNullChild(PsiTreeUtil.getChildOfType(this, M68kSpecialRegister.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
import com.intellij.psi.PsiElementVisitor;
|
||||||
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.*;
|
import de.platon42.intellij.plugins.m68k.psi.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -27,31 +28,31 @@ public class M68kStatementImpl extends ASTWrapperPsiElement implements M68kState
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kAsmInstruction getAsmInstruction() {
|
public M68kAsmInstruction getAsmInstruction() {
|
||||||
return findChildByClass(M68kAsmInstruction.class);
|
return PsiTreeUtil.getChildOfType(this, M68kAsmInstruction.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kAssignment getAssignment() {
|
public M68kAssignment getAssignment() {
|
||||||
return findChildByClass(M68kAssignment.class);
|
return PsiTreeUtil.getChildOfType(this, M68kAssignment.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kLabel getLabel() {
|
public M68kLabel getLabel() {
|
||||||
return findChildByClass(M68kLabel.class);
|
return PsiTreeUtil.getChildOfType(this, M68kLabel.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kMacroCall getMacroCall() {
|
public M68kMacroCall getMacroCall() {
|
||||||
return findChildByClass(M68kMacroCall.class);
|
return PsiTreeUtil.getChildOfType(this, M68kMacroCall.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kPreprocessorDirective getPreprocessorDirective() {
|
public M68kPreprocessorDirective getPreprocessorDirective() {
|
||||||
return findChildByClass(M68kPreprocessorDirective.class);
|
return PsiTreeUtil.getChildOfType(this, M68kPreprocessorDirective.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryComplExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryComplExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kUnaryComplExprImpl extends M68kExprImpl implements M68kUnaryCom
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryMinusExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryMinusExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kUnaryMinusExprImpl extends M68kExprImpl implements M68kUnaryMin
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryNotExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryNotExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kUnaryNotExprImpl extends M68kExprImpl implements M68kUnaryNotEx
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package de.platon42.intellij.plugins.m68k.psi.impl;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.PsiElementVisitor;
|
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.M68kExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryPlusExpr;
|
import de.platon42.intellij.plugins.m68k.psi.M68kUnaryPlusExpr;
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
import de.platon42.intellij.plugins.m68k.psi.M68kVisitor;
|
||||||
@ -29,7 +30,7 @@ public class M68kUnaryPlusExprImpl extends M68kExprImpl implements M68kUnaryPlus
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public M68kExpr getExpr() {
|
public M68kExpr getExpr() {
|
||||||
return findChildByClass(M68kExpr.class);
|
return PsiTreeUtil.getChildOfType(this, M68kExpr.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,8 @@ class M68kFileElementType private constructor() : IStubFileElementType<M68kFileS
|
|||||||
@JvmField
|
@JvmField
|
||||||
val INSTANCE = M68kFileElementType()
|
val INSTANCE = M68kFileElementType()
|
||||||
|
|
||||||
const val STUB_VERSION = 1
|
const val STUB_VERSION = 2
|
||||||
|
const val STUB_EXTERNAL_ID_PREFIX = "MC68000."
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getStubVersion() = STUB_VERSION
|
override fun getStubVersion() = STUB_VERSION
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
parserClass="de.platon42.intellij.plugins.m68k.parser.M68kParser"
|
parserClass="de.platon42.intellij.plugins.m68k.parser.M68kParser"
|
||||||
parserUtilClass="de.platon42.intellij.plugins.m68k.parser.M68kParserUtilBase"
|
parserUtilClass="de.platon42.intellij.plugins.m68k.parser.M68kParserUtilBase"
|
||||||
|
|
||||||
|
implements = "de.platon42.intellij.plugins.m68k.psi.M68kPsiElement"
|
||||||
extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
|
extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
|
||||||
psiClassPrefix="M68k"
|
psiClassPrefix="M68k"
|
||||||
psiImplClassSuffix="Impl"
|
psiImplClassSuffix="Impl"
|
||||||
@ -153,8 +154,8 @@ GlobalLabel ::= GLOBAL_LABEL_DEF COLON* {
|
|||||||
extends = Label
|
extends = Label
|
||||||
implements = "de.platon42.intellij.plugins.m68k.psi.M68kNamedElement"
|
implements = "de.platon42.intellij.plugins.m68k.psi.M68kNamedElement"
|
||||||
mixin = "de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin"
|
mixin = "de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin"
|
||||||
// elementTypeFactory = "de.platon42.intellij.plugins.m68k.stubs.M68kStubElementTypeFactory.stubFactory"
|
elementTypeFactory = "de.platon42.intellij.plugins.m68k.stubs.M68kStubElementTypeFactory.stubFactory"
|
||||||
// stubClass = "de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStub"
|
stubClass = "de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStub"
|
||||||
methods = [getName setName getNameIdentifier]
|
methods = [getName setName getNameIdentifier]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,11 +6,11 @@ import com.intellij.lexer.Lexer
|
|||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.psi.FileViewProvider
|
import com.intellij.psi.FileViewProvider
|
||||||
import com.intellij.psi.tree.TokenSet
|
import com.intellij.psi.tree.TokenSet
|
||||||
import de.platon42.intellij.plugins.m68k.M68kFileElementType
|
|
||||||
import de.platon42.intellij.plugins.m68k.lexer.M68kLexer
|
import de.platon42.intellij.plugins.m68k.lexer.M68kLexer
|
||||||
import de.platon42.intellij.plugins.m68k.lexer.M68kLexerPrefs
|
import de.platon42.intellij.plugins.m68k.lexer.M68kLexerPrefs
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kFile
|
import de.platon42.intellij.plugins.m68k.psi.M68kFile
|
||||||
import de.platon42.intellij.plugins.m68k.psi.M68kTypes
|
import de.platon42.intellij.plugins.m68k.psi.M68kTypes
|
||||||
|
import de.platon42.intellij.plugins.m68k.stubs.M68kElementTypes
|
||||||
|
|
||||||
class M68kParserDefinition : ParserDefinition {
|
class M68kParserDefinition : ParserDefinition {
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ class M68kParserDefinition : ParserDefinition {
|
|||||||
|
|
||||||
override fun createParser(project: Project) = M68kParser()
|
override fun createParser(project: Project) = M68kParser()
|
||||||
|
|
||||||
override fun getFileNodeType() = M68kFileElementType.INSTANCE
|
override fun getFileNodeType() = M68kElementTypes.FILE
|
||||||
|
|
||||||
override fun getCommentTokens() = COMMENTS
|
override fun getCommentTokens() = COMMENTS
|
||||||
|
|
||||||
|
@ -1,19 +1,29 @@
|
|||||||
package de.platon42.intellij.plugins.m68k.psi
|
package de.platon42.intellij.plugins.m68k.psi
|
||||||
|
|
||||||
import com.intellij.extapi.psi.ASTWrapperPsiElement
|
import com.intellij.extapi.psi.StubBasedPsiElementBase
|
||||||
import com.intellij.ide.projectView.PresentationData
|
import com.intellij.ide.projectView.PresentationData
|
||||||
import com.intellij.lang.ASTNode
|
import com.intellij.lang.ASTNode
|
||||||
import com.intellij.navigation.ItemPresentation
|
import com.intellij.navigation.ItemPresentation
|
||||||
|
import com.intellij.psi.stubs.IStubElementType
|
||||||
import de.platon42.intellij.plugins.m68k.M68kIcons
|
import de.platon42.intellij.plugins.m68k.M68kIcons
|
||||||
|
import de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStub
|
||||||
import javax.swing.Icon
|
import javax.swing.Icon
|
||||||
|
|
||||||
abstract class M68kGlobalLabelMixin(node: ASTNode) : ASTWrapperPsiElement(node), M68kGlobalLabel {
|
abstract class M68kGlobalLabelMixin : StubBasedPsiElementBase<M68kGlobalLabelStub>, M68kGlobalLabel {
|
||||||
|
|
||||||
|
constructor(node: ASTNode) : super(node)
|
||||||
|
|
||||||
|
constructor(stub: M68kGlobalLabelStub, nodeType: IStubElementType<*, *>) : super(stub, nodeType)
|
||||||
|
|
||||||
override fun getPresentation(): ItemPresentation? {
|
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? {
|
override fun getIcon(flags: Int): Icon? {
|
||||||
return M68kIcons.GLOBAL_LABEL
|
return M68kIcons.GLOBAL_LABEL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return javaClass.simpleName + "(GLOBAL_LABEL)"
|
||||||
|
}
|
||||||
}
|
}
|
@ -3,4 +3,4 @@ package de.platon42.intellij.plugins.m68k.psi
|
|||||||
import com.intellij.psi.NavigatablePsiElement
|
import com.intellij.psi.NavigatablePsiElement
|
||||||
import com.intellij.psi.PsiNameIdentifierOwner
|
import com.intellij.psi.PsiNameIdentifierOwner
|
||||||
|
|
||||||
interface M68kNamedElement : PsiNameIdentifierOwner, NavigatablePsiElement
|
interface M68kNamedElement : M68kPsiElement, PsiNameIdentifierOwner, NavigatablePsiElement
|
@ -0,0 +1,5 @@
|
|||||||
|
package de.platon42.intellij.plugins.m68k.psi
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiElement
|
||||||
|
|
||||||
|
interface M68kPsiElement : PsiElement
|
@ -36,7 +36,7 @@ class M68kGlobalLabelSymbolReference(element: M68kSymbolReference) :
|
|||||||
val project = ref.element.project
|
val project = ref.element.project
|
||||||
val targets: MutableList<PsiElement> = SmartList()
|
val targets: MutableList<PsiElement> = SmartList()
|
||||||
PsiSearchHelper.getInstance(project).processElementsWithWord(
|
PsiSearchHelper.getInstance(project).processElementsWithWord(
|
||||||
{ elem, offset ->
|
{ elem, _ ->
|
||||||
when (elem) {
|
when (elem) {
|
||||||
is M68kGlobalLabel, is M68kSymbolDefinition -> targets.add(elem)
|
is M68kGlobalLabel, is M68kSymbolDefinition -> targets.add(elem)
|
||||||
}
|
}
|
||||||
|
@ -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<M68kFileStub>(INSTANCE)
|
||||||
|
|
||||||
|
@JvmField
|
||||||
|
val GLOBAL_LABEL: IStubElementType<M68kGlobalLabelStub, M68kGlobalLabel> =
|
||||||
|
object : M68kStubElementType<M68kGlobalLabelStub, M68kGlobalLabel>("GLOBAL_LABEL") {
|
||||||
|
override fun createPsi(stub: M68kGlobalLabelStub): M68kGlobalLabel = M68kGlobalLabelImpl(stub, this)
|
||||||
|
|
||||||
|
override fun createStub(psi: M68kGlobalLabel, parentStub: StubElement<out PsiElement>): 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!!)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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<M68kGlobalLabel>
|
@ -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<M68kGlobalLabel>() {
|
||||||
|
override fun getKey(): StubIndexKey<String, M68kGlobalLabel> = KEY
|
||||||
|
|
||||||
|
override fun getVersion(): Int = M68kFileElementType.STUB_VERSION
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val KEY = StubIndexKey.createIndexKey<String, M68kGlobalLabel>("mc68000.globallabel.index")
|
||||||
|
}
|
||||||
|
}
|
@ -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<STUB : StubElement<out M68kPsiElement>, PSI_TYPE : M68kPsiElement>(debugName: String) :
|
||||||
|
|
||||||
|
ILightStubElementType<STUB, PSI_TYPE>(debugName, INSTANCE) {
|
||||||
|
override fun getExternalId(): String = M68kFileElementType.STUB_EXTERNAL_ID_PREFIX + this
|
||||||
|
}
|
@ -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 StubElement<out M68kPsiElement>, out M68kPsiElement> {
|
||||||
|
when (name) {
|
||||||
|
"GLOBAL_LABEL" -> return M68kElementTypes.GLOBAL_LABEL
|
||||||
|
else -> throw RuntimeException("Unknown element type '$name'")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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<M68kGlobalLabel>, M68kGlobalLabelStub {
|
||||||
|
constructor(parent: StubElement<*>, elementType: IStubElementType<*, *>, name: StringRef) : super(parent, elementType, name)
|
||||||
|
constructor(parent: StubElement<*>, elementType: IStubElementType<*, *>, name: String) : super(parent, elementType, name)
|
||||||
|
}
|
@ -29,7 +29,8 @@
|
|||||||
<lang.psiStructureViewFactory language="MC68000" implementationClass="de.platon42.intellij.plugins.m68k.structureview.M68kStructureViewFactory"/>
|
<lang.psiStructureViewFactory language="MC68000" implementationClass="de.platon42.intellij.plugins.m68k.structureview.M68kStructureViewFactory"/>
|
||||||
<lang.elementManipulator forClass="de.platon42.intellij.plugins.m68k.psi.M68kSymbolReference"
|
<lang.elementManipulator forClass="de.platon42.intellij.plugins.m68k.psi.M68kSymbolReference"
|
||||||
implementationClass="de.platon42.intellij.plugins.m68k.refs.M68kSymbolReferenceElementManipulator"/>
|
implementationClass="de.platon42.intellij.plugins.m68k.refs.M68kSymbolReferenceElementManipulator"/>
|
||||||
|
<stubElementTypeHolder class="de.platon42.intellij.plugins.m68k.stubs.M68kElementTypes"/>
|
||||||
|
<stubIndex implementation="de.platon42.intellij.plugins.m68k.stubs.M68kGlobalLabelStubIndex"/>
|
||||||
<psi.referenceContributor implementation="de.platon42.intellij.plugins.m68k.refs.M68kReferenceContributor"/>
|
<psi.referenceContributor implementation="de.platon42.intellij.plugins.m68k.refs.M68kReferenceContributor"/>
|
||||||
<gotoSymbolContributor implementation="de.platon42.intellij.plugins.m68k.refs.M68kChooseByNameContributor"/>
|
<gotoSymbolContributor implementation="de.platon42.intellij.plugins.m68k.refs.M68kChooseByNameContributor"/>
|
||||||
<renameInputValidator implementation="de.platon42.intellij.plugins.m68k.psi.M68kRenameInputValidator"/>
|
<renameInputValidator implementation="de.platon42.intellij.plugins.m68k.psi.M68kRenameInputValidator"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user