38 lines
877 B
Java
38 lines
877 B
Java
package flintstones.application.control.handler;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
|
import org.eclipse.e4.core.contexts.IEclipseContext;
|
|
import org.eclipse.e4.core.di.annotations.Execute;
|
|
|
|
import flintstones.application.model.IApplicationService;
|
|
import flintstones.application.handlers.PerspectiveSwitcher;
|
|
|
|
/**
|
|
* The Class NewHandler creates a new proyect.
|
|
*/
|
|
public class NewHandler {
|
|
|
|
/** The context. */
|
|
@Inject
|
|
IEclipseContext context;
|
|
|
|
/** The app service. */
|
|
@Inject
|
|
IApplicationService appService;
|
|
|
|
/**
|
|
* Execute.
|
|
*
|
|
* @throws IOException Signals that an I/O exception has occurred.
|
|
*/
|
|
@Execute
|
|
public void execute() {
|
|
this.appService.newProblem();
|
|
ContextInjectionFactory.make(PerspectiveSwitcher.class, context).changePerspective("flintstones.application.perspective.framework");
|
|
|
|
}
|
|
|
|
}
|