Project

General

Profile

Actions

Bug #5659

closed

Kepler CaseGraphFrame and CaseGraphTableau have duplicated Ptolemy code.

Added by Christopher Brooks over 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
interface
Target version:
Start date:
08/06/2012
Due date:
% Done:

100%

Estimated time:
Spent time:
Bugzilla-Id:
5659

Description

./gui/src/org/kepler/gui/frame/CaseGraphFrame.java
FIXME: Refactor!
Duplicate of ptolemy/src/ptolemy/vergil/modal/CaseGraphFrame.java
The Kepler version extends the Kepler-specific MultiCompositeGraphFrame which extends KeplerGraphFrame


  1. ./gui/src/org/kepler/gui/frame/CaseGraphTableau.java
    FIXME: Refactor!
    Probably like CaseGraphFrame above.
Actions #1

Updated by Christopher Brooks about 12 years ago

I'm reassigning this to Dan.

There has to be a better way to do this than to duplicate a bunch of code.

Actions #2

Updated by Daniel Crawl about 12 years ago

One solution is to move as much of the duplicated code as possible into static methods. There would still need to be CaseGraphFrame and CaseGraphTableau classes in Kepler, but they would be small.

Another solution is for KeplerGraphFrame to become a subclass of CaseGraphFrame. CaseGraphFrame would have to be updated to display a tabbed pane and create menus for adding/removing refinements only if the container was a Case actor.

Both solutions remove a lot of the duplicated code but do not really fix the problem... Comments? Other solutions?

Actions #3

Updated by Christopher Brooks about 12 years ago

One option would be to move more of the KeplerGraphFrame features in to BasicGraphFrame.

CaseGraphFrame would have to be updated to display a tabbed pane and create
menus for adding/removing refinements only if the container was a Case actor.

KeplerGraphFrame has tabs that appear in the right pane, but these tabs are not visible when I run kepler. Where do the tabs appear?
Can more of KeplerGraphFrame be merged into BasicGraphFrame?

One issue is that KeplerGraphFrame has scrollbars. Could these be disabled
for Vergil?

KeplerGraphFrame also has a save as that saves the kar files.

Maybe we can use some sort of mixin facility?

See
http://stackoverflow.com/questions/386695/option-for-inheritance

Actions #4

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 5659

Actions #5

Updated by Daniel Crawl over 9 years ago

  • Target version changed from 2.5.0 to 2.X.Y

CaseGraphFrame is no longer in Kepler. CaseGraphTableau still is.

Actions #6

Updated by Christopher Brooks over 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

I'm not sure of the status of this bug.

There is a CaseGraphTableau in ptII and kepler/gui and a CaseGraphFrame in ptII:

./gui/src/org/kepler/gui/frame/CaseGraphTableau.java
./ptolemy/src/ptolemy/vergil/modal/CaseGraphFrame.java
./ptolemy/src/ptolemy/vergil/modal/CaseGraphTableau.java

There was a CaseGraphFrame in Kepler, but that was removed.

The duplicate code check for Kepler no longer shows a problem here, see http://terra.eecs.berkeley.edu:8080/job/kepler/Kepler_Duplicate_Code/

I'm closing this bug.

Actions

Also available in: Atom PDF