Initial commit after migrating repo and assuring the product launches
This commit is contained in:
60
src/edu/fichte/pbi/ide/commands/HelpCommandHandler.java
Normal file
60
src/edu/fichte/pbi/ide/commands/HelpCommandHandler.java
Normal file
@ -0,0 +1,60 @@
|
||||
package edu.fichte.pbi.ide.commands;
|
||||
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.core.commands.IHandler;
|
||||
import org.eclipse.core.commands.IHandler2;
|
||||
import org.eclipse.core.commands.IHandlerListener;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
|
||||
import edu.fichte.pbi.ide.views.HelpView;
|
||||
|
||||
public class HelpCommandHandler implements IHandler, IHandler2{
|
||||
|
||||
@Override
|
||||
public void setEnabled(Object evaluationContext) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addHandlerListener(IHandlerListener handlerListener) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
IWorkbenchWindow window = HandlerUtil
|
||||
.getActiveWorkbenchWindow(event);
|
||||
try {
|
||||
@SuppressWarnings("unused")
|
||||
final HelpView help = (HelpView) window
|
||||
.getActivePage().showView(HelpView.ID);
|
||||
} catch (PartInitException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHandled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeHandlerListener(IHandlerListener handlerListener) {
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user