Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user I want to define custom commands that get multiple selected resources as a list or as indexed parameters #16

Open
basti1302 opened this issue Mar 15, 2012 · 0 comments

Comments

@basti1302
Copy link
Collaborator

Normally, if multiple resources are selected in a resource view like package explorer, and the user executes a custom command on this selection, the command is executed on each of the resources separately. Thus, if 3 files are selected, the command is simply executed 3 times and each execution gets one of the files as a parameter. For most commands this is just fine.

For some commands however, it would be nice to be able to pass all selected resources as a parameter list to one execution. Then the command would be executed just once but gets all three files as a parameter.

To support this feature, StartExplorer should provide a few new variables:

  • ${resource_path_list:arg} :The paths of all selected resources, delimited by arg. If no argument is provided, a comma or the platform specific path separator is used
  • Variables of the same fashion for resource_parent, resource_name, resource_name_without_extension and resource_extension, that is, ${resource_parent_list:arg}, ${resource_name_list:arg}, ${resource_name_without_extension_list:arg} and ${resource_extension_list:arg}
  • ${resource_path_elem:arg} :The paths of the n-th resource, n is given by the numerical arg. If no argument is provided, the first resource is used
  • Variables of the same fashion for resource_parent, resource_name, resource_name_without_extension and resource_extension, that is, ${resource_parent_elem:arg}, ${resource_name_elem:arg}, ${resource_name_without_extension_elem:arg} and ${resource_extension_elem:arg}.
  • Maybe we can find something better than elem...
    Bring variable names in line with Eclipse variable naming schemes #17 and Variable replacement should always be handled by standard Eclipse mechanisms #18 should be done before this ticket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant