Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 294200 - [console] An extension to the OCL interpreter example (OCL Console): history for expressions
Summary: [console] An extension to the OCL interpreter example (OCL Console): history ...
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 260641 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-04 09:06 EST by Patrick Konemann CLA
Modified: 2011-05-27 02:46 EDT (History)
3 users (show)

See Also:


Attachments
Patch for history in OCL console (2.95 KB, patch)
2009-11-04 09:11 EST, Patrick Konemann CLA
ed: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Konemann CLA 2009-11-04 09:06:22 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729)
Build Identifier: M20090917-0800

I'm using the OCL console frequently and I am really missing some history function like the unix bash has, for instance.
So I coded one and I think it is really helpful especially when writing long expressions.
Yes, it is all my work; and yes, you may integrate it into the existing example.

Instructions:
1. Apply the attached patch to the org.eclipse.emf.ocl.examples.interpreter project.
2. Run the OCL Console and explore the history with pageUp and pageDown

Reproducible: Always
Comment 1 Patrick Konemann CLA 2009-11-04 09:11:51 EST
Created attachment 151299 [details]
Patch for history in OCL console
Comment 2 Ed Willink CLA 2009-11-05 17:13:38 EST
Is there any reason to use PAGE_UP/DOWN rather than ARROW_UP/DOWN?

Maintenance of the history seems confused. Why does page up both remove and add to history? Surely the history grows with each CR only?
Comment 3 Patrick Konemann CLA 2009-11-05 17:25:13 EST
(In reply to comment #2)
> Is there any reason to use PAGE_UP/DOWN rather than ARROW_UP/DOWN?

Yes. In case of multi-line expressions (shift-enter), ARROW_UP/DOWN are used to navigate between the lines.
An alternative would be SHIFT + ARROW_UP/DOWN?

> 
> Maintenance of the history seems confused. Why does page up both remove and add
> to history? Surely the history grows with each CR only?

Let us assume the history contains several items, and you are currently writing a new expression.
Browsing the history will not destroy your current expression but let you return to it (e.g. if you want to look up an old expression and then returning to the expression your are currently writing).
Comment 4 Ed Willink CLA 2009-12-01 02:34:42 EST
*** Bug 260641 has been marked as a duplicate of this bug. ***
Comment 5 Ed Willink CLA 2009-12-01 02:41:26 EST
Committed to CVS HEAD.

I'm not sure what is happening on the revised example, so I cannot be sure whether this will get 'lost' and we may need reminding of its utility.

Thanks anyway.
Comment 6 Ed Willink CLA 2011-05-27 02:46:57 EDT
Closing after over 18 months in resolved state.