I don't really know the OpenAPI but I imagine people who do know it can do all sorts of cool stuff with this. For one thing, this should allow runtime inspection of plugin state, etc. for debugging.
I don't really know the OpenAPI but I imagine people who do know it can do all sorts of cool stuff with this. For one thing, this should allow runtime inspection of plugin state, etc. for debugging.
I've just installed it and seems to be working quite nicely. I tried the
following to test it out:
Jython 2.1 on java1.4.1
>>> print "Hello world!"
Hello world!
>>> from com.intellij.openapi.application import ApplicationInfo
>>> ApplicationInfo.getInstance().getVersionName()
'IntelliJ IDEA (Ariadna)'
>>>
Also, I tried this to get the open projects:
>>> from com.intellij.openapi.project import ProjectManager
>>> pm = ProjectManager.getInstance()
>>> projects = pm.getOpenProjects()
>>> print projects
array(,
com.intellij.openapi.project.Project)
I don't really know the OpenAPI but I imagine people who do know it can
do all sorts of cool stuff with this. For one thing, this should allow
runtime inspection of plugin state, etc. for debugging.
Thomas Vollmer wrote:
--
Gordon Tyler
Software Developer, R&D
Sitraka -- Performance is Mission Critical
Here are a few things I tried:
>>> from com.intellij.openapi.project import ProjectManager
>>> pm = ProjectManager.getInstance()
>>> projects = pm.getOpenProjects()
>>> projects[0].getProjectFile().getName()
>>> from com.intellij.openapi.wm import ToolWindowManager
>>> twm = ToolWindowManager.getInstance(projects[0])
>>> ids = twm.getToolWindowIds()
>>> ids
>>> tw = twm.getToolWindow("Jython")
>>> from java.util import Date
>>> d = Date()
>>> tw.setTitle(d.toString())
>>> tw.setTitle("")
>>> tw.hide(None)
>>> tw.getType()
>>> from com.intellij.openapi.wm import ToolWindowId
>>> tw = twm.getToolWindow(ToolWindowId.ANT_BUILD)
>>> tw.show(None)
>>> tw.hide(None)
>>>
>>> from com.intellij.openapi.projectRoots import ProjectRootManager
>>> prm = ProjectRootManager.getInstance(projects[0])
>>> prm.getFullClassPath()
>>> prm.getJdk().getName()
>>> prm.getJdk().getHomeDirectory()
>>>
>>> from com.intellij.openapi.application import ApplicationInfo
>>> ai = ApplicationInfo.getInstance()
>>> ai.getBuildDate().getTime()
>>> ai.getBuildNumber()
>>> ai.getMajorVersion()
>>> ai.getMinorVersion()
>>> ai.getVersionName()
Have fun!
-Thomas
"Gordon Tyler" <gordon.tyler@sitraka.com> wrote in message
news:ans8k8$eej$1@is.intellij.net...
>
>
>
>
>
probably
welcome!
with
>
>