Project

General

Profile

Bug #3187

RExpression actor does not share focus

Added by Kevin Drury over 10 years ago. Updated over 9 years ago.

Status:
In Progress
Priority:
Normal
Category:
actors
Target version:
Start date:
03/25/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3187

Description

It would be nice to be able to change the focus from an open RExpression actor to another Kepler window. Two cases that commonly occur:
1) copying code from one RExpression actor to another - when the source code comes from several regions of an RExpression R-script this leads to copying lots of stuff you don't need (that is in between the parts you do need), or opening and closing the 2 RExpression actors multiple times. Because of the tiny size of the R-code window, believe it or not, it's the latter path that I usually choose. Especially before this window was scrollable - whoever fixed that, thanks!
2) often, the next change an analyst will make to their code depends on what the output looks like from the last execution. So, you look here in the output window (say, a standard text output actor), then you scroll down and look there, and other places in a long output stream. Then, you open your RExpression actor to make the desired changes, but suppose you need to double-check a bit of output that is no longer visible, because you've scrolled past it. You have to close the RExpression actor in order to scroll back through the output to the spot you need. Then reopen the actor. But, now other parts of the output are invisible and don't become visible (by scrolling to them) until you close the RExpression actor again.

Is it possible to allow back-and-forth between 2 open RExpression actors and an RExpression actor and the workflow output?


Related issues

Blocks Kepler - Bug #3191: Merge TextEditor changes with ptII sourceResolved2008-03-28

History

#1 Updated by ben leinfelder over 10 years ago

By using the ptolemy.actor.gui.TextEditor when "Open Actor" is invoked on the RExpression we can support having multiple editor (and display) windows open simultaneously so that copying and pasting among them easier.

This change can go into the Kepler code base (RExpression class) without any modifications to the underlying ptolemy sources.

Note: We'll hopefully get the go-ahead to add "undo" functionality to this TextEditor, too. But this would depend on approval from the ptII folks.

#2 Updated by ben leinfelder over 10 years ago

Until a change is included in ptII code (specifically ptolemy.actor.gui.TextEditorTableau), only one RExpresison text editor will be shown at a time (you can still look at other actors and execute the workflow with this single editor open, however).

The change mentioned makes sure the frame (or is it a Tableau?) title is set to the R actor's name so that multiple text editors are opened for each different script. Currently they all use the same frame titled "Unnamed"

#3 Updated by Christopher Brooks over 10 years ago

The change to TextEditorTableau is marked below
if (frame == null) {
frame = new TextEditor(title, container.getDocument());
}

frame.text.setColumns(80);
frame.text.setRows(40);
--> setTitle(frame.getTitle());
setFrame(frame);
frame.setTableau(this);

The problem is that if I make this change, then under Ptolemy the titlebar
does not get updated with the filename. Here's how to reproduce this:
1. Make the above change to TextEditorTableau and recompile Ptolemy
2. File | New | Text Editor
3. Type some text
4. File | Save As
5. Save the file as data.txt
The title bar does not get updated with the title.

If I revert the change, and repeat, then the titlebar gets updated.
At least it did for my test

#4 Updated by ben leinfelder over 10 years ago

It's less than ideal to have a bunch of open text editor windows all named "Unnamed".
But I think we can handle it for the time being.

#5 Updated by Christopher Brooks over 10 years ago

Ok, I put the setTitle inside the if block, so this might now work.
What we have is:

if (frame == null) {
frame = new TextEditor(title, container.getDocument());
// Set the title for the Kepler R actor
// http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3187
setTitle(frame.getTitle());
}
frame.text.setColumns(80);
frame.text.setRows(40);
setFrame(frame);
frame.setTableau(this);

This might have solved the "many windows named Unnamed" proble

#6 Updated by ben leinfelder over 10 years ago

I think you have it inverted. the frame won't be null in our Kepler case for the R actor. The code block should be:

if (frame == null) {
frame = new TextEditor(title, container.getDocument());
}
else {
// Set the title for the Kepler R actor
// http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3187
setTitle(frame.getTitle());
}

is that reasonable?

#7 Updated by ben leinfelder over 10 years ago

This will not be included in the branch of ptolemy (rel70b2) we are using to build kepler 1.0
Retargeting for after 1.0.
I think Kepler 1.0 can live without the frame title text being set

#8 Updated by Redmine Admin over 5 years ago

Original Bugzilla ID was 3187

Also available in: Atom PDF