[
https://issues.jboss.org/browse/JBIDE-14333?page=com.atlassian.jira.plugi...
]
Max Rydahl Andersen commented on JBIDE-14333:
---------------------------------------------
About param1, param2 etc. that is only true for action's, read further down - if we
implement commands instead we can provide parameters.
"<command returns = "result"
serialization="org.eclipse.ui.dialogs.openMessageDialog(title=Select
View,buttonLabel0=Package Explorer,message=Select a view ,buttonLabel1=Search
View)"/>
<onCompletion> Selected the ${result}. </onCompletion>"
That is much better than requiring static list of param1-9 names.
About use of ${project} then it depends how we make the commands, i.e. what parameters
they require.
If it is a full path then yeah, something like:
"<command
serialization="org.jboss.tools.examples.openFileOnLine(resource="${project}/src/org/test/Funky.java",line="24")"/>
and
"<command
serialization="org.jboss.tools.examples.openJavaOnSourceElement(project="${project}",
element="org.demo.Foo#myMethod()"/>
and
"<command
serialization="org.jboss.tools.examples.openResourceSelectMatch(resource="${project}/src/org/test/Funky.java",match=".*myMethod"/>
...one concern is what to do for projects with a dependent project, like example-war,
example-ear etc. I guess if the main project is named "example" then users can
use ${project}-ear as a "workaround".
have context sensitive parameterized commands for open file, show
type etc. with proper API
-------------------------------------------------------------------------------------------
Key: JBIDE-14333
URL:
https://issues.jboss.org/browse/JBIDE-14333
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: project-examples
Reporter: Max Rydahl Andersen
Fix For: 4.1.0.Beta1, 4.1.0.Beta2
currently our custom cheatsheet commands requires the project name(s) to be known
upfront. We should make them less reliant on project names and if at all possible have the
project name calculated based on the project the cheatsheet file is open in.
The commands should also actually be commands with named parameters so the order of
parameters does not matter and we should make sure these have a good and long term API so
cheatsheets will continue to work well in the future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira