Git Product home page Git Product logo

exide's People

Contributors

adamretter avatar amclark42 avatar ccheraa avatar christophe-g avatar cmccrorie avatar dariok avatar dependabot-preview[bot] avatar dependabot[bot] avatar dizzzz avatar duncdrum avatar jensopetersen avatar joewiz avatar lguariento avatar line-o avatar ljo avatar marmoure avatar mathias-goebel avatar obujor avatar plutonik-a avatar reinhapa avatar remikoutcherawy avatar teddyboomer avatar windauer avatar wolfgangmm avatar wshager avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exide's Issues

Logged in as null

eXide often shows "Logged in as null' (e.g. when exist-db has been restarted when the editor is open).

eXide.util.normalizePath

Hi Wolfgang,
Thanks a lot for this very useful lib.

normalizePath method is creating some problem when retrieving relative modules. This patch should solve it (it least it does it for me !)
Cheers,
Christophe

/**
         * Normalize a collection path. Remove xmldb: part, resolve ..
         */
         normalizePath : function (path) {
                            if (!path)
                            return path;
                            path = path.replace(/^xmldb:exist:\/\//, "");
                            var newComponents = [],
                                components = path.split("/"), 
                                length = components.length;
                            for (var i = 0 ; i < length; i++) {
                                if (components[i] == ".." ) {
                                    //i--;
                                    newComponents.pop();
                                } else {
                                    newComponents.push(components[i]);
                                }
                            }
                            return newComponents.join('/');
                            //return newComponents.reverse().join("/");
          },

autocomplete does not catch local variables containing "-" or "_"

This still leave the case where local variables are defined with the following form uncovered, though:

let $iAmMatching := true(),
    $butNotMe := false()

fix (xQuery-helper.js):

    Constr.prototype.$localVars = function (prefix, wordrange, complete) {
        var variables =[];
        var stopRegex = /declare function|};/;
        //var varRegex = /let \$[\w\:]+|for \$[\w\:]+|\$[\w\:]+\)/;
        //var getVarRegex = /\$[\w\:]+/;
        var varRegex = /let \$[\w\-_\:]+|for \$[\w\-_\:]+|\$[\w\-_\:]+\)/;
        var getVarRegex = /\$[\w\-_\:]+/;
        var nameRegex = new RegExp("^\\" + prefix);
        var session = this.editor.getSession();
        var row = wordrange.start.row;
        while (row > -1) {
            var line = session.getDisplayLine(row);
            var m;
            if (m = line.match(varRegex)) {
                $.log("Var: %s", m[0]);
                var name = m[0].match(getVarRegex);
                if (name[0].match(nameRegex)) {
                    variables.push({
                        name: name[0],
                        type: "variable"
                    });
                }
            }
            if (line.match(stopRegex)) {
                $.log("Stop: %s", line);
                return variables;
            }
            row--;
        }
        return variables;
    }

not able to open results pane in Chrome 36

The results pane is placed at bottom im my case. It has been narrowed to a small stripe of just a few pixels height.

It is not possible to change the size any more by dragging the resize bar. Effectively the results pane keeps being hidden und unusable.

towards a smoother outline behavior

Hi !
I love eXide, but was a bit annoyed by the jumpy behavior of the outline panel (removes every function on every code validation). It can get quite slow when dealing with bulky modules and a lot of imports.

This makes it much smoother. It just fades in and out ouline functions when needed. For this, it relies on the excellent d3.js lib (yes, that is one more dependency ...).

