Skip to content

Commit

Permalink
Add FFI imports required for EtaBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyothsnasrinivas committed Feb 16, 2018
1 parent 8f397ea commit d73c198
Show file tree
Hide file tree
Showing 32 changed files with 396 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eta-parser
1 change: 1 addition & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- base >=4.8 && <4.9
- containers == 0.5.10.2
- eta-parser
- eta-java-interop

library:
source-dirs: src/main/eta
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Com.IntelliJ.Execution.Configurations.GeneralCommandLine where

import P

-- Start com.intellij.execution.configurations.GeneralCommandLine

data GeneralCommandLine = GeneralCommandLine @com.intellij.execution.configurations.GeneralCommandLine
deriving Class

-- End com.intellij.execution.configurations.GeneralCommandLine
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module FFI.Com.IntelliJ.Execution.Process.BaseOSProcessHandler where

import P

-- Start com.intellij.execution.process.BaseOSProcessHandler

data BaseOSProcessHandler = BaseOSProcessHandler
@com.intellij.execution.process.BaseOSProcessHandler
deriving Class

-- TODO addProcessListener

foreign import java unsafe startNotify :: Java BaseOSProcessHandler ()

foreign import java unsafe waitFor :: Java BaseOSProcessHandler Bool

-- End com.intellij.execution.process.BaseOSProcessHandler
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Com/IntelliJ/Execution/Process/ProcessAdapter.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Com.IntelliJ.Execution.Process.ProcessAdapter where

import P

-- Start com.intellij.execution.process.ProcessAdapter

data ProcessAdapter = ProcessAdapter @com.intellij.execution.process.ProcessAdapter
deriving Class

-- End com.intellij.execution.process.ProcessAdapter
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Com/IntelliJ/Execution/Process/ProcessEvent.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Com.IntelliJ.Execution.Process.ProcessEvent where

import P

-- Start com.intellij.execution.process.ProcessEvent

data ProcessEvent = ProcessEvent @com.intellij.execution.process.ProcessEvent
deriving Class

-- End com.intellij.execution.process.ProcessEvent
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Com.IntelliJ.IDE.Util.ImportProject.ProjectDescriptor where

import P

-- Start com.intellij.ide.util.importProject.ProjectDescriptor

data ProjectDescriptor = ProjectDescriptor @com.intellij.ide.util.importProject.ProjectDescriptor
deriving Class

-- End com.intellij.ide.util.importProject.ProjectDescriptor
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Com/IntelliJ/OpenApi/Util/Key.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Com.IntelliJ.OpenApi.Util.Key where

import P

-- Start com.intellij.openapi.util.Key

data Key = Key @com.intellij.openapi.util.Key
deriving Class

-- End com.intellij.openapi.util.Key
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Com/IntelliJ/OpenApi/Util/UserDataHandler.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Com.IntelliJ.OpenApi.Util.UserDataHandler where

import P

-- Start com.intellij.openapi.util.UserDataHandler

data UserDataHandler = UserDataHandler @com.intellij.openapi.util.UserDataHandler
deriving Class

-- End com.intellij.openapi.util.UserDataHandler
14 changes: 14 additions & 0 deletions src/main/eta/FFI/Com/IntelliJ/OpenApi/Vfs/CharsetToolkit.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module FFI.Com.IntelliJ.OpenApi.Vfs.CharsetToolkit
(getDefaultCharset) where

import P
import Interop.Java.NIO

-- Start com.intellij.openapi.vfs.CharsetToolkit

data CharsetToolkit = CharsetToolkit @com.intellij.openapi.vfs.CharsetToolkit
deriving Class

foreign import java unsafe getDefaultCharset :: Java CharsetToolkit Charset

-- End com.intellij.openapi.vfs.CharsetToolkit
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Builders/DirtyFilesHolder.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Builders.DirtyFilesHolder where

import P

-- Start org.jetbrains.jps.builders.DirtyFilesHolder

data DirtyFilesHolder = DirtyFilesHolder @org.jetbrains.jps.builders.DirtyFilesHolder
deriving Class

-- End org.jetbrains.jps.builders.DirtyFilesHolder
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module FFI.Org.JetBrains.JPS.Builders.Java.JavaSourceRootDescriptor where

import P

-- Start org.jetbrains.jps.builders.java.JavaSourceRootDescriptor

data JavaSourceRootDescriptor = JavaSourceRootDescriptor
@org.jetbrains.jps.builders.java.JavaSourceRootDescriptor
deriving Class

-- End org.jetbrains.jps.builders.java.JavaSourceRootDescriptor
21 changes: 21 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Incremental/CompileContext.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module FFI.Org.JetBrains.JPS.Incremental.CompileContext
( CompileContext
, getProjectDescriptor
) where

