Marc Portier wrote:
> 
> Hi there,
> 
> I currently have a semantical way to separate portions of my
> document into different modules
> 
> I just use a <inline-group src="../module/whatever.xml">
> 
> to reference the other file.
> 
> I'ld like to be able now to have XXE open this file for edit when
> I ctrl-doubleClick it.
> 
> I already have the current binding and command defined:
> 
>    <!--
>        | tox.openModule
>        | Instructs XXE to open an editor window for the current
>        | selected module
>        -->
>    <command name="tox.openModule">
>      <macro>
>        <sequence>
>          <command name="selectNode"
>                   parameter="ancestorOrSelf inline-group" />
> 
>         <!-- HERE I NEED THE MEAT ON THE BONE -->
> 
>        </sequence>
>      </macro>
>    </command>
> 
>    <binding>
>      <mouseClicked2 button="1" modifiers="ctrl" />
>      <command name="tox.openModule" />
>    </binding>
> 
> Obviously the command needs some more, I can't seem to find the
> build in commands to perform the required actions, so I plan to
> build some custom Java Commands to get to doing it.  Finding the
> correct Java API calls is however not that easy either.
> 
> These are the 3 small commands that should tackle my problem:
> 1. tox.readAttribute att_name
> 
> returns the value of the @att_name on the selected node
> (strange that this is not available already?)
> 
> 2. tox.resolveSrc fileRelative path
>     tox.resolveSrc sysPropRelative path sysPropName
> 
> returns the resolved version of the path variable into an
> absoluteFileName by either using the current file location (1st
> version) or using a base-path found in a Java system property
> (2nd version of the command)
> 
> Question: for the first version: is there a way to grab the
> current file location? Which method/object I should ask?
> 
> 3. tox.openFile path
> 
> instructs xxe to open the file in a new document window.
> 
> Question: is there a way to do this? what is the method/object
> this should go to?

Your analysis is correct but it is absolutely impossible to do it this
way, even by using the developer's docs and by writing a command in
Java.

The reason is that: for now, you can write commands that act on the
document loaded in XXE (tox.readAttribute) but you cannot write commands
that act on the XXE application itself (tox.openFile).

We'll try to enhance XXE in release 2.3 (released at the end of this
month) to allow you to do that. We have always intended to do it but
neglected to add it to the development schedule.

Reply via email to