JESS: V 7.0b1 JessDE Editor construct folding

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JESS: V 7.0b1 JessDE Editor construct folding

Greenblatt, Howard
Hi there,

I am running into an interesting problem with the latest version of the
JessDE editor (version 7.0b1) with construct folding and closing parenthesis.
If I type an opening parenthesis for a new construct after a set of
previously defined constructs that are folded, the editor doesn't seem to
count the folded lines and places the matching closing parentheses higher up
in the file, usually within the folded construct. This obviously generates an
error and it also partially expands the folded construct. In addition, oddly
enough it pops up the list of just the six templated constructs (defrule,
deftemplate, defquery, deffunction, defglobal and deffacts) which BTW I can
never seem to access in any other way.

An example:

  ; ~~~~~~~~~~~~~~~~Top of file~~~~~~~~~~~~~~~~~~~~~~
  ; start with an expanded deftemplate
  ;   - the 'V' in the margin indicates it is expanded
V (deftemplate t1
    (slot a)
    (slot b))

  ()  ; add an opening parenthesis and everything seems to act correctly by
adding a closing parenthesis immediately after and popping up the full list
of possible entries (*, **, +, etc.), minus the six templated constructs
(defrule, deftemplate, defquery, deffunction, defglobal and deffacts).


  ; ~~~~~~~~~~~~~~~~Top of file~~~~~~~~~~~~~~~~~~~~~~
  ; fold the construct by clicking in the margin on the 'V'
  ;   - the '>' indicates it is folded
> (deftemplate t1...
 
  (   ; when I add an opening parenthesis following the folded construct,
      ;  I get the following:


  ; ~~~~~~~~~~~~~~~~Top of file~~~~~~~~~~~~~~~~~~~~~~
  ; folded deftemplate
> (deftemplate t1...
*    (slot b))     ; partially expanded deftemplate with error on this line

  (   ; no closing parentheses - only the six templated constructs pop up.


  ; ~~~~~~~~~~~~~~~~Top of file~~~~~~~~~~~~~~~~~~~~~~
  ; finally, expand the folded deftemplate showing the error
V (deftemplate t1
*  ) (slot a)      ; this is the line the closing parenthesis was added to
    (slot b))

  (   ; no closing parentheses...


Hopefully this example was not too confusing.

I loaded the new eclipse plugins, restarted eclipse with a -clean to clear
the buffers etc. I can't think of anything else I may be doing wrong.

Thanks for your help,

- Howard


--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: JESS: V 7.0b1 JessDE Editor construct folding

friedman_hill ernest j
I think Greenblatt, Howard wrote:
> Hi there,
>
> I am running into an interesting problem with the latest version of the
> JessDE editor (version 7.0b1) with construct folding and closing parenthesis.
> If I type an opening parenthesis for a new construct after a set of
> previously defined constructs that are folded, the editor doesn't seem to
> count the folded lines and places the matching closing parentheses higher up
> in the file, usually within the folded construct.


Thanks. The code-folding machinery in Eclipse isn't entirely
transparent; the fact that an index into the document and the cursor
position aren't the same is exposed to your code, so any code that
assumes they should always be the same is broken. I fixed a number of
instances of this before the release, but obviously I missed this
one.


> In addition, oddly enough it pops up the list of just the six
> templated constructs (defrule, deftemplate, defquery, deffunction,
> defglobal and deffacts) which BTW I can never seem to access in any
> other way.

"(def Ctrl-/" (i.e., starting to type and then using the "Content
Assist" key) will get you there. This is another area that could use
some polishing.



---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [hidden email]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'
in the BODY of a message to [hidden email], NOT to the list
(use your own address!) List problems? Notify [hidden email].
--------------------------------------------------------------------