Repository: haxefoundation/intellij-haxe
Issue: Modifications to the /gen/ tree have to be reverted and non-generated functions must be integrated differently.

Changes 1f7684ee931708f59567fbb48f1fc421e848986d, 1f7684ee931708f59567fbb48f1fc421e848986d, and 1f7684ee931708f59567fbb48f1fc421e848986d introduced manual changes to the generated parser files.  These need to be reverted and the new code added, either to a mixin super-class or using another mechanism.

Primarily the functions that need to be removed are the getModel() methods added for semantic annotation.

TIR: STB-11374


Changed files:
src/common/com/intellij/plugins/haxe/model/HaxeMemberModel.java, gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclaration.java, gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeVarDeclarationImpl.java, src/common/com/intellij/plugins/haxe/ide/annotator/HaxeSemanticAnnotator.java, src/common/com/intellij/plugins/haxe/model/HaxeClassModel.java, gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeExpressionListImpl.java, gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclarationPart.java

diff --git a/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclaration.java b/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclaration.java
index bab8f5dd..67e43298 100644
--- a/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclaration.java
+++ b/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclaration.java
@@ -20,14 +20,10 @@
 package com.intellij.plugins.haxe.lang.psi;
 
 import java.util.List;
-
-import com.intellij.plugins.haxe.model.HaxeFieldModel;
-import com.intellij.plugins.haxe.model.HaxeMethodModel;
 import org.jetbrains.annotations.*;
 import com.intellij.psi.PsiElement;
 
 public interface HaxeVarDeclaration extends HaxePsiField {
-  HaxeFieldModel getModel();
 
   @NotNull
   List<HaxeAutoBuildMacro> getAutoBuildMacroList();
diff --git a/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclarationPart.java b/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclarationPart.java
index f4efcb61..813fb1a1 100644
--- a/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclarationPart.java
+++ b/gen/com/intellij/plugins/haxe/lang/psi/HaxeVarDeclarationPart.java
@@ -20,12 +20,11 @@
 package com.intellij.plugins.haxe.lang.psi;
 
 import java.util.List;
-
-import com.intellij.plugins.haxe.model.HaxeFieldModel;
 import org.jetbrains.annotations.*;
 import com.intellij.psi.PsiElement;
 
 public interface HaxeVarDeclarationPart extends HaxePsiField {
+
   @NotNull
   HaxeComponentName getComponentName();
 
diff --git a/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeExpressionListImpl.java b/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeExpressionListImpl.java
index bed75f2b..1fb8676f 100644
--- a/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeExpressionListImpl.java
+++ b/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeExpressionListImpl.java
@@ -19,14 +19,15 @@
 // This is a generated file. Not intended for manual editing.
 package com.intellij.plugins.haxe.lang.psi.impl;
 
+import java.util.List;
 import org.jetbrains.annotations.*;
 import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiElementVisitor;
 import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.plugins.haxe.lang.lexer.HaxeTokenTypes.*;
 import com.intellij.plugins.haxe.lang.psi.*;
 
-import java.util.List;
-
 public class HaxeExpressionListImpl extends HaxePsiCompositeElementImpl implements HaxeExpressionList {
 
   public HaxeExpressionListImpl(ASTNode node) {
diff --git a/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeVarDeclarationImpl.java b/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeVarDeclarationImpl.java
index 248cb2cb..5428c326 100644
--- a/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeVarDeclarationImpl.java
+++ b/gen/com/intellij/plugins/haxe/lang/psi/impl/HaxeVarDeclarationImpl.java
@@ -20,9 +20,6 @@
 package com.intellij.plugins.haxe.lang.psi.impl;
 
 import java.util.List;
-
-import com.intellij.plugins.haxe.model.HaxeFieldModel;
-import com.intellij.plugins.haxe.model.HaxeMethodModel;
 import org.jetbrains.annotations.*;
 import com.intellij.lang.ASTNode;
 import com.intellij.psi.PsiElement;
@@ -42,11 +39,6 @@ public class HaxeVarDeclarationImpl extends HaxePsiFieldImpl implements HaxeVarD
     else super.accept(visitor);
   }
 
-  @Override
-  public HaxeFieldModel getModel() {
-    return new HaxeFieldModel(this);
-  }
-
   @Override
   @NotNull
   public List<HaxeAutoBuildMacro> getAutoBuildMacroList() {
diff --git a/src/common/com/intellij/plugins/haxe/ide/annotator/HaxeSemanticAnnotator.java b/src/common/com/intellij/plugins/haxe/ide/annotator/HaxeSemanticAnnotator.java
index 6a9764fa..38de3921 100644
--- a/src/common/com/intellij/plugins/haxe/ide/annotator/HaxeSemanticAnnotator.java
+++ b/src/common/com/intellij/plugins/haxe/ide/annotator/HaxeSemanticAnnotator.java
@@ -104,7 +104,7 @@ class TypeTagChecker {
 
 class FieldChecker {
   public static void check(final HaxeVarDeclaration var, final AnnotationHolder holder) {
-    HaxeFieldModel field = var.getModel();
+    HaxeFieldModel field = new HaxeFieldModel(var);
     if (field.isProperty()) {
       checkProperty(field, holder);
     }
diff --git a/src/common/com/intellij/plugins/haxe/model/HaxeClassModel.java b/src/common/com/intellij/plugins/haxe/model/HaxeClassModel.java
index b410131e..d0de5d21 100644
--- a/src/common/com/intellij/plugins/haxe/model/HaxeClassModel.java
+++ b/src/common/com/intellij/plugins/haxe/model/HaxeClassModel.java
@@ -206,7 +206,7 @@ public class HaxeClassModel {
 
   public HaxeFieldModel getField(String name) {
     HaxeVarDeclaration name1 = (HaxeVarDeclaration)haxeClass.findHaxeFieldByName(name);
-    return name1 != null ? name1.getModel() : null;
+    return name1 != null ? new HaxeFieldModel(name1) : null;
   }
 
   public HaxeMethodModel getMethod(String name) {
diff --git a/src/common/com/intellij/plugins/haxe/model/HaxeMemberModel.java b/src/common/com/intellij/plugins/haxe/model/HaxeMemberModel.java
index b737f157..59d4b39a 100644
--- a/src/common/com/intellij/plugins/haxe/model/HaxeMemberModel.java
+++ b/src/common/com/intellij/plugins/haxe/model/HaxeMemberModel.java
@@ -90,7 +90,7 @@ abstract public class HaxeMemberModel {
 
   public static HaxeMemberModel fromPsi(PsiElement element) {
     if (element instanceof HaxeMethod) return ((HaxeMethod)element).getModel();
-    if (element instanceof HaxeVarDeclaration) return ((HaxeVarDeclaration)element).getModel();
+    if (element instanceof HaxeVarDeclaration) return new HaxeFieldModel((HaxeVarDeclaration)element);
     final PsiElement parent = element.getParent();
     return (parent != null) ? fromPsi(parent) : null;
   }