This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 185391 - Export SMLIF wizard > ruleBindings page shows no documents
Summary: Export SMLIF wizard > ruleBindings page shows no documents
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: David Whiteman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-03 12:53 EDT by Valentina Popescu CLA
Modified: 2012-01-03 13:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentina Popescu CLA 2007-05-03 12:53:30 EDT
Using the synthetic sample I run Export to SMLIF from the root folder.
Go to the ruleBindings page and try to add new rules. When I click on add there are no options offered for the rule or instance document
Comment 1 David Whiteman CLA 2007-05-03 13:06:33 EDT
Did you click in the cells?  There should be a drop down list of all document aliases and rule aliases in those respective columns.  If not, it probably there are no aliases already defined, and there will be nothing you can choose in the list.  You can specify aliases on page 2, and then go back to page three and you should see some available documents and rules to be bound.
Comment 2 Valentina Popescu CLA 2007-05-03 13:14:05 EDT
I clicked on the list, the drop down was empty.
So you say that I should first create aliases ?.. It doesn't look right since the aliases are created by default if none provided. The bindings page should use this default if nothing was defined by the user.
Comment 3 David Whiteman CLA 2007-05-03 13:49:53 EDT
We generate aliases when you do an import, but I guess we don't when exporting from SML model units if you didn't first do an import.  So I guess you're saying we should do so?  If so, sounds like a good feature request.
Comment 4 Valentina Popescu CLA 2007-05-03 14:09:10 EDT
I don't think this is a feature request. 
1. The resulted smlif document does have aliases defined for every of the documents imported even if the user doesn't specify any. The rule bindings page should use the same alghoritm when deciding what to show for the alias.

2. It's not intuitive that not having an alias will stop me from creating rule bindings. In my mind, I want to link a rule with a document to be applied to and I expect to be able to provide this information in the bindings page, with or without alias support
Comment 5 David Whiteman CLA 2007-05-03 14:23:33 EDT
I agree with you. I just wanted to explain that it isn't impossible with the current design to make rule bindings with your data.  But I agree that the changes you suggest should be made.
Comment 6 amehrega CLA 2007-05-03 14:54:59 EDT
(In reply to comment #3)
> We generate aliases when you do an import, but I guess we don't when exporting
> from SML model units if you didn't first do an import.  

I thought we always generate an alias.  I was under the impression that the following policy is used in the order shown below:

1) Use the alias that the user has explicitly specified in the export wizard
2) Use the metadata that is generated if the user has performed an import from an SML-IF document
3) Use the workspace path of the document as the alias

If this is the case, then we should always have an alias for documents exported into an SML-IF document.  Valentina's suggestion does make sense (i.e. users shouldn't be forced to bind a document to an alias to bind rules to them)
Comment 7 David Whiteman CLA 2007-05-03 15:01:01 EDT
I guess Valentina was saying that #3 is happening but that the GUI isn't reflecting that.  I would have to extract that logic our of the ExportToSMLIF class so the GUI can make use of calculating an alias for a document that doesn't have one.  Should aliases be generated/calculated for all definitions (schemas and rules) and instances?
Comment 8 David Whiteman CLA 2007-05-03 15:59:40 EDT
(In reply to comment #6)
> 1) Use the alias that the user has explicitly specified in the export wizard
> 2) Use the metadata that is generated if the user has performed an import from
> an SML-IF document

IIRC, if there are aliases in the metadata, we populate the aliases in page 2 of the export wizard, but the user can change these by adding or removing aliases on that page, so it's less transparent than it might seem in your summary above.
Comment 9 amehrega CLA 2007-05-03 18:24:17 EDT
David,

>In reply to comment #7
You shouldn't determine the alias of a document and have it appear under the drop down list.  It's sufficient to just show the name of the resource.
I think we should always generate aliases for the documents automatically if none exists.  This allows users to have SML documents referenced in other SML documents based on the policy we use to determine aliases.

>In reply to comment #8
That's fine.
Comment 10 Valentina Popescu CLA 2007-11-29 13:52:18 EST
moving target to i8
Comment 11 David Whiteman CLA 2008-04-29 17:25:50 EDT
(In reply to comment #9)
> I think we should always generate aliases for the documents automatically if
> none exists.  This allows users to have SML documents referenced in other SML
> documents based on the policy we use to determine aliases.

Doesn't this violate our goal for the SML-IF document used in import to be semantically equivalent to the one generated if you immediately exported the SML documents?

Comment 12 amehrega CLA 2008-04-30 15:23:48 EDT
(In reply to comment #11)
> Doesn't this violate our goal for the SML-IF document used in import to be
> semantically equivalent to the one generated if you immediately exported the
> SML documents?
> 

No, not if we use the policy I mentioned under comment #6.  It's only when (1) and (2) are not available that we generate aliases.  It's easier to talk about this if it's still not clear to you.