DESCRIPTION

Bug 446965 - [platform] Problems occurred when invoking code from
plug-in: "org.eclipse.e4.ui.workLeon Ochoa... (err_grp: 05c19149)

Change-Id: I487c2e74d3e8cd7d3d04adf3efd6c4420e408ef2
Signed-off-by: Zaid Mosley xxx@xxx.xxx

COMMENTS

author: Zaid Mosley
date: 2014-10-24 13:30:31.000000000

Patch Set 2:

Adding Paul as FYI, but I think the change is simple and does not need his expert review.

-------------------------------------
author: Slade Moran
date: 2014-10-24 13:37:54.000000000

Patch Set 2:

Why doesn't the location of your fix match the NPE?  I don't think this file changes all that often.

-------------------------------------
author: Zaid Mosley
date: 2014-10-24 13:39:57.000000000

Patch Set 2: Code-Review+2 Verified+1

-------------------------------------
author: Zaid Mosley
date: 2014-10-24 13:40:00.000000000

Change has been successfully merged into the git repository.

-------------------------------------
author: Zaid Mosley
date: 2014-10-24 13:43:42.000000000

Patch Set 2:

Because I remove the (Non-Javadoc) a while ago. For this fix, I reverted to the previous version to ensure that I had the correct line numeber.

-------------------------------------
author: Slade Moran
date: 2014-10-24 14:05:55.000000000

Patch Set 2:

OK, sounds good.  I'll point out, though, this in theory points to a bigger problem.  Property testers aren't supposed to be applied unless the default variable is an instanceof what the property tester supports.  How can null be passed in in the first place?

-------------------------------------
author: Zaid Mosley
date: 2014-10-24 15:05:02.000000000

Patch Set 2:

Thanks Paul. I can't find an instance check for PropertyTests in the call hierarchy. Shall I open a new bug to ensure that this is done?


public EvaluationResult evaluate(IEvaluationContext context) throws CoreException {
		Object element= context.getDefaultVariable();
		if (System.class.equals(element)) {
			String str= System.getProperty(fProperty);
			if (str == null)
				return EvaluationResult.FALSE;
			return EvaluationResult.valueOf(str.equals(fArgs[0]));
		}
		Property property= fgTypeExtensionManager.getProperty(element, fNamespace, fProperty, context.getAllowPluginActivation() && fForcePluginActivation);
		if (!property.isInstantiated())
			return EvaluationResult.NOT_LOADED;
		return EvaluationResult.valueOf(property.test(element, fArgs, fExpectedValue));
	}

-------------------------------------
author: Slade Moran
date: 2014-10-24 15:18:40.000000000

Patch Set 2:

That's it in Property property= fgTypeExtensionManager.getProperty(element, fNamespace, fProperty, context.getAllowPluginActivation() && fForcePluginActivation);

It doesn't return a property unless it can match a type.

-------------------------------------
author: Slade Moran
date: 2014-10-24 15:21:14.000000000

Patch Set 2:

Oh, sorry.  The IEditorPart is the receiver.  We have an IEditorPart returning a null IEditorInput.  That means either it's bad code in a contributed editor, and we should log that (the editor type at least) or we have disposed an editor but we're still looking at it.

-------------------------------------
author: Brenden Conley
date: 2014-10-24 15:54:31.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/3508/

-------------------------------------
author: Brenden Conley
date: 2014-10-24 16:27:56.000000000

Patch Set 2:

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/3508/ : SUCCESS

-------------------------------------
