[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Issue with embedding Orion.Client

One additional feedback then: every single one of the (embarrassing number of) times I have embedded the editor or seen someone else do it, the screen is blank. I believe the problem is that the editor takes the size of its container. This behavior is important, but by making it the default the default result for embedding is a blank page. By contrast CodeMirror for example shows up by default.

jjb

On Thu, Jun 28, 2012 at 7:20 AM, Mike Wilson <Mike_Wilson@xxxxxxxxxx> wrote:

Consumption of the editor in multiple contexts is very important to us. Silenio and/or Simon, what can we do so that makes this a) easier to consume and b) documented well enough that people can actually make progress.

McQ.

Inactive hide details for John J Barton ---06/27/2012 08:28:23 PM---On Wed, Jun 27, 2012 at 5:09 PM, Andy Clement <andrew.clemeJohn J Barton ---06/27/2012 08:28:23 PM---On Wed, Jun 27, 2012 at 5:09 PM, Andy Clement <andrew.clement@xxxxxxxxx>wrote: > When I was pulling



From: John J Barton <johnjbarton@xxxxxxxxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>,
Date: 06/27/2012 08:28 PM

Subject: Re: [orion-dev] Issue with embedding Orion.Client
Sent by: orion-dev-bounces@xxxxxxxxxxx






On Wed, Jun 27, 2012 at 5:09 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
    When I was pulling the editor out of Orion for use in another project,
    I hit these issues.  I do have a minimal project that is the pulled
    out editor that I can probably share with you, if you'd find it useful
    - but basically I pulled and re-arranged as necessary to give myself
    the minimal set of files I needed.

    Once pulled out though there are many more steps and gotchas as you
    attempt to integrate the other pieces that makes it a more
    sophisticated editing experience: syntax highlighting,
    rulers/annotations (and their highlighting in the editor), jslint,
    content assist, etc...  Right now you have to do many things in the
    *exact* same order that orion does otherwise your event listeners
    register in an incompatible order. I plan to raise some bugzillas on
    this when I get some time.


    > I can't figure out default-theme.css however. The file lives at:
    > ./orion.client/bundles/org.eclipse.orion.client.core/web/css/default-theme.css
    > but it is called in by
    > ./orion.client/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.css:@import
    > "../../css/default-theme.css";
    > So I can't see how this can ever work.

    I think this only works when the server is running and the different
    bundles are 'merged' and being hosted from the same place (then the
    relative path is correct in server terms).

Ah, thanks:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383705

BTW we are pretty successful using chrome-extension://<id> as our 'server', once we sort out the path stuff.

