Package com.vexus2.cakestorm.logic

Examples of com.vexus2.cakestorm.logic.ViewMethod


    Collection<PhpClass> phpClasses = PhpIndex.getInstance(psiElement.getProject()).getClassesByFQN(jumpFileName);

    if (phpClasses.isEmpty()) {
      VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
      CakeConfig cakeConfig = CakeConfig.getInstance(psiElement.getProject());
      if (cakeConfig.isEmpty()) {
        VirtualFile tmpVirtualFile = psiElement.getContainingFile().getVirtualFile();
        cakeConfig.init(tmpVirtualFile, CakeIdentifier.getIdentifier(tmpVirtualFile));
      }
      VirtualFile virtualFile = psiElement.getContainingFile().getVirtualFile();
      if (virtualFile == null)
        return PsiReference.EMPTY_ARRAY;
      String pluginDirPath = FileSystem.getPluginDir(psiElement.getContainingFile().getVirtualFile());
      String controllerName = cakeConfig.getBetweenDirectoryPath(virtualFile.getName());
      String filePath = cakeConfig.getPath(CakeIdentifier.View, controllerName, jumpFileName, pluginDirPath);
      virtualFile = virtualFileManager.refreshAndFindFileByUrl(FileSystem.getAppPath(psiElement.getContainingFile().getVirtualFile()) + filePath);
      if (virtualFile == null) {
        if (pluginDirPath != null) {
          // Plugin Directory element
          VirtualFile pluginDir = virtualFileManager.refreshAndFindFileByUrl("file://" + psiElement.getProject().getBasePath() + "/app/" + cakeConfig.cakeVersionAbsorption.get(CakeIdentifier.Plugin));
View Full Code Here


        } else {
          virtualFile = getVirtualFile(psiElement, jumpFileName, cakeConfig, CakeIdentifier.Element);
        }
      }
      if (virtualFile != null && textRange != null) {
        PsiReference ref = new ClassReference(
            virtualFile,
            cursorText.substring(textRange.getStartOffset(), textRange.getEndOffset()),
            psiElement,
            textRange,
            psiElement.getProject(),
            virtualFile);
        return new PsiReference[]{ref};
      }
      return PsiReference.EMPTY_ARRAY;
    }

    ArrayList<PsiReference> refList = new ArrayList<PsiReference>();

    for (PhpClass phpClass : phpClasses) {
      if (phpClass != null && textRange != null) {
        PsiReference ref = new ClassReference(
            phpClass.getContainingFile().getVirtualFile(),
            cursorText.substring(textRange.getStartOffset(), textRange.getEndOffset()),
            psiElement,
            textRange,
            psiElement.getProject(),
View Full Code Here

      this.directory = view.getOrChooseDirectory();
    }

    this.fileSystem = new FileSystem(currentFile, e.getDataContext());
    this.fileSystem.setProject(e.getProject());
    directorySystem = new DirectorySystem(e.getProject(), currentFile, fileSystem.getIdentifier());
    directorySystem.setAppPath(fileSystem.getAppFile(currentFile));
    this.fileSystem.setProject(e.getProject());
    this.fileSystem.setDirectorySystem(directorySystem);
    this.fileSystem.setOpenType(openType);
  }
View Full Code Here

    IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);
    if (view != null) {
      this.directory = view.getOrChooseDirectory();
    }

    this.fileSystem = new FileSystem(currentFile, e.getDataContext());
    this.fileSystem.setProject(e.getProject());
    directorySystem = new DirectorySystem(e.getProject(), currentFile, fileSystem.getIdentifier());
    directorySystem.setAppPath(fileSystem.getAppFile(currentFile));
    this.fileSystem.setProject(e.getProject());
    this.fileSystem.setDirectorySystem(directorySystem);
View Full Code Here

  public static class SmartJump extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent event) {
      try {
        new SmartJumper(event).jump();
      } catch (Exception e) {
        notification(e.getMessage());
      }
    }
View Full Code Here

  public static class HorizontalSmartJump extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent event) {
      try {
        new SmartJumper(event, OpenType.HORIZONTAL).jump();
      } catch (Exception e) {
        notification(e.getMessage());
      }
    }
View Full Code Here

  public static class VerticalSmartJump extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent event) {
      try {
        new SmartJumper(event, OpenType.VERTICAL).jump();
      } catch (Exception e) {
        notification(e.getMessage());
      }
    }
View Full Code Here

  public static class JumpToControllerFromView extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent event) {
      try {
        new SmartJumper(event).jumpToControllerFromView();
      } catch (Exception e) {
        notification(e.getMessage());
      }
    }
View Full Code Here

  public static class JumpToControllerFromTest extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent event) {
      try {
        new SmartJumper(event).jumpToControllerFromTest();
      } catch (Exception e) {
        notification(e.getMessage());
      }
    }
View Full Code Here

  public static class JumpToModelFromFixture extends AnAction {
    @Override
    public void actionPerformed(AnActionEvent event) {
      try {
        new SmartJumper(event).jumpToModelFromFixture();
      } catch (Exception e) {
        notification(e.getMessage());
      }
    }
View Full Code Here

TOP

Related Classes of com.vexus2.cakestorm.logic.ViewMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.