Community
Participate
Working Groups
I have a feature which should render it's values in a Widget AdvancedTableComposition. Unfortunately, the label isn't displayed. (See attachment, in properties view an element is selected, but no label). I have put a breakpoint on the getText() method on xxItemProvider for this object, which doesn't get called. I wonder if the adapterFactory is correctly resolved by EEF in this case? this is in my .edit plugin.xml <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> <factory uri="http://www.netxforge.com/15072010/networks" class="com.netxforge.d.networks.provider.NetworksItemProviderAdapterFactory" supportedTypes= "org.eclipse.emf.edit.provider.IEditingDomainItemProvider org.eclipse.emf.edit.provider.IStructuredItemContentProvider org.eclipse.emf.edit.provider.ITreeItemContentProvider org.eclipse.emf.edit.provider.IItemLabelProvider org.eclipse.emf.edit.provider.IItemPropertySource org.eclipse.emf.edit.provider.ITableItemLabelProvider"/> </extension> Here is some extracts for this object: <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_VSMjaJXLEd-GxtwJpoOb1Q" name="equipmentResources" views="_VSNKqZXLEd-GxtwJpoOb1Q"> <model xsi:type="ecore:EReference" href="file:/Users/dzonekl/Documents/Spaces/netxstudio.gen2/com.netxforge.d/model/networks.ecore#//Equipment/equipmentResources"/> <elements xsi:type="eef-views:ElementEditor" xmi:id="_VSNKqZXLEd-GxtwJpoOb1Q" name="Equipment Resources"> <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
hi, seems you forgot to attach the screenshot.. BTW, in the EquipmentResourcesFormPart, you should put a breakpoint in the Widget implementation that is responsible of the table display.
Created attachment 177211 [details] label not rendered
Hi, There is no specific FormPart for EquipmentResources. The widget you refer to, is it? (What do I need to check here? The label provider seems to be set). protected void createEquipmentResourcesTableComposition(FormToolkit widgetFactory, Composite parent) { this.equipmentResources = new ReferencesTable<NetXResource>(NetworksMessages.EquipmentPropertiesEditionPart_EquipmentResourcesLabel, new ReferencesTableListener<NetXResource>() { public void handleAdd() { addToEquipmentResources();} public void handleEdit(NetXResource element) { editEquipmentResources(element); } public void handleMove(NetXResource element, int oldIndex, int newIndex) { moveEquipmentResources(element, oldIndex, newIndex); } public void handleRemove(NetXResource element) { removeFromEquipmentResources(element); } public void navigateTo(NetXResource element) { } }); this.equipmentResources.setHelpText(propertiesEditionComponent.getHelpContent(NetworksViewsRepository.Equipment.equipmentResources, NetworksViewsRepository.FORM_KIND)); this.equipmentResources.createControls(parent, widgetFactory); GridData equipmentResourcesData = new GridData(GridData.FILL_HORIZONTAL); equipmentResourcesData.horizontalSpan = 3; this.equipmentResources.setLayoutData(equipmentResourcesData); this.equipmentResources.setLowerBound(0); this.equipmentResources.setUpperBound(-1); }
(In reply to comment #3) Seems it comes from the Referencestables ( which resides in the EEF runtime ). the table use a adapterfactory that is initialized like : protected AdapterFactory adapterFactory = new ComposedAdapterFactory( ComposedAdapterFactory.Descriptor.Registry.INSTANCE); so it will provide your adapterfactory specified in the plugin.xml. i will look deeper.
BTW, I am going to see if this also occurs on a win32 build. (I now use MacOSX Snow leopard).
ok, after checking the nonreg tests plugins, it goes thru the getText of the itemprovider of the element you want to display. in your case, it must go to the getText() of the requirementItemProvider ... does it happens only with this widget ?
- Yes, it seems to happen only on this widget. - The item provider is in this case EquipmentItemProvider. - not sure what you mean with nonreg (Non regression?).
(In reply to comment #8) > - Yes, it seems to happen only on this widget. > - The item provider is in this case EquipmentItemProvider. this is strange that the adapterFactory does not work for this case. could you send me your test case ? > - not sure what you mean with nonreg (Non regression?). yes, in the CVS we have severals non regressions tests.
(In reply to comment #9) > (In reply to comment #8) > > - Yes, it seems to happen only on this widget. > > - The item provider is in this case EquipmentItemProvider. > > this is strange that the adapterFactory does not work for this case. > > could you send me your test case ? I don't really have a test case, I just see this when launching the app. Would you like the model etc.. in place? > > > - not sure what you mean with nonreg (Non regression?). > > yes, in the CVS we have severals non regressions tests.
(In reply to comment #10) > > > > this is strange that the adapterFactory does not work for this case. > > > > could you send me your test case ? > > I don't really have a test case, I just see this when launching the app. > Would you like the model etc.. in place? > yes, the whole app would be nice ( ecore + edit + editor + eef generated )
(In reply to comment #11) > (In reply to comment #10) > > > > > > this is strange that the adapterFactory does not work for this case. > > > > > > could you send me your test case ? > > > > I don't really have a test case, I just see this when launching the app. > > Would you like the model etc.. in place? > > > > yes, the whole app would be nice ( ecore + edit + editor + eef generated ) I have tested this with win32, and the same problem persists. I wonder if this could be a configuration issue like defining the correct extensions in plugin.xml?
(In reply to comment #12) > I have tested this with win32, and the same problem persists. > I wonder if this could be a configuration issue like defining the correct > extensions in plugin.xml? your plugin.xml seems fine, for the adapterFactory case. please verify that all the EEF generated stuff is correct ( diff between the eef generated plugin.xml and your plugin.xml )
In order not to overload you with a non-bug, I intend to reproduce the problem, with the simplest possible model. So, I will produce this, if the bug persists, I will send you this snippet model.
Hi Stephane, I made a simple library, book, writer model with an EReference between book and writers. This uses the Widget AdvancedReferencesTable without any problem. The label is shown. So, I can't reproduce the problem with a small model. I propose we close this issue, as it's likely a setup issue in my case (plugin.xml?).
(In reply to comment #15) > Hi Stephane, > I made a simple library, book, writer model with an EReference between book and > writers. This uses the Widget AdvancedReferencesTable without any problem. The > label is shown. > So, I can't reproduce the problem with a small model. > I propose we close this issue, as it's likely a setup issue in my case > (plugin.xml?). Yes, we can do that, but i am still perplex about your issue...
Also, I didn't mention but my setup is slightly different from the standard generated EMF code. 1. I use a shared editing domain. So in the various editors I have, I refer to this shared domain. 2. I use a transactional editing domain which is declared in the workbench. 3. Because of this shared domain, I centralize some of the stuff, like the resource problem indication. 4. My resource, is an HibernateResource, so I use Teneo to persist my resource. Now, I am thinking about applying the same concept to my simplified model, and see if I reproduce. Cheers Christophe
Hi, I am not 100%, but the problem can be reproduced by using a Workspace Transactional Editing domain. So an editing domain created with i.e. this: TransactionalEditingDomain domain = TransactionalEditingDomain.Registry.INSTANCE .getEditingDomain(EDITING_DOMAIN_ID); The ID, is a declared shared domain. In my case, I use a WorkspaceEditingDomainFactory. <extension point="org.eclipse.emf.transaction.editingDomains"> <domain> id="org.eclipse.example.MyDomain" factory="org.eclipse.emf.workspace.WorkspaceEditingDomainFactory"/> </extension> I think the EEF label providers will perhaps not correctly use the : TransactionalAdapterFactoryContentProvider TransactionalAdapterFactoryLabelProvider as suggested in the documentation. When changing my code to a regular editing domain, the problem dissapeared.