some bugfixes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / builder / IdentifierIndexManager.java
index b72d55d..1b0be9e 100644 (file)
@@ -88,6 +88,7 @@ public class IdentifierIndexManager {
 
     private void parseDeclarations(StringBuffer buf, boolean goBack) {
       char[] ident;
+                       char[] classVariable;
       int counter = 0;
       int phpdocOffset = -1;
       int phpdocLength = -1;
@@ -107,7 +108,9 @@ public class IdentifierIndexManager {
             getNextToken();
             if (fToken == TokenNameVariable) {
               ident = fScanner.getCurrentIdentifierSource();
-              addIdentifierInformation('v', ident, buf, phpdocOffset, phpdocLength);
+                                                       classVariable = new char[ident.length-1];
+                                                       System.arraycopy(ident, 1, classVariable, 0, ident.length-1);
+              addIdentifierInformation('v', classVariable, buf, phpdocOffset, phpdocLength);
               getNextToken();
             }
           } else if (fToken == TokenNamefunction) {
@@ -533,6 +536,8 @@ public class IdentifierIndexManager {
         fileWriter.write(line + '\n');
       }
       fileWriter.close();
+    } catch (FileNotFoundException e) {
+       // ignore exception; project is deleted by user
     } catch (IOException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();