Re: [Pydev-code] Writing to the Eclipse status area from a Jython Pydev extension
Brought to you by:
fabioz
|
From: Don T. <nos...@gm...> - 2006-05-19 18:36:40
|
Fabio Zadrozny wrote:
> Actually, you probably want to ask the status manager to the editor.
> Something as below (untested):
>
> statusLine = editor.getAdapter(IEditorStatusLine.class);
> if statusLine is not None:
> statusLine.setMessage(False, "foo", None)
>
Fabio:
My code looks like this:
if cmd == 'onCreateActions':
from org.eclipse.jface.action import Action
from org.python.pydev.core.docutils import PySelection
from org.eclipse.ui.texteditor import IEditorStatusLine
#-Paragrapher---------------------------------------------------------------
class Paragrapher:
''' Provides tools to process a paragraph of text in the Pydev
editor.
'''
def __init__(self):
self.selection = PySelection(editor)
self.document = editor.getDocument()
self.statusLine = editor.getAdapter(IEditorStatusLine)
print "statusLine %s" % self.statusLine
if self.statusLine is not None:
self.statusLine.setMessage(False, "foo", None)
When I run this I get:
statusLine org.eclipse.ui.texteditor.EditorStatusLine@1133f56
on the console - which I think is good?
But I don't see my message showing up anywhere.
DOn.
|