Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dash-dev] Re: Translated samples into Groovy

So those DOMs you provide are similar to the DOMs that i've worked on for JS. Given that, I think if we just agree on a set of 'core DOMs', we can have a language independent set, then we can each write any additional bindings that we may require specific to our language.

We can define two extension points, one for the generic DOMs (monkey.doms) and one, optionally, for specific language support (monkey.languages).

The language extension point can also specify one or more required core DOMs -- if they aren't available or cannot be downloaded, then that lang extension wouldn't load.

This is the direction I'm working toward right now -- give me a few days and I can have this system in place for us to try out.
 
Paul Colton
aptana.com | aptana.tv



On Feb 13, 2007, at 8:00 AM, James Ervin wrote:

There is a default set of DOM(s) that get provided in Groovy Monkey for everyone.  One of them is bound to window which maps to the IWorkbenchWindow class.  I also provide a few more like monitor ( which allows you to update the status of the running script as well as provide for cancellation ), metadata which references the script's ScriptMetadata class ( useful for knowing the script name, script project, etc... ), runnerDOM which allows you to invoke another Monkey script in the workspace, workspace that maps to IWorkspace, etc...
 
I have an outline view in groovy monkey ( shown in the included jpg in this email ) that shows the mappings, plus content assist to autocomplete bound vars from DOMs and autocomplete methods defined in the DOM class ( and superclasses ).
 
James

 
On 2/13/07, Paul Colton <paul@xxxxxxxxxx> wrote:
This line, for example:

 
window.activePage.activeEditor

 
Where is this DOM defined?

On Feb 13, 2007, at 7:05 AM, James Ervin wrote:

Just to add to the discussion I ported all the new Monkey samples I saw in the CVS repository over into Groovy Monkey.  I wanted to be able to allow for some comparisons.  I think for the most part they ported almost directly, though I did learn something new about the Eclipse API for text editors by porting the Editors__Comment_Lines script.

--
James E. Ervin, IV

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

-Robert A. Heinlein



--
James E. Ervin, IV

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

-Robert A. Heinlein
<Editors__Comment_Lines.gm>
<Editors__Replace_Selection_with_Date.gm>
<IO__File_Sample.gm>
<IO__Web_Sample.gm>

 



--
James E. Ervin, IV

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

-Robert A. Heinlein
<gmonkey.jpg>


Back to the top