Search in sources :

Example 6 with IConfigurable

use of de.janrufmonitor.framework.configuration.IConfigurable in project janrufmonitor by tbrandt77.

the class Editor method getTitleExtension.

protected String getTitleExtension() {
    String id = this.m_configuration.getProperty(CFG_REPOSITORY, "");
    if (id != null && id.length() > 0) {
        ICallerManager cm = getRuntime().getCallerManagerFactory().getCallerManager(id);
        if (cm != null && cm.isSupported(ILocalRepository.class)) {
            String title = "";
            if (cm instanceof IConfigurable) {
                title = getI18nManager().getString(((IConfigurable) cm).getNamespace(), "title", "label", getLanguage()) + " - ";
            }
            title += ((ILocalRepository) cm).getFile();
            return title;
        }
        if (cm != null && cm.isSupported(IRemoteRepository.class)) {
            String title = "";
            if (cm instanceof IConfigurable) {
                title = getI18nManager().getString(((IConfigurable) cm).getNamespace(), "title", "label", getLanguage());
            }
            return title;
        }
    }
    return null;
}
Also used : IRemoteRepository(de.janrufmonitor.repository.types.IRemoteRepository) ILocalRepository(de.janrufmonitor.repository.types.ILocalRepository) IConfigurable(de.janrufmonitor.framework.configuration.IConfigurable) ICallerManager(de.janrufmonitor.repository.ICallerManager)

Example 7 with IConfigurable

use of de.janrufmonitor.framework.configuration.IConfigurable in project janrufmonitor by tbrandt77.

the class Journal method getTitleExtension.

protected String getTitleExtension() {
    String id = this.m_configuration.getProperty(CFG_REPOSITORY, "");
    if (id != null && id.length() > 0) {
        ICallManager cm = getRuntime().getCallManagerFactory().getCallManager(id);
        if (cm != null && cm.isSupported(ILocalRepository.class)) {
            String title = "";
            if (cm instanceof IConfigurable) {
                title = getI18nManager().getString(((IConfigurable) cm).getNamespace(), "title", "label", getLanguage()) + " - ";
            }
            title += ((ILocalRepository) cm).getFile();
            return title;
        }
        if (cm != null && cm.isSupported(IRemoteRepository.class)) {
            String title = "";
            if (cm instanceof IConfigurable) {
                title = getI18nManager().getString(((IConfigurable) cm).getNamespace(), "title", "label", getLanguage());
            }
            return title;
        }
    }
    return null;
}
Also used : ICallManager(de.janrufmonitor.repository.ICallManager) IRemoteRepository(de.janrufmonitor.repository.types.IRemoteRepository) ILocalRepository(de.janrufmonitor.repository.types.ILocalRepository) IConfigurable(de.janrufmonitor.framework.configuration.IConfigurable)

Aggregations

IConfigurable (de.janrufmonitor.framework.configuration.IConfigurable)7 ArrayList (java.util.ArrayList)4 List (java.util.List)4 ICallerManager (de.janrufmonitor.repository.ICallerManager)2 ILocalRepository (de.janrufmonitor.repository.types.ILocalRepository)2 IRemoteRepository (de.janrufmonitor.repository.types.IRemoteRepository)2 CallerNotFoundException (de.janrufmonitor.repository.CallerNotFoundException)1 ICallManager (de.janrufmonitor.repository.ICallManager)1 ITracker (de.janrufmonitor.repository.imexport.ITracker)1 SWTExecuter (de.janrufmonitor.ui.swt.SWTExecuter)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 ProgressMonitorDialog (org.eclipse.jface.dialogs.ProgressMonitorDialog)1 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)1 CheckboxTableViewer (org.eclipse.jface.viewers.CheckboxTableViewer)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Button (org.eclipse.swt.widgets.Button)1