You have a good example in Getting Started with Properties
Using the Properties view is quite simple.
Since it shows the properties for the selected object, the first step to using it is to make sure that the workplace selection service is aware of the object selected in your view . Theres a full Eclipse Corner article written on the topic of picking services
public void createPartControl(Composite parent) {
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
getSite().setSelectionProvider(viewer);
viewer.setInput(getViewSite());
}
After your view is useful for selecting a workspace, you need to make sure that the objects selected by your view contribute to the properties
(extract)
public class Person implements IPropertySource {
private String name;
private Object street;
private Object city;
public Person(String name) {
this.name = name;
this.street = "";
this.city = "";
}
public Object getEditableValue() {
return this;
}
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new TextPropertyDescriptor("name", "Name"),
new TextPropertyDescriptor("street", "Street"),
new TextPropertyDescriptor("city", "City")
};
}
, " [ " ]. , , , ( Eclipse-) ; , , .
- , :
IAdaptable.
. ,

.
isImportant() - , , IPage IWorkbenchPart .
, false workbenchPart, . :
<view
class="com.eclipse_tips.views.CustomPropertiesView"
icon="icons/sample.gif"
id="com.eclipse-tips.views.customePropertiesView"
name="My Properties View">
</view>
CustomPropertiesView PropertySheet isImportant():
public class CustomPropertiesView extends PropertySheet {
@Override
protected boolean isImportant(IWorkbenchPart part) {
if (part.getSite().getId().equals(IPageLayout.ID_PROJECT_EXPLORER))
return true;
return false;
}
}
Project Explorer

, .
.
, / .
/ , / .
, , , .
, .
, Navigator IResource, IResource, Navigator .
Workbench
ISelectionListener - .
:
private ISelectionListener mylistener = new ISelectionListener() {
public void selectionChanged(IWorkbenchPart sourcepart, ISelection selection) {
if (sourcepart != MyView.this &&
selection instanceof IStructuredSelection) {
doSomething(((IStructuredSelection) selection).toList());
}
}
};
, -, , , :