import P
import FFI.Org.JetBrains.JPS.Incremental.MessageHandler
import FFI.Com.IntelliJ.IDE.Util.ImportProject.ProjectDescriptor
import FFI.Com.IntelliJ.OpenApi.Util.UserDataHandler

-- Start org.jetbrains.jps.incremental.CompileContext

data CompileContext = CompileContext @org.jetbrains.jps.incremental.CompileContext
deriving Class

type instance Inherits CompileContext = '[UserDataHandler, MessageHandler]

foreign import java unsafe "@interface" getProjectDescriptor
:: Java CompileContext ProjectDescriptor

-- End org.jetbrains.jps.incremental.CompileContext
13 changes: 13 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Incremental/MessageHandler.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module FFI.Org.JetBrains.JPS.Incremental.MessageHandler where

import P
import FFI.Org.JetBrains.JPS.Incremental.Messages.BuildMessage

-- Start org.jetbrains.jps.incremental.MessageHandler

data MessageHandler = MessageHandler @org.jetbrains.jps.incremental.MessageHandler
deriving Class

foreign import java unsafe "interface" processMessage :: BuildMessage -> Java MessageHandler ()

-- End org.jetbrains.jps.incremental.MessageHandler
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module FFI.Org.JetBrains.JPS.Incremental.Messages.BuildMessage where

import P

-- Start org.jetbrains.jps.incremental.messages.BuildMessage

data BuildMessage = BuildMessage @org.jetbrains.jps.incremental.messages.BuildMessage
deriving Class

-- End org.jetbrains.jps.incremental.messages.BuildMessage

-- Start org.jetbrains.jps.incremental.messages.BuildMessage.Kind

data Kind = Kind @org.jetbrains.jps.incremental.messages.BuildMessage$Kind
deriving Class

foreign import java unsafe
"@static @field org.jetbrains.jps.incremental.messages.BuildMessage.Kind.ERROR" _ERROR ::
Kind

foreign import java unsafe
"@static @field org.jetbrains.jps.incremental.messages.BuildMessage.Kind.WARNING" _WARNING ::
Kind

foreign import java unsafe
"@static @field org.jetbrains.jps.incremental.messages.BuildMessage.Kind.INFO" _INFO ::
Kind

foreign import java unsafe
"@static @field org.jetbrains.jps.incremental.messages.BuildMessage.Kind.PROGRESS" _PROGRESS ::
Kind

-- End org.jetbrains.jps.incremental.messages.BuildMessage.Kind
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module FFI.Org.JetBrains.JPS.Incremental.Messages.CompilerMessage where

import P
import FFI.Org.JetBrains.JPS.Incremental.Messages.BuildMessage

-- Start org.jetbrains.jps.incremental.messages.CompilerMessage

data CompilerMessage = CompilerMessage @org.jetbrains.jps.incremental.messages.CompilerMessage
deriving Class

type instance Inherits CompilerMessage = '[BuildMessage]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Incremental.ModuleBuildTarget where

import P

-- Start org.jetbrains.jps.incremental.ModuleBuildTarget

data ModuleBuildTarget = ModuleBuildTarget @org.jetbrains.jps.incremental.ModuleBuildTarget
deriving Class

-- End org.jetbrains.jps.incremental.ModuleBuildTarget
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module FFI.Org.JetBrains.JPS.Incremental.ModuleLevelBuilder where

import P

-- Start org.jetbrains.jps.incremental.ModuleLevelBuilder

data ModuleLevelBuilder = ModuleLevelBuilder @org.jetbrains.jps.incremental.ModuleLevelBuilder
deriving Class

data ExitCode = ExitCode @org.jetbrains.jps.incremental.ModuleLevelBuilder$ExitCode
deriving Class

foreign import java unsafe
"@static @field org.jetbrains.jps.incremental.ModuleLevelBuilder.ExitCode.NOTHING_DONE"
nothingDone :: ExitCode

foreign import java unsafe
"@static @field org.jetbrains.jps.incremental.ModuleLevelBuilder.ExitCode.OK"
ok :: ExitCode

data OutputConsumer = OutputConsumer @org.jetbrains.jps.incremental.ModuleLevelBuilder$OutputConsumer
deriving Class


-- End org.jetbrains.jps.incremental.ModuleLevelBuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module FFI.Org.JetBrains.JPS.Incremental.ProjectBuildException where

import P
import Data.Typeable

-- Start org.jetbrains.jps.incremental.ProjectBuildException

data ProjectBuildException = ProjectBuildException @org.jetbrains.jps.incremental.ProjectBuildException
deriving (Class, Typeable)

type instance Inherits ProjectBuildException = '[JException]

