package de.simonscholz.nonjavadoc.handlers;

import javax.inject.Named;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.viewers.IStructuredSelection;

import de.simonscholz.nonjavadoc.jobs.NonJavaDocJob;

public class NonJavaDocRemoverHandler {

	@Execute
	public Object execute(
			@Optional @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection) {
		if (selection != null && !selection.isEmpty()) {
			NonJavaDocJob job = new NonJavaDocJob(selection.toList());
			job.schedule();
		}

		return null;
	}


}

@@ -395,14 +395,12 @@
 lic 
-Object
+void
  exe
@@ -404,20 +404,16 @@
 execute(
-%0A%09%09%09
 @Optiona
@@ -633,25 +633,9 @@
 %7D%0A%0A%09
-%09return null;%0A%09%7D%0A
+%7D
 %0A%0A%7D%0A

Clean up of handler code