From: kpouer Date: Thu, 23 Jan 2003 16:52:19 +0000 (+0000) Subject: Added some code to show variables from class in the outline X-Git-Url: http://secure.phpeclipse.com Added some code to show variables from class in the outline and added option to display or not class, functions and variables (still a bug when you choose to hide classes but show their variables and functions) --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java index 5c79a17..bcc7ba9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java @@ -19,12 +19,14 @@ import java.util.Stack; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.actions.PHPStartApacheAction; import net.sourceforge.phpeclipse.phpeditor.PHPString; +import net.sourceforge.phpeclipse.phpeditor.PHPParserAction; import net.sourceforge.phpeclipse.phpeditor.php.PHPKeywords; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.action.IAction; import org.eclipse.ui.texteditor.MarkerUtilities; public class PHPParser extends PHPKeywords { @@ -752,7 +754,7 @@ public class PHPParser extends PHPKeywords { if (ch2 == '?') { ch2 = str.charAt(chIndx++); if (Character.isWhitespace(ch2)) { - // php start + // php start phpMode = true; phpFound = true; break; @@ -1352,7 +1354,7 @@ public class PHPParser extends PHPKeywords { chIndx--; // determine if this identitfer is a keyword - // @todo improve this in future version + // @todo improve this in future version Integer i = (Integer) keywordMap.get(identifier.toLowerCase()); if (i != null) { token = i.intValue(); @@ -1468,7 +1470,7 @@ public class PHPParser extends PHPKeywords { if (ch2 == '?') { ch2 = input.charAt(i++); if (Character.isWhitespace(ch2)) { - // php start + // php start phpMode = true; phpFound = true; startIndex = i; @@ -1617,7 +1619,7 @@ public class PHPParser extends PHPKeywords { // String temp = ((PHPString)phpList.get(j)).getPHPString(); // int startIndx = temp.length()-10; // if (startIndx<0) { - // startIndx = 0; + // startIndx = 0; // } // System.out.println(temp.substring(startIndx)+"?>"); // } @@ -1626,7 +1628,7 @@ public class PHPParser extends PHPKeywords { // for(int j=0;j