Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed warnings because of hiding fields
  • Loading branch information
Andreas Stange committed Feb 19, 2016
commit 2e7adbb17833898b089d86f7d92ab6167392aeb1
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public class LaunchConfiguration implements ILaunchConfigurationDelegate{
IProgressMonitor monitor;

@Override
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor)
public void launch(ILaunchConfiguration launchConfig, String launchMode, ILaunch launchHandle, IProgressMonitor launchMonitor)
throws CoreException {

this.config = config;
this.mode = mode;
this.launch = launch;
this.monitor = monitor;
this.config = launchConfig;
this.mode = launchMode;
this.launch = launchHandle;
this.monitor = launchMonitor;

// Get data from config
loadSettingsFromConfiguration();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,42 +39,40 @@ public class LaunchShortcut implements ILaunchShortcut {
* {@inheritDoc}
*/
@Override
public void launch(IEditorPart editor, String mode) {
IFile file = ResourceUtil.getFile(editor.getEditorInput());
if (file != null) {
launch(file, mode);
public void launch(IEditorPart editor, String launchMode) {
IFile editorFile = ResourceUtil.getFile(editor.getEditorInput());
if (editorFile != null) {
launch(editorFile, launchMode);
}
}

/**
* {@inheritDoc}
*/
@Override
public void launch(ISelection selection, String mode) {
public void launch(ISelection selection, String launchMode) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
if (structuredSelection.getFirstElement() instanceof IFile) {
launch((IFile) structuredSelection.getFirstElement(), mode);
launch((IFile) structuredSelection.getFirstElement(), launchMode);
}
}
}

/**
* Launch the file by adding it to an existing launch config of this project
* or creating a new one if none yet. If a new config is created the main
* file and environment used to initialize it will be fetched from the
* project preferences if possible or from a user dialog if not.
* Launch the project of the file via an existing launch configuration
* or create a new one if there is none yet.
*
* @param file
* The file to be launched
* @param mode
* The mode the launch should be performed in (e.g. 'run' or
* 'debug')
*/
private void launch(IFile file, String mode) {
this.file = file;
private void launch(IFile launchFile, String launchMode) {
this.file = launchFile;
this.project = file.getProject();
this.mode = mode;
this.mode = launchMode;

// Find launch config for the project or initialize new one.
ILaunchConfiguration config = findOrCreateLaunchConfiguration();
Expand Down