Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367218

Summary: [Infra] Be able to disable the external resource overlay
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: EMF-FacetAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: emft.facet-inbox, gdupe, vincent.lorenzo
Version: unspecifiedFlags: gdupe: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 378367    
Attachments:
Description Flags
patch
nicolas.bros: iplog+, gdupe: review+
patch for the test scenario
gdupe: iplog+
new plug-in : org.eclipse.emf.facet.infra.browser.doc nicolas.bros: iplog+

Description Nicolas Bros CLA 2011-12-20 11:40:30 EST
It should be possible to control whether the external resource overlay (which looks like a blue arrow currently) should be displayed.
Comment 1 Nicolas Bros CLA 2011-12-20 11:49:10 EST
Created attachment 208633 [details]
patch

Here is a patch that adds an API to control the appearance of the overlay on external resources.
Comment 2 Nicolas Bros CLA 2011-12-21 04:17:00 EST
Created attachment 208659 [details]
patch for the test scenario

To enable/disable the external resource overlay, simply call:
org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager#setDecorateExternalResources

Since this API controls custom painting, I see no way that I can write a proper unit test.
So, here is a scenario to check that it works:
- start Eclipse with this plug-in enabled: org.eclipse.emf.facet.infra.browser.uicore.examples.cnf (but org.eclipse.gmt.modisco.infra.browser.uicore.examples.cnf disabled)
- open the "Project Explorer" view
- expand a ".ecore" file, and see that the EFactory element(s) under the EPackage#eFactoryInstance reference have a blue arrow
- now, apply the attached patch and restart the runtime Eclipse
- check that the EFactory element(s) under the EPackage#eFactoryInstance don't have a blue arrow anymore
Comment 3 Nicolas Bros CLA 2011-12-21 04:44:06 EST
Created attachment 208663 [details]
new plug-in : org.eclipse.emf.facet.infra.browser.doc

Here is the associated documentation plug-in.
Comment 4 Nicolas Bros CLA 2011-12-21 04:44:44 EST
Comment on attachment 208633 [details]
patch

Committed in revision 1354.
Comment 5 Nicolas Bros CLA 2011-12-21 04:44:57 EST
Comment on attachment 208663 [details]
new plug-in : org.eclipse.emf.facet.infra.browser.doc

Committed in revision 1354.
Comment 6 Nicolas Bros CLA 2011-12-21 04:46:14 EST
Fixed in revision 1354 (for 0.2.0 M5)
Comment 7 Gregoire Dupe CLA 2011-12-21 05:23:18 EST
Comment on attachment 208633 [details]
patch

It works in my environment. I agree to commit but the following methods have to be documented:
 - org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager.setDecorateExternalResources(boolean)
 - org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager.isDecorateExternalResources()
Comment 8 Vincent Lorenzo CLA 2011-12-22 02:28:53 EST
I reopen the bug because I think you should add images in your developper documentation to show the browser with the blue arrow and without the blue arrow.
/Vincent Lorenzo
Comment 9 Gregoire Dupe CLA 2011-12-22 04:50:11 EST
Comment on attachment 208663 [details]
new plug-in : org.eclipse.emf.facet.infra.browser.doc

Why cannot I see this documentation in http://download.eclipse.org/facet/doc/org.eclipse.emf.facet.doc/index.html ?
Comment 10 Nicolas Bros CLA 2011-12-22 06:27:27 EST
(In reply to comment #9)
> Why cannot I see this documentation in
> http://download.eclipse.org/facet/doc/org.eclipse.emf.facet.doc/index.html ?

The documentation building mechanism for EMF Facet is convoluted : I spent more than an hour yesterday trying to figure out how it was supposed to work, and I didn't even get it right, since the documentation was ultimately not published.
I think EMF Facet should adopt the simpler and more correct documentation building system that was redesigned for MoDisco.
Comment 11 Nicolas Bros CLA 2012-01-17 05:46:22 EST
I have added screenshots in the documentation in revision 1491, and I committed a fix for the documentation build in 1492.
Comment 12 Nicolas Bros CLA 2012-01-17 11:27:50 EST
I checked : the paragraphs I added now appear in the documentation (the images will appear with the next build).
Marking as fixed.
Comment 13 Nicolas Bros CLA 2012-01-18 04:06:29 EST
(In reply to comment #12)
> the images will appear with the next build

They don't. I'm reopening to investigate.
Comment 14 Nicolas Bros CLA 2012-05-30 05:34:49 EDT
I checked: the images now appear in the documentation:

http://download.eclipse.org/facet/doc/org.eclipse.emf.facet.infra.browser.doc/mediawiki/plugin_dev.html
Comment 15 Gregoire Dupe CLA 2012-06-01 06:49:05 EDT
This bug can be closed.
Comment 16 Gregoire Dupe CLA 2014-05-26 08:12:53 EDT
Comment on attachment 208659 [details]
patch for the test scenario

I've found part of this patch in the source code : that's why I add an iplog+.