| Summary: | ValidateEditException when saving calendar sample editor | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Shenxue Zhou <shenxue.zhou> |
| Component: | Sapphire | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | konstantin |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Shenxue Zhou
This appears to be a long-standing issue rather than a recent regression. I have a fix implemented. Tested the following scenarios: Scenario A 1. Create calendar.xml at a location that does not have contacts.xml. 2. Add an event and an attendee. 3. Save. 4. Confirm no exception and contacts.xml not created. Scenario B Just like A, except between steps 1 and 2, visit the contacts.xml tab to make sure the xml editor is initialized on a missing file. You should see a message in the editor pane about file not being present. That's expected. Scenario C 1. Create calendar.xml at a location that does not have contacts.xml. 2. Add an event and an attendee. 3. Enter e-mail for attendee. This requires writing to contacts.xml. Verify that contacts.xml file is created. 4. Visit contacts.xml tab to confirm file content. 5. Save. 6. Confirm no exception. Scenario D Just like A, except between steps 1 and 2, visit the contacts.xml tab to make sure the xml editor is initialized on a missing file. Shenxue, Please verify the fix. Once verified, add a note here and I will close this bug. I'm getting compiler errors on the sample project:
In the generated Contact.java:
public ModelElementHandle<IAddress> getAddress()
But in the IContact.java:
// *** Address ***
@Type( base = IAddress.class )
@XmlBinding( path = "address" )
ImpliedElementProperty PROP_ADDRESS = new ImpliedElementProperty( TYPE, "Address" );
IAddress getAddress();
The compiler error I'm getting is:
The return type is incompatible with IContact.getAddress() Contact.java /org.eclipse.sapphire.samples/.apt_generated/org/eclipse/sapphire/samples/contacts/internal line 46 Java Problem
If I revert the Address property from ImpliedElementProperty type to ElementProperty, then the compiler error goes away.
Even after I revert the Address property and sample project builds, running the contact editor and adding a new contact would result the following exception: Caused by: java.lang.RuntimeException: Could not find property Street in org.eclipse.sapphire.samples.contacts.IContact at org.eclipse.sapphire.ui.SapphirePart.resolve(SapphirePart.java:438) at org.eclipse.sapphire.ui.SapphirePart.resolve(SapphirePart.java:417) at org.eclipse.sapphire.ui.SapphirePropertyEditor.init(SapphirePropertyEditor.java:124) at org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:144) at org.eclipse.sapphire.ui.SapphirePart.create(SapphirePart.java:661) at org.eclipse.sapphire.ui.SapphirePartContainer.init(SapphirePartContainer.java:63) at org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:144) at org.eclipse.sapphire.ui.SapphirePart.create(SapphirePart.java:661) at org.eclipse.sapphire.ui.SapphirePageBook.changePage(SapphirePageBook.java:164) at org.eclipse.sapphire.ui.SapphirePageBook.changePage(SapphirePageBook.java:146) at org.eclipse.sapphire.ui.SapphireWithDirective.updateCurrentPage(SapphireWithDirective.java:322) at org.eclipse.sapphire.ui.SapphireWithDirective.init(SapphireWithDirective.java:72) at org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:144) at org.eclipse.sapphire.ui.SapphirePart.create(SapphirePart.java:661) at org.eclipse.sapphire.ui.SapphirePartContainer.init(SapphirePartContainer.java:63) at org.eclipse.sapphire.ui.SapphireSection.init(SapphireSection.java:68) at org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:144) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsContentNode.init(MasterDetailsContentNode.java:230) at org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:144) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsContentNode$6.createNode(MasterDetailsContentNode.java:314) at org.eclipse.sapphire.ui.editor.views.masterdetails.internal.ListPropertyNodeFactory.createNodes(ListPropertyNodeFactory.java:83) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsContentNode.getChildNodes(MasterDetailsContentNode.java:610) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsPage$2.hasChildren(MasterDetailsPage.java:450) at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2086) at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:588) at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2112) at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.java:2794) at org.eclipse.jface.viewers.TreeViewer.updatePlus(TreeViewer.java:852) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1832) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1799) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1785) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1487) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1422) at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1485) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537) at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.refresh(FilteredTree.java:1208) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsPage$4.handleNodeStructureChange(MasterDetailsPage.java:522) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsContentTree.notifyOfNodeStructureChange(MasterDetailsContentTree.java:286) at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsContentNode$7.run(MasterDetailsContentNode.java:672) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 23 more You need to sync to the latest and re-build your dev environment and target. With the new build, I'm about to add new event and new contact. Please go ahead to close this bug. Closing, based on Shenxue's verification. |