Bug 5378 - Illegal Argument exception when no project is selected in Profile Menu contribution
Summary: Illegal Argument exception when no project is selected in Profile Menu contri...
Status: RESOLVED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.5.1
Assignee: Jessica
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-23 10:12 UTC by Johann Draschwandtner
Modified: 2013-10-31 23:02 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Proposed patch (1.55 KB, patch)
2013-10-23 10:12 UTC, Johann Draschwandtner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johann Draschwandtner 2013-10-23 10:12:57 UTC
Created attachment 1573 [details]
Proposed patch

I've installed the yocto sdk profile in an eclipse based IDE that updates the menu handlers when opening a perspective.

When there is no project yet created or no project selected an Illegal Argument exception is thrown.
Relevant code is found in:
ProjectSpecificContributionItem and
TargetProfileContributionItem
of package org.yocto.sdk.ide.

The assumption that the selection will always contain a Project is not correct, therfore a simple check for null will fix the issue.

Please refer to the proposed patch attached.