本文整理汇总了Java中org.eclipse.ui.part.PageBookView类的典型用法代码示例。如果您正苦于以下问题:Java PageBookView类的具体用法?Java PageBookView怎么用?Java PageBookView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PageBookView类属于org.eclipse.ui.part包,在下文中一共展示了PageBookView类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getConsole
import org.eclipse.ui.part.PageBookView; //导入依赖的package包/类
public static IConsole getConsole(IWorkbenchPart part) {
if(!(part instanceof IViewPart)){
return null;
}
IViewPart vp =(IViewPart) part;
if (vp instanceof PageBookView) {
IPage page = ((PageBookView) vp).getCurrentPage();
ITextViewer viewer = getViewer(page);
if (viewer == null || viewer.getDocument() == null)
return null;
}
IConsole con = null;
try {
con = ((IConsoleView)part).getConsole();
} catch (Exception e) {
}
return con;
}
开发者ID:anb0s,项目名称:LogViewer,代码行数:23,代码来源:ResourceUtils.java
示例2: getSelection
import org.eclipse.ui.part.PageBookView; //导入依赖的package包/类
private ISelection getSelection(IWorkbenchPart part, ISelection selection) {
// for some reason, selection is empty when we select a revision from the P4 history view
if (!(part instanceof PageBookView)) {
return selection;
}
IPage page = ((PageBookView)part).getCurrentPage();
if (!(page instanceof P4HistoryPage)) {
return selection;
}
return getSelection((P4HistoryPage)page);
}
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:12,代码来源:P4RevisionBookmarkPropertiesProvider.java
示例3: refreshPaletteView
import org.eclipse.ui.part.PageBookView; //导入依赖的package包/类
private void refreshPaletteView(final IWorkbenchPart part) {
final PageBookView paletteView = findPaletteView(part);
if (paletteView == null) {
return;
}
part.getSite().getWorkbenchWindow().getWorkbench().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
paletteView.partClosed(part);
paletteView.partActivated(part);
}
});
}
开发者ID:info-sharing-environment,项目名称:NIEM-Modeling-Tool,代码行数:14,代码来源:PaletteChangedListener.java
示例4: findPaletteView
import org.eclipse.ui.part.PageBookView; //导入依赖的package包/类
private PageBookView findPaletteView(final IWorkbenchPart part) {
final IViewReference[] views = part.getSite().getPage().getViewReferences();
for (final IViewReference view : views) {
if (PaletteView.ID.equals(view.getId())) {
return (PageBookView) view.getPart(true);
}
}
return null;
}
开发者ID:info-sharing-environment,项目名称:NIEM-Modeling-Tool,代码行数:10,代码来源:PaletteChangedListener.java
示例5: log
import org.eclipse.ui.part.PageBookView; //导入依赖的package包/类
public static void log(Class<? extends PageBookView> class1, String string,
PartInitException e) {
// TODO Auto-generated method stub
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:6,代码来源:WorkbenchPlugin.java
示例6: execute
import org.eclipse.ui.part.PageBookView; //导入依赖的package包/类
/**
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@SuppressWarnings("unchecked")
public Object execute(ExecutionEvent event) throws ExecutionException {
ITextEditor editor = getTextEditor(event);
if (editor == null) {
if (isWindowCommand()) {
Object result = checkExecute(event);
if (result == Check.Fail) {
beep();
result = null;
}
return result;
} else if (isConsoleCommand()) {
// intercept and dispatch execution if console supported and used in a console view
IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if (activePart != null && (activePart instanceof IConsoleView) && (activePart instanceof PageBookView)) {
IPage textPage = ((PageBookView)activePart).getCurrentPage();
if (textPage instanceof TextConsolePage) {
return ((IConsoleDispatch)this).consoleDispatch(((TextConsolePage)textPage).getViewer(),(IConsoleView)activePart,event);
}
}
}
}
try {
setThisEditor(editor);
isEditable = getEditable();
if (editor == null || isBlocked()) {
beep();
asyncShowMessage(editor, INEDITABLE_BUFFER, true);
return null;
}
// Retrieve the universal-argument parameter value if passed
if (extractUniversalCount(event) != 1) {
// check if we should dispatch a related command based on the universal argument
String dispatchId = checkDispatchId(event.getCommand().getId());
if (dispatchId != null) {
// recurse on new id (inverse or arg value driven)
return dispatchId(editor, dispatchId, getParams(event.getCommand(), event.getParameters()));
}
}
setThisDocument(editor.getDocumentProvider().getDocument(editor.getEditorInput()));
// Get the current selection
ISelectionProvider selectionProvider = editor.getSelectionProvider();
ITextSelection selection = (ITextSelection) selectionProvider.getSelection();
preTransform(editor, selection);
return transformWithCount(editor, getThisDocument(), selection, event);
} finally {
// normal commands clean up here
if (isTransform()) {
postExecute();
}
}
}
开发者ID:MulgaSoft,项目名称:e4macs,代码行数:60,代码来源:EmacsPlusCmdHandler.java
注:本文中的org.eclipse.ui.part.PageBookView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论