Bug 340538 - C/C++ project's Refactor menu is hijacked by Photran?
Summary: C/C++ project's Refactor menu is hijacked by Photran?
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Refactoring Engine (show other bugs)
Version: 5.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P1 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-20 23:37 EDT by Beth Tibbitts CLA
Modified: 2011-03-28 22:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.