Community
Participate
Working Groups
N20060425-0010 Scenario: - open a Java project; - deploy the JRE node, then rt.jar, then one of the packages; - select any of the class files; - right-click and select export; - on the first page of the wizard, select File System and click Next; - you are presented with resources lists within which the current source editor file is selected. I find this quite counter intuitive. If class files of a library cannot be exported, the contextual menu should be disabled when the current selection includes such items. At least, the pre-checked boxes in the wizard should not reflect anything else but what is currently selected in the view. Especially if you consider the case in which the user knowns he selected a single file and doesn't bother reviewing the exported contents.
The file system export is provided by platform which only knows resources. I agree with David that when the file exporter cannot hanlde the selected elements, no element should be selected. The 'Export' menu can't be disabled, how should we know what exporter you choose.
bug 111345 describes the lack of context for import/export in general.
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Project Explorer doesn't show the Import/Export on the JRE/library entries. Its shown only in Package Explorer. Can Package Explorer hide the Export menu on the libraries?
>Project Explorer doesn't show the Import/Export on the JRE/library entries. That's a bug then. As Martin said: the exporter should simply ignore unknown items. If you have a multi-selection in the Project Explorer you can no longer export and you have to painfully find and unselect those items.
Dani, This is the enablement expression in the o.e.ui.navigator.resources plugin.xml for the import/export action provider: <actionProvider id="org.eclipse.ui.navigator.resources.PortingActions" class="org.eclipse.ui.internal.navigator.resources.actions.PortingActionProvider"> <enablement> <or> <adapt type="org.eclipse.core.resources.IResource" /> <adapt type="java.util.Collection"> <count value="0" /> </adapt> </or> </enablement> </actionProvider> What should it be to make sure that import/export is enabled for the Java objects?
>Project Explorer doesn't show the Import/Export on the JRE/library entries. Its >shown only in Package Explorer. Can Package Explorer hide the Export menu on >the libraries? We don't want to disable the action since import/export always makes sense and we don't have a clue whether someone contributes an import or export wizard for a given element. That's also the reason why the actions in Platform UI are always enabled (and hence File > Import.../Export...) and why the Project Explorer should simply always put those into the context menu (filed bug 306337). Regarding the initial bug report (which got hijacked a but during the discussion) there's not much we can do about it and hence closing as WONTFIX.