Search in sources :

Example 16 with TabItemHandler

use of org.apache.hop.ui.hopgui.perspective.TabItemHandler in project hop by apache.

the class HopDataOrchestrationPerspective method updateTabs.

/**
 * Update all the tab labels...
 */
public void updateTabs() {
    for (TabItemHandler item : items) {
        IHopFileTypeHandler typeHandler = item.getTypeHandler();
        updateTabLabel(item.getTabItem(), typeHandler.getFilename(), typeHandler.getName());
    }
}
Also used : IHopFileTypeHandler(org.apache.hop.ui.hopgui.file.IHopFileTypeHandler) TabItemHandler(org.apache.hop.ui.hopgui.perspective.TabItemHandler)

Example 17 with TabItemHandler

use of org.apache.hop.ui.hopgui.perspective.TabItemHandler in project hop by apache.

the class HopDataOrchestrationPerspective method setActiveFileTypeHandler.

@Override
public void setActiveFileTypeHandler(IHopFileTypeHandler activeFileTypeHandler) {
    TabItemHandler tabItemHandler = findTabItemHandler(activeFileTypeHandler);
    if (tabItemHandler == null) {
        // Can't find the file
        return;
    }
    // Select the tab
    // 
    switchToTab(tabItemHandler);
}
Also used : TabItemHandler(org.apache.hop.ui.hopgui.perspective.TabItemHandler)

Example 18 with TabItemHandler

use of org.apache.hop.ui.hopgui.perspective.TabItemHandler in project hop by apache.

the class MetadataFileTypeHandler method findTabItemHandler.

private TabItemHandler findTabItemHandler() {
    if (metadata == null) {
        return null;
    }
    MetadataPerspective perspective = MetadataPerspective.getInstance();
    for (TabItemHandler tabItemHandler : perspective.getItems()) {
        CTabItem tabItem = tabItemHandler.getTabItem();
        MetadataEditor editor = (MetadataEditor) tabItem.getData();
        IHopMetadata other = editor.getMetadata();
        if (other.equals(metadata)) {
            return tabItemHandler;
        }
    }
    return null;
}
Also used : IHopMetadata(org.apache.hop.metadata.api.IHopMetadata) MetadataPerspective(org.apache.hop.ui.hopgui.perspective.metadata.MetadataPerspective) TabItemHandler(org.apache.hop.ui.hopgui.perspective.TabItemHandler) CTabItem(org.eclipse.swt.custom.CTabItem)

Aggregations

TabItemHandler (org.apache.hop.ui.hopgui.perspective.TabItemHandler)18 IHopFileTypeHandler (org.apache.hop.ui.hopgui.file.IHopFileTypeHandler)9 HopException (org.apache.hop.core.exception.HopException)8 CTabItem (org.eclipse.swt.custom.CTabItem)7 ArrayList (java.util.ArrayList)4 HopExtensionPoint (org.apache.hop.core.extension.HopExtensionPoint)4 IHopPerspective (org.apache.hop.ui.hopgui.perspective.IHopPerspective)4 HopDataOrchestrationPerspective (org.apache.hop.ui.hopgui.perspective.dataorch.HopDataOrchestrationPerspective)4 PipelineMeta (org.apache.hop.pipeline.PipelineMeta)3 ErrorDialog (org.apache.hop.ui.core.dialog.ErrorDialog)3 HopGui (org.apache.hop.ui.hopgui.HopGui)3 WorkflowMeta (org.apache.hop.workflow.WorkflowMeta)3 Stack (java.util.Stack)2 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)2 IHasFilename (org.apache.hop.core.file.IHasFilename)2 ISearchable (org.apache.hop.core.search.ISearchable)2 ISearchableCallback (org.apache.hop.core.search.ISearchableCallback)2 AuditList (org.apache.hop.history.AuditList)2 AuditState (org.apache.hop.history.AuditState)2 AuditStateMap (org.apache.hop.history.AuditStateMap)2