Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369614 - Problems building org.eclipse.linuxtools.profiling.ui
Summary: Problems building org.eclipse.linuxtools.profiling.ui
Status: RESOLVED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: Project (show other bugs)
Version: unspecified   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Linux Distros Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 21:15 EST by Corey Ashford CLA
Modified: 2012-06-29 13:12 EDT (History)
1 user (show)

See Also:


Attachments
Fix compilation problem by changing package dependencies to bundle dependencies (2.15 KB, patch)
2012-01-24 21:19 EST, Corey Ashford CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Corey Ashford CLA 2012-01-24 21:15:12 EST
Build Identifier: M20110909-1335

I've run into a strange problem that I hacked in a fix for before, but then forgot about it.  Now that I'm trying to create a coherent patch series to post up, I ran into my hack, and removed it, and of course the old problem re-appeared.

The problem is that in the class ProfileUIUtils.java, there are two methods from
CCorePlugin used: getDefault() and getIndexManager().

When I build the org.eclipse.linuxtools.profiling.ui, I get unresolved references to these two functions.

If I navigate to the class, clearly these methods are there, and I don't understand why Eclipse isn't seeing them.

After scratching my head for a bit at this, I tried changing the dependencies
in META-INF/MANIFEST.MF from packages to bundles, and somehow that fixes the problem.

Reproducible: Always
Comment 1 Corey Ashford CLA 2012-01-24 21:19:17 EST
Created attachment 210020 [details]
Fix compilation problem by changing package dependencies to bundle dependencies
Comment 2 Andrew Overholt CLA 2012-01-25 12:13:00 EST
I will take a longer look at this later, but Import-Package is preferred over Require-Bundle.
Comment 3 Corey Ashford CLA 2012-01-25 13:58:34 EST
I read up on a blog post about bundle vs. package dependencies, and I understand why package dependencies are preferred.

Andrew, have you run into this particular build problem before?

I've cleaned my workspace completely, re-built, and the problem persists.  It's
very strange.  It's almost as if Eclipse is looking at at an old version of
the class definition, or its parent, or I don't know what...

In the source editor, it appears that Eclipse can see only these members of CCorePlugin:

CDT_PROJECT_NATURE_ID_MISMATCH
class
PLUGIN_ID
STATUS_CDTPROJECT_EXISTS
STATUS_CDTPROJECT_MISMATCH
STATUS_PDOM_TOO_LARGE
createStatus(String msg)
createStatus(String msg, Throwable e)
getResourceString(String key)
log(IStatus status)
log(Throwable e)
Comment 4 Andrew Overholt CLA 2012-01-26 14:01:04 EST
I can build o.e.l.profiling.ui just fine.  I just started a clean workspace with a recent Eclipse 4.x build and it continues to build just fine for me.

Could your target platform be set incorrectly?
Comment 5 Alexander Kurtakov CLA 2012-04-11 17:34:12 EDT
Closing the bug as there haven't been any reply and profiling.ui builds fine in hudson.