======Current Editor===============================================================
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
// must from the UI Thread, else get the null.
IWorkbenchPage page = window.getActivePage();
IEditorPart editor = page.getActiveEditor();
======Current Property==========================================================
1. Common Way:
IViewReference[] viewRefs = Ub900Plugin.getPlugin().getWorkbench()
.getActiveWorkbenchWindow().getActivePage().getViewReferences();
for (int i = 0; i < viewRefs.length; i++) {
if (viewRefs[i].getId()
.equals("org.eclipse.ui.views.PropertySheet")) {
PropertySheet sheet = (PropertySheet) viewRefs[i]
.getPart(false);
((PropertySheetPage) sheet.getCurrentPage()).refresh();
}
}
2. EMF Property Sheet:
Editor.getPropertySheetPage();