@@ -39,42 +39,40 @@ public class LaunchShortcut implements ILaunchShortcut {
39
39
* {@inheritDoc}
40
40
*/
41
41
@ Override
42
- public void launch (IEditorPart editor , String mode ) {
43
- IFile file = ResourceUtil .getFile (editor .getEditorInput ());
44
- if (file != null ) {
45
- launch (file , mode );
42
+ public void launch (IEditorPart editor , String launchMode ) {
43
+ IFile editorFile = ResourceUtil .getFile (editor .getEditorInput ());
44
+ if (editorFile != null ) {
45
+ launch (editorFile , launchMode );
46
46
}
47
47
}
48
48
49
49
/**
50
50
* {@inheritDoc}
51
51
*/
52
52
@ Override
53
- public void launch (ISelection selection , String mode ) {
53
+ public void launch (ISelection selection , String launchMode ) {
54
54
if (selection instanceof IStructuredSelection ) {
55
55
IStructuredSelection structuredSelection = (IStructuredSelection ) selection ;
56
56
if (structuredSelection .getFirstElement () instanceof IFile ) {
57
- launch ((IFile ) structuredSelection .getFirstElement (), mode );
57
+ launch ((IFile ) structuredSelection .getFirstElement (), launchMode );
58
58
}
59
59
}
60
60
}
61
61
62
62
/**
63
- * Launch the file by adding it to an existing launch config of this project
64
- * or creating a new one if none yet. If a new config is created the main
65
- * file and environment used to initialize it will be fetched from the
66
- * project preferences if possible or from a user dialog if not.
63
+ * Launch the project of the file via an existing launch configuration
64
+ * or create a new one if there is none yet.
67
65
*
68
66
* @param file
69
67
* The file to be launched
70
68
* @param mode
71
69
* The mode the launch should be performed in (e.g. 'run' or
72
70
* 'debug')
73
71
*/
74
- private void launch (IFile file , String mode ) {
75
- this .file = file ;
72
+ private void launch (IFile launchFile , String launchMode ) {
73
+ this .file = launchFile ;
76
74
this .project = file .getProject ();
77
- this .mode = mode ;
75
+ this .mode = launchMode ;
78
76
79
77
// Find launch config for the project or initialize new one.
80
78
ILaunchConfiguration config = findOrCreateLaunchConfiguration ();
0 commit comments