package de.plushnikov.intellij.lombok.util;

import com.intellij.psi.PsiType;

/**
 * Gets all of primitive types as PsiType
 * Attention: IntelliJ 11 returns PsiPrimitiveType instead of PsiType, so we need a facade here.
 * @author Plushnikov Michail
 */
public class PsiPrimitiveTypeUtil10Impl implements PsiPrimitiveTypeUtil {
  @Override
  public PsiType getBooleanType() {
    return PsiType.BOOLEAN;
  }

  @Override
  public PsiType getNullType() {
    return PsiType.NULL;
  }

  @Override
  public PsiType getVoidType() {
    return PsiType.VOID;
  }

  @Override
  public PsiType getByteType() {
    return PsiType.BYTE;
  }

  @Override
  public PsiType getCharType() {
    return PsiType.CHAR;
  }

  @Override
  public PsiType getFloatType() {
    return PsiType.FLOAT;
  }

  @Override
  public PsiType getDoubleType() {
    return PsiType.DOUBLE;
  }

  @Override
  public PsiType getShortType() {
    return PsiType.SHORT;
  }

  @Override
  public PsiType getIntType() {
    return PsiType.INT;
  }

  @Override
  public PsiType getLongType() {
    return PsiType.LONG;
  }
}

@@ -67,20 +67,110 @@
 .psi.Psi
-Type
+Keyword;%0D%0Aimport com.intellij.psi.PsiType;%0D%0Aimport com.intellij.psi.impl.PsiElementFactoryImpl
 ;%0D%0A%0D%0A/**
@@ -312,16 +312,97 @@
  here.%0D%0A
+ * Before build 103.72 is was PsiType and after this build PsiPrimitiveType%0D%0A *%0D%0A
  * @auth
@@ -572,20 +572,62 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .BOOLEAN
 ;%0D%0A 
@@ -622,16 +622,17 @@
 .BOOLEAN
+)
 ;%0D%0A  %7D%0D%0A
@@ -698,17 +698,60 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .NULL
+)
 ;%0D%0A 
@@ -821,17 +821,60 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .VOID
+)
 ;%0D%0A 
@@ -944,17 +944,60 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .BYTE
+)
 ;%0D%0A 
@@ -1067,17 +1067,60 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .CHAR
+)
 ;%0D%0A 
@@ -1191,18 +1191,61 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .FLOAT
+)
 ;%0D%0A 
@@ -1317,19 +1317,62 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .DOUBLE
+)
 ;%0D%0A 
@@ -1443,18 +1443,61 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .SHORT
+)
 ;%0D%0A 
@@ -1566,16 +1566,59 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .INT
+)
 ;%0D%0A 
@@ -1688,17 +1688,60 @@
  Psi
-Type
+ElementFactoryImpl.getPrimitiveType(PsiKeyword
 .LONG
+)
 ;%0D%0A 

Fix incompatibility between IntelliJ<=10.0.2 and >10.0.2 (build 103.72)