Community
Participate
Working Groups
EG (4/10/01 3:11:15 PM) The Project References Property page should also be available on an IJavaProject. The problem is that IJavaProject has an IResource but isn't one. One solution is to make the ReferencePropertyPage class API and we will contribute it for IJavaProject. Another solution is to add support to the plugin.xml markup for specifying that getAdapter(IResource) should be called for an object first before going through the contribution mechanism. NOTES: EG (4/18/01 5:26:05 PM) The solution implemented in the debugger is register the propery page against both the IProject and IJavaProject: <extension point = "com.ibm.eclipse.ui.propertyPages"> <page id = "com.ibm.dt.internal.ui.LauncherPropertyPage" class="com.ibm.dt.internal.ui.LauncherPropertyPage" objectClass="com.ibm.eclipse.core.resources.IProject" name= "%LauncherPropertyPage.name"> </page> <page id = "com.ibm.dt.internal.ui.LauncherPropertyPage" class ="com.ibm.dt.internal.ui.LauncherPropertyPage" objectClass="com.ibm.jdt.core.IJavaProject" name= "%LauncherPropertyPage.name"> </page> </extension> This would be a layer breaker for the workbench and this solution isn't applicable in this case. What we could do in the Java tooling is to register the ProjectReferencePage. However, this would require that we refer to the internal ProjectReferencePage. <page name="Project References" id="com.ibm.eclipse.ui.propertypages.project.reference" objectClass="com.ibm.eclipse.core.resources.IProject" class="com.ibm.eclipse.internal.ui.dialogs.ProjectReferencePage"> </page> To make this clean would require to make the ProjectReferencePage accessible as API. Since we will not call any method on the ProjectReferencePage the API is basically the class name. EG (4/18/01 7:40:17 PM) Tried the above but it didn't work since the ProjectReferencePage does a hard cast on IProject without checking for the IResource adapter. See the code below. private void initialize() { >>>>project= (IProject) getElement(); noDefaultAndApplyButton(); StringBuffer buf= new StringBuffer(); buf.append("Projects may refer to other projects in the workspace.\n"); buf.append("Use this page to specify what other projects are referenced\n"); buf.append("by project "); buf.append(project.getName()); buf.append("."); setDescription(buf.toString()); TC (5/1/01 4:48:32 PM) - this has been changed to the following project = (IProject) getElement().getAdapter(IResource.class); but we still need to determine what the final answer should be as this is an internal class
Is this still an issue for you?
issue is addressed, you can close
Thanks Erich