use of org.eclipse.ui.views.properties.IPropertySheetEntry in project webtools.sourceediting by eclipse.
the class ConfigurablePropertySheetPage method remove.
void remove() {
if (fSelectedEntries != null) {
Object[] entries = fSelectedEntries;
ISelection selection = fInput;
boolean needsRefresh = false;
if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
IPropertySource source = getConfiguration().getPropertySourceProvider(this).getPropertySource(((IStructuredSelection) selection).getFirstElement());
if (source != null && source instanceof IPropertySourceExtension) {
for (int i = 0; i < entries.length; i++) {
if (entries[i] instanceof IPropertySheetEntry) {
IPropertySheetEntry entry = (IPropertySheetEntry) entries[i];
needsRefresh = true;
((IPropertySourceExtension) source).removeProperty(entry.getDisplayName());
}
}
}
}
if (needsRefresh) {
refresh();
}
}
}
Aggregations