Fixed bug for stacktrace:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / JavaOutlinePage.java
index 6a23ef8..8fcbaf0 100644 (file)
@@ -35,9 +35,6 @@ import net.sourceforge.phpdt.internal.ui.IJavaHelpContextIds;
 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
 import net.sourceforge.phpdt.internal.ui.actions.AbstractToggleLinkingAction;
 import net.sourceforge.phpdt.internal.ui.actions.CompositeActionGroup;
-import net.sourceforge.phpdt.internal.ui.dnd.JdtViewerDragAdapter;
-import net.sourceforge.phpdt.internal.ui.dnd.TransferDragSourceListener;
-import net.sourceforge.phpdt.internal.ui.packageview.SelectionTransferDragAdapter;
 import net.sourceforge.phpdt.internal.ui.preferences.MembersOrderPreferenceCache;
 import net.sourceforge.phpdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
 import net.sourceforge.phpdt.internal.ui.viewsupport.DecoratingJavaLabelProvider;
@@ -108,10 +105,8 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
 import org.eclipse.ui.texteditor.IUpdate;
 import org.eclipse.ui.texteditor.TextEditorAction;
-import org.eclipse.ui.texteditor.TextOperationAction;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
-import org.eclipse.ui.views.navigator.RefactorActionGroup;
 
 
 /**
@@ -142,12 +137,12 @@ public class JavaOutlinePage extends Page implements IContentOutlinePage, IAdapt
                                                                ICompilationUnit cu= (ICompilationUnit) fInput;
                                                                IJavaElement base= cu;
 //                                                             if (fTopLevelTypeOnly) {
-                                                                       base= getMainType(cu);
-                                                                       if (base == null) {
+//                                                                     base= getMainType(cu);
+//                                                                     if (base == null) {
                                                                                if (fOutlineViewer != null)
                                                                                        fOutlineViewer.refresh(true);
                                                                                return;
-                                                                       }
+//                                                                     }
 //                                                             }
 //                                                             IJavaElementDelta delta= findElement(base, e.getDelta());
 //                                                             if (delta != null && fOutlineViewer != null) {
@@ -860,8 +855,8 @@ public class JavaOutlinePage extends Page implements IContentOutlinePage, IAdapt
        private GotoAnnotationAction fPreviousAnnotation;
        private GotoAnnotationAction fNextAnnotation;
        private TextEditorAction fShowJavadoc;
-       private TextOperationAction fUndo;
-       private TextOperationAction fRedo;
+       private IAction fUndo;
+       private IAction fRedo;
        
        private ToggleLinkingAction fToggleLinkingAction;
        
@@ -881,13 +876,12 @@ public class JavaOutlinePage extends Page implements IContentOutlinePage, IAdapt
                
                fContextMenuID= contextMenuID;
                fEditor= editor;
-               
                fTogglePresentation= new TogglePresentationAction();
                fPreviousAnnotation= new GotoAnnotationAction("PreviousAnnotation.", false); //$NON-NLS-1$
                fNextAnnotation= new GotoAnnotationAction("NextAnnotation.", true); //$NON-NLS-1$
                fShowJavadoc= (TextEditorAction) fEditor.getAction("ShowJavaDoc"); //$NON-NLS-1$
-               fUndo= (TextOperationAction) fEditor.getAction(ITextEditorActionConstants.UNDO);
-               fRedo= (TextOperationAction) fEditor.getAction(ITextEditorActionConstants.REDO);
+               fUndo= fEditor.getAction(ITextEditorActionConstants.UNDO);
+               fRedo= fEditor.getAction(ITextEditorActionConstants.REDO);
                
                fTogglePresentation.setEditor(editor);
                fPreviousAnnotation.setEditor(editor);
@@ -1334,9 +1328,9 @@ public class JavaOutlinePage extends Page implements IContentOutlinePage, IAdapt
 //             fOutlineViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners));
                
                // Drag Adapter
-               TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
-                       new SelectionTransferDragAdapter(fOutlineViewer)
-               };
-               fOutlineViewer.addDragSupport(ops, transfers, new JdtViewerDragAdapter(fOutlineViewer, dragListeners));
+//             TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
+//                     new SelectionTransferDragAdapter(fOutlineViewer)
+//             };
+//             fOutlineViewer.addDragSupport(ops, transfers, new JdtViewerDragAdapter(fOutlineViewer, dragListeners));
        }
 }