foreign import java unsafe "@new" newProjectBuildException :: JString -> Java a ProjectBuildException

-- End org.jetbrains.jps.incremental.ProjectBuildException
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.Ex.JpsCompositeElementBase where

import P

-- Start org.jetbrains.jps.model.ex.JpsCompositeElementBase

data JpsCompositeElementBase = JpsCompositeElementBase @org.jetbrains.jps.model.ex.JpsCompositeElementBase
deriving Class

-- End org.jetbrains.jps.model.ex.JpsCompositeElementBase
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.Ex.JpsElementChildRoleBase where

import P

-- Start org.jetbrains.jps.model.ex.JpsElementChildRoleBase

data JpsElementChildRoleBase = JpsElementChildRoleBase @org.jetbrains.jps.model.ex.JpsElementChildRoleBase
deriving Class

-- End org.jetbrains.jps.model.ex.JpsElementChildRoleBase
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.Ex.JpsElementTypeWithDummyProperties where

import P

-- Start org.jetbrains.jps.model.ex.JpsElementTypeWithDummyProperties

data JpsElementTypeWithDummyProperties = JpsElementTypeWithDummyProperties @org.jetbrains.jps.model.ex.JpsElementTypeWithDummyProperties
deriving Class

-- End org.jetbrains.jps.model.ex.JpsElementTypeWithDummyProperties
16 changes: 16 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/JpsCompositeElement.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module FFI.Org.JetBrains.JPS.Model.JpsCompositeElement where

import P
import FFI.Org.JetBrains.JPS.Model.JpsElement
import FFI.Org.JetBrains.JPS.Model.JpsElementContainer

-- Start org.jetbrains.jps.model.JpsCompositeElement

data JpsCompositeElement = JpsCompositeElement @org.jetbrains.jps.model.JpsCompositeElement
deriving Class

type instance Inherits JpsCompositeElement = '[JpsElement]

foreign import java unsafe getContainer :: Java JpsCompositeElement JpsElementContainer

-- End org.jetbrains.jps.model.JpsCompositeElement
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/JpsDummyElement.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.JpsDummyElement where

import P

-- Start org.jetbrains.jps.model.module.JpsDummyElement

data JpsDummyElement = JpsDummyElement @org.jetbrains.jps.model.module.JpsDummyElement
deriving Class

-- End org.jetbrains.jps.model.module.JpsDummyElement
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/JpsElement.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.JpsElement where

import P

-- Start org.jetbrains.jps.model.JpsElement

data JpsElement = JpsElement @org.jetbrains.jps.model.JpsElement
deriving Class

-- End org.jetbrains.jps.model.JpsElement
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/JpsElementContainer.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.JpsElementContainer where

import P

-- Start org.jetbrains.jps.model.JpsElementContainer

data JpsElementContainer = JpsElementContainer @org.jetbrains.jps.model.JpsElementContainer
deriving Class

-- End org.jetbrains.jps.model.JpsElementContainer
14 changes: 14 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/JpsProject.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module FFI.Org.JetBrains.JPS.Model.JpsProject where

import P
import FFI.Org.JetBrains.JPS.Model.JpsCompositeElement
import FFI.Org.JetBrains.JPS.Model.JpsReferenceableElement

-- Start org.jetbrains.jps.model.JpsProject

data JpsProject = JpsProject @org.jetbrains.jps.model.JpsProject
deriving Class

type instance Inherits JpsProject = '[JpsCompositeElement, JpsReferenceableElement JpsProject]

-- End org.jetbrains.jps.model.JpsProject
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module FFI.Org.JetBrains.JPS.Model.JpsReferenceableElement where

import P

-- Start org.jetbrains.jps.model.JpsReferenceableElement

data JpsReferenceableElement e = JpsReferenceableElement
(@org.jetbrains.jps.model.JpsReferenceableElement e)
deriving Class

-- End org.jetbrains.jps.model.JpsReferenceableElement
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/Module/JpsModule.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.Module.JpsModule where

import P

-- Start org.jetbrains.jps.model.module.JpsModule

data JpsModule = JpsModule @org.jetbrains.jps.model.module.JpsModule
deriving Class

-- End org.jetbrains.jps.model.module.JpsModule
10 changes: 10 additions & 0 deletions src/main/eta/FFI/Org/JetBrains/JPS/Model/Module/JpsModuleType.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FFI.Org.JetBrains.JPS.Model.Module.JpsModuleType where

import P

-- Start org.jetbrains.jps.model.module.JpsElementChildRoleBase

data JpsModuleType = JpsModuleType @org.jetbrains.jps.model.module.JpsModuleType
deriving Class

-- End org.jetbrains.jps.model.module.JpsModuleType
Loading

0 comments on commit d73c198

Please sign in to comment.