Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dash-dev] First draft of documentation for Editor

I added what I know starting at
http://wiki.eclipse.org/Eclipse_Monkey_Overview

It would be good if there was a link from the main Project Dash or Eclipse Monkey docs to the wiki. It's not easily discoverable right now.

-Steve

Karl Matthias wrote:
Hey Steve,

Yep we do have a wiki, we can use.  The Eclipse Foundation hosts pages
for dash here:

http://wiki.eclipse.org/Dash_Project

It looks like it could use some help. ;)  You can login with a Bugzilla
account (all you have to do it register) to edit pages.

Cheers,
Karl



Steve Corwin wrote:
A wiki would be perfect: the markup is more than sufficient, and it
allows for easy collaboration between multiple people.  Which leads to
the next question: do we have one we can use?

-Steve

Nick Boldt wrote:
How about wiki markup? Easy to write, easy to edit, easy to
contribute... hell, there's even a wiki editor for Eclipse! [1]

[1] http://www.plog4u.org/index.php/Using_Eclipse_Wikipedia_Editor
<http://www.plog4u.org/index.php/Using_Eclipse_Wikipedia_Editor>

Nick

On Nov 7, 2007 8:12 PM, Steve Corwin <scorwin@xxxxxxxxxxxxx
<mailto:scorwin@xxxxxxxxxxxxx>> wrote:

    [I just saw Paul's email after I finished typing this.  So, for
whatever
    it's worth, here's what I have so far.]

    I've been mostly using the
    org.eclipse.eclipsemonkey.lang.javascript.doms.editors.Editor class,
    which is what you get from this line:
    var sourceEditor = editors.activeEditor;

    Here's a stab at documenting it:

    Properties:
    Read-only:
    id: ?
    lineDelimiter: the correct End of Line characters for the current
file?
    source: the current contents of the editor, as a Java String.
    sourceLength: the length of the current contents of the editor.
    selectionRange: the range of text that is currently selected in the
    editor.  It contains two integers, startingOffset and endingOffset.
    These may be used to find the selected text within the source
property.
     If nothing is selected endingOffset == startingOffset.
    title: ?
    textEditor: ?

    Read/write:
    currentOffset: ?

    Functions:
    applyEdit(int offset, int deleteLength, String insertText):
    Used to insert and/or delete text.  offset is a position within the
    source property.  deleteLength is the length of the existing text to
    remove; use 0 to not delete anything.  insertText is text to
insert at
    offset; use "" to not insert anything.

    beginCompoundChange(): ?
    close(boolean save): close the current editor, saving its contents if
    save == true?
    endCompoundChange(): ?
    getLineAtOffset(int offset): returns the number of the line that
    contains offset.
    getOffsetAtLine(final int line): returns the offset of the first
    character in line line.
    save(): saves the current contents of the editor?
    selectAndReveal(final int offset, final int length): selects the text
    starting at offset and ending at (offset + length).  Will scroll the
    text as needed to make the selection visible on screen.  length
may be 0
    to force a line to be visible without selecting anything.
    toString(): returns "[object Editor]"

    Naturally, suggestions and corrections would be welcome.  It would
    certainly be better to have more formatting options than plain
text.  I
    thought about writing Javadoc in Editor.java, but that's not an easy
    place for a newcomer to find and understand.

    -Steve

    _______________________________________________
    dash-dev mailing list
    dash-dev@xxxxxxxxxxx <mailto:dash-dev@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/dash-dev



------------------------------------------------------------------------

_______________________________________________
dash-dev mailing list
dash-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dash-dev
_______________________________________________
dash-dev mailing list
dash-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dash-dev
_______________________________________________
dash-dev mailing list
dash-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dash-dev


Back to the top