use of org.eclipse.ui.views.properties.IPropertySheetPage in project gemoc-studio by eclipse.
the class GexpressionsEditor method getPropertySheetPage.
/**
* This accesses a cached version of the property sheet.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
GexpressionsEditor.this.setSelectionToViewer(selection);
GexpressionsEditor.this.setFocus();
}
@Override
public void setActionBars(IActionBars actionBars) {
super.setActionBars(actionBars);
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
use of org.eclipse.ui.views.properties.IPropertySheetPage in project webtools.sourceediting by eclipse.
the class TestPropertySheetConfiguration method testPropertySourceRemoval.
public void testPropertySourceRemoval() throws BadLocationException {
IDocument document = (IDocument) fEditor.getAdapter(IDocument.class);
// set up the editor document
document.replace(0, 0, "<test><myproperty props=\"yes\" /></test>");
// set current selection in editor
ISelection setSelection = new TextSelection(9, 0);
fEditor.getSelectionProvider().setSelection(setSelection);
// get current selection in editor
Object item = null;
ISelection selection = fEditor.getSelectionProvider().getSelection();
if (selection instanceof IStructuredSelection) {
item = ((IStructuredSelection) selection).getFirstElement();
IPropertySheetPage propertySheet = (IPropertySheetPage) fEditor.getAdapter(IPropertySheetPage.class);
assertTrue("No ConfigurablePropertySheetPage found", propertySheet instanceof ConfigurablePropertySheetPage);
if (propertySheet instanceof ConfigurablePropertySheetPage) {
ConfigurablePropertySheetPage cps = (ConfigurablePropertySheetPage) propertySheet;
PropertySheetConfiguration config = cps.getConfiguration();
assertNotNull("No property sheet configuration found", config);
IPropertySourceProvider provider = config.getPropertySourceProvider(cps);
assertNotNull("No property sheet provider found", provider);
IPropertySource source = provider.getPropertySource(item);
if (source instanceof IPropertySourceExtension) {
boolean canRemove = ((IPropertySourceExtension) source).isPropertyRemovable("props");
assertTrue("Current property cannot be removed", canRemove);
if (canRemove) {
((IPropertySourceExtension) source).removeProperty("props");
assertTrue("Current property cannot be removed", true);
// failing assert
return;
}
}
}
}
// if we get to here, always fail, since something went wrong.
assertTrue("testPropertySourceRemoval test did not take expected path", false);
}
use of org.eclipse.ui.views.properties.IPropertySheetPage in project iobserve-analysis by research-iobserve.
the class cloudprofileEditor method getPropertySheetPage.
/**
* This accesses a cached version of the property sheet.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
cloudprofileEditor.this.setSelectionToViewer(selection);
cloudprofileEditor.this.setFocus();
}
@Override
public void setActionBars(IActionBars actionBars) {
super.setActionBars(actionBars);
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
use of org.eclipse.ui.views.properties.IPropertySheetPage in project InformationSystem by ObeoNetwork.
the class ApplicationEditor method getPropertySheetPage.
/**
* This accesses a cached version of the property sheet.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
ApplicationEditor.this.setSelectionToViewer(selection);
ApplicationEditor.this.setFocus();
}
@Override
public void setActionBars(IActionBars actionBars) {
super.setActionBars(actionBars);
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
use of org.eclipse.ui.views.properties.IPropertySheetPage in project InformationSystem by ObeoNetwork.
the class ToolkitsEditor method getPropertySheetPage.
/**
* This accesses a cached version of the property sheet.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
ToolkitsEditor.this.setSelectionToViewer(selection);
ToolkitsEditor.this.setFocus();
}
@Override
public void setActionBars(IActionBars actionBars) {
super.setActionBars(actionBars);
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
Aggregations