super();
}
public void createPartControl(Composite parent) {
browser = new Browser(parent, SWT.BORDER);
final IWorkbenchWindow workbenchWindow = getSite().getWorkbenchWindow();
linkWithView = BytecodeOutlinePlugin.getDefault().getPreferenceStore()
.getBoolean(BCOConstants.LINK_REF_VIEW_TO_EDITOR);
linkWithViewAction = new DefaultToggleAction(BCOConstants.LINK_REF_VIEW_TO_EDITOR){
public void run(boolean newState) {
linkWithView = newState;
if(linkWithView){
ISelectionService selectionService = workbenchWindow
.getSelectionService();
try {
IViewPart part = workbenchWindow.getActivePage()
.showView(
"de.loskutov.bco.views.BytecodeOutlineView");
ISelection selection = selectionService
.getSelection("de.loskutov.bco.views.BytecodeOutlineView");
selectionChanged(part, selection);
} catch (PartInitException e) {
BytecodeOutlinePlugin.log(e, IStatus.ERROR);
}
}
}
};
final IActionBars bars = getViewSite().getActionBars();
final IToolBarManager tmanager = bars.getToolBarManager();
tmanager.add(linkWithViewAction);
shouDefaultEmptyPage();
workbenchWindow.getPartService().addPartListener(this);
}