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

Bug 123486

Summary: [Feature][Export][Wizard]Feature Export is Disabled
Product: [Eclipse Project] PDE Reporter: Kim Horne <eclipse>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: aarong, caniszczyk, curtis.windatt.public, johan.backlund, lzap, noam.chitayat, steven.soloff, wassim.melhem
Version: 3.2Keywords: helpwanted
Target Milestone: 3.4   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Note how sad it makes me
none
As requested none

Description Kim Horne CLA 2006-01-11 14:01:41 EST
I20060110-1026

No matter what options I change the Finish button on the export feature wizard is disabled.  This worked in the 1215 build.
Comment 1 Kim Horne CLA 2006-01-11 14:02:22 EST
Created attachment 32854 [details]
Note how sad it makes me
Comment 2 Wassim Melhem CLA 2006-01-11 14:06:58 EST
works fine for me.

steps please...

Also could you try selecting the feature you want to export in Package Explorer before you bring up the wizard, and see if it makes a difference.
Comment 3 Kim Horne CLA 2006-01-11 14:15:22 EST
I've tried with and without selecting the project.  Same result either way.

I'm not sure if there was anything peculiar I did to get into this state.  It's simply the case that no matter what I do in this dialog it does not export.  I had tried it earlier this morning in 1215 and then upgraded.  I tweaked my projects and tried to export again and I am now in this state.  My workspace is currently ~300mb.  I'll try and prune it down or to reproduce in a fresh workspace.
Comment 4 Wassim Melhem CLA 2006-01-11 14:24:52 EST
It would help if you attached the dialog settings file for pde/ui.  this way I would know what state the wizard is coming up in.
Comment 5 Kim Horne CLA 2006-01-11 14:53:39 EST
Created attachment 32855 [details]
As requested
Comment 6 Wassim Melhem CLA 2006-01-11 15:00:01 EST
Thanks.  I will investigate.  In the meantime, could you please delete the 'FeatureExportWizard' section from the file and restart.  This should significantly reduce the sadness and let you get on with your export activities.
Comment 7 Wassim Melhem CLA 2006-02-14 17:52:33 EST
was not able to reproduce.  However, there was some weirdness with the tabs and enablement in the feature export wizard that was just fixed as part of bug 127930.

I will close this one.  Reopen if the problem reoccurs.
Comment 8 Lukas Zapletal CLA 2006-12-19 03:07:54 EST
Same for me: Linux, Eclipse IDE 3.2.1 :-(
Comment 9 Lukas Zapletal CLA 2006-12-19 04:07:54 EST
I have deleted whole file with no luck. It didnt help - its grey and I am not able to export my feature! What should I do?

Linux, Eclipse IDE 3.2.1
Comment 10 Steven Soloff CLA 2007-01-02 00:20:12 EST
I also experienced this problem after upgrading to 3.2.1 (Windows XP SP2, JDK 1.5.0_06).  However, I think I found the cause of the problem.

First, let me describe the steps I took to work around the issue:

  0) Check feature to export and specify destination (note that this is all I had to previously do under 3.1.2 to get the Finish button enabled).
  1) On the Options tab, check "Export for multiple platforms".
  2) Click Next to display the "Cross-platform export" page.
  3) Check at least one platform (since my feature is platform-independent, I just used win32/x86).

I don't know if it matters, but my target environment is cross-platform (i.e. I've installed the RCP delta pack into my target).

Digging through the PDE UI source code, I think I came upon the root cause.  This is based purely on a code review; I haven't tried a patched build.  If not specified, all classes are assumed relative to org.eclipse.pde.internal.ui.wizards.exports.

It looks like FeatureExportWizard instantiates a CrossPlatformExportPage.  (I don't know if this is specific to my environment [i.e. having a cross-platform target].  The condition that determines if such a page is added to the wizard is the existence of a feature model named "org.eclipse.platform.launchers".  I didn't investigate further.)  CrossPlatformExportPage.createControl() invokes initialize() which invokes pageChanged().  The definition of pageChanged() is pretty bare:

    protected void pageChanged() {
        setPageComplete(fPlatformPart.getSelectionCount() > 0);
    }

My guess is that the Finish button doesn't appear because the CrossPlatformExportPage is always in an 'incomplete' state (i.e. no platforms are initially selected).  My work around explicitly brings up the page where I can check an item and thus satisfy the completion condition above.

Note also that if I bring up the wizard for a second time and uncheck "Export for multiple platforms", the Finish button remains enabled.  Looking at the "FeatureExportWizard" section of the memento shows this line of interest:

    <item key="cross-platform" value="win32 (win32/x86)"/>

Which is different from the corresponding line in the second attachment submitted by KimH, as well as the line I saw originally when I first experienced the problem (in both cases this key was set to the empty string).  Deleting the section from my original memento didn't fix the problem as suggested (and confirmed by LukasZ).  After trying to export again and closing the IDE (thus creating a new memento), the "cross-platform" key was set to the empty string, which seems like an appropriate default value, but obviously causes the above condition in pageChanged() to be false.

