History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OSMORC-87
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Robert F. Beeger
Reporter: Nick Pratt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Osmorc

For "additional JAR contents", provide a file dialog box that supports multi-select

Created: 22 Dec 08 02:16   Updated: 10 Sep 09 14:46
Component/s: None
Affects Version/s: None
Fix Version/s: 0.12.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
When adding files to the "Additional JAR contents" list, it would be really nice and helpful if Osmorc could popup a file dialog, allow multi select, and then populate both columns with the selected files (the same value in each column - set destination and source file to the same name)

 All   Comments   Work Log   Change History      Sort Order:
Robert F. Beeger - 08 Jan 09 19:54
Note: The new and better implementation of additional JAR content handling isn't compatible with the earlier one. You'll have to reenter the additional JAR contents specification.

Nick Pratt - 08 Jan 09 19:58
Robert - is there any way we can remain backwards compatible or at least provide a migration path - entering all these items on a large RCP project is a real pain.

Robert F. Beeger - 08 Jan 09 21:38
Well, it shouldn't be such a pain as before.

For each module you could remove all additional JAR content, click on the "Add" button and select all files and folders you want to add to the JAR. At this time multiselection is enabled in the filechooser and Osmorc makes pretty good guesses about the destination path in the JAR. If all your additional content is directly inside the content root of a module, the destination path will be the path of the file or folder as it is relative to that content root. So if you select "c:\myproject\mymodule\plugin.xml" and "c:\myproject\mymodule\lib\somejar.jar" and the content root is "c:\myproject\mymodule\", the destination paths willl be automatically set to "plugin.xml" and "lib/somejar.jar" and in most cases that's just what you want.

If you have one content root per module and the module file is directly inside the content root (that is the normal case when you don't change anything), then you can edit your module files (the ones with the iml-extension) with an editor that knows something about regular expressions and replace
<entry source="([^"]*)" dest="
with
<entry source=""$MODULE_DIR$/\1" dest="

It's fairly improbable that some other plugin uses the notation, but you could go through the changes step by step and check that the changes are only applied inside <additionalJARContents> and </additionalJARContents>. That shouldn't take too long with editors that can apply such changes on whole directory structures.

Hope this helps a bit.


Robert F. Beeger - 08 Jan 09 21:57
Oh well, I'll add something to make the migration easier. You'll have to click on "Edit..." for each entry, but the file chooser will try to find the entry in the content roots. So just pressing "Edit..." and then OK should be enough. I'll post a new comment as soon as that is implemented.

Robert F. Beeger - 08 Jan 09 22:24
OK, so to migrate to the new handling, you now have to select each entry, press "Edit...", make sure that the correct file or folder is selected in the file chooser, press OK, and then press Cancel to not change the destination path. In most cases the destination path will be the same as before, but if the additional contents is inside some special folder, Osmorc will make a suggestion that is probably not the one you want. In this case just press Cancel to leave the destination path as it was before.