本文整理汇总了Java中org.eclipse.ui.IViewReference.getPart方法的典型用法代码示例。如果您正苦于以下问题:Java IViewReference.getPart方法的具体用法?Java IViewReference.getPart怎么用?Java IViewReference.getPart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.IViewReference
的用法示例。
在下文中一共展示了IViewReference.getPart方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: allDisplaySurfaces
import org.eclipse.ui.IViewReference; //导入方法依赖的package包/类
public static List<IDisplaySurface> allDisplaySurfaces() {
final List<IDisplaySurface> result = new ArrayList<>();
final IViewReference[] viewRefs = WorkbenchHelper.getPage().getViewReferences();
for (final IViewReference ref : viewRefs) {
final IWorkbenchPart part = ref.getPart(false);
if (part instanceof IGamaView.Display) {
result.add(((IGamaView.Display) part).getDisplaySurface());
}
}
return result;
}
示例2: findPaletteView
import org.eclipse.ui.IViewReference; //导入方法依赖的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;
}
示例3: setVaccinationHeaderDefinition
import org.eclipse.ui.IViewReference; //导入方法依赖的package包/类
public static void setVaccinationHeaderDefinition(
VaccinationPlanHeaderDefinition vacccinationHeaderDefinition){
VaccinationView.vaccinationHeaderDefinition = vacccinationHeaderDefinition;
IViewReference viewReference =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.findViewReference(PART_ID);
IWorkbenchPart part = viewReference.getPart(false);
if (part != null) {
part.setFocus();
}
}
示例4: getKonsDetailView
import org.eclipse.ui.IViewReference; //导入方法依赖的package包/类
private KonsDetailView getKonsDetailView(){
IViewReference[] viewReferences =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getViewReferences();
for (IViewReference viewRef : viewReferences) {
if (KonsDetailView.ID.equals(viewRef.getId())) {
return (KonsDetailView) viewRef.getPart(false);
}
}
return null;
}
示例5: getKonsDetailView
import org.eclipse.ui.IViewReference; //导入方法依赖的package包/类
private KonsDetailView getKonsDetailView(){
IViewReference[] viewReferences = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().getViewReferences();
for (IViewReference viewRef : viewReferences) {
if (KonsDetailView.ID.equals(viewRef.getId())) {
return (KonsDetailView) viewRef.getPart(false);
}
}
return null;
}