It seems CrossPlatformExportPage should not affect the completion state of the wizard unless the "Export for multiple platforms" checkbox is enabled.  I took a quick look at the corresponding 3.1.2 source and saw pretty much the same code, which leads me to believe I'm either completely wrong or I didn't look deep enough into the wizard infrastructure to see how the individual page completion states are tied to the overall wizard completion state. :-)

Cheers.
Comment 11 Aaron Greenhouse CLA 2007-01-08 12:05:24 EST
(In reply to comment #10)
> I also experienced this problem after upgrading to 3.2.1 (Windows XP SP2, JDK
> 1.5.0_06).  However, I think I found the cause of the problem.
> 
> First, let me describe the steps I took to work around the issue:
> 
>   0) Check feature to export and specify destination (note that this is all I
> had to previously do under 3.1.2 to get the Finish button enabled).
>   1) On the Options tab, check "Export for multiple platforms".
>   2) Click Next to display the "Cross-platform export" page.
>   3) Check at least one platform (since my feature is platform-independent, I
> just used win32/x86).
> 
> I don't know if it matters, but my target environment is cross-platform (i.e.
> I've installed the RCP delta pack into my target). 

I just ran into the same problem with Eclipse 3.2.1 with the RCP Delta Pack installed.  It took me about 1 day of work to figure out what the problem was, and I came to same solution as described above.  (For what it's worth a complained about it on the eclipse.platform newsgroup on 5 Jan 2007.)  

Bugzilla says this is fixed, but doesn't indicate in what release the fix will become available.
Comment 12 Johan Backlund CLA 2007-05-22 08:26:01 EDT
I'm running into the same problem with 3.2.2 and even though the previously described workaround enables the export it causes some undesired side effects:

 (1) Even though the feature is platform-independent it will contain the name of the chosen platform.

 (2) Seems that this also changes the behavior when exporting to an existing zip archive. When exporting without specific platform support the zip was overwritten after a warning dialog, but when exporting with platform support the existing zip is updated keeping all the previous files.

This bug should be reopened since it is easily reproducible.
Comment 13 Wassim Melhem CLA 2007-05-22 08:30:45 EDT
Brian, can you take a look please?
Comment 14 Noam Chitayat CLA 2007-05-24 11:53:42 EDT
I'd like to investigate this, but I can't seem to reproduce this problem. There must be a step that I'm missing. Can someone who's reproduced this bug post the steps they took to get to this problem? 
Comment 15 Wassim Melhem CLA 2007-05-24 12:09:38 EDT
Noam, have you installed the RCP delta pack?  Perhaps it's related and/or having it may leave residual metadata that we are not getting rid of.
Comment 16 Noam Chitayat CLA 2007-05-24 13:21:26 EDT
Yep, I tried exporting with the RCP Delta Pack installed as well; no change for me.
Comment 17 Johan Backlund CLA 2007-05-24 15:53:53 EDT
Just did a completely clean run-through and all problems reproduced. Here's what I did:

1. Install 3.2.2. I'm running on Linux so I use eclipse-SDK-3.2.2-linux-gtk.tar.gz.
2. Start eclipse in empty workspace.
3. Create plugin project named simple using Hello world sample. Didn't touch any other dials.
4. Create feature project named simple.feature and referring to simple and use defaults for rest.
5. Activate Export Wizard in simple.feature Overview page. Selecting archive file /tmp/simple and then press Finish. Feature is exported as expected.
6. Activate Export Wizard again and press Finish. A "Confirm Replace" dialog appears as expected. Click Yes and feature is exported as expected.

So far so good.

7. Exit eclipse and install RCP Pack 3.2.2. I used eclipse-RCP-3.2.2-delta-pack.zip.
8. Open same workspace again and go to simple.feature Overview page (if not already visible since last run).
9. Activate Export Wizard and notice the disabled Finish button. This shows this bugs original problem.
10. Go to Options and check Export for multiple platforms. Next button is enabled.
11. Press Next and select a platform. Finish becomes enabled. This is according to the workaround specified in this bug.
12. Press Finish. Confirm Replace dialog comes up again referring to /tmp/simple.zip. Press Yes.
13. Check /tmp. Notice simple.zip has gone and we now have simple.<platform>.zip instead. This behaviour seems a bit odd to me although acceptable.
14. Change version of feature to 1.0.1.
15. Activate Export Wizard and press Finish. Notice that there is no Confirm Replace dialog. This is a bit odd and should be corrected.
16. Check the contents of /tmp/simple.<platform>.zip and notice the two versions of the feature. This is not a good thing.

I guess (13), (15) and (16) are related and maybe they should deserve their own  bug.

Hope this helps in reproducing the problem - let me know if there are any questions around this.
Comment 18 Eclipse Webmaster CLA 2007-07-29 09:18:45 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991
Comment 19 Brian Bauman CLA 2008-02-06 00:05:19 EST
Haven't had time to find a fix.  Reassigning back to the inbox for others to give it a shot.
Comment 20 Curtis Windatt CLA 2008-03-27 11:06:39 EDT
Anyone from the community want to take a look?
Comment 21 Chris Aniszczyk CLA 2008-03-27 11:15:43 EDT
oh we fixed this issue recently

let me find the bug
Comment 22 Chris Aniszczyk CLA 2008-03-27 11:22:15 EDT

*** This bug has been marked as a duplicate of bug 221852 ***