This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137648 - IEP operators on editor canvas do not have cut/copy/paste icons enabled in NB toolbar
Summary: IEP operators on editor canvas do not have cut/copy/paste icons enabled in NB...
Status: REOPENED
Alias: None
Product: soa
Classification: Unclassified
Component: IEP editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: pvarghese
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-19 00:25 UTC by kdoizaki
Modified: 2008-09-16 17:10 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdoizaki 2008-06-19 00:25:28 UTC
User can cut/copy/paste IEP operators using keyboard keys and shortcut commands, but should be able to use NB icons, 
too.
Comment 1 pvarghese 2008-08-15 18:51:14 UTC
Moving this bug as an enhancement ticket to cover the new cut/copy/paste retirements(stated below) that was suggested by
Bing. 

1. When are Cut, Copy, and Paste actions enabled?

Whenever a collection of operators and links (at least one operator) in an event processor are selected, the following

gui components should be enabled:

    *

      Menu bar: Edit -> Cut, Copy
    *

      Tool bar button -> Cut, Copy



A user can use any of above action triggers to cut or copy the selected operators and links. A user

can also use <Ctrl-X> to cut, and <Ctrl-C> to copy the selected operators and links. After user's

cut or copy action, the Paste action should be enabled in Menu bar, and Tool bar.



2. Where to be paste the copied operators and links?

A user can paste the copied operators and links to the same event processor or a different event processor that is
opened in the IEP editor. And a user can paste as many times as he wants.



3. What happens when the copied operators and links are pasted to event processor A?

For each copied operator X do following in the order of its topScore {

    *

      create operator Y in event processor A such that Y has the same operator type as X.
    *

      Y.id = “o” + k where k is the smallest nonnegative integer not used by other operators (including those operators
created prior to Y in the same paste action) in event processor A

    *

      Y.name = X.name + “_” + k where k is the smallest nonnegative integer such that X.name + “_” + k is not used by
other operators (including those operators created before Y in the same paste action) in event processor A
    *

      If X is a schema owner, and its schema is S, then create schema T such that T has identical columns defined as S
does, and T.name = S.name + “_” + k where k is the smallest nonnegative integer not used by other schemas (including
those schemas created prior to T in the same paste action) in event processor A. Set Y.outputSchemaId to T.name. If X is
not a schema owner, then set Y's outputSchemaId to “”
    *

      Following properties of Y will be set to empty list: inputIdList, inputSchemaIdList, staticInputIdList.
    *

      Other properties of Y will be copied literally.

}



For each copied link L do the following in the order of their fromNode's topoScore {

    *

      go to next link if L.toNode or L.fromNode is not copied.
    *

      If L links from operator X1 to operator X2, then create a link M to link operator Y1 to operator Y2 where Y1 and
Y2 are pasted versions of X1 and X2, respectively. Update those properties of Y2 and all its down stream operators that
are updated by editor when a link is created between Y1 and Y2. Currently following properties are updated for Y2 and
all its down stream operators: inputIdList, inputSchemaIdList, staticInputIdList. OutputSchemaId is updated too if Y2 is
not schema owner

}



4. Features that related to copy and paste but not implemented before.

Now for each pasted operator Y, we know that Y has valid id, name, outputSchemaId, inputIdList, inputSchemaIdList,
staticInputIdList. We will check other properties of Y against these valid properties to fix any inconsistency:

For each pasted operator Y do following in the order of their fromNode's topoScore {

    *

      If X has a property that has non-list data type, and that has reference to its input operator X1, and X1 is not
copied or link is not copied, then Y's same property will be set to default. For example, X has a whereClause property
which has type “string”, and this property has “X1.price > 3” as part of its value, and X1 is not copied, then Y's
whereClause property will set to the default value “”.
    *

      If X has a property that has non-list data type, and that all input operators it has references are copied and all
links are copied, then Y's same property will be set to refer to the pasted versions of X's input operators. For
example, X has a whereClause property which has type “string”, and this property has value “X1.price > 3 AND X2.price >
5” , and both X1 and X2 are copied, then Y's whereClause property will set to “Y1.price > 3 AND Y2.price > 5”. Here Y1
and Y2 are the pasted version of X1 and X2, respetively.
    *

      If X has a property that has list data type, and that has reference to its input operator X1, and X1 is copied,
and link is copied, then Y's same property will have reference to Y1 in the same way X to X1.
    *

      If X has a property that has list data type, and that has reference to its input operator X1, and X1 is not copied
or link is not copied, then Y's same property will not have reference to X1. For example, X has a fromClause property
which has type “stringList”, and this property has value “X1.name, X2.name”, then Y's fromClause will not have value
“X1.name” if X1 is not copied, or link is not copied.

}



Note: An efficient way to do the first two steps is to check for each operator X1 that is in X's inputIdList to see if
Y1 is also in Y's inputIdList, then replace X1.name with Y1.name for the Y's same property, and continue to X's next
input operator. If Y1 is not in Y's inputIdList, then set Y's same property to default value, and go to next property..



5. Cut = Copy + Delete
Comment 2 jlautz 2008-09-16 17:10:05 UTC
This has not been implemented, so leaving the enhancement request open.