Bug 340538

Summary: C/C++ project's Refactor menu is hijacked by Photran?
Product: [Tools] PTP Reporter: Beth Tibbitts <beth>
Component: Photran.Refactoring EngineAssignee: Jeffrey Overbey <com-eclipse-dot-org>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: com-eclipse-dot-org
Version: 5.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Beth Tibbitts CLA 2011-03-20 23:37:04 EDT
PTP 5.0 M6 5.0.0.201103170933 ("M6+") from epp-parallel package which includes Photran.
20110319-2313_eclipse-parallel-indigo-M6a-macosx.cocoa.x86_64.tar.gz 


Create a local C project  from the new project wizard "helloMPI".
Create a remote C/C++ project.  Remote Makefile project.
I copied the helloMPI.c into it from the local helloMPI project from the new project MPI wizard.
I tried to rename it. Context menu on the source file, "Refactor" gives only what looks like must be Photran choices.
Actually the same is true of the refactor menu on the local project as well.

The Refactor Menu at the top has the Rename choice greyed out as well. 

Well.. upon further investigation, a straight CDT eclipse (no PTP, no Photran) *has* no refactor context menu.   The Refactor menu at the top has the Rename choice greyed out here too.

And of course now I noticed that there is a "Rename..." choice right there on the Context menu.  So that is what I should have used to begin with.

So my question is...  if it's not hijacking, it's at the least confusing.
Should the menu be disabled if it's not Fortran code that's being selected?
Or if it's not a Fortran project?  Or am I making a mountain out of a molehill?
Comment 1 Jeffrey Overbey CLA 2011-03-21 00:00:46 EDT
Hi Beth,

You're right, Photran's contributing its Refactor menu a little too aggressively.  Let me try to track down exactly what's going on...
Comment 2 Jeffrey Overbey CLA 2011-03-28 22:14:29 EDT
So, the problem appeared to be that the property tester...

                     <test
                        property="org.eclipse.rephraserengine.ui.refactoring.isRefactorable"
                        forcePluginActivation="true" />

...did not have forcePluginActivation="true", so it was not being tested unless the plugin was already activated.  That took a surprisingly long time to figure out.  :-)

Fixed in HEAD.