Search in sources :

Example 1 with DocumentationService

use of eu.esdihumboldt.hale.ui.util.bbr.DocumentationService in project hale by halestudio.

the class AbstractDocumentationTextSection method refresh.

/**
 * @see AbstractPropertySection#refresh()
 */
@Override
public void refresh() {
    DocumentationService ds = PlatformUI.getWorkbench().getService(DocumentationService.class);
    Documentation doc = ds.getDocumentation(getDefinition());
    String desc = (doc == null) ? (null) : (getDocumentationText(doc));
    if (desc == null) {
        desc = "";
    }
    descriptionText.setText(desc);
}
Also used : DocumentationService(eu.esdihumboldt.hale.ui.util.bbr.DocumentationService) Documentation(eu.esdihumboldt.hale.ui.util.bbr.Documentation)

Example 2 with DocumentationService

use of eu.esdihumboldt.hale.ui.util.bbr.DocumentationService in project hale by halestudio.

the class AbstractDocumentationFilter method isFiltered.

@Override
public boolean isFiltered(Definition<?> input) {
    if (!input.getName().getNamespaceURI().equals(DocumentationServiceImpl.NS_URI_AGEOBW)) {
        // namespace does not match
        return true;
    }
    DocumentationService ds = PlatformUI.getWorkbench().getService(DocumentationService.class);
    Documentation doc = ds.getDocumentation(input);
    if (doc == null) {
        return true;
    }
    return !accept(doc);
}
Also used : DocumentationService(eu.esdihumboldt.hale.ui.util.bbr.DocumentationService) Documentation(eu.esdihumboldt.hale.ui.util.bbr.Documentation)

Example 3 with DocumentationService

use of eu.esdihumboldt.hale.ui.util.bbr.DocumentationService in project hale by halestudio.

the class ValuesSection method refresh.

/**
 * @see AbstractPropertySection#refresh()
 */
@Override
public void refresh() {
    DocumentationService ds = PlatformUI.getWorkbench().getService(DocumentationService.class);
    Documentation doc = ds.getDocumentation(getDefinition());
    if (doc != null) {
        values.setInput(doc.getValues());
        if (!doc.getValues().isEmpty()) {
            // select the first entry
            values.setSelection(new StructuredSelection(doc.getValues().iterator().next()));
        }
    } else {
        values.setInput(null);
    }
}
Also used : DocumentationService(eu.esdihumboldt.hale.ui.util.bbr.DocumentationService) Documentation(eu.esdihumboldt.hale.ui.util.bbr.Documentation) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Aggregations

Documentation (eu.esdihumboldt.hale.ui.util.bbr.Documentation)3 DocumentationService (eu.esdihumboldt.hale.ui.util.bbr.DocumentationService)3 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1