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

Bug 366624

Summary: make package org.eclipse.nebula.jface.gridviewer.internal visible to outside (export in manifest.mf)
Product: z_Archived Reporter: Mircea Luchian <mircea.luchian>
Component: NebulaAssignee: Thomas Schindl <tom.schindl>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgross
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
screenshot of jar structure with missing exported package none

Description Mircea Luchian CLA 2011-12-13 15:49:30 EST
Build Identifier: 20110916-0149

I am using a GridTableViewer to edit some values in the composite. The user can select an entire row or a few cells in the table. 

To get the Structured Selection, I use
StructuredSelection selection = (StructuredSelection) gridTableViewer.getSelection();

In debug mode, the instance of the selection is a CellSelection (org.eclipse.nebula.jface.gridviewer.internal) and I do want to access its "public List getIndices(Object element)" method from the outside. 

However, the package in which CellSelection is defined (org.eclipse.nebula.jface.gridviewer.internal) IS NOT exported in the Manifest.MF, therefore cannot access the class in my implementation. 

Manifest.MF has: 
Export-Package: org.eclipse.nebula.jface.gridviewer,
                org.eclipse.nebula.widgets.grid,
                org.eclipse.nebula.widgets.grid.internal;x-internal:=true

Unless otherwise noted, we should be able to use the CellSelection class from the outside world.

Reproducible: Always

Steps to Reproduce:
see above
Comment 1 Thomas Schindl CLA 2011-12-13 18:15:07 EST
Well the package is exported but marked as x-internal so you get a warning but could ignore it. We can discuss move the selection class to the public package but we'll never export the internal stuff as API.

If you want to modify your request to move CellSelection to the public package please reopen but as stated you can already access it though you might get broken one day.
Comment 2 Mircea Luchian CLA 2011-12-13 18:25:31 EST
Hi Tom, 

The org.eclipse.nebula.widgets.grid.internal package is OK with me. 
The problem is the 

org.eclipse.nebula.jface.gridviewer.internal 

package that's not declared in the Manifest as an Export-Package 

In other words, shouldn't the manifest.mf be

Export-Package: org.eclipse.nebula.jface.gridviewer,
                org.eclipse.nebula.jface.gridviewer.internal;x-internal:=true,
                org.eclipse.nebula.widgets.grid,
                org.eclipse.nebula.widgets.grid.internal;x-internal:=true
?

Currently it is: 

Export-Package: org.eclipse.nebula.jface.gridviewer,
                org.eclipse.nebula.widgets.grid,
                org.eclipse.nebula.widgets.grid.internal;x-internal:=true
Comment 3 Mircea Luchian CLA 2011-12-13 18:26:29 EST
Created attachment 208360 [details]
screenshot of jar structure with missing exported package
Comment 4 Thomas Schindl CLA 2011-12-13 18:42:25 EST
ah ok I looked only at the grid and not the viewer one. Now this makes sense.
Comment 5 Thomas Schindl CLA 2011-12-13 18:45:03 EST
fix released to HEAD the next build should have the fix