Java 类com.intellij.ui.switcher.SwitchProvider 实例源码

项目:intellij-ce-playground    文件:JBTabsImpl.java   
@Override
@Nullable
public Object getData(@NonNls final String dataId) {
  if (myDataProvider != null) {
    final Object value = myDataProvider.getData(dataId);
    if (value != null) return value;
  }

  if (SwitchProvider.KEY.getName().equals(dataId) && myOwnSwitchProvider) {
    return this;
  }

  if (QuickActionProvider.KEY.getName().equals(dataId)) {
    return this;
  }

  return NAVIGATION_ACTIONS_KEY.is(dataId) ? this : null;
}
项目:tools-idea    文件:JBTabsImpl.java   
@Override
@Nullable
public Object getData(@NonNls final String dataId) {
  if (myDataProvider != null) {
    final Object value = myDataProvider.getData(dataId);
    if (value != null) return value;
  }

  if (SwitchProvider.KEY.getName().equals(dataId) && myOwnSwitchProvider) {
    return this;
  }

  if (QuickActionProvider.KEY.getName().equals(dataId)) {
    return this;
  }

  return NAVIGATION_ACTIONS_KEY.is(dataId) ? this : null;
}
项目:tools-idea    文件:RunnerLayoutUiImpl.java   
@Override
public Object getData(@NonNls String dataId) {
  if (SwitchProvider.KEY.getName().equals(dataId)) {
    return myContentUI;
  }

  if (QuickActionProvider.KEY.getName().equals(dataId)) {
    return myContentUI;
  }

  if (RunnerContentUi.KEY.getName().equals(dataId)) {
    return myContentUI;
  }

  final DataProvider provider = DataManager.getDataProvider(this);
  return provider != null ? provider.getData(dataId) : null;
}
项目:consulo    文件:JBTabsImpl.java   
@Override
@Nullable
public Object getData(@Nonnull @NonNls final Key<?> dataId) {
  if (myDataProvider != null) {
    final Object value = myDataProvider.getData(dataId);
    if (value != null) return value;
  }

  if (SwitchProvider.KEY == dataId && myOwnSwitchProvider) {
    return this;
  }

  if (QuickActionProvider.KEY == dataId) {
    return this;
  }

  return NAVIGATION_ACTIONS_KEY == dataId ? this : null;
}
项目:intellij-ce-playground    文件:ToolWindowContentUi.java   
@Nullable
public Object getData(@NonNls String dataId) {
  if (PlatformDataKeys.TOOL_WINDOW.is(dataId)) return myWindow;

  if (CloseAction.CloseTarget.KEY.is(dataId)) {
    return computeCloseTarget();
  }

  if (SwitchProvider.KEY.is(dataId) && myType == ToolWindowContentUiType.TABBED) {
    return this;
  }

  return null;
}
项目:intellij-ce-playground    文件:ContentManagerImpl.java   
@Override
public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) {
  if (myUI instanceof SwitchProvider) {
    return ((SwitchProvider)myUI).getTargets(onlyVisible, false);
  }
  return new SmartList<SwitchTarget>();
}
项目:intellij-ce-playground    文件:RunnerLayoutUiImpl.java   
@Nullable
@Override
public Object getData(@NonNls String dataId) {
  if (SwitchProvider.KEY.is(dataId) || QuickActionProvider.KEY.is(dataId) || RunnerContentUi.KEY.is(dataId)) {
    return myContentUI;
  }
  return null;
}
项目:tools-idea    文件:ToolWindowContentUi.java   
@Nullable
public Object getData(@NonNls String dataId) {
  if (PlatformDataKeys.TOOL_WINDOW.is(dataId)) return myWindow;

  if (CloseAction.CloseTarget.KEY.is(dataId)) {
    return computeCloseTarget();
  }

  if (SwitchProvider.KEY.is(dataId) && myType == ToolWindowContentUiType.TABBED) {
    return this;
  }

  return null;
}
项目:tools-idea    文件:ContentManagerImpl.java   
@Override
public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) {
  if (myUI instanceof SwitchProvider) {
    return ((SwitchProvider)myUI).getTargets(onlyVisible, false);
  }
  return new ArrayList<SwitchTarget>();
}
项目:tools-idea    文件:ContentManagerImpl.java   
@Override
public SwitchTarget getCurrentTarget() {
  if (myUI instanceof SwitchProvider) {
    return ((SwitchProvider)myUI).getCurrentTarget();
  }

  return null;
}
项目:tools-idea    文件:ContentManagerImpl.java   
@Override
public JComponent getComponent() {
  if (myUI instanceof SwitchProvider) {
    return myUI.getComponent();
  }

  return this;
}
项目:consulo    文件:UnifiedToolWindowContentUI.java   
@Override
@Nullable
public Object getData(@Nonnull @NonNls Key<?> dataId) {
  if (PlatformDataKeys.TOOL_WINDOW == dataId) return myWindow;

  if (CloseAction.CloseTarget.KEY == dataId) {
    return computeCloseTarget();
  }

  if (SwitchProvider.KEY == dataId && myType == ToolWindowContentUiType.TABBED) {
    return this;
  }

  return null;
}
项目:consulo    文件:RunnerLayoutUiImpl.java   
@Nullable
@Override
public Object getData(@Nonnull @NonNls Key dataId) {
  if (SwitchProvider.KEY == dataId || QuickActionProvider.KEY == dataId || RunnerContentUi.KEY == dataId) {
    return myContentUI;
  }
  return null;
}
项目:consulo    文件:DesktopToolWindowContentUi.java   
@Override
@javax.annotation.Nullable
public Object getData(@Nonnull @NonNls Key<?> dataId) {
  if (PlatformDataKeys.TOOL_WINDOW == dataId) return myWindow;

  if (CloseAction.CloseTarget.KEY == dataId) {
    return computeCloseTarget();
  }

  if (SwitchProvider.KEY == dataId && myType == ToolWindowContentUiType.TABBED) {
    return this;
  }

  return null;
}
项目:intellij-ce-playground    文件:JBTabsImpl.java   
@Override
public JBTabs setAdditionalSwitchProviderWhenOriginal(SwitchProvider delegate) {
  mySwitchDelegate = delegate;
  return this;
}
项目:intellij-ce-playground    文件:ContentManagerImpl.java   
@Override
public SwitchTarget getCurrentTarget() {
  return myUI instanceof SwitchProvider ? ((SwitchProvider)myUI).getCurrentTarget() : null;
}
项目:intellij-ce-playground    文件:ContentManagerImpl.java   
@Override
public JComponent getComponent() {
  return myUI instanceof SwitchProvider ? myUI.getComponent() : this;
}
项目:intellij-ce-playground    文件:ContentManagerImpl.java   
@Override
public boolean isCycleRoot() {
  return myUI instanceof SwitchProvider && ((SwitchProvider)myUI).isCycleRoot();
}
项目:tools-idea    文件:JBTabsImpl.java   
@Override
public JBTabs setAdditionalSwitchProviderWhenOriginal(SwitchProvider delegate) {
  mySwitchDelegate = delegate;
  return this;
}
项目:tools-idea    文件:ContentManagerImpl.java   
@Override
public boolean isCycleRoot() {
  return myUI instanceof SwitchProvider && ((SwitchProvider)myUI).isCycleRoot();
}
项目:consulo    文件:JBTabsImpl.java   
@Override
public JBTabs setAdditionalSwitchProviderWhenOriginal(SwitchProvider delegate) {
  mySwitchDelegate = delegate;
  return this;
}
项目:intellij-ce-playground    文件:JBTabs.java   
JBTabs setAdditionalSwitchProviderWhenOriginal(SwitchProvider delegate);
项目:tools-idea    文件:JBTabs.java   
JBTabs setAdditionalSwitchProviderWhenOriginal(SwitchProvider delegate);
项目:consulo    文件:JBTabs.java   
JBTabs setAdditionalSwitchProviderWhenOriginal(SwitchProvider delegate);