Package org.eclipse.php.internal.debug.core.zend.model

Examples of org.eclipse.php.internal.debug.core.zend.model.PHPStackFrame


  // Returns the php debug target that is in contex.
  // In case that
  protected PHPDebugTarget getDebugTarget() {
    IAdaptable adaptable = DebugUITools.getDebugContext();
    if (adaptable instanceof PHPStackFrame) {
      PHPStackFrame stackFrame = (PHPStackFrame) adaptable;
      IEditorInput ei = getEditor().getEditorInput();
      if (ei instanceof FileEditorInput) {
        FileEditorInput fi = (FileEditorInput) ei;

        // Check for the file path within the project
        String fileInDebug = stackFrame.getSourceName();
        String fileInProject = fi.getFile().getProjectRelativePath()
            .toString();
        if (fileInDebug != null
            && fileInDebug.endsWith('/' + fileInProject)
            || fileInDebug.equals(fileInProject)) {
          PHPDebugTarget debugTarget = (PHPDebugTarget) stackFrame
              .getDebugTarget();
          return debugTarget;
        }
      } else {
        // File on the include Path
        PHPDebugTarget debugTarget = (PHPDebugTarget) stackFrame
            .getDebugTarget();
        return debugTarget;
      }
    }
    return null;
View Full Code Here


    return buf.toString();
  }

  protected String getStackFrameText(IStackFrame frame) {
    if (frame instanceof PHPStackFrame) {
      PHPStackFrame phpStackFrame = (PHPStackFrame) frame;
      try {
        StringBuffer buffer = new StringBuffer();
        String frameName = phpStackFrame.getName();
        if (frameName != null && frameName.length() > 0) {
          buffer.append(frameName);
          buffer.append("(): "); //$NON-NLS-1$
        }

        String sourceName = phpStackFrame.getSourceName();
        sourceName = resolveUntitledEditorName(sourceName);
        buffer.append(sourceName);

        buffer.append(PHPDebugUIMessages.MPresentation_ATLine_1
            + (phpStackFrame.getLineNumber()));
        return buffer.toString();

      } catch (DebugException e) {
        Logger.logException(e);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.debug.core.zend.model.PHPStackFrame

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.