Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsben-zeev2006-07-16 07:27:48 -0400
committersben-zeev2006-07-16 07:27:48 -0400
commit58ad9eb0a45a1eb9fb59a733802d8e0a801a9351 (patch)
treecddb4a3d8da2e9a3293cd30e96a427b6f70286f3
parentc609596f6166d39048f0ede3cfd0a13062812fb5 (diff)
downloadorg.eclipse.pdt-58ad9eb0a45a1eb9fb59a733802d8e0a801a9351.tar.gz
org.eclipse.pdt-58ad9eb0a45a1eb9fb59a733802d8e0a801a9351.tar.xz
org.eclipse.pdt-58ad9eb0a45a1eb9fb59a733802d8e0a801a9351.zip
enable sub classing
-rw-r--r--plugins/org.eclipse.php.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineContentProvider.java6
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineLabelProvider.java2
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlinePart.java29
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineViewGroup.java14
5 files changed, 28 insertions, 24 deletions
diff --git a/plugins/org.eclipse.php.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.php.ui/META-INF/MANIFEST.MF
index 0baa940b9..088860352 100644
--- a/plugins/org.eclipse.php.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.php.ui/META-INF/MANIFEST.MF
@@ -46,6 +46,7 @@ Export-Package: org.eclipse.php.project.ui.wizards,
org.eclipse.php.ui.preferences,
org.eclipse.php.ui.preferences.includepath,
org.eclipse.php.ui.preferences.ui,
+ org.eclipse.php.ui.projectOutline,
org.eclipse.php.ui.treecontent,
org.eclipse.php.ui.util,
org.eclipse.php.ui.wizards,
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineContentProvider.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineContentProvider.java
index 17f9b3f18..24a170292 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineContentProvider.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineContentProvider.java
@@ -37,7 +37,7 @@ public class ProjectOutlineContentProvider extends StandardPHPElementContentProv
int type;
ProjectOutlinePart part;
- OutlineNode(int type, String text, PHPProjectModel model, ProjectOutlinePart part) {
+ public OutlineNode(int type, String text, PHPProjectModel model, ProjectOutlinePart part) {
this.type = type;
this.text = text;
this.model = model;
@@ -118,9 +118,9 @@ public class ProjectOutlineContentProvider extends StandardPHPElementContentProv
public Object[] getChildrenInternal(Object parentElement) {
if (parentElement instanceof IProject) {
- if (groupNodes == null || (IProject)parentElement != fStoredProject) {
+ if (groupNodes == null || (IProject) parentElement != fStoredProject) {
groupNodes = getOutlineChildren((IProject) parentElement);
- fStoredProject = (IProject)parentElement;
+ fStoredProject = (IProject) parentElement;
}
return groupNodes;
} else if (parentElement instanceof OutlineNode) {
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineLabelProvider.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineLabelProvider.java
index 748abc1a4..06972adb0 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineLabelProvider.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineLabelProvider.java
@@ -22,7 +22,7 @@ public class ProjectOutlineLabelProvider extends AppearanceAwareLabelProvider {
private TreeHierarchyLayoutProblemsDecorator fProblemDecorator;
- ProjectOutlineLabelProvider(int textFlags, int imageFlags, ITreeContentProvider cp) {
+ public ProjectOutlineLabelProvider(int textFlags, int imageFlags, ITreeContentProvider cp) {
super(textFlags, imageFlags);
fProblemDecorator = new TreeHierarchyLayoutProblemsDecorator();
addLabelDecorator(fProblemDecorator);
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlinePart.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlinePart.java
index 78d34aa5c..999f1f216 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlinePart.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlinePart.java
@@ -95,9 +95,9 @@ import org.eclipse.ui.part.ViewPart;
public class ProjectOutlinePart extends ViewPart implements IMenuListener {
- private PHPTreeViewer fViewer;
- private ProjectOutlineContentProvider fContentProvider;
- private ProjectOutlineLabelProvider fLabelProvider;
+ protected PHPTreeViewer fViewer;
+ protected ProjectOutlineContentProvider fContentProvider;
+ protected ProjectOutlineLabelProvider fLabelProvider;
private Menu fContextMenu;
private boolean fLinkingEnabled;
@@ -106,9 +106,9 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
private ISelection fLastOpenSelection;
private ISelectionChangedListener fPostSelectionListener;
- private ProjectOutlineViewGroup actionGroup;
+ protected ProjectOutlineViewGroup actionGroup;
private UpdateViewJob updateViewJob;
- private IProject currentProject;
+ protected IProject currentProject;
private boolean showAll = false;
@@ -192,7 +192,7 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
setProviders();
setUpPopupMenu();
- actionGroup = new ProjectOutlineViewGroup(this);
+ actionGroup = createActionGroup();
fViewer.addPostSelectionChangedListener(fPostSelectionListener);
addMouseTrackListener();
@@ -224,9 +224,13 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
fViewer.refresh();
getSite().getPage().addPostSelectionListener(fSelectionListener);
-
- PHPWorkspaceModelManager.getInstance().addModelListener(fContentProvider);
+ PHPWorkspaceModelManager.getInstance().addModelListener(fContentProvider);
+
+ }
+
+ protected ProjectOutlineViewGroup createActionGroup() {
+ return new ProjectOutlineViewGroup(this);
}
public void setProject(IProject project) {
@@ -239,7 +243,7 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
}
updateViewJob.schedule();
actionGroup.updateActions();
-
+
}
public void handleUpdateInput(IEditorPart editorPart) {
@@ -367,7 +371,7 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
return new ProjectOutlineContentProvider(this, showCUChildren);
}
- private ProjectOutlineLabelProvider createLabelProvider() {
+ protected ProjectOutlineLabelProvider createLabelProvider() {
return new ProjectOutlineLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | PHPElementLabels.M_PARAMETER_NAMES, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | PHPElementImageProvider.SMALL_ICONS | PHPElementImageProvider.OVERLAY_ICONS, fContentProvider);
}
@@ -404,7 +408,7 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
}
getSite().getPage().removePartListener(fPartListener);
getSite().getPage().removePostSelectionListener(fSelectionListener);
- PHPWorkspaceModelManager.getInstance().removeModelListener(fContentProvider);
+ PHPWorkspaceModelManager.getInstance().removeModelListener(fContentProvider);
super.dispose();
}
@@ -707,8 +711,7 @@ public class ProjectOutlinePart extends ViewPart implements IMenuListener {
}
public boolean isInCurrentProject(PHPFileData fileData) {
- if (currentProject!=null)
- {
+ if (currentProject != null) {
return currentProject.equals(PHPModelUtil.getResource(fileData).getProject());
}
return false;
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineViewGroup.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineViewGroup.java
index af9aba4ac..483e6ed5d 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineViewGroup.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/ui/projectOutline/ProjectOutlineViewGroup.java
@@ -25,7 +25,7 @@ public class ProjectOutlineViewGroup extends ViewActionGroup {
public static final int PHP4 = 1;
public static final int PHP5 = 2;
- private ProjectOutlinePart fPart;
+ protected ProjectOutlinePart fPart;
private ToggleAllAction toggleAllAction;
private SortAction sortAction;
private ToggleLinkingAction toggleLinking;
@@ -73,11 +73,11 @@ public class ProjectOutlineViewGroup extends ViewActionGroup {
fOpenEditorActionGroup.fillContextMenu(menu);
toggleAllAction.setChecked(fPart.isShowAll());
-// menu.add(toggleAllAction);
-// menu.add(toggleLinking);
+ // menu.add(toggleAllAction);
+ // menu.add(toggleLinking);
}
- void updateActions() {
+ public void updateActions() {
}
public void setMode(int mode) {
@@ -89,11 +89,11 @@ public class ProjectOutlineViewGroup extends ViewActionGroup {
toolBar.add(sortAction);
toolBar.add(toggleLinking);
}
-
- void fillMenu(IMenuManager menu) {
+
+ protected void fillMenu(IMenuManager menu) {
toggleAllAction.setChecked(fPart.isShowAll());
menu.add(toggleAllAction);
-// menu.add(toggleLinking);
+ // menu.add(toggleLinking);
}
public void fillActionBars(IActionBars actionBars) {

Back to the top