/platform/vcs-impl/src/com/intellij/openapi/diff/impl/dir/actions/popup/SetCopyToLeft.java

https://bitbucket.org/nbargnesi/idea · Java · 36 lines · 15 code · 3 blank · 18 comment · 1 complexity · a6ad9a36411f227f2efb5e9599b38e10 MD5 · raw file

  1. /*
  2. * Copyright 2000-2012 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.openapi.diff.impl.dir.actions.popup;
  17. import com.intellij.ide.diff.DirDiffElement;
  18. import com.intellij.openapi.diff.impl.dir.DirDiffOperation;
  19. import org.jetbrains.annotations.NotNull;
  20. /**
  21. * @author Konstantin Bulenkov
  22. */
  23. public class SetCopyToLeft extends SetOperationToBase {
  24. @NotNull
  25. @Override
  26. protected DirDiffOperation getOperation() {
  27. return DirDiffOperation.COPY_FROM;
  28. }
  29. @Override
  30. protected boolean isEnabledFor(DirDiffElement element) {
  31. return element.getTarget() != null;
  32. }
  33. }