本文整理匯總了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;
}