|
Lines 20-25
Link Here
|
| 20 |
|
20 |
|
| 21 |
import org.eclipse.core.runtime.IConfigurationElement; |
21 |
import org.eclipse.core.runtime.IConfigurationElement; |
| 22 |
import org.eclipse.ui.WorkbenchException; |
22 |
import org.eclipse.ui.WorkbenchException; |
|
|
23 |
import org.eclipse.ui.activities.WorkbenchActivityHelper; |
| 23 |
import org.eclipse.ui.internal.navigator.NavigatorPlugin; |
24 |
import org.eclipse.ui.internal.navigator.NavigatorPlugin; |
| 24 |
import org.eclipse.ui.internal.navigator.extensions.NavigatorContentRegistryReader; |
25 |
import org.eclipse.ui.internal.navigator.extensions.NavigatorContentRegistryReader; |
| 25 |
import org.eclipse.ui.navigator.INavigatorContentService; |
26 |
import org.eclipse.ui.navigator.INavigatorContentService; |
|
Lines 117-123
Link Here
|
| 117 |
.next(); |
118 |
.next(); |
| 118 |
|
119 |
|
| 119 |
if (isVisible(aContentService, descriptor) |
120 |
if (isVisible(aContentService, descriptor) |
| 120 |
&& descriptor.isEnabledFor(anElement)) { |
121 |
&& descriptor.isEnabledFor(anElement)) { |
| 121 |
descriptorIds.add(descriptor.getWizardId()); |
122 |
descriptorIds.add(descriptor.getWizardId()); |
| 122 |
} |
123 |
} |
| 123 |
} |
124 |
} |
|
Lines 154-160
Link Here
|
| 154 |
.next(); |
155 |
.next(); |
| 155 |
|
156 |
|
| 156 |
if (isVisible(aContentService, descriptor) |
157 |
if (isVisible(aContentService, descriptor) |
| 157 |
&& descriptor.isEnabledFor(anElement)) { |
158 |
&& descriptor.isEnabledFor(anElement)) { |
| 158 |
descriptors.add(descriptor); |
159 |
descriptors.add(descriptor); |
| 159 |
} |
160 |
} |
| 160 |
} |
161 |
} |
|
Lines 168-180
Link Here
|
| 168 |
* @return True if the descriptor is visible to the given content service. |
169 |
* @return True if the descriptor is visible to the given content service. |
| 169 |
*/ |
170 |
*/ |
| 170 |
private boolean isVisible(INavigatorContentService aContentService, CommonWizardDescriptor descriptor) { |
171 |
private boolean isVisible(INavigatorContentService aContentService, CommonWizardDescriptor descriptor) { |
| 171 |
return (aContentService == null || |
172 |
return !WorkbenchActivityHelper.filterItem(descriptor) && |
| 172 |
(descriptor.getId() == null || |
173 |
(aContentService == null || |
| 173 |
(aContentService.isVisible(descriptor.getId()) && |
174 |
(descriptor.getId() == null || |
| 174 |
aContentService.isActive(descriptor.getId()) |
175 |
( aContentService.isVisible(descriptor.getId()) && |
| 175 |
) |
176 |
aContentService.isActive(descriptor.getId()) |
| 176 |
) |
177 |
) |
| 177 |
); |
178 |
) |
|
|
179 |
); |
| 178 |
} |
180 |
} |
| 179 |
|
181 |
|
| 180 |
private class CommonWizardRegistry extends NavigatorContentRegistryReader { |
182 |
private class CommonWizardRegistry extends NavigatorContentRegistryReader { |