Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321342

Summary: Eclipse generates exceptions when I do right click on the PHP project and latest Aptana 2.0.5 is installed
Product: z_Archived Reporter: Silver Zachara <silver.zachara>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.org, jacek.pospychala
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Silver Zachara CLA 2010-07-30 09:29:09 EDT
Hi,

here is the exception:

!ENTRY org.eclipse.core.expressions 4 201 2010-07-30 15:27:50.375
!MESSAGE No property tester contributes a property com.aptana.ide.core.ui.nature to type class org.eclipse.dltk.internal.core.ScriptProject
!STACK 1
org.eclipse.core.runtime.CoreException: No property tester contributes a property com.aptana.ide.core.ui.nature to type class org.eclipse.dltk.internal.cor
e.ScriptProject
        at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:123)
        at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
        at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)
        at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)
        at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
        at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)
        at org.eclipse.ui.internal.dialogs.RegistryPageContributor.failsEnablement(RegistryPageContributor.java:260)
        at org.eclipse.ui.internal.dialogs.RegistryPageContributor.isApplicableTo(RegistryPageContributor.java:209)
        at org.eclipse.ui.internal.dialogs.PropertyPageContributorManager.getApplicableContributors(PropertyPageContributorManager.java:199)
        at org.eclipse.ui.dialogs.PropertyDialogAction.hasPropertyPagesFor(PropertyDialogAction.java:104)
        at org.eclipse.ui.dialogs.PropertyDialogAction.isApplicableForSelection(PropertyDialogAction.java:146)
        at org.eclipse.php.internal.ui.actions.OpenViewActionGroup.fillContextMenu(OpenViewActionGroup.java:153)
        at org.eclipse.php.internal.ui.actions.NavigateActionGroup.fillContextMenu(NavigateActionGroup.java:75)
        at org.eclipse.dltk.internal.ui.actions.CompositeActionGroup.fillContextMenu(CompositeActionGroup.java:72)
        at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerActionGroup.fillContextMenu(ScriptExplorerActionGroup.java:225)
        at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerPart.menuAboutToShow(ScriptExplorerPart.java:971)
        at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:338)
        at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:469)
        at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465)
        at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:491)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:241)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
        at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4485)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4188)
        at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
        at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598)
        at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2038)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
        at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
        at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256)
        at org.eclipse.swt.widgets.Display.runPopups(Display.java:4107)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
!SUBENTRY 1 org.eclipse.core.expressions 4 201 2010-07-30 15:27:50.375
!MESSAGE No property tester contributes a property com.aptana.ide.core.ui.nature to type class org.eclipse.dltk.internal.core.ScriptProject
Comment 1 Silver Zachara CLA 2010-07-30 09:30:22 EDT
I think, that here should be some collaboration between Aptana and PDT teams.

Here is link to the Aptana's issue post:
https://aptanastudio.tenderapp.com/discussions/problems/1539-aptana-generates-exceptions-when-i-do-right-click-on-the-php-project
Comment 2 François Rey CLA 2010-10-02 06:57:00 EDT
Here's the corresponding ticket with aptana:
https://aptana.lighthouseapp.com/projects/35272/tickets/949
My guess is that some plugin.xml in aptana is declaring something like

    <test property="com.aptana.ide.core.ui.nature" />

But then I'm no expert on plugin development...
Comment 3 Jacek Pospychala CLA 2010-10-02 08:09:15 EDT
hi, that's Aptana bug.
PDT cannot contribute "com.aptana.ide.core.ui.nature" properties to PDT projects.
Aptana guys should probably implement a propertyTester for PDT projects if they want to evaluate them, or avoid evaluating them. More about property testers at:
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_core_expressions_propertyTesters.html
Comment 4 François Rey CLA 2010-10-02 08:40:43 EDT
(In reply to comment #3)
> hi, that's Aptana bug.
> PDT cannot contribute "com.aptana.ide.core.ui.nature" properties to PDT
> projects.
Why would the stack trace not show anything from aptana then?
Comment 5 Jacek Pospychala CLA 2010-10-02 09:33:21 EDT
Good question François,
Based on stack trace, a menu is about to be shown. Because it's PDT element that was clicked, PDT calls OpenViewActionGroup.fillContextMenu() to find all contributions that want to show up in that menu.
One of the elements to be added is OpenPropertiesDialog action, that is used to open "Properties" page for given selection. But before adding this action, PDT first checks if it's applicable for selected element ( OpenPropertiesDialog.isApplicableForSelection()). OpenPropertiesDialog is part of extensible Eclipse Platform API, e.g. it's not part of PDT.
So now what PropertyDialogAction does, is to look for all contributed properties pages that match selected element type. There's lots of property pages in Eclipse. The same is with commands, menus, and many other GUI contributions. There's always lots of such contributions, but they typically match only in certain contexts.
For this purpose, Platform Expression Framework (http://wiki.eclipse.org/Platform_Expression_Framework) was invented in Eclipse, to easily define matching rules for contributions directly in plugin.xml files, instead of strictly encoding them in source.
The top 6 entries in stack trace show an effort to resolve some expression for selection (which is PDT project). Unfortunately the expression fails, because it was expecting to see property "com.aptana.ide.core.ui.nature" but didn't found it.
My wild guess is that there are some contributions in one of Aptana plugins with match expression testing project for "com.aptana.ide.core.ui.nature" property value. Unfortunately PDT project doesn't have this property.