Author: dazarov
Date: 2011-03-22 15:04:23 -0400 (Tue, 22 Mar 2011)
New Revision: 29945
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithDialog.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken1.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken2.qfxresult
Removed:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8201
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -169,8 +169,8 @@
IBean bean = iter.next();
if(field != null){
return new IMarkerResolution[] {
- new MakeFieldProtectedMarkerResolution(field, file)//,
- //new MakeBeanScopedDependentMarkerResolution(bean, file)
+ new MakeFieldProtectedMarkerResolution(field, file),
+ new MakeBeanScopedDependentMarkerResolution(bean, file)
};
}
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -11,15 +11,29 @@
package org.jboss.tools.cdi.ui.marker;
import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
-import org.eclipse.jdt.core.IField;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IImportContainer;
+import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IType;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IMarkerResolution2;
+import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
+import org.jboss.tools.common.EclipseUtil;
/**
* @author Daniel Azarov
@@ -42,8 +56,82 @@
@Override
public void run(IMarker marker) {
+ IAnnotation originalAnnotation = getScopeAnnotation();
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new
NullProgressMonitor());
+
+ MarkerResolutionUtils.addImport(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME,
compilationUnit);
+
+ IAnnotation workingCopyAnnotation = getWorkingCopyAnnotation(originalAnnotation,
compilationUnit);
+
+ if(workingCopyAnnotation != null){
+ String shortName =
MarkerResolutionUtils.getShortName(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
+
+ IBuffer buffer = compilationUnit.getBuffer();
+
+ buffer.replace(workingCopyAnnotation.getSourceRange().getOffset(),
workingCopyAnnotation.getSourceRange().getLength(), MarkerResolutionUtils.AT+shortName);
+
+ synchronized(compilationUnit) {
+ compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
+ }
+
+ // delete import
+ String qualifiedName = getFullyQualifiedName();
+ IImportDeclaration importDeclaration = compilationUnit.getImport(qualifiedName);
+ IImportContainer importContainer = compilationUnit.getImportContainer();
+ if(importDeclaration != null && importContainer != null){
+ int importSize =
importContainer.getSourceRange().getOffset()+importContainer.getSourceRange().getLength();
+ String text = buffer.getText(importSize, buffer.getLength()-importSize);
+ if(checkImport(text, originalAnnotation.getElementName()))
+ importDeclaration.delete(false, new NullProgressMonitor());
+ }
+ }
+
+ compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
+ compilationUnit.discardWorkingCopy();
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+
}
+
+ private boolean checkImport(String text, String shortName){
+ Pattern p =
Pattern.compile(".*\\W"+shortName+"\\W.*",Pattern.DOTALL);
//$NON-NLS-1$ //$NON-NLS-2$
+ Matcher m = p.matcher(text);
+ return !m.matches();
+ }
+
+ private IAnnotation getWorkingCopyAnnotation(IAnnotation annotation, ICompilationUnit
compilationUnit){
+ IType type = compilationUnit.getType(bean.getBeanClass().getElementName());
+ if(type != null){
+ return type.getAnnotation(annotation.getElementName());
+ }
+ return null;
+ }
+
+ private IAnnotation getScopeAnnotation(){
+ Set<IScopeDeclaration> scopDeclarations = bean.getScopeDeclarations();
+ Iterator<IScopeDeclaration> iter = scopDeclarations.iterator();
+ while(iter.hasNext()){
+ IScopeDeclaration declaration = iter.next();
+ return declaration.getDeclaration();
+ }
+ return null;
+ }
+
+ private String getFullyQualifiedName(){
+ Set<IScopeDeclaration> scopDeclarations = bean.getScopeDeclarations();
+ Iterator<IScopeDeclaration> iter = scopDeclarations.iterator();
+ while(iter.hasNext()){
+ IScopeDeclaration declaration = iter.next();
+ return declaration.getScope().getSourceType().getFullyQualifiedName();
+ }
+ return null;
+
+ }
+
@Override
public String getDescription() {
return null;
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -32,7 +32,7 @@
/**
* @author Daniel Azarov
*/
-public class MakeFieldProtectedMarkerResolution implements IMarkerResolution2{
+public class MakeFieldProtectedMarkerResolution implements IMarkerResolution2,
TestableResolutionWithDialog{
private static final String PUBLIC = "public"; //$NON-NLS-1$
private static final String PROTECTED = "protected"; //$NON-NLS-1$
@@ -53,10 +53,21 @@
@Override
public void run(IMarker marker) {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- boolean cont = MessageDialog.openQuestion(shell, CDIUIMessages.QUESTION,
CDIUIMessages.DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS);
- if(!cont)
- return;
+ internal_run(marker, false);
+ }
+
+ @Override
+ public void runForTest(IMarker marker) {
+ internal_run(marker, true);
+ }
+
+ private void internal_run(IMarker marker, boolean test){
+ if(!test){
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ boolean cont = MessageDialog.openQuestion(shell, CDIUIMessages.QUESTION,
CDIUIMessages.DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS);
+ if(!cont)
+ return;
+ }
try{
ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
ICompilationUnit compilationUnit = original.getWorkingCopy(new
NullProgressMonitor());
@@ -89,5 +100,4 @@
public Image getImage() {
return null;
}
-
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -34,7 +34,7 @@
/**
* @author Daniel Azarov
*/
-public class MakeInjectedPointUnambiguousMarkerResolution implements IMarkerResolution2,
TestableResolutionWithSelectionWizard {
+public class MakeInjectedPointUnambiguousMarkerResolution implements IMarkerResolution2,
TestableResolutionWithDialog {
private String label;
private IInjectionPoint injectionPoint;
private List<IBean> beans;
@@ -51,7 +51,7 @@
return label;
}
- public void selectFirstElementAndRun(IMarker marker){
+ public void runForTest(IMarker marker){
internal_run(marker, true);
}
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -31,7 +31,7 @@
/**
* @author Daniel Azarov
*/
-public class SelectBeanMarkerResolution implements IMarkerResolution2,
TestableResolutionWithSelectionWizard {
+public class SelectBeanMarkerResolution implements IMarkerResolution2,
TestableResolutionWithDialog {
private String label;
private IInjectionPoint injectionPoint;
private List<IBean> beans;
@@ -46,7 +46,7 @@
return label;
}
- public void selectFirstElementAndRun(IMarker marker){
+ public void runForTest(IMarker marker){
internal_run(marker, true);
}
Copied:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithDialog.java
(from rev 29933,
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java)
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithDialog.java
(rev 0)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithDialog.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.marker;
+
+import org.eclipse.core.resources.IMarker;
+
+/**
+ * @author Daniel Azarov
+ */
+public interface TestableResolutionWithDialog {
+ public void runForTest(IMarker marker);
+}
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithDialog.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.cdi.ui.marker;
-
-import org.eclipse.core.resources.IMarker;
-
-/**
- * @author Daniel Azarov
- */
-public interface TestableResolutionWithSelectionWizard {
- public void selectFirstElementAndRun(IMarker marker);
-}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Leopard_Broken
+{
+
+ public String name = "pete";
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken1.qfxresult
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken1.qfxresult
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken1.qfxresult 2011-03-22
19:04:23 UTC (rev 29945)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Leopard_Broken
+{
+
+ protected String name = "pete";
+
+}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken2.qfxresult
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken2.qfxresult
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Leopard_Broken2.qfxresult 2011-03-22
19:04:23 UTC (rev 29945)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.context.Dependent;
+
+@Dependent
+class Leopard_Broken
+{
+
+ public String name = "pete";
+
+}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-03-22
18:30:48 UTC (rev 29944)
+++
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-03-22
19:04:23 UTC (rev 29945)
@@ -36,13 +36,15 @@
import org.jboss.tools.cdi.ui.marker.AddSerializableInterfaceMarkerResolution;
import org.jboss.tools.cdi.ui.marker.DeleteAllDisposerDuplicantMarkerResolution;
import org.jboss.tools.cdi.ui.marker.DeleteAllInjectedConstructorsMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.MakeBeanScopedDependentMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.MakeFieldProtectedMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeFieldStaticMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeInjectedPointUnambiguousMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeMethodBusinessMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeMethodPublicMarkerResolution;
import org.jboss.tools.cdi.ui.marker.SelectBeanMarkerResolution;
import org.jboss.tools.cdi.ui.marker.TestableResolutionWithRefactoringProcessor;
-import org.jboss.tools.cdi.ui.marker.TestableResolutionWithSelectionWizard;
+import org.jboss.tools.cdi.ui.marker.TestableResolutionWithDialog;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.test.util.JobUtils;
@@ -120,8 +122,8 @@
}
rootChange.perform(new NullProgressMonitor());
- }else if(resolution instanceof TestableResolutionWithSelectionWizard){
- ((TestableResolutionWithSelectionWizard)resolution).selectFirstElementAndRun(marker);
+ }else if(resolution instanceof TestableResolutionWithDialog){
+ ((TestableResolutionWithDialog)resolution).runForTest(marker);
}else{
resolution.run(marker);
}
@@ -536,4 +538,32 @@
AddSerializableInterfaceMarkerResolution.class);
}
+ public void testMakeFieldProtectedResolution() throws CoreException {
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Leopard_Broken.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Leopard_Broken1.qfxresult"
+ },
+ MARKER_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID,
+ MakeFieldProtectedMarkerResolution.class);
+ }
+
+ public void testMakeBeanScopedDependentResolution() throws CoreException {
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Leopard_Broken.java"
+ },
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Leopard_Broken2.qfxresult"
+ },
+ MARKER_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID,
+ MakeBeanScopedDependentMarkerResolution.class);
+ }
+
}