01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.internal.provisional.views.markers;
11:
12: import org.eclipse.core.expressions.PropertyTester;
13: import org.eclipse.ui.ide.IDE;
14:
15: /**
16: * QuickFixPropertyTester is the property tester for the quick fix object.
17: *
18: * @since 3.4
19: *
20: */
21: public class QuickFixPropertyTester extends PropertyTester {
22:
23: private static final String QUICK_FIX = "quickFix"; //$NON-NLS-1$
24:
25: /**
26: * Create a new instance of the receiver.
27: */
28: public QuickFixPropertyTester() {
29: super ();
30: }
31:
32: /* (non-Javadoc)
33: * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
34: */
35: public boolean test(Object receiver, String property,
36: Object[] args, Object expectedValue) {
37: if (property.equals(QUICK_FIX))
38: return IDE.getMarkerHelpRegistry().hasResolutions(
39: ((MarkerEntry) receiver).getMarker());
40: return false;
41: }
42:
43: }
|