removed unused private methods.
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / phpeditor / PHPUnitEditor.java
index c8991c4..ddcc77a 100644 (file)
@@ -58,7 +58,7 @@ import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
+//import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.DocumentCommand;
 import org.eclipse.jface.text.IAutoEditStrategy;
@@ -962,15 +962,15 @@ public class PHPUnitEditor extends PHPEditor { // implements
                }
        }
 
-       private static class BracketLevel {
-               int fOffset;
-
-               int fLength;
-
-               LinkedPositionManager fManager;
-
-               LinkedPositionUI fEditor;
-       };
+//     private static class BracketLevel {
+//             int fOffset;
+//
+//             int fLength;
+//
+//             LinkedPositionManager fManager;
+//
+//             LinkedPositionUI fEditor;
+//     };
 
        private class BracketInserter implements VerifyKeyListener,
                        LinkedPositionUI.ExitListener {
@@ -1012,21 +1012,21 @@ public class PHPUnitEditor extends PHPEditor { // implements
                        }
                }
 
-               private boolean hasIdentifierToTheLeft(IDocument document, int offset) {
-                       try {
-                               int start = offset;
-                               IRegion startLine = document.getLineInformationOfOffset(start);
-                               int minStart = startLine.getOffset();
-                               while (start != minStart
-                                               && Character.isWhitespace(document.getChar(start - 1)))
-                                       --start;
-                               return start != minStart
-                                               && Scanner.isPHPIdentifierPart(document
-                                                               .getChar(start - 1));
-                       } catch (BadLocationException e) {
-                               return true;
-                       }
-               }
+//             private boolean hasIdentifierToTheLeft(IDocument document, int offset) {
+//                     try {
+//                             int start = offset;
+//                             IRegion startLine = document.getLineInformationOfOffset(start);
+//                             int minStart = startLine.getOffset();
+//                             while (start != minStart
+//                                             && Character.isWhitespace(document.getChar(start - 1)))
+//                                     --start;
+//                             return start != minStart
+//                                             && Scanner.isPHPIdentifierPart(document
+//                                                             .getChar(start - 1));
+//                     } catch (BadLocationException e) {
+//                             return true;
+//                     }
+//             }
 
                private boolean hasCharacterToTheLeft(IDocument document, int offset,
                                char character) {
@@ -1884,10 +1884,10 @@ public class PHPUnitEditor extends PHPEditor { // implements
                return store.getBoolean(SPACES_FOR_TABS);
        }
 
-       private Color getColor(String key) {
-               RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), key);
-               return getColor(rgb);
-       }
+//     private Color getColor(String key) {
+//             RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), key);
+//             return getColor(rgb);
+//     }
 
        private Color getColor(RGB rgb) {
                JavaTextTools textTools = WebUI.getDefault()
@@ -2121,19 +2121,19 @@ public class PHPUnitEditor extends PHPEditor { // implements
        // IVerticalRuler ruler, int styles) {
        // return new AdaptedSourceViewer(parent, ruler, styles);
        // }
-       private boolean isValidSelection(int offset, int length) {
-               IDocumentProvider provider = getDocumentProvider();
-               if (provider != null) {
-                       IDocument document = provider.getDocument(getEditorInput());
-                       if (document != null) {
-                               int end = offset + length;
-                               int documentLength = document.getLength();
-                               return 0 <= offset && offset <= documentLength && 0 <= end
-                                               && end <= documentLength;
-                       }
-               }
-               return false;
-       }
+//     private boolean isValidSelection(int offset, int length) {
+//             IDocumentProvider provider = getDocumentProvider();
+//             if (provider != null) {
+//                     IDocument document = provider.getDocument(getEditorInput());
+//                     if (document != null) {
+//                             int end = offset + length;
+//                             int documentLength = document.getLength();
+//                             return 0 <= offset && offset <= documentLength && 0 <= end
+//                                             && end <= documentLength;
+//                     }
+//             }
+//             return false;
+//     }
 
        /*
         * @see net.sourceforge.phpdt.internal.ui.javaeditor.JavaEditor#getInputElement()
@@ -2563,43 +2563,43 @@ public class PHPUnitEditor extends PHPEditor { // implements
        /**
         * Returns the updated java element for the old java element.
         */
-       private IJavaElement findElement(IJavaElement element) {
-               if (element == null)
-                       return null;
-               IWorkingCopyManager manager = WebUI.getDefault()
-                               .getWorkingCopyManager();
-               ICompilationUnit unit = manager.getWorkingCopy(getEditorInput());
-               if (unit != null) {
-                       try {
-                               synchronized (unit) {
-                                       unit.reconcile();
-                               }
-                               IJavaElement[] findings = unit.findElements(element);
-                               if (findings != null && findings.length > 0)
-                                       return findings[0];
-                       } catch (JavaModelException x) {
-                               PHPeclipsePlugin.log(x.getStatus());
-                               // nothing found, be tolerant and go on
-                       }
-               }
-               return null;
-       }
+//     private IJavaElement findElement(IJavaElement element) {
+//             if (element == null)
+//                     return null;
+//             IWorkingCopyManager manager = WebUI.getDefault()
+//                             .getWorkingCopyManager();
+//             ICompilationUnit unit = manager.getWorkingCopy(getEditorInput());
+//             if (unit != null) {
+//                     try {
+//                             synchronized (unit) {
+//                                     unit.reconcile();
+//                             }
+//                             IJavaElement[] findings = unit.findElements(element);
+//                             if (findings != null && findings.length > 0)
+//                                     return findings[0];
+//                     } catch (JavaModelException x) {
+//                             PHPeclipsePlugin.log(x.getStatus());
+//                             // nothing found, be tolerant and go on
+//                     }
+//             }
+//             return null;
+//     }
 
        /**
         * Returns the offset of the given Java element.
         */
-       private int getOffset(IJavaElement element) {
-               if (element instanceof ISourceReference) {
-                       ISourceReference sr = (ISourceReference) element;
-                       try {
-                               ISourceRange srcRange = sr.getSourceRange();
-                               if (srcRange != null)
-                                       return srcRange.getOffset();
-                       } catch (JavaModelException e) {
-                       }
-               }
-               return -1;
-       }
+//     private int getOffset(IJavaElement element) {
+//             if (element instanceof ISourceReference) {
+//                     ISourceReference sr = (ISourceReference) element;
+//                     try {
+//                             ISourceRange srcRange = sr.getSourceRange();
+//                             if (srcRange != null)
+//                                     return srcRange.getOffset();
+//                     } catch (JavaModelException e) {
+//                     }
+//             }
+//             return -1;
+//     }
 
        /*
         * @see AbstractTextEditor#restoreSelection()