/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/actions/CvsQuickListContentProvider.java

https://bitbucket.org/nbargnesi/idea · Java · 49 lines · 26 code · 5 blank · 18 comment · 1 complexity · c79befdcdaf745b571fbfa3fe89406d7 MD5 · raw file

  1. /*
  2. * Copyright 2000-2009 JetBrains s.r.o.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.intellij.cvsSupport2.actions;
  17. import com.intellij.openapi.actionSystem.ActionManager;
  18. import com.intellij.openapi.actionSystem.AnAction;
  19. import com.intellij.openapi.actionSystem.DataContext;
  20. import com.intellij.openapi.project.Project;
  21. import com.intellij.openapi.vcs.AbstractVcs;
  22. import com.intellij.openapi.vcs.actions.VcsQuickListContentProvider;
  23. import org.jetbrains.annotations.NotNull;
  24. import org.jetbrains.annotations.Nullable;
  25. import java.util.ArrayList;
  26. import java.util.Collections;
  27. import java.util.List;
  28. /**
  29. * @author Roman.Chernyatchik
  30. */
  31. public class CvsQuickListContentProvider implements VcsQuickListContentProvider {
  32. public List<AnAction> getVcsActions(@Nullable Project project, @Nullable AbstractVcs activeVcs,
  33. @Nullable DataContext dataContext) {
  34. return null;
  35. }
  36. public List<AnAction> getNotInVcsActions(@Nullable Project project, @Nullable DataContext dataContext) {
  37. final AnAction action = ActionManager.getInstance().getAction("Cvs.Import");
  38. assert action != null;
  39. return Collections.singletonList(action);
  40. }
  41. public boolean replaceVcsActionsFor(@NotNull AbstractVcs activeVcs, @Nullable DataContext dataContext) {
  42. return false;
  43. }
  44. }