JythonPlugin 0.1

0
Avatar
Permanently deleted user

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:

http://www.intellij.org/twiki/bin/view/Main/JythonPlugin

This plugin is a port of JPythonJB, a JBuilder plugin by Gordon Tyler.

This is a preview release which has very limited functionality and probably
a few bugs. Comments, bug reports and feature requests are always welcome!

This plugin was tested with IntelliJ IDEA 3.0 Build 651 but might work with
other builds.

Enjoy!


--
Gordon Tyler
Software Developer, R&D
Sitraka -- Performance is Mission Critical

0
Avatar
Permanently deleted user

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...

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:

http://www.intellij.org/twiki/bin/view/Main/JythonPlugin

>

This plugin is a port of JPythonJB, a JBuilder plugin by Gordon Tyler.

>

This is a preview release which has very limited functionality and

probably

a few bugs. Comments, bug reports and feature requests are always

welcome!

>

This plugin was tested with IntelliJ IDEA 3.0 Build 651 but might work

with

other builds.

>

Enjoy!

>
>

>

--
Gordon Tyler
Software Developer, R&D
Sitraka -- Performance is Mission Critical

>


0

请先登录再写评论。