jjb
 

    Andy


    > On Wed, Jun 27, 2012 at 2:10 PM, Zachariah Moreno <
    xachmoreno@xxxxxxxxx>
    > wrote:
    >>
    >> Thank You Silenio,
    >>
    >> for putting together that patch, which I just applied. I am still
    >> receiving a failed to load resource errors for the textview & editor .js
    >> files which you can see in the attached screenshot. I'm not having any
    >> problems with embedding the editor into a standard webpage (on Orion local
    >> or remote), but instead from within our extension. None-the-less, this just
    >> seems to be a relative path issue, that I am trying to fix through trial &
    >> error for now.
    >>
    >> Thanks again,
    >>
    >> --
    >> Zachariah Moreno
    >> Sent with Sparrow
    >>
    >> On Wednesday, June 27, 2012 at 1:08 PM, Silenio Quarti wrote:
    >>
    >> Hi Zach,
    >>
    >> I believe this is not a problem with the version of require.js. The
    >> problem is with the way the files are layed out in the file system (or
    >> server).
    >>
    >> How are you mounting the files on your server?  I was able to open
    >> panel.html by making the changes in the attached patch and creating an orion
    >> site with the following mappings:
    >>
    >>
    >> /Orion-X    ->   /
    >> /Orion-X/orion.client/bundles/org.eclipse.orion.client.editor/web  ->  /
    >> /Orion-X/orion.client/bundles/org.eclipse.orion.client.core/web  -> /
    >>
    >> Silenio
    >>
    >>
    >>
    >>
    >>
    >>
    >> From:        John J Barton <
    johnjbarton@xxxxxxxxxxxxxxx>
    >> To:        Orion developer discussions <
    orion-dev@xxxxxxxxxxx>,
    >> Date:        06/26/2012 06:15 PM
    >> Subject:        Re: [orion-dev] Issue with embedding Orion.Client
    >> Sent by:        
    orion-dev-bounces@xxxxxxxxxxx
    >> ________________________________
    >>
    >>
    >>
    >>
    >>
    >> On Tue, Jun 26, 2012 at 3:11 PM, Zachariah Moreno <
    xachmoreno@xxxxxxxxx>
    >> wrote:
    >> Thank You John,
    >>
    >> I hadn't checked my version of Require. I just updated my copy to the
    >> latest (v2.0.2) which is still presenting the same error. It was my
    >> understanding that orion.client is dependent on require.js, but it is not
    >> included in the repo, is this correct?
    >>
    >> Try the one in
    >>
    >> /orion.client/bundles/org.eclipse.orion.client.core/web/requirejs/require.js
    >>
    >>
    >> The paths you mention are not giving me a Failed to Load Resource, is that
    >> what you're getting?
    >>
    >> No, I just get undefined arguments, no other errors.
    >>
    >> jjb
    >>
    >>
    >> Zach
    >>
    >> --
    >> Zachariah Moreno
    >> Sent with Sparrow
    >>
    >> On Tuesday, June 26, 2012 at 2:41 PM, John J Barton wrote:
    >>
    >>
    >>
    >> On Tue, Jun 26, 2012 at 1:11 PM, Zachariah Moreno <
    xachmoreno@xxxxxxxxx>
    >> wrote:
    >> Hello All,
    >>
    >> I have been attempting to embed orion.client into a Chrome DevTools panel,
    >> as part of my efforts for Google Summer of Code. The first method I used was
    >> outlined by Felipe Heidrich in his blog post Using the Orion Editor with
    >> Almond, which was a success in most ways but not others. So I switched my
    >> method of embedding to use the the example presented by John Arthorne (thank
    >> you btw) in his more recent post Examples of Embedding The Orion Editor,
    >> which is more fitting for use in conjunction with the API exposed in
    >> DevTools. Last week, John Barton was kind enough to spend some time with me
    >> on this project. We determined John Arthorne's Embedded editor example was
    >> the most fitting for our desired outcome & the switch was made successfully
    >> in this repo. However, the file structure of orion.client was not maintained
    >> to get this working in a short period of time. After reviewing this
    >> progress, John Barton suggested I go through the process again, while
    >> maintaining the orion.client file structure to allow for ease of updates in
    >> the future (which I completely agree with). I have created a separate repo
    >> for this change & updated all of the paths to reflect this, but I am getting
    >> Uncaught TypeError: Cannot read property 'CssContentAssistProvider' of
    >> undefined
    >> chrome-extension://hnnbddcdmjkbcckijnphgophmegpflhe/embeddededitor.js:47.
    >> From what I can tell, `mCSSContentAssist.CssContentAssistProvider()` is only
    >> referenced in embeddededitor.js & the error never came up when I did my
    >> first implementation. If anyone has any thoughts or advice please don't
    >> hesitate to share.
    >>
    >> embeddededitor.js uses require.js with module ids like:
    >>
    >> "orion.client/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView"
    >> All of the arguments that match these ids are 'undefined'.
    >>
    >> I have no idea how this can happen (require.js is loading the files but
    >> not passing the exports to the arguments of define).  I suggest checking the
    >> version of require.js against the one used by Orion.
    >>
    >> jjb
    >>
    >>
    >> Thank You Kindly,
    >>
    >> --
    >> Zachariah Moreno
    >> Sent with Sparrow
    >>
    >>
    >> _______________________________________________
    >> orion-dev mailing list
    >>
    orion-dev@xxxxxxxxxxx
    >>
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >>
    >>
    >> _______________________________________________
    >> orion-dev mailing list
    >>
    orion-dev@xxxxxxxxxxx
    >>
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >>
    >>
    >> _______________________________________________
    >> orion-dev mailing list
    >>
    orion-dev@xxxxxxxxxxx
    >>
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >>
    >> _______________________________________________
    >> orion-dev mailing list
    >>
    orion-dev@xxxxxxxxxxx
    >>
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >>
    >> _______________________________________________
    >> orion-dev mailing list
    >>
    orion-dev@xxxxxxxxxxx
    >>
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >>
    >> Attachments:
    >> - patch_orionx.txt
    >>
    >>
    >>
    >> _______________________________________________
    >> orion-dev mailing list
    >>
    orion-dev@xxxxxxxxxxx
    >>
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >>
    >
    >
    > _______________________________________________
    > orion-dev mailing list
    >
    orion-dev@xxxxxxxxxxx
    >
    https://dev.eclipse.org/mailman/listinfo/orion-dev
    >
    _______________________________________________
    orion-dev mailing list

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


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


GIF image