import net.sourceforge.phpdt.ui.JavaUI;
import net.sourceforge.phpdt.ui.PreferenceConstants;
import net.sourceforge.phpdt.ui.ProblemsLabelDecorator.ProblemsLabelChangedEvent;
+import net.sourceforge.phpdt.ui.actions.CustomFiltersActionGroup;
import net.sourceforge.phpdt.ui.actions.GenerateActionGroup;
import net.sourceforge.phpdt.ui.actions.MemberFilterActionGroup;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.part.ShowInContext;
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;
refresh(true);
}
}
-// public void reconcile(IJavaElementDelta delta) {
-// fReorderedMembers = false;
-// if (getSorter() == null) {
-// if (fTopLevelTypeOnly && delta.getElement() instanceof IType && (delta.getKind() & IJavaElementDelta.ADDED) != 0) {
-// refresh(true);
-//
-// } else {
-// Widget w = findItem(fInput);
-// if (w != null && !w.isDisposed())
-// update(w, delta);
-// if (fReorderedMembers) {
-// refresh(false);
-// fReorderedMembers = false;
-// }
-// }
-// } else {
-// // just for now
-// refresh(true);
-// }
-// }
/*
* @see TreeViewer#internalExpandToLevel
* Custom filter action group.
* @since 3.0
*/
-// private CustomFiltersActionGroup fCustomFiltersActionGroup;
+ private CustomFiltersActionGroup fCustomFiltersActionGroup;
public JavaOutlinePage(String contextMenuID, PHPEditor editor) {
super();
return type.exists() ? type : null;
}
- /**
- * Returns the primary type of a class file.
- *
- * @param classFile
- * the class file
- * @return returns the primary type of the class file, or <code>null</code> if is does not have one
- */
- // protected IType getMainType(IClassFile classFile) {
- // try {
- // IType type= classFile.getType();
- // return type != null && type.exists() ? type : null;
- // } catch (JavaModelException e) {
- // return null;
- // }
- // }
/*
* (non-Javadoc) Method declared on Page
*/
if (toolBarManager != null) {
toolBarManager.add(new LexicalSortingAction());
- fMemberFilterActionGroup = new MemberFilterActionGroup(fOutlineViewer, "org.eclipse.jdt.ui.JavaOutlinePage"); //$NON-NLS-1$
+ fMemberFilterActionGroup = new MemberFilterActionGroup(fOutlineViewer, "net.sourceforge.phpeclipse.JavaOutlinePage"); //$NON-NLS-1$
fMemberFilterActionGroup.contributeToToolBar(toolBarManager);
-
- // fCustomFiltersActionGroup.fillActionBars(actionBars);
+
+ fCustomFiltersActionGroup.fillActionBars(actionBars);
IMenuManager menu = actionBars.getMenuManager();
menu.add(new Separator("EndFilterGroup")); //$NON-NLS-1$
fOutlineViewer.addPostSelectionChangedListener(updater);
}
+// Custom filter group
+ fCustomFiltersActionGroup= new CustomFiltersActionGroup("net.sourceforge.phpeclipse.JavaOutlinePage", fOutlineViewer); //$NON-NLS-1$
+
registerToolbarActions(bars);
fOutlineViewer.setInput(fInput);
fMemberFilterActionGroup = null;
}
+ if (fCustomFiltersActionGroup != null) {
+ fCustomFiltersActionGroup.dispose();
+ fCustomFiltersActionGroup= null;
+ }
+
fEditor.outlinePageClosed();
fEditor = null;