Search in sources :

Example 6 with IAction

use of de.janrufmonitor.ui.jface.application.action.IAction in project janrufmonitor by tbrandt77.

the class OpenEditorAction method getSubActions.

public IAction[] getSubActions() {
    List localCallManagers = getRuntime().getCallerManagerFactory().getTypedCallerManagers(ILocalRepository.class);
    List remoteCallManagers = getRuntime().getCallerManagerFactory().getTypedCallerManagers(IRemoteRepository.class);
    IAction[] actions = new IAction[localCallManagers.size() + (remoteCallManagers.size() > 0 ? remoteCallManagers.size() : 0)];
    for (int i = 0; i < localCallManagers.size(); i++) {
        actions[i] = new LocalAction((ILocalRepository) localCallManagers.get(i));
    }
    if (remoteCallManagers.size() > 0)
        for (int i = 0; i < remoteCallManagers.size(); i++) {
            actions[i + localCallManagers.size()] = new RemoteAction((IRemoteRepository) remoteCallManagers.get(i));
        }
    return actions;
}
Also used : IAction(de.janrufmonitor.ui.jface.application.action.IAction) ILocalRepository(de.janrufmonitor.repository.types.ILocalRepository) ArrayList(java.util.ArrayList) List(java.util.List)

Example 7 with IAction

use of de.janrufmonitor.ui.jface.application.action.IAction in project janrufmonitor by tbrandt77.

the class MacCategoryImportAction method run.

public void run() {
    List subfolders = MacAddressBookProxy.getInstance().getCategories();
    if (subfolders != null && subfolders.size() > 0) {
        MacAddressBookProxy.getInstance().ensureEditorConfigurationCatergories(subfolders);
        IAction cat = ActionRegistry.getInstance().getAction("editor_category", this.m_app);
        cat.setApplication(this.m_app);
        cat.run();
    }
}
Also used : IAction(de.janrufmonitor.ui.jface.application.action.IAction) List(java.util.List)

Example 8 with IAction

use of de.janrufmonitor.ui.jface.application.action.IAction in project janrufmonitor by tbrandt77.

the class FritzboxStatAction method getSubActions.

public IAction[] getSubActions() {
    IAction[] actions = new IAction[3];
    actions[0] = new CallStatistic();
    actions[0].setApplication(this.m_app);
    actions[1] = new CbcStatsAction();
    actions[1].setApplication(this.m_app);
    actions[2] = new LineStatsAction();
    actions[2].setApplication(this.m_app);
    return actions;
}
Also used : LineStatsAction(de.janrufmonitor.ui.jface.application.fritzbox.action.statistic.LineStatsAction) IAction(de.janrufmonitor.ui.jface.application.action.IAction) CbcStatsAction(de.janrufmonitor.ui.jface.application.fritzbox.action.statistic.CbcStatsAction)

Example 9 with IAction

use of de.janrufmonitor.ui.jface.application.action.IAction in project janrufmonitor by tbrandt77.

the class OutlookCategoryImportAction method run.

public void run() {
    OutlookContactProxy ocp = new OutlookContactProxy();
    List subfolders = ocp.getAllContactFolders();
    if (subfolders != null && subfolders.size() > 0) {
        ocp.ensureEditorConfigurationCatergories(subfolders);
        IAction cat = ActionRegistry.getInstance().getAction("editor_category", this.m_app);
        cat.setApplication(this.m_app);
        cat.run();
    }
}
Also used : IAction(de.janrufmonitor.ui.jface.application.action.IAction) List(java.util.List) OutlookContactProxy(de.janrufmonitor.repository.OutlookContactProxy)

Example 10 with IAction

use of de.janrufmonitor.ui.jface.application.action.IAction in project janrufmonitor by tbrandt77.

the class NewJournalAction method getSubActions.

public IAction[] getSubActions() {
    List localCallerManagers = getRuntime().getCallManagerFactory().getTypedCallManagers(ILocalRepository.class);
    filterReadOnlyRepositories(localCallerManagers);
    IAction[] actions = new IAction[localCallerManagers.size()];
    for (int i = 0; i < localCallerManagers.size(); i++) {
        actions[i] = new SubAction((ILocalRepository) localCallerManagers.get(i));
    }
    return actions;
}
Also used : IAction(de.janrufmonitor.ui.jface.application.action.IAction) ILocalRepository(de.janrufmonitor.repository.types.ILocalRepository) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

IAction (de.janrufmonitor.ui.jface.application.action.IAction)17 List (java.util.List)13 ArrayList (java.util.ArrayList)10 IFilter (de.janrufmonitor.repository.filter.IFilter)4 ILocalRepository (de.janrufmonitor.repository.types.ILocalRepository)4 Message (de.janrufmonitor.exception.Message)2 ITracker (de.janrufmonitor.repository.imexport.ITracker)2 SWTExecuter (de.janrufmonitor.ui.swt.SWTExecuter)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 Comparator (java.util.Comparator)2 Iterator (java.util.Iterator)2 Properties (java.util.Properties)2 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2 ProgressMonitorDialog (org.eclipse.jface.dialogs.ProgressMonitorDialog)2 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)2 DropTarget (org.eclipse.swt.dnd.DropTarget)2 DropTargetAdapter (org.eclipse.swt.dnd.DropTargetAdapter)2 DropTargetEvent (org.eclipse.swt.dnd.DropTargetEvent)2 FileTransfer (org.eclipse.swt.dnd.FileTransfer)2 Transfer (org.eclipse.swt.dnd.Transfer)2