Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349423 - [Compatibility] 'Source' and 'Refactor' menus disappear after installing Photran
Summary: [Compatibility] 'Source' and 'Refactor' menus disappear after installing Photran
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 4.2 M5   Edit
Assignee: Remy Suen CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 344260
  Show dependency tree
 
Reported: 2011-06-15 08:43 EDT by Remy Suen CLA
Modified: 2012-01-24 10:59 EST (History)
1 user (show)

See Also:


Attachments
ContributionRecord patch v1 (2.57 KB, patch)
2011-09-08 16:30 EDT, Remy Suen CLA
no flags Details | Diff
ContributionRecord patch v2 (3.20 KB, patch)
2012-01-16 09:55 EST, Remy Suen CLA
no flags Details | Diff
ContributionRecord patch v3 (3.31 KB, patch)
2012-01-19 10:38 EST, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-06-15 08:43:59 EDT
After installing Photran from Indigo and restarting, the 'Source' and 'Refactor' menus no longer show up when the 'Package Explorer' is the active part. If I select something in the view the 'Refactor' menu shows up but the 'Source' menu does not.
Comment 1 Remy Suen CLA 2011-06-15 09:51:30 EDT
This is with I20110614-1545.
Comment 2 Paul Webster CLA 2011-06-15 15:07:00 EDT
Can you see them when the Java Editor is active?

PW
Comment 3 Remy Suen CLA 2011-06-15 16:05:31 EDT
(In reply to comment #2)
> Can you see them when the Java Editor is active?

There's not a problem there. The 'Source' menu doesn't have separators though (you saw this on my screen yesterday).
Comment 4 Remy Suen CLA 2011-09-08 13:59:09 EDT
This snippet will induce the problem in an inner.

<extension point="org.eclipse.ui.menus">
  <menuContribution
      locationURI="menu:org.eclipse.ui.main.menu?after=edit">
    <menu
        label="&amp;Source"
        id="org.eclipse.jdt.ui.source.menu">
      <visibleWhen checkEnabled="false">
        <!-- ... -->
      </visibleWhen>
      <separator name="commentGroup" />
    </menu>
  </menuContribution>
</extension>
Comment 5 Remy Suen CLA 2011-09-08 16:30:13 EDT
Created attachment 203030 [details]
ContributionRecord patch v1

When we find the same menu, we just reference it directly and don't actually create any OR clauses between them. This is just an illustrative patch as we should also be considering the cloned one's expression (if any) since this patch only merges the pre-existing menu's expression with the menu contribution's.

In any case, the problem in question goes away with this patch.
Comment 6 Remy Suen CLA 2012-01-16 09:55:11 EST
Created attachment 209560 [details]
ContributionRecord patch v2

Updates the patch against master as well as adding code to exclude expressions if one of the two elements don't have an expression defined.
Comment 7 Remy Suen CLA 2012-01-19 10:38:04 EST
Created attachment 209752 [details]
ContributionRecord patch v3

The patch couldn't be applied cleanly for whatever reasons. This one should work.
Comment 8 Remy Suen CLA 2012-01-19 13:40:14 EST
(In reply to comment #7)
> Created attachment 209752 [details]
> ContributionRecord patch v3

Patch pushed to master.
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4bdf5a7dd4ea646015bf114a8fa18f0a5974dd7e
Comment 9 Remy Suen CLA 2012-01-24 10:59:14 EST
Verified with I20120123-2200 on Windows 7 that the 'Source' and 'Refactor' menus no longer magically disappear!