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

Bug 345434

Summary: Please export more packages, so I can create my own wizards.
Product: [SOA] JWT Reporter: Ericp56 <ericp>
Component: WEAssignee: Christian Saad <christian.saad>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: christian.saad, marc.dutoo
Version: 1.0.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
wizard project that needs jwt-we packages none

Description Ericp56 CLA 2011-05-11 10:54:32 EDT
Build Identifier: 201009170705

I am creating a "new File" wizard in my own plug-in extension.

Can you change the jwt-we projects Manifest file so it exports these packages?

 org.eclipse.jwt.we.commands.editdomain,
 org.eclipse.jwt.we.commands.view,
 org.eclipse.jwt.we.misc.util.internal,
 org.eclipse.jwt.we.model.view.impl,

Reproducible: Always

Steps to Reproduce:
1.  Create a new plugin project, add jwt-we as a dependency.
2.  Create a "new file" wizard, the same as what is in jwt-we
3.  You can't compile, as some packages are not exposed from jwt-we.
Comment 1 Marc Dutoo CLA 2011-05-13 05:01:39 EDT
Hi Eric

Your use case is a valid one, it definitely should be possible to create a new file wizard.

However, we can't blindly export packages. For instance, all "*.internal" packages precisely CAN'T be exported according to Eclipse good practices. So that would mean some more refactoring first.

Could you attach to this bugzilla as a zip a sample project for such a simple file wizard ?

This way I'd be able to do said refactoring best.

Regards,
Marc
Comment 2 Ericp56 CLA 2011-05-13 09:32:24 EDT
The three classes used in the New File Wizard are as follows:

org.eclipse.jwt.we.commands.view.CreateLayoutDataCommand;
org.eclipse.jwt.we.misc.util.internal.EMFHelper;
org.eclipse.jwt.we.model.view.impl.ViewFactoryImpl;

I will attach a project soon.

Eric
Comment 3 Christian Saad CLA 2011-05-13 11:51:34 EDT
Hi Eric,

thanks for your suggestion. I also think this is a valid use case and the decision whether a specific class should be internal or not is basically determined by its use. Since JWT is intended to be an extensible framework, we probably have to expose more stuff that other projects would consider internal anyway.

Regards,
Chris
Comment 4 Ericp56 CLA 2011-05-27 11:40:11 EDT
Created attachment 196777 [details]
wizard project that needs jwt-we packages

Here's a project that needs access to a few classes that are currently inaccessible, as far as I know.
Comment 5 Ericp56 CLA 2011-05-27 11:41:33 EDT
As requested attached is a project that won't compile with the current JWT 1.0 release.
Comment 6 Marc Dutoo CLA 2011-05-27 13:41:28 EDT
Hi Eric

Thanks, I'll have a look in 10 days.

Regards,
Marc
Comment 7 Christian Saad CLA 2011-05-30 05:18:24 EDT
You won't get any objections from me. I would suggest however to move EMFHelper from org.eclipse.jwt.we.misc.util.internal to org.eclipse.jwt.we.misc.util instead of exporting the internal package.

Marc, if you're ok with this I'll upload the changes.
Comment 8 Marc Dutoo CLA 2011-06-06 05:49:09 EDT
Yes, since we can't export the internal package. Thanks Chris, please do upload it.
Comment 9 Christian Saad CLA 2011-06-06 08:45:24 EDT
I've uploaded the changes to JWT WE. Eric, could you confirm that this meets your requirements? Thanks!
Comment 10 Marc Dutoo CLA 2011-06-06 11:46:35 EDT
Seems good for me, closing it.