the bulk of the change is as below, the rest available here https://github.com/e-smile/eXide/commit/4bf135c22e9e869789d1e825040013e38219f8f0 (only changed files included) :

        $outlineUpdate: function (doc) {
            if (this.currentDoc != doc)
            return;

            eXide.app.resize();
            var outline = d3.select("#outline"),
                  sel = outline.selectAll("li")
                    .data(doc.functions, function(d) {
                    return d.name
                    });

            function stringCompare(a, b) {
                a = a.toLowerCase();
                b = b.toLowerCase();
                return a > b ? 1 : a == b ? 0 : -1;
            }   

           var li = sel.enter()
                .append("li")
                    .attr("class", function(d) {
                        return d.type == eXide.edit.Document.TYPE_FUNCTION
                            ? "ace_support.ace_function"
                            : "ace_variable"
                        })
                    .append("a")
                      .style("opacity",0)
                      .attr("title", function(d) {
                              if(d.signature) {return d.signature}
                              return null
                          })
                      .attr("href", function(d) {
                              return  "#" + (d.source ? d.source : "") 
                          })
                      .attr("class",function(d) {
                              var cl =  d.type == eXide.edit.Document.TYPE_FUNCTION
                                      ?  "t.function" : "t_variable"
                              return cl + " " + (d.visibility === "private" ? "private" : "public" )         
                          })
                       .text(function(d) {return d.name})

                       .on("click", function(d) {
                           var path = this.hash.substring(1);
                           if(d.row) {
                               eXide.app.locate("function", path == '' ? null: path, parseInt(d.row));
                           } else if(d.type == eXide.edit.Document.TYPE_FUNCTION) {
                               eXide.app.locate("function", path == '' ? null: path, d.name);
                           } else {
                               eXide.app.locate("variable", path == '' ? null: path,d.name);
                           }
                       })
                       .transition()
                            .duration(800)
                            .style("opacity",1)
             sel.sort(function (a, b) { return a == null || b == null ? -1  : stringCompare(a.name, b.name); });

            sel.exit()
                .transition()
                    .duration(400)
                    .style("opacity",0)
                    .remove()

Sorry for this messy push, but I am struggling trying to have a git working directory in eXist and the git tree repository outside. Not quite working.
Cheers,
C.

Linting for xconfig files: inaccurate error wrt namespaces

I am currently trying to get indexing working. I entered the following code snippet from http://exist-db.org/exist/apps/doc/indexing.xml into eXide

<collection xmlns="http://exist-db.org/collection-config/1.0">
    <index xmlns:atom="http://www.w3.org/2005/Atom">
        <fulltext default="none" attributes="no">
            <create qname="atom:title"/>
        </fulltext>
        <range>
            <create qname="atom:id" type="xs:string"/>
        </range>
    </index>
</collection>

Now, eXide marks type="xs:string" as an error with the error message "The value 'xs:string' of attribute 'type' on element 'create' is not valid with respect to its type, 'QName'."

So, either the example from the eXist documentation is wrong or this error message is misleading...

result panel: direct output dropdown grayed out after selection was made

eXide Version: 2.0.1
Browser FF 27.0.1
edited file type was templated html

Dropdown allows to switch between XML output and 'direct output'. Once i clicked the checkbox (after having used the 'run' button) and changed its value it became grayed out and is not changeable any more. Even reloading did not help.

eXide XML Output cannot be selected and copied

With shared-resources-0.3.9, it s no longer possible to select and copy the XML Output of a query in eXide. Even copying the whole page does not include the XML Output. With shared-resources-0.3.8, copying works fine. Unfortunately, eXide 2.0.6 requires shared-resources-0.3.9.

eXist-version: 2.1
Mac OS X 10.9.1

Tested in browsers: Chrome 31.0.1650.63, Firefox 26.0, Safari 7.0.1.

I add the ticket here, because it appears only to affect eXide.

File / Reload changes document status to changed. (eXide version 2.0)

I use eXist-db 2.0 (installed from eXist-db-setup-2.0-rev18252.jar) on Windows XP, with Chrome version 27.0.1453.116.

Steps to reproduce:

  1. Open any document.
    There is no * in the tab caption.
  2. Choose File / Reload.
    A * appears in the tab caption. It can't be different form the saved state after a successful reload!
  3. Choose File / Reload again.
    A confirmation dialog appears, as there were unsaved changes in the window. (The wording, "Do you really want to reload the document?" does not states it explicitly, I think it should - see step 4.)
    This dialog seems to be modal, but it HAS NO FOCUS! The Esc key can't close it, the Enter key inserts a new line into the document behind!
  4. Click Close.
    The warning in the dialog (There are unsaved changes in this document which will be lost if you close it. Do you want to continue?) is 3 lines long, but only 2 of them are visible. Could you enlarge the window?

Return at end of closed comment

If pressing at the end of a single line comment, a colon is inserted on the next line even though the comment has been closed.

This works well when manual starting the comment and pressing return, but not when placing the caret at the end of the comment

To Reproduce:
Type a line, press c, then press return to start a new line of xquery.

enhancement request: split editor panel

Hi,

I would love to have the possibility to split the main editor panel into more (e.g to compare codes between modules, ...)

Is there any chance to see this in the future ?

Cheers and thanks
C.

@ character in file names

I create documents using an '@' sign. Example ([email protected]). I encode my request to this url using foo%40bar.com. Everything works well until I open the document from the collection browser. The document, the '%' sign is re-encoded instead of being decoded and I get a new file called foo%2540bar.com.xml in exide. The open command from exide works as expected however.

The java admin client and the exide open command correctly display the url as [email protected];

"New XQuery" creates almost empty page

When running "New XQuery" eXide creates almost empty page , with a character '1' to avoid syntax-validation errors; I think this should change since it looks not so nice too.

Clear Dirty State When New Document Is Created

The initial state of a new document is dirty and always prompts to save, even when the I have not entered any information. I think the dirty state should only be set if the user has modified the new 'template'.

Missing default namespace declaration in eXide results pane

Hi,

I have some data in an eXist database where the default namespace is set on a wrapper element (fragment), then set to empty on a child element (div).

Using a db connection in oxygen, the behaviour is as expected, so I'm happy that the data is held correctly in the database.

However, when using exist the empty default namespace declaration (xmlns="") is not displayed:

image

Thanks!
Tom

keyboard shortcut to close output window wanted

continually revising - outputting - revising becomes clumsy when one has to hit the minute arrow every time to close to output window in order to view the code properly, so a keyboard shortcut would come in handy here

Synchronisation of application modifies documents

When syncing an application (xml, xhtml) to the file system, a number of items get lost:

  • XML comments
  • CDATA sections are converted into (correct) XML encoded sections

The 1st one is probably related with an issue where XML comments generated in an query are not visible.

editor.updateTabStatus() is not always working ("*" is not cleared)

Was curious to see why sometimes the "*" is cleared on the editor tab after a save, and sometime not.

It was due to the fact that String.match (called in eXide.js/locate) returns an array and not a string (and hence some doc having an array doc.name)

we should have (notice the [0])

    name: path.match(/[^\/]+$/)[0],

instead of

    name: path.match(/[^\/]+$/),

in the locate method below.

        locate: function(type, path, symbol) {
            if (path == null) {
                editor.exec("locate", type, symbol);
            } else {
                $.log("Locating %s in document %s", symbol, path);
                var doc = editor.getDocument(path);
                if (doc == null) {
                    var resource = {
                            name: path.match(/[^\/]+$/)[0],
                            path: path
                    };
                    eXide.app.$doOpenDocument(resource, function(doc) {
                        if (doc) {
                            editor.exec("locate", type, symbol);
                        }
                    });
                } else {
                    editor.switchTo(doc);
                    editor.exec("locate", type, symbol);
                }
            }
        },

Security not handled by 'configuration.xml'

Hi,

According to the documentation, setting configuration/restrictions/@guest to "no" should prevent public access. Tests on two instances of eXide version 2.0.1 and 2.0.2 on top of existdb 2.1-rev18721 does not seem to handle properly the configuration.xml file.

Do I need something other to make this security feature on?

Regards,
Thanks a lot for this wonderful tool !

Guillaume

Emmet ?

Quick question : is there a particular reason for disabling emmet in the editor ? are there some potential conflicts with the snippet feature ?

If you uncomment the emmet section in editor.js (line 317-321) it is possible to run emmet style for css document (e.g. 'p10' + [tab] -> padding:10px;).

Would be nice to have this behavior in xml or html file as well (but could not find how to enable it yet...):
div>li.id$*5 + [tab] ->

<div>
    <li class="id1"></li>
    <li class="id2"></li>
    <li class="id3"></li>
    <li class="id4"></li>
    <li class="id5"></li>
</div>

Cheers,
C.

Log info appearing on console

Line 58 of modules/deployment.xql is constantly piping logging information into the console, e.g.:

(Line: 58 /db/apps/eXide/modules/deployment.xql) /db/apps/

Please consider removing this logging info, or if it's meant to be useful to users, please add more descriptive information to the log entry.

Can't open xqm files

Files with extension .xqm extensions are filtered, and do not show up in the open dialog.

Add removeEventListener to editor

When trying to remove an event listener from the editor, an error is thrown because there is no such method. Please add it for consistency.

Error popup gets in the way

When on the bottom line, the error popup often gets in the way of completing the last line. There usually is an error on the last line, when typing in an unfinished document.

generate expath-pkg.xml.tmpl

If one downloads an app and unzips it, one has a copy of the installation. That's fine, but if one wishes to make modifications and rebuild it, the expath-pkg.xml.tmpl is missing. Could this file be generated as well when downloading?

The search is always one character behind

When using the search with the bottom search bar, the search is always one character behind in what it searches for. So when I type "exis" it will search for "exi", but when I then hit backspace and have "exi" in my search bar, it will search for "exis". This can be quite confusing.

This can be fixed easily by changing line 17 in src/find.js from
$this.input.keydown(function (ev) {
to
$this.input.keyup(function (ev) {

I check this in Firefox 18 and Chrome 24.

The RestXQ trigger should be added to the default collection.xconf

When an app is created from template, the collection.xconf should be:

<collection xmlns="http://exist-db.org/collection-config/1.0">
    <index xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <fulltext default="none" attributes="false"/>
    </index>
    <triggers>
        <trigger class="org.exist.extensions.exquery.restxq.impl.RestXqTrigger"/>
    </triggers>
</collection>

Instead of:

<collection xmlns="http://exist-db.org/collection-config/1.0">
    <index xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <fulltext default="none" attributes="false"/>
    </index>
</collection>

Select tab with file opened with 'open' param

When a file is opened using ?open=/db/file AND the previous state of eXide is restored AND the file was already open in that state, the tab containing the file is not necessarily selected. This looks like an issue, however minor.

build fails

Buildfile: /Users/jens/Downloads/eXide-develop/build.xml

check-rhino-available:

get-rhino:
[echo] Downloading rhino...
[get] Getting: https://raw.github.com/jrburke/r.js/master/lib/rhino/js.jar
[get] To: /Users/jens/Downloads/eXide-develop/tools/js.jar
[get] https://raw.github.com/jrburke/r.js/master/lib/rhino/js.jar permanently moved to https://raw.githubusercontent.com/jrburke/r.js/master/lib/rhino/js.jar
[get] Getting: http://requirejs.org/docs/release/2.1.4/r.js
[get] To: /Users/jens/Downloads/eXide-develop/tools/r.js

xqlint:
[echo] Optimizing xqlint ...
[copy] Copying 1 file to /Users/jens/Downloads/eXide-develop/support/xqlint
[copy] Copying 1 file to /Users/jens/Downloads/eXide-develop/support/xqlint
[java] js: Couldn't read source file "./support/xqlint/r.js: ./support/xqlint/r.js (No such file or directory)".

BUILD FAILED
/Users/jens/Downloads/eXide-develop/build.xml:109: Java returned: 4

Add 'generate xqdoc'

It would be nice if eXide could generate for xquery schrips/modules xqdoc compatible documentation (skeleton) based on the function signature.

This will encourage writing documentation, and saves lots of typing :-)

Query processing-instruction return incorrect results

(:in eXist Admin Client - eXist 2.0 rev 18252:)
let $xml :=
<r>

{

processing-instruction name2 { "string2" },
processing-instruction name3 {}
}</r>
return $xml
(:return as follows-----------
<r>

</r>
:)

(:in eXide:)
let $xml :=
<r>

{

processing-instruction name2 { "string2" },
processing-instruction name3 {}
}</r>
return $xml
(:return as follows-----------
<r>

</r>
:)

xqlint isn't building

There are several problems with xqlint when building eXide.

First, the file r.js is not found, as the path should be ${tools}.

Secondly, when r.js is found, the lib directory is not created.

Enhance main application url redirect

Hi,

I propose to consider an additional empty path to be redirected to the main index.html page into templates/existdb/controller.xql

May do the next line do the trick :

if ($exist:path = ("/","")) then

in replacement of first test that is:

if ($exist:path eq "/") then

This would help a little bit more useability and confidentiality.

Thanks a lot for your work!

Guillaume

Copy and paste doesn't work.

On my dev-machine

[eXist Version : 2.1]
[eXist Build : 20131214]

ctrl-c / ctrl-v doesn't work in exide.

(my source is one month old, bug maybe fixed already.)

Exception during save prevents renaming the tab. (eXide version 2.0)

I use eXist-db 2.0 (installed from eXist-db-setup-2.0-rev18252.jar) on Windows XP, with Chrome version 27.0.1453.116.

Steps to reproduce:

  1. Create a new document in eXide (File / New), type: XML.
    A new tab is open, the name is (e.g.) new-document 2.
  2. Type in something nonsense, e.g.
    asdf
  3. Click Save.
    The Save Document dialog appears.
  4. Type a name, e.g. asdf.xml
  5. Click Save.
  6. eXide reports: The XML parser reported a problem: fatal error at (1,1) : Content is not allowed in prolog.
  7. Click OK in the error dialog.
  8. Click Cancel in the Save Document dialog, as it can't be saved now.
  9. Correct the error, e.g.
    <asdf/>
  10. Click Save. The document name is not asked again, it's saved as asdf.xml, BUT the tab name remains new-document 2! And it is IMPOSSIBLE to close that tab! The status bar below the editor shows /db/..../asdf.xml. Actually I can have TWO new-document 2 tabs, if I repeat this test. AND there is the * after the tab captions as the document weren't saved.
    The same bug occours if an existing document contains syntax error and is Saved As another name: the status bar is updated, but the tab caption is not!

Missing Error for invalid logins

If the user enters wrong credentials there should be a more visible error message (user logged in as null is often overseen and not understandable for everyone)

Do not use xmldb:login

Setting the user with xmldb:login interferes with other applications running in the same browser, because the user/password settings in the session are applied to all XQueries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.