[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] Proposals for enhancement to ContentAssist
|
Am 13.11.12 18:27, schrieb Andrew Eisenberg:
> Hi Tom,
>
> I can have a chat with you.
>
> I assume that you are talking about this proposal:
>
> {
> "styleClass" : "public-method",
> "segments" : [
> { "value" : "bla() : void" },
> { "value" : " - Test",
> "style" : {
> "bold" : "false",
> "italic" : "false",
> "color" : "AAA"
> }
> }
> ]
> }
>
Yes.
> A few questions about this:
>
> 1. Who will provide the styleClasses? Are they hard coded by orioin or
> provided by plugins? If the former, that follows the same limitation
> that we have regarding styling. If the latter, then we get into
> security concerns.
Well I'm coming from a different direction, because I'm running without
any server and plugin infrastructure from the local-filesystem loading
teh orion editor into an embedded browser.
So in my case I'll provide them through
https://github.com/tomsontom/fx-ide/blob/master/at.bestsolution.javafx.ide.editor/orion/js/editor/textview/embeddededitor.css
So in my current case I pass a string like this:
{
"proposal": "setX()" ,
"description":
{
"styleClass": "content-item method-item",
"segments": [
{
"value":"setX(double) : void"
},
{
"value":" - Window",
"style": {
"bold": false ,
"italic": false ,
"color":"#AAAAAA"
}
}
]} ,
"escapePosition": 443 ,
"style": "attributedString",
"replace": true
}
I have no idea how plugins can provide CSS-Styles and what security
concerns this would bring in the web orion space because I'm coming from
the embedded story only.
> 2. Perhaps instead of a styleClass, you simply provide an icon (just a
> url to an icon that you want to use). And delegate the rest of the
> styling to the segments. Or is there something more fundamental that
> you would like the styleClass to handle?
Having an icon only would probably do the trick. I thought a styleClass
would be nicer and provide users more possibilities but if there's a
security concern with using a styleClass, an image would be enough for
my use case as at the moment.
> 3. I like the idea of segments. For a little nit picking, I would
> recommend using something like "foreground" and "background" instead of
> just color, or fore-color and back-color, or something to distinguish
> the two kinds of coloring that we might want to do.
>
I've chose color because that's name of the css-Attribute but having
foreground and background-color is not a problem. I'll add them.
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
http://www.BestSolution.at phone ++43 512 935834