JBoss Tools SVN: r38124 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core: .settings and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-24 17:52:44 -0500 (Tue, 24 Jan 2012)
New Revision: 38124
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigCorePlugin.java
Log:
JBIDE-10703
https://issues.jboss.org/browse/JBIDE-10703
CDISeamConfigCorePlugin is modified to follow the common pattern.
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs 2012-01-24 22:52:44 UTC (rev 38124)
@@ -0,0 +1,8 @@
+#Fri Nov 04 10:56:09 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigCorePlugin.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigCorePlugin.java 2012-01-24 22:51:41 UTC (rev 38123)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigCorePlugin.java 2012-01-24 22:52:44 UTC (rev 38124)
@@ -11,11 +11,7 @@
package org.jboss.tools.cdi.seam.config.core;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.common.log.BaseUIPlugin;
-import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
@@ -32,26 +28,9 @@
* The constructor
*/
public CDISeamConfigCorePlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
plugin = this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
/**
* Returns the shared instance
*
12 years, 11 months
JBoss Tools SVN: r38123 - in trunk: seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-24 17:51:41 -0500 (Tue, 24 Jan 2012)
New Revision: 38123
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
https://issues.jboss.org/browse/JBIDE-10699
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2012-01-24 21:59:52 UTC (rev 38122)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2012-01-24 22:51:41 UTC (rev 38123)
@@ -334,8 +334,12 @@
var.resolveValue("#{" + var.getElToken().getText() + suffix + "}"); //$NON-NLS-1$ //$NON-NLS-2$
// Save all used variables from "value" EL to the list of used variables for EL which uses this "var" attribute.
- for (ELSegment segment : varELResolution.getSegments()) {
- firstSegment.getVariables().addAll(segment.getVariables());
+ if(firstSegment.getVariables()!=null) {
+ for (ELSegment segment : varELResolution.getSegments()) {
+ if(segment.getVariables()!=null) {
+ firstSegment.getVariables().addAll(segment.getVariables());
+ }
+ }
}
ELResolutionImpl oldElResolution = resolveELOperand(file, operand, returnEqualedVariablesOnly, false, offset);
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml 2012-01-24 21:59:52 UTC (rev 38122)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml 2012-01-24 22:51:41 UTC (rev 38123)
@@ -52,10 +52,5 @@
<h:dataTable value="#{setItems}" var="value">
<h:outputText value="#{value.nonExistingBroken}"/>
</h:dataTable>
-
- <h:dataTable value="#{nonExistingBroken}" var="valueBroken">
- <h:outputText value="#{valueBroken.name}"/>
- </h:dataTable>
-
</ui:define>
</ui:composition>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2012-01-24 21:59:52 UTC (rev 38122)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2012-01-24 22:51:41 UTC (rev 38123)
@@ -139,9 +139,7 @@
TestUtil.validate(file);
String messagePattern = MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, new Object[]{"nonExistingBroken"});
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, messagePattern, false, 49, 50, 53, 56, 57);
List<IMarker> markers = getMarkersByGroupName(file, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP);
-
StringBuffer sb = new StringBuffer("Here is a list of found markers in ").append(file.getFullPath().toOSString()).append(markers.size()==0?" : [": " : [\r\n"); //$NON-NLS-1$ //$NON-NLS-2$");
int i = 0;
for (IMarker marker : markers) {
@@ -153,7 +151,8 @@
i++;
}
sb.append("]"); //$NON-NLS-1$
- assertEquals(sb.toString(), 2, markers.size());
+ System.out.println(sb.toString());
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, messagePattern, false, 49, 50, 53);
}
private List<IMarker> getMarkersByGroupName(IResource resource, String messageGroup) throws CoreException {
12 years, 11 months
JBoss Tools SVN: r38122 - in trunk/ws: plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-01-24 16:59:52 -0500 (Tue, 24 Jan 2012)
New Revision: 38122
Added:
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/resources/web-3_0-with-invalid-servlet-mapping.xml
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtils.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JavaMethodSignaturesVisitor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/JaxrsMetamodelDelta.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchTasks.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java
Log:
Fixing JBIDE-10701 - NPE in JaxrsMetamodelBuilder
https://issues.jboss.org/browse/JBIDE-10701
Fixing other NPEs found while using the plugin
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -36,6 +36,8 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
+import org.eclipse.jdt.core.IOpenable;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -46,9 +48,8 @@
import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
/**
- * Scans and filters the IJavaElementDelta and IResourceDelta (including their
- * children and annotations) and returns a list of JavaElementChangedEvents that
- * match with the JavaElementChangedEventFilter rules.
+ * Scans and filters the IJavaElementDelta and IResourceDelta (including their children and annotations) and returns a
+ * list of JavaElementChangedEvents that match with the JavaElementChangedEventFilter rules.
*
* @author xcoulon
* @see @{IJavaElementDelta}
@@ -82,19 +83,25 @@
* @throws CoreException
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=100267
*/
- private List<JavaElementDelta> scanDelta(final IJavaElementDelta delta, final int eventType)
- throws CoreException {
+ private List<JavaElementDelta> scanDelta(final IJavaElementDelta delta, final int eventType) throws CoreException {
final List<JavaElementDelta> events = new ArrayList<JavaElementDelta>();
IJavaElement element = delta.getElement();
// skip as the project is closed
if (element == null || (element.getJavaProject() != null && !element.getJavaProject().getProject().isOpen())) {
return Collections.emptyList();
+ } else if ((element.getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT)) {
+ final IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) element;
+ if (!packageFragmentRoot.isExternal()
+ && (packageFragmentRoot.getResource() == null || !packageFragmentRoot.getResource().exists())) {
+ return Collections.emptyList();
+ }
+ } else if (element.getResource() == null || !element.getResource().exists()) {
+ return Collections.emptyList();
}
int elementKind = element.getElementType();
int deltaKind = retrieveDeltaKind(delta);
int flags = delta.getFlags();
CompilationUnit compilationUnitAST = getCompilationUnitAST(delta);
-
if (elementKind == COMPILATION_UNIT) {
ICompilationUnit compilationUnit = (ICompilationUnit) element;
// compilationUnitAST is null when the given compilation unit'w
@@ -112,8 +119,8 @@
List<JavaMethodSignature> diffs = compilationUnitsRepository.mergeAST(compilationUnit,
compilationUnitAST, computeDiffs);
for (JavaMethodSignature diff : diffs) {
- final JavaElementDelta event = new JavaElementDelta(diff.getJavaMethod(), CHANGED,
- eventType, compilationUnitAST, F_SIGNATURE);
+ final JavaElementDelta event = new JavaElementDelta(diff.getJavaMethod(), CHANGED, eventType,
+ compilationUnitAST, F_SIGNATURE);
if (javaElementChangedEventFilter.apply(event)) {
events.add(event);
}
@@ -125,8 +132,8 @@
problems);
for (Entry<IProblem, IJavaElement> solvedProblem : solvedProblems.entrySet()) {
IJavaElement solvedElement = solvedProblem.getValue();
- final JavaElementDelta event = new JavaElementDelta(solvedElement, CHANGED,
- eventType, compilationUnitAST, F_PROBLEM_SOLVED);
+ final JavaElementDelta event = new JavaElementDelta(solvedElement, CHANGED, eventType,
+ compilationUnitAST, F_PROBLEM_SOLVED);
if (javaElementChangedEventFilter.apply(event)) {
events.add(event);
}
@@ -134,8 +141,8 @@
}
} else {
- final JavaElementDelta event = new JavaElementDelta(element, deltaKind, eventType,
- compilationUnitAST, flags);
+ final JavaElementDelta event = new JavaElementDelta(element, deltaKind, eventType, compilationUnitAST,
+ flags);
if (javaElementChangedEventFilter.apply(event)) {
events.add(event);
}
@@ -193,8 +200,7 @@
}
/**
- * Retrieves the appropriate kind of the given delta, with some specific
- * adaptations for some element types.
+ * Retrieves the appropriate kind of the given delta, with some specific adaptations for some element types.
*
* @param delta
* the delta.
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -27,6 +27,7 @@
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.jboss.tools.ws.jaxrs.core.JBossJaxrsCorePlugin;
+import org.jboss.tools.ws.jaxrs.core.configuration.ProjectNatureUtils;
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsMetamodel;
import org.jboss.tools.ws.jaxrs.core.internal.utils.ConstantUtils;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
@@ -69,12 +70,10 @@
protected final IProject[] build(final int kind, @SuppressWarnings("rawtypes") final Map args,
final IProgressMonitor monitor) throws CoreException {
IProject project = getProject();
- // if (!ProjectNatureUtils.isProjectNatureInstalled(project,
- // ProjectNatureUtils.JAXRS_NATURE_ID)) {
- // Logger.warn("Project '" + project.getName() +
- // "' is not a JAX-RS project.");
- // return null;
- // }
+ if (!ProjectNatureUtils.isProjectNatureInstalled(project, ProjectNatureUtils.JAXRS_NATURE_ID)) {
+ Logger.warn("Project '" + project.getName() + "' is not a JAX-RS project.");
+ return null;
+ }
logBuild(kind, args, project);
switch (kind) {
case CLEAN_BUILD:
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelChangedProcessor.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -247,28 +247,30 @@
if (returnType != null) {
final ITypeHierarchy returnTypeHierarchy = JdtUtils
.resolveTypeHierarchy(returnType, false, progressMonitor);
- final List<String> subtypesHandlers = extractHandlers(returnTypeHierarchy.getAllSubtypes(returnType));
- for (Iterator<IJaxrsResource> iterator = metamodel.getAllResources().iterator(); iterator.hasNext();) {
- JaxrsResource resource = (JaxrsResource) iterator.next();
- if (resource.isSubresource()) {
- final String resourceHandleIdentifier = resource.getJavaElement().getHandleIdentifier();
- if (resourceHandleIdentifier.equals(returnType.getHandleIdentifier())
- || subtypesHandlers.contains(resourceHandleIdentifier)) {
- for (JaxrsResourceMethod resourceMethod : resource.getMethods().values()) {
- switch (resourceMethod.getKind()) {
- case RESOURCE_METHOD:
- case SUBRESOURCE_METHOD:
- final JaxrsHttpMethod httpMethod = metamodel.getHttpMethod(resourceMethod
- .getHttpMethodAnnotation());
- final LinkedList<JaxrsResourceMethod> resourceMethods = new LinkedList<JaxrsResourceMethod>(
- Arrays.asList(subresourceLocator, resourceMethod));
- final JaxrsEndpoint endpoint = new JaxrsEndpoint(metamodel.getApplication(),
- httpMethod, resourceMethods);
- if (metamodel.add(endpoint)) {
- changes.add(new JaxrsEndpointDelta(endpoint, ADDED));
+ if (returnTypeHierarchy != null) {
+ final List<String> subtypesHandlers = extractHandlers(returnTypeHierarchy.getAllSubtypes(returnType));
+ for (Iterator<IJaxrsResource> iterator = metamodel.getAllResources().iterator(); iterator.hasNext();) {
+ JaxrsResource resource = (JaxrsResource) iterator.next();
+ if (resource.isSubresource()) {
+ final String resourceHandleIdentifier = resource.getJavaElement().getHandleIdentifier();
+ if (resourceHandleIdentifier.equals(returnType.getHandleIdentifier())
+ || subtypesHandlers.contains(resourceHandleIdentifier)) {
+ for (JaxrsResourceMethod resourceMethod : resource.getMethods().values()) {
+ switch (resourceMethod.getKind()) {
+ case RESOURCE_METHOD:
+ case SUBRESOURCE_METHOD:
+ final JaxrsHttpMethod httpMethod = metamodel.getHttpMethod(resourceMethod
+ .getHttpMethodAnnotation());
+ final LinkedList<JaxrsResourceMethod> resourceMethods = new LinkedList<JaxrsResourceMethod>(
+ Arrays.asList(subresourceLocator, resourceMethod));
+ final JaxrsEndpoint endpoint = new JaxrsEndpoint(metamodel.getApplication(),
+ httpMethod, resourceMethods);
+ if (metamodel.add(endpoint)) {
+ changes.add(new JaxrsEndpointDelta(endpoint, ADDED));
+ }
}
+ break;
}
- break;
}
}
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -199,9 +200,13 @@
private List<JaxrsElementDelta> processApplicationChangesOnWebxmlAdditionOrChange(IResource resource,
JaxrsMetamodel metamodel, IProgressMonitor progressMonitor) throws CoreException {
- final List<JaxrsElementDelta> results = new ArrayList<JaxrsElementDelta>();
final IType applicationType = JdtUtils.resolveType(Application.class.getName(), metamodel.getJavaProject(),
progressMonitor);
+ // occurs when the project has the jax-rs nature (the builder is called), but no jaxrs library is in the classpath
+ if(applicationType == null) {
+ return Collections.emptyList();
+ }
+ final List<JaxrsElementDelta> results = new ArrayList<JaxrsElementDelta>();
final ITypeHierarchy applicationTypeHierarchy = JdtUtils.resolveTypeHierarchy(applicationType, false,
progressMonitor);
final IType[] applicationSubclasses = applicationTypeHierarchy.getSubclasses(applicationType);
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtils.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/WtpUtils.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -14,8 +14,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
@@ -82,6 +80,7 @@
* servletMapping.getUrlPattern(); } }
*/
// using a good old xpath expression to scan the file.
+
try {
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(false); // never forget this!
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JavaMethodSignaturesVisitor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JavaMethodSignaturesVisitor.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JavaMethodSignaturesVisitor.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -71,7 +71,7 @@
public boolean visit(MethodDeclaration declaration) {
try {
final IJavaElement element = compilationUnit.getElementAt(declaration.getStartPosition());
- if (element.getElementType() != IJavaElement.METHOD) {
+ if (element == null || element.getElementType() != IJavaElement.METHOD) {
return true;
}
IMethod method = (IMethod) element;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/JaxrsMetamodelDelta.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/JaxrsMetamodelDelta.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/metamodel/JaxrsMetamodelDelta.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -7,7 +7,9 @@
import java.util.Collections;
import java.util.List;
+import org.eclipse.jdt.core.IJavaElementDelta;
import org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsElementDelta;
+import org.jboss.tools.ws.jaxrs.core.internal.utils.ConstantUtils;
/**
* @author Xavier Coulon
@@ -22,10 +24,10 @@
private final int deltaKind;
/** List of underlying JarxEndpoints change events carried by this event. */
- private final List<JaxrsEndpointDelta> affectedEndpointd;
+ private final List<JaxrsEndpointDelta> affectedEndpoints;
private final List<JaxrsElementDelta> affectedElements;
-
+
/**
* Full constructor.
*
@@ -34,19 +36,19 @@
this.metamodel = metamodel;
this.deltaKind = deltaKind;
this.affectedElements = new ArrayList<JaxrsElementDelta>();
- this.affectedEndpointd = new ArrayList<JaxrsEndpointDelta>();
+ this.affectedEndpoints = new ArrayList<JaxrsEndpointDelta>();
}
/**
* Full constructor.
*
- * @param affectedEndpointd
+ * @param affectedEndpoints
*/
public JaxrsMetamodelDelta(IJaxrsMetamodel metamodel, int deltaKind, List<JaxrsElementDelta> affectedElements) {
this.metamodel = metamodel;
this.deltaKind = deltaKind;
this.affectedElements = affectedElements;
- this.affectedEndpointd = new ArrayList<JaxrsEndpointDelta>();
+ this.affectedEndpoints = new ArrayList<JaxrsEndpointDelta>();
}
/**
@@ -67,7 +69,7 @@
* @return the endpointDeltas
*/
public final List<JaxrsEndpointDelta> getAffectedEndpoints() {
- return Collections.unmodifiableList(affectedEndpointd);
+ return Collections.unmodifiableList(affectedEndpoints);
}
/**
@@ -80,7 +82,7 @@
public void addAffectedEndpoint(List<JaxrsEndpointDelta> affectedEndpoints) {
if (affectedEndpoints != null) {
- this.affectedEndpointd.addAll(affectedEndpoints);
+ this.affectedEndpoints.addAll(affectedEndpoints);
}
}
@@ -102,4 +104,15 @@
}
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "JaxrsMetamodelDelta [metamodel=" + metamodel + ", deltaKind=" + ConstantUtils.getStaticFieldName(IJavaElementDelta.class, deltaKind) + "\n\taffectedEndpoints:"
+ + affectedEndpoints + "\n\taffectedElements=" + affectedElements + "]";
+ }
+
+
+
}
Added: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/resources/web-3_0-with-invalid-servlet-mapping.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/resources/web-3_0-with-invalid-servlet-mapping.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/resources/web-3_0-with-invalid-servlet-mapping.xml 2012-01-24 21:59:52 UTC (rev 38122)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+</web-app>
\ No newline at end of file
Property changes on: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/resources/web-3_0-with-invalid-servlet-mapping.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchTasks.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchTasks.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchTasks.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -51,8 +51,7 @@
*
* @param sourcePath
* @param monitor
- * @return true if ImportOperation to synchronize was performed (ie, was
- * required), false otherwise.
+ * @return true if ImportOperation to synchronize was performed (ie, was required), false otherwise.
* @throws InvocationTargetException
* @throws InterruptedException
* @throws CoreException
@@ -179,8 +178,9 @@
public static IPackageFragmentRoot addClasspathEntry(IJavaProject javaProject, String name,
IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException, InterruptedException {
IPath path = javaProject.getProject().getLocation().append("lib").addTrailingSeparator().append(name);
- Assert.assertTrue("Following library does not exist or is not readable: " + path.toFile(), path.toFile()
- .exists() && path.toFile().canRead());
+ if (!path.toFile().exists() || !path.toFile().canRead()) {
+ LOGGER.warn("Following library does not exist or is not readable: {} ", path.toFile());
+ }
IClasspathEntry[] classpathEntries = javaProject.getRawClasspath();
IClasspathEntry newLibraryEntry = JavaCore.newLibraryEntry(path, null, null);
classpathEntries = (IClasspathEntry[]) ArrayUtils.add(classpathEntries, newLibraryEntry);
@@ -195,8 +195,7 @@
}
/**
- * Called by subclasses to setup the workspace with project and files (xml,
- * java, etc.)
+ * Called by subclasses to setup the workspace with project and files (xml, java, etc.)
*
* @param projectName
*
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -114,7 +114,8 @@
public void resourceChanged(IResourceChangeEvent event) {
try {
final ResourceDeltaScanner scanner = new ResourceDeltaScanner();
- final List<ResourceDelta> affectedResources = scanner.scanAndFilterEvent(event.getDelta(), new NullProgressMonitor());
+ final List<ResourceDelta> affectedResources = scanner.scanAndFilterEvent(event.getDelta(),
+ new NullProgressMonitor());
// must explicitly call the add() method to perform verify() on the mocks at the end of the test.
for (ResourceDelta resourceDelta : affectedResources) {
resourceEvents.add(resourceDelta);
@@ -150,13 +151,18 @@
private void verifyEventNotification(IJavaElement element, int deltaKind, int eventType, int flags,
VerificationMode numberOfTimes) throws JavaModelException {
LOGGER.info("Verifying method calls..");
- // verify(scanner,
- // numberOfTimes).notifyJavaElementChanged(eq(element),
- // eq(elementKind), eq(deltaKind),
- // any(CompilationUnit.class), eq(flags));
- ICompilationUnit compilationUnit = JdtUtils.getCompilationUnit(element);
- CompilationUnit ast = JdtUtils.parse(compilationUnit, new NullProgressMonitor());
- verify(javaElementEvents, numberOfTimes).add(new JavaElementDelta(element, deltaKind, eventType, ast, flags));
+ if (element == null) {
+ verify(javaElementEvents, numberOfTimes).add(null);
+ } else {
+ // verify(scanner,
+ // numberOfTimes).notifyJavaElementChanged(eq(element),
+ // eq(elementKind), eq(deltaKind),
+ // any(CompilationUnit.class), eq(flags));
+ ICompilationUnit compilationUnit = JdtUtils.getCompilationUnit(element);
+ CompilationUnit ast = JdtUtils.parse(compilationUnit, new NullProgressMonitor());
+ verify(javaElementEvents, numberOfTimes).add(
+ new JavaElementDelta(element, deltaKind, eventType, ast, flags));
+ }
}
private void verifyEventNotification(IResource resource, int deltaKind, int eventType, int flags,
@@ -552,6 +558,15 @@
}
@Test
+ public void shouldNotNotifyWhenUnexistingLibraryAddedInClasspath() throws CoreException, InterruptedException {
+ // operation
+ IPackageFragmentRoot addedEntry = WorkbenchTasks.addClasspathEntry(javaProject, "slf4j-api-1.5.xyz.jar",
+ new NullProgressMonitor());
+ // verifications
+ verifyEventNotification(addedEntry, ADDED, POST_CHANGE, NO_FLAG, times(0));
+ }
+
+ @Test
public void shouldNotifyWhenLibraryRemovedFromClasspath() throws CoreException, InterruptedException {
// operation
List<IPackageFragmentRoot> removedEntries = WorkbenchUtils.removeClasspathEntry(javaProject,
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java 2012-01-24 21:38:42 UTC (rev 38121)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessorTestCase.java 2012-01-24 21:59:52 UTC (rev 38122)
@@ -19,6 +19,7 @@
import static org.hamcrest.Matchers.notNullValue;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getAnnotation;
import static org.jboss.tools.ws.jaxrs.core.WorkbenchUtils.getType;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.spy;
@@ -494,6 +495,23 @@
verify(metamodel, times(1)).add(any(JaxrsWebxmlApplication.class));
assertThat(metamodel.getElements(javaProject).size(), equalTo(1));
}
+
+ @Test
+ public void shouldNotFailWhenWebxmlWithUnknownServletClass() throws Exception {
+ // pre-conditions
+ List<IPackageFragmentRoot> removedEntries = WorkbenchUtils.removeClasspathEntry(javaProject,
+ "jaxrs-api-2.0.1.GA.jar", null);
+ assertFalse(removedEntries.isEmpty());
+ final IResource webxmlResource = WorkbenchUtils.replaceDeploymentDescriptorWith(javaProject,
+ "web-3_0-with-invalid-servlet-mapping.xml", bundle);
+ //metamodel.add(createApplication("/foo"));
+ // operation
+ // operation
+ final ResourceDelta event = createEvent(webxmlResource, CHANGED);
+ final List<JaxrsElementDelta> affectedElements = processResourceChanges(event, progressMonitor);
+ // verifications
+ assertThat(affectedElements.size(), equalTo(0));
+ }
@Test
public void shouldRemoveApplicationWhenChangingWebxml() throws Exception {
12 years, 11 months
JBoss Tools SVN: r38121 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-24 16:38:42 -0500 (Tue, 24 Jan 2012)
New Revision: 38121
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodPublicMarkerResolution.java
Log:
Add the code which is supposed to be inserted by the Quick Fix into its description https://issues.jboss.org/browse/JBIDE-10636
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodPublicMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodPublicMarkerResolution.java 2012-01-24 21:34:09 UTC (rev 38120)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodPublicMarkerResolution.java 2012-01-24 21:38:42 UTC (rev 38121)
@@ -20,8 +20,10 @@
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.ltk.core.refactoring.TextChange;
import org.eclipse.swt.graphics.Image;
import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
@@ -32,6 +34,8 @@
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.refactoring.MarkerResolutionUtils;
+import org.jboss.tools.common.ui.CommonUIPlugin;
/**
* @author Daniel Azarov
@@ -45,11 +49,13 @@
private String label;
private IMethod method;
private IFile file;
+ private String description;
public MakeMethodPublicMarkerResolution(IMethod method, IFile file){
this.label = MessageFormat.format(CDIUIMessages.MAKE_METHOD_PUBLIC_MARKER_RESOLUTION_TITLE, new Object[]{method.getElementName()});
this.method = method;
this.file = file;
+ description = getPreview();
}
@Override
@@ -66,54 +72,80 @@
}
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
- CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+ CompilationUnitChange change = getChange(compilationUnit);
- MultiTextEdit edit = new MultiTextEdit();
+ if(change.getEdit().hasChildren()){
+ change.perform(new NullProgressMonitor());
+ original.reconcile(ICompilationUnit.NO_AST, false, null, new NullProgressMonitor());
+ }
+ compilationUnit.discardWorkingCopy();
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ }
+
+ private CompilationUnitChange getChange(ICompilationUnit compilationUnit) throws JavaModelException{
+ CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+
+ MultiTextEdit edit = new MultiTextEdit();
+
+ change.setEdit(edit);
+ IBuffer buffer = compilationUnit.getBuffer();
+
+ IMethod workingCopyMethod = CDIMarkerResolutionUtils.findWorkingCopy(compilationUnit, method);
+ if(workingCopyMethod != null){
+ int flag = workingCopyMethod.getFlags();
- change.setEdit(edit);
- IBuffer buffer = compilationUnit.getBuffer();
-
- IMethod workingCopyMethod = CDIMarkerResolutionUtils.findWorkingCopy(compilationUnit, method);
- if(workingCopyMethod != null){
- int flag = workingCopyMethod.getFlags();
-
- String text = buffer.getText(workingCopyMethod.getSourceRange().getOffset(), workingCopyMethod.getSourceRange().getLength());
-
- // make method public
- int position = workingCopyMethod.getSourceRange().getOffset();
- if((flag & Flags.AccPublic) != 0){
- // do nothing
- }else if((flag & Flags.AccPrivate) != 0){
+ String text = buffer.getText(workingCopyMethod.getSourceRange().getOffset(), workingCopyMethod.getSourceRange().getLength());
+
+ // make method public
+ int position = workingCopyMethod.getSourceRange().getOffset();
+ if((flag & Flags.AccPublic) == 0){
+ if((flag & Flags.AccPrivate) != 0){
position += text.indexOf(PRIVATE);
ReplaceEdit re = new ReplaceEdit(position, PRIVATE.length(), PUBLIC);
edit.addChild(re);
- //buffer.replace(position, PRIVATE.length(), PUBLIC);
}else if((flag & Flags.AccProtected) != 0){
position += text.indexOf(PROTECTED);
ReplaceEdit re = new ReplaceEdit(position, PROTECTED.length(), PUBLIC);
edit.addChild(re);
- //buffer.replace(position, PROTECTED.length(), PUBLIC);
}else{
String type = Signature.getSignatureSimpleName(workingCopyMethod.getReturnType());
position += text.indexOf(type);
InsertEdit ie = new InsertEdit(position, PUBLIC+SPACE);
edit.addChild(ie);
- //buffer.replace(position, 0, PUBLIC+SPACE);
}
}
- if(edit.hasChildren()){
- change.perform(new NullProgressMonitor());
- original.reconcile(ICompilationUnit.NO_AST, false, null, new NullProgressMonitor());
- }
- compilationUnit.discardWorkingCopy();
+ }
+
+ return change;
+ }
+
+ private CompilationUnitChange getPreviewChange(){
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+
+ return getChange(original);
}catch(CoreException ex){
CDIUIPlugin.getDefault().logError(ex);
}
+ return null;
}
-
+
+ private String getPreview(){
+ TextChange previewChange = getPreviewChange();
+
+ try {
+ return MarkerResolutionUtils.getPreview(previewChange);
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ return label;
+ }
+
@Override
public String getDescription() {
- return label;
+ return description;
}
@Override
12 years, 11 months
JBoss Tools SVN: r38120 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-24 16:34:09 -0500 (Tue, 24 Jan 2012)
New Revision: 38120
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/MakeFieldProtectedMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldStaticMarkerResolution.java
Log:
Add the code which is supposed to be inserted by the Quick Fix into its description https://issues.jboss.org/browse/JBIDE-10636
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 2012-01-24 21:29:57 UTC (rev 38119)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java 2012-01-24 21:34:09 UTC (rev 38120)
@@ -13,8 +13,6 @@
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;
@@ -23,12 +21,11 @@
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.jdt.core.JavaModelException;
import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.ltk.core.refactoring.TextChange;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.text.edits.DeleteEdit;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -41,6 +38,8 @@
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.refactoring.MarkerResolutionUtils;
+import org.jboss.tools.common.ui.CommonUIPlugin;
/**
* @author Daniel Azarov
@@ -49,11 +48,13 @@
private String label;
private IBean bean;
private IFile file;
+ private String description;
public MakeBeanScopedDependentMarkerResolution(IBean bean, IFile file){
this.label = MessageFormat.format(CDIUIMessages.MAKE_BEAN_SCOPED_DEPENDENT_MARKER_RESOLUTION_TITLE, new Object[]{bean.getElementName()});
this.bean = bean;
this.file = file;
+ description = getPreview();
}
@Override
@@ -73,32 +74,9 @@
}
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
- CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+ CompilationUnitChange change = getChange(originalAnnotation, compilationUnit);
- MultiTextEdit edit = new MultiTextEdit();
-
- change.setEdit(edit);
-
- CDIMarkerResolutionUtils.addImport(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME, compilationUnit, edit);
-
- IAnnotation workingCopyAnnotation = getWorkingCopyAnnotation(originalAnnotation, compilationUnit);
-
- if(workingCopyAnnotation != null){
- String shortName = CDIMarkerResolutionUtils.getShortName(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
-
- TextEdit re = new ReplaceEdit(workingCopyAnnotation.getSourceRange().getOffset(), workingCopyAnnotation.getSourceRange().getLength(), CDIMarkerResolutionUtils.AT+shortName);
- edit.addChild(re);
-
- IBuffer buffer = compilationUnit.getBuffer();
-
- // delete import
- String qualifiedName = getFullyQualifiedName();
- if(qualifiedName != null){
- CDIMarkerResolutionUtils.deleteImportForAnnotation(qualifiedName, workingCopyAnnotation, compilationUnit, buffer, edit);
- }
- }
-
- if(edit.hasChildren()){
+ if(change.getEdit().hasChildren()){
change.perform(new NullProgressMonitor());
original.reconcile(ICompilationUnit.NO_AST, false, null, new NullProgressMonitor());
}
@@ -109,7 +87,70 @@
}
+ private CompilationUnitChange getChange(IAnnotation originalAnnotation, ICompilationUnit compilationUnit) throws JavaModelException{
+ CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+
+ MultiTextEdit edit = new MultiTextEdit();
+
+ change.setEdit(edit);
+
+ CDIMarkerResolutionUtils.addImport(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME, compilationUnit, edit);
+
+ IAnnotation workingCopyAnnotation = getWorkingCopyAnnotation(originalAnnotation, compilationUnit);
+
+ if(workingCopyAnnotation != null){
+ String shortName = CDIMarkerResolutionUtils.getShortName(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
+
+ TextEdit re = new ReplaceEdit(workingCopyAnnotation.getSourceRange().getOffset(), workingCopyAnnotation.getSourceRange().getLength(), CDIMarkerResolutionUtils.AT+shortName);
+ edit.addChild(re);
+
+ IBuffer buffer = compilationUnit.getBuffer();
+
+ // delete import
+ String qualifiedName = getFullyQualifiedName();
+ if(qualifiedName != null){
+ CDIMarkerResolutionUtils.deleteImportForAnnotation(qualifiedName, workingCopyAnnotation, compilationUnit, buffer, edit);
+ }
+ }
+
+ return change;
+ }
+ private CompilationUnitChange getPreviewChange(){
+ IAnnotation originalAnnotation = getScopeAnnotation();
+ if(originalAnnotation == null)
+ return null;
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+ if(original == null) {
+ return null;
+ }
+
+ return getChange(originalAnnotation, original);
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ return null;
+ }
+
+ private String getPreview(){
+ TextChange previewChange = getPreviewChange();
+ if(previewChange != null){
+ try {
+ return MarkerResolutionUtils.getPreview(previewChange);
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ }
+ return label;
+ }
+
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+
private IAnnotation getWorkingCopyAnnotation(IAnnotation annotation, ICompilationUnit compilationUnit){
IType type = compilationUnit.getType(bean.getBeanClass().getElementName());
if(type != null){
@@ -142,11 +183,6 @@
}
@Override
- public String getDescription() {
- return label;
- }
-
- @Override
public Image getImage() {
return CDIImages.QUICKFIX_EDIT;
}
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 2012-01-24 21:29:57 UTC (rev 38119)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java 2012-01-24 21:34:09 UTC (rev 38120)
@@ -20,8 +20,10 @@
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ltk.core.refactoring.TextChange;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.text.edits.MultiTextEdit;
@@ -33,6 +35,8 @@
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.refactoring.MarkerResolutionUtils;
+import org.jboss.tools.common.ui.CommonUIPlugin;
/**
* @author Daniel Azarov
@@ -44,11 +48,13 @@
private String label;
private IField field;
private IFile file;
+ private String description;
public MakeFieldProtectedMarkerResolution(IField field, IFile file){
this.label = MessageFormat.format(CDIUIMessages.MAKE_FIELD_PROTECTED_MARKER_RESOLUTION_TITLE, new Object[]{field.getElementName()});
this.field = field;
this.file = file;
+ description = getPreview();
}
@Override
@@ -80,26 +86,9 @@
}
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
- CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+ CompilationUnitChange change = getChange(compilationUnit);
- MultiTextEdit edit = new MultiTextEdit();
-
- change.setEdit(edit);
- IBuffer buffer = compilationUnit.getBuffer();
-
- int flag = field.getFlags();
-
- String text = buffer.getText(field.getSourceRange().getOffset(), field.getSourceRange().getLength());
-
- int position = field.getSourceRange().getOffset();
- if((flag & Flags.AccPublic) != 0){
- position += text.indexOf(PUBLIC);
- TextEdit re = new ReplaceEdit(position, PUBLIC.length(), PROTECTED);
- edit.addChild(re);
- //buffer.replace(position, PUBLIC.length(), PROTECTED);
- }
-
- if(edit.hasChildren()){
+ if(change.getEdit().hasChildren()){
change.perform(new NullProgressMonitor());
original.reconcile(ICompilationUnit.NO_AST, false, null, new NullProgressMonitor());
}
@@ -109,9 +98,53 @@
}
}
+ private CompilationUnitChange getChange(ICompilationUnit compilationUnit) throws JavaModelException{
+ CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+
+ MultiTextEdit edit = new MultiTextEdit();
+
+ change.setEdit(edit);
+ IBuffer buffer = compilationUnit.getBuffer();
+
+ int flag = field.getFlags();
+
+ String text = buffer.getText(field.getSourceRange().getOffset(), field.getSourceRange().getLength());
+
+ int position = field.getSourceRange().getOffset();
+ if((flag & Flags.AccPublic) != 0){
+ position += text.indexOf(PUBLIC);
+ TextEdit re = new ReplaceEdit(position, PUBLIC.length(), PROTECTED);
+ edit.addChild(re);
+ }
+
+ return change;
+ }
+
+ private CompilationUnitChange getPreviewChange(){
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+
+ return getChange(original);
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ return null;
+ }
+
+ private String getPreview(){
+ TextChange previewChange = getPreviewChange();
+
+ try {
+ return MarkerResolutionUtils.getPreview(previewChange);
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ return label;
+ }
+
@Override
public String getDescription() {
- return label;
+ return description;
}
@Override
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldStaticMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldStaticMarkerResolution.java 2012-01-24 21:29:57 UTC (rev 38119)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldStaticMarkerResolution.java 2012-01-24 21:34:09 UTC (rev 38120)
@@ -20,8 +20,10 @@
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.ltk.core.refactoring.TextChange;
import org.eclipse.swt.graphics.Image;
import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
@@ -30,6 +32,8 @@
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.refactoring.MarkerResolutionUtils;
+import org.jboss.tools.common.ui.CommonUIPlugin;
/**
* @author Daniel Azarov
@@ -44,11 +48,13 @@
private String label;
private IField field;
private IFile file;
+ private String description;
public MakeFieldStaticMarkerResolution(IField field, IFile file){
this.label = MessageFormat.format(CDIUIMessages.MAKE_FIELD_STATIC_MARKER_RESOLUTION_TITLE, new Object[]{field.getElementName()});
this.field = field;
this.file = file;
+ description = getPreview();
}
@Override
@@ -65,42 +71,9 @@
}
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
- CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+ CompilationUnitChange change = getChange(compilationUnit);
- MultiTextEdit edit = new MultiTextEdit();
-
- change.setEdit(edit);
- IBuffer buffer = compilationUnit.getBuffer();
-
- int flag = field.getFlags();
-
- String text = buffer.getText(field.getSourceRange().getOffset(), field.getSourceRange().getLength());
-
- int position = field.getSourceRange().getOffset();
- if((flag & Flags.AccPublic) != 0){
- position += text.indexOf(PUBLIC)+PUBLIC.length();
- InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
- edit.addChild(ie);
- //buffer.replace(position, 0, SPACE+STATIC);
- }else if((flag & Flags.AccPrivate) != 0){
- position += text.indexOf(PRIVATE)+PRIVATE.length();
- InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
- edit.addChild(ie);
- //buffer.replace(position, 0, SPACE+STATIC);
- }else if((flag & Flags.AccProtected) != 0){
- position += text.indexOf(PROTECTED)+PROTECTED.length();
- InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
- edit.addChild(ie);
- //buffer.replace(position, 0, SPACE+STATIC);
- }else{
- String type = Signature.getSignatureSimpleName(field.getTypeSignature());
- position += text.indexOf(type);
- InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
- edit.addChild(ie);
- //buffer.replace(position, 0, STATIC+SPACE);
- }
-
- if(edit.hasChildren()){
+ if(change.getEdit().hasChildren()){
change.perform(new NullProgressMonitor());
original.reconcile(ICompilationUnit.NO_AST, false, null, new NullProgressMonitor());
}
@@ -110,9 +83,66 @@
}
}
+ private CompilationUnitChange getChange(ICompilationUnit compilationUnit) throws JavaModelException{
+ CompilationUnitChange change = new CompilationUnitChange("", compilationUnit);
+
+ MultiTextEdit edit = new MultiTextEdit();
+
+ change.setEdit(edit);
+ IBuffer buffer = compilationUnit.getBuffer();
+
+ int flag = field.getFlags();
+
+ String text = buffer.getText(field.getSourceRange().getOffset(), field.getSourceRange().getLength());
+
+ int position = field.getSourceRange().getOffset();
+ if((flag & Flags.AccPublic) != 0){
+ position += text.indexOf(PUBLIC)+PUBLIC.length();
+ InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
+ edit.addChild(ie);
+ }else if((flag & Flags.AccPrivate) != 0){
+ position += text.indexOf(PRIVATE)+PRIVATE.length();
+ InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
+ edit.addChild(ie);
+ }else if((flag & Flags.AccProtected) != 0){
+ position += text.indexOf(PROTECTED)+PROTECTED.length();
+ InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
+ edit.addChild(ie);
+ }else{
+ String type = Signature.getSignatureSimpleName(field.getTypeSignature());
+ position += text.indexOf(type);
+ InsertEdit ie = new InsertEdit(position, SPACE+STATIC);
+ edit.addChild(ie);
+ }
+
+ return change;
+ }
+
+ private CompilationUnitChange getPreviewChange(){
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+
+ return getChange(original);
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ return null;
+ }
+
+ private String getPreview(){
+ TextChange previewChange = getPreviewChange();
+
+ try {
+ return MarkerResolutionUtils.getPreview(previewChange);
+ } catch (CoreException e) {
+ CommonUIPlugin.getDefault().logError(e);
+ }
+ return label;
+ }
+
@Override
public String getDescription() {
- return label;
+ return description;
}
@Override
12 years, 11 months
JBoss Tools SVN: r38119 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-24 16:29:57 -0500 (Tue, 24 Jan 2012)
New Revision: 38119
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java
Log:
Add the code which is supposed to be inserted by the Quick Fix into its description https://issues.jboss.org/browse/JBIDE-10636
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java 2012-01-24 21:01:25 UTC (rev 38118)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java 2012-01-24 21:29:57 UTC (rev 38119)
@@ -555,7 +555,10 @@
String textBefore = buffer.getText(importSize, annotationStart-importSize);
String textAfter = buffer.getText(annotationEnd, buffer.getLength()-annotationEnd);
if(checkImport(textBefore, qualifiedName) && checkImport(textAfter, qualifiedName)){
- int numberOfSpaces = getNumberOfSpaces(importDeclaration.getSourceRange().getOffset() + importDeclaration.getSourceRange().getLength(), buffer);
+ int numberOfSpaces = 0;
+ if(!isLastImport(importContainer, importDeclaration)){
+ numberOfSpaces = getNumberOfSpaces(importDeclaration.getSourceRange().getOffset() + importDeclaration.getSourceRange().getLength(), buffer);
+ }
TextEdit edit = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength()+numberOfSpaces);
rootEdit.addChild(edit);
@@ -575,6 +578,17 @@
}
}
+ private static boolean isLastImport(IImportContainer importContainer, IImportDeclaration importDeclaration) throws JavaModelException{
+ for(int index = 0; index < importContainer.getChildren().length; index++){
+ IJavaElement child = importContainer.getChildren()[index];
+
+ if(child.equals(importDeclaration) && index == importContainer.getChildren().length-1){
+ return true;
+ }
+ }
+ return false;
+ }
+
public static boolean checkImport(String text, String qualifiedName){
String name = getShortName(qualifiedName);
12 years, 11 months
JBoss Tools SVN: r38118 - in trunk/common: tests/org.jboss.tools.common.mylyn.test/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-24 16:01:25 -0500 (Tue, 24 Jan 2012)
New Revision: 38118
Modified:
trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF
Log:
Fixed mylyn dependency versions
Modified: trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF 2012-01-24 20:53:12 UTC (rev 38117)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF 2012-01-24 21:01:25 UTC (rev 38118)
@@ -8,9 +8,9 @@
Require-Bundle: org.jboss.tools.common.mylyn,
org.eclipse.mylyn;bundle-version="3.6.0",
org.eclipse.mylyn.commons.core;bundle-version="3.6.0",
- org.eclipse.mylyn.commons.ui;bundle-version="3.6.1",
+ org.eclipse.mylyn.commons.ui;bundle-version="3.6.0",
org.eclipse.mylyn.tasks.core;bundle-version="3.6.0",
- org.eclipse.mylyn.tasks.ui;bundle-version="3.6.2",
+ org.eclipse.mylyn.tasks.ui;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
com.atlassian.connector.eclipse.commons.core;bundle-version="3.0.0";resolution:=optional,
com.atlassian.connector.eclipse.commons.ui;bundle-version="3.0.0";resolution:=optional,
Modified: trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF 2012-01-24 20:53:12 UTC (rev 38117)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF 2012-01-24 21:01:25 UTC (rev 38118)
@@ -7,11 +7,11 @@
org.junit,
org.eclipse.mylyn;bundle-version="3.6.0",
org.eclipse.mylyn.commons.core;bundle-version="3.6.0",
- org.eclipse.mylyn.commons.ui;bundle-version="3.6.1",
+ org.eclipse.mylyn.commons.ui;bundle-version="3.6.0",
org.eclipse.mylyn.tasks.core;bundle-version="3.6.0",
- org.eclipse.mylyn.tasks.ui;bundle-version="3.6.2",
+ org.eclipse.mylyn.tasks.ui;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.mylyn.bugzilla.core;bundle-version="3.6.2",
+ org.eclipse.mylyn.bugzilla.core;bundle-version="3.6.0",
org.eclipse.mylyn.bugzilla.ide;bundle-version="3.6.0",
org.eclipse.mylyn.bugzilla.ui;bundle-version="3.6.0",
com.atlassian.connector.eclipse.commons.core;bundle-version="3.0.0";resolution:=optional;x-installation:=greedy,
12 years, 11 months
JBoss Tools SVN: r38117 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: src/org/jboss/tools/jst/web/ui/navigator and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-24 15:53:12 -0500 (Tue, 24 Jan 2012)
New Revision: 38117
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XContentProvider.java
Log:
JBIDE-10698
https://issues.joss.org/browse/JBIDE-10698
Method XContentProvider.hasChildren() is improved for the case of IFile element.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-01-24 20:19:48 UTC (rev 38116)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-01-24 20:53:12 UTC (rev 38117)
@@ -414,6 +414,8 @@
<or>
<instanceof
value="org.eclipse.core.resources.IFile" />
+ <instanceof
+ value="org.eclipse.core.resources.IProject" /> <!-- for activation -->
</or>
</triggerPoints>
<possibleChildren>
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XContentProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XContentProvider.java 2012-01-24 20:19:48 UTC (rev 38116)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XContentProvider.java 2012-01-24 20:53:12 UTC (rev 38117)
@@ -13,9 +13,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreeViewer;
@@ -24,13 +22,11 @@
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
-import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.navigator.TreeViewerModelListenerImpl;
import org.jboss.tools.common.model.ui.preferences.DecoratorPreferencesListener;
import org.jboss.tools.common.model.ui.views.navigator.FilteredTreesCache;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelTreeListenerSWTASync;
-import org.jboss.tools.jst.web.ui.WebUiPlugin;
public class XContentProvider implements ITreeContentProvider {
protected Viewer viewer = null;
@@ -39,6 +35,9 @@
DecoratorPreferencesListener decoratorListener = null;
+ public XContentProvider() {
+ }
+
protected TreeViewerModelListenerImpl createListener() {
return new TreeViewerModelListenerImpl();
}
@@ -92,6 +91,13 @@
}
public boolean hasChildren(Object element) {
+ if(element instanceof IFile) {
+ IFile f = (IFile)element;
+ element = EclipseResourceUtil.createObjectForResource(f);
+ if(element == null) {
+ return false;
+ }
+ }
if(element instanceof XModelObject) {
XModelObject o = (XModelObject)element;
XFilteredTree filteredTree = getFilteredTree(o);
12 years, 11 months
JBoss Tools SVN: r38116 - in trunk: cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-24 15:19:48 -0500 (Tue, 24 Jan 2012)
New Revision: 38116
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java
Log:
Add the code which is supposed to be inserted by the Quick Fix into its description https://issues.jboss.org/browse/JBIDE-10636
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 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java 2012-01-24 20:19:48 UTC (rev 38116)
@@ -91,26 +91,10 @@
IBuffer buffer = compilationUnit.getBuffer();
- //buffer.replace(workingCopyAnnotation.getSourceRange().getOffset(), workingCopyAnnotation.getSourceRange().getLength(), CDIMarkerResolutionUtils.AT+shortName);
-
- //synchronized(compilationUnit) {
- // compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
- //}
-
// delete import
String qualifiedName = getFullyQualifiedName();
if(qualifiedName != null){
- 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())){
- TextEdit de = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength());
- edit.addChild(de);
- //importDeclaration.delete(false, new NullProgressMonitor());
- }
- }
+ CDIMarkerResolutionUtils.deleteImportForAnnotation(qualifiedName, workingCopyAnnotation, compilationUnit, buffer, edit);
}
}
@@ -125,12 +109,6 @@
}
- 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());
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,15 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-
-import javax.inject.Inject;
-
-@Decorator
-public class ObserverInDecorator {
- @Inject @Delegate @AAnnotation String str;
-
- public void method(Boolean param){
-
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInDecorator.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+public class ObserverInDecorator {
+ @Inject @Delegate @AAnnotation String str;
+
+ public void method(Boolean param){
+
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,15 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.interceptor.Interceptor;
-
-import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
-
-@Interceptor
-@FooBinding
-public class ObserverInInterceptor {
-
- public void method(Boolean param){
-
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/ObserverInInterceptor.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.interceptor.Interceptor;
+
+import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
+
+@Interceptor
+@FooBinding
+public class ObserverInInterceptor {
+
+ public void method(Boolean param){
+
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class SessionBeanAnnotatedDecoratorBroken {
-
-}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedDecoratorBroken.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Stateless;
+
+@Stateless
+public class SessionBeanAnnotatedDecoratorBroken {
+
+}
\ No newline at end of file
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,14 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.ejb.Singleton;
-import javax.interceptor.AroundInvoke;
-
-import javax.interceptor.InvocationContext;
-
-@Singleton
-public class SessionBeanAnnotatedInterceptorBroken {
- @AroundInvoke
- public Object alwaysReturnThis(InvocationContext ctx) throws Exception {
- return ctx.proceed();
- }
-}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SessionBeanAnnotatedInterceptorBroken.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.ejb.Singleton;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+@Singleton
+public class SessionBeanAnnotatedInterceptorBroken {
+ @AroundInvoke
+ public Object alwaysReturnThis(InvocationContext ctx) throws Exception {
+ return ctx.proceed();
+ }
+}
\ No newline at end of file
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,12 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.decorator.Decorator;
-
-
-@Decorator
-public class TestDecorator {
-
- public void method(String parameter){
-
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+@Decorator
+public class TestDecorator {
+
+ public void method(String parameter){
+
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,15 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-
-import javax.inject.Inject;
-
-@Decorator
-public class TestDecorator2 {
- @Inject @Delegate @AAnnotation String str;
-
- public String produce(){
- return "a";
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator2.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+public class TestDecorator2 {
+ @Inject @Delegate @AAnnotation String str;
+
+ public String produce(){
+ return "a";
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,16 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
-
-@Decorator
-public class TestDecorator3 {
- @Inject @Delegate @AAnnotation String str;
-
-
- public String produce(){
- return str;
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator3.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+@Decorator
+public class TestDecorator3 {
+ @Inject @Delegate @AAnnotation String str;
+
+
+ public String produce(){
+ return str;
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,16 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-
-import javax.inject.Inject;
-
-@Decorator
-public class TestDecorator4 extends TestDecorator3{
- @Inject @Delegate @AAnnotation String str;
-
-
- public String produce(){
- return str;
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDecorator4.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+public class TestDecorator4 extends TestDecorator3{
+ @Inject @Delegate @AAnnotation String str;
+
+
+ public String produce(){
+ return str;
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,20 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-@Named("sss")
-public class TestDisposerConstructor {
- @Produces
- public String produce(){
- return "test";
- }
-
-
- @Inject
- public TestDisposerConstructor(String aaa){
-
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestDisposerConstructor.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+@Named("sss")
+public class TestDisposerConstructor {
+ @Produces
+ public String produce(){
+ return "test";
+ }
+
+
+ @Inject
+ public TestDisposerConstructor(String aaa){
+
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,17 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.enterprise.inject.Produces;
-import javax.interceptor.Interceptor;
-
-@Interceptor
-public class TestInterceptor3 {
- @Produces
- public String produce(){
- return "";
- }
-
- public void method(String parameter){
-
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor3.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.enterprise.inject.Produces;
+import javax.interceptor.Interceptor;
+
+@Interceptor
+public class TestInterceptor3 {
+ @Produces
+ public String produce(){
+ return "";
+ }
+
+ public void method(String parameter){
+
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,15 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.interceptor.Interceptor;
-
-import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
-
-@Interceptor
-@FooBinding
-public class TestInterceptor4{
-
- public String produce(){
- return "a";
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor4.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.interceptor.Interceptor;
+
+import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
+
+@Interceptor
+@FooBinding
+public class TestInterceptor4{
+
+ public String produce(){
+ return "a";
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,16 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.interceptor.Interceptor;
-
-import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
-
-@Interceptor
-@FooBinding
-public class TestInterceptor5{
-
-
- public String produce(){
- return "a";
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor5.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.interceptor.Interceptor;
+
+import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
+
+@Interceptor
+@FooBinding
+public class TestInterceptor5{
+
+
+ public String produce(){
+ return "a";
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,16 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.interceptor.Interceptor;
-
-import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
-
-@Interceptor
-@FooBinding
-public class TestInterceptor6 extends TestInterceptor5{
-
-
- public String produce(){
- return "a";
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestInterceptor6.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.interceptor.Interceptor;
+
+import org.jboss.jsr299.tck.tests.decorators.interceptor.FooBinding;
+
+@Interceptor
+@FooBinding
+public class TestInterceptor6 extends TestInterceptor5{
+
+
+ public String produce(){
+ return "a";
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,12 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-
-import javax.inject.Inject;
-
-public class TestObserverConstructor {
-
- @Inject
- public TestObserverConstructor(String aaa){
-
- }
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestObserverConstructor.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.inject.Inject;
+
+public class TestObserverConstructor {
+
+ @Inject
+ public TestObserverConstructor(String aaa){
+
+ }
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.tests.jbt.quickfixes;
-
-import java.lang.annotation.Target;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Stereotype;
-
-import javax.inject.Named;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-
-@Retention(RUNTIME)
-@Stereotype
-@Target({TYPE, METHOD, FIELD})
-@ApplicationScoped
-@Named
-public @interface TestStereotype6 {
-
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/TestStereotype6.qfxresult 2012-01-24 20:19:48 UTC (rev 38116)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Stereotype;
+import javax.inject.Named;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.FIELD;
+
+@Retention(RUNTIME)
+@Stereotype
+@Target({TYPE, METHOD, FIELD})
+@ApplicationScoped
+@Named
+public @interface TestStereotype6 {
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java 2012-01-24 20:06:27 UTC (rev 38115)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/MarkerResolutionUtils.java 2012-01-24 20:19:48 UTC (rev 38116)
@@ -514,16 +514,7 @@
if(annotation != null){
IBuffer buffer = compilationUnit.getBuffer();
- int position = annotation.getSourceRange().getOffset() + annotation.getSourceRange().getLength();
- int numberOfSpaces = 0;
- if(position < buffer.getLength()-1){
- char c = buffer.getChar(position);
- while((c == C_SPACE || c == C_TAB || c == C_NEW_LINE || c == C_CARRIAGE_RETURN) && position < buffer.getLength()-1){
- numberOfSpaces++;
- position++;
- c = buffer.getChar(position);
- }
- }
+ int numberOfSpaces = getNumberOfSpaces(annotation.getSourceRange().getOffset() + annotation.getSourceRange().getLength(), buffer);
// delete annotation
if(rootEdit != null){
@@ -534,37 +525,57 @@
}
// check and delete import
- IImportDeclaration importDeclaration = compilationUnit.getImport(qualifiedName);
- IImportContainer importContainer = compilationUnit.getImportContainer();
- if(importDeclaration.exists() && importContainer.exists()){
- int importSize = importContainer.getSourceRange().getOffset()+importContainer.getSourceRange().getLength();
-
- if(rootEdit != null){
- int annotationStart = annotation.getSourceRange().getOffset();
- int annotationEnd = annotationStart+annotation.getSourceRange().getLength();
- String textBefore = buffer.getText(importSize, annotationStart-importSize);
- String textAfter = buffer.getText(annotationEnd, buffer.getLength()-annotationEnd);
- if(checkImport(textBefore, qualifiedName) && checkImport(textAfter, qualifiedName)){
- TextEdit edit = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength());
- rootEdit.addChild(edit);
- }
- }else{
- String text = buffer.getText(importSize, buffer.getLength()-importSize);
- if(checkImport(text, qualifiedName)){
- importDeclaration.delete(false, new NullProgressMonitor());
- }
- }
+ deleteImportForAnnotation(qualifiedName, annotation, compilationUnit, buffer, rootEdit);
+ }
+ }
+
+ private static int getNumberOfSpaces(int startPosition, IBuffer buffer){
+ int position = startPosition;
+ int numberOfSpaces = 0;
+ if(position < buffer.getLength()-1){
+ char c = buffer.getChar(position);
+ while((c == C_SPACE || c == C_TAB || c == C_NEW_LINE || c == C_CARRIAGE_RETURN) && position < buffer.getLength()-1){
+ numberOfSpaces++;
+ position++;
+ c = buffer.getChar(position);
}
+ }
+ return numberOfSpaces;
+ }
+
+ public static void deleteImportForAnnotation(String qualifiedName, IAnnotation annotation, ICompilationUnit compilationUnit, IBuffer buffer, MultiTextEdit rootEdit) throws JavaModelException{
+ IImportDeclaration importDeclaration = compilationUnit.getImport(qualifiedName);
+ IImportContainer importContainer = compilationUnit.getImportContainer();
+ if(importDeclaration.exists() && importContainer.exists()){
+ int importSize = importContainer.getSourceRange().getOffset()+importContainer.getSourceRange().getLength();
- if(rootEdit == null){
- synchronized(compilationUnit) {
- compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
+ if(rootEdit != null){
+ int annotationStart = annotation.getSourceRange().getOffset();
+ int annotationEnd = annotationStart+annotation.getSourceRange().getLength();
+ String textBefore = buffer.getText(importSize, annotationStart-importSize);
+ String textAfter = buffer.getText(annotationEnd, buffer.getLength()-annotationEnd);
+ if(checkImport(textBefore, qualifiedName) && checkImport(textAfter, qualifiedName)){
+ int numberOfSpaces = getNumberOfSpaces(importDeclaration.getSourceRange().getOffset() + importDeclaration.getSourceRange().getLength(), buffer);
+
+ TextEdit edit = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength()+numberOfSpaces);
+ rootEdit.addChild(edit);
+ }
+ }else{
+ String text = buffer.getText(importSize, buffer.getLength()-importSize);
+ if(checkImport(text, qualifiedName)){
+ importDeclaration.delete(false, new NullProgressMonitor());
+ }
}
+ }
+
+ if(rootEdit == null){
+ synchronized(compilationUnit) {
+ compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
}
}
}
- private static boolean checkImport(String text, String qualifiedName){
+ public static boolean checkImport(String text, String qualifiedName){
String name = getShortName(qualifiedName);
Pattern p = Pattern.compile(".*\\W"+name+"\\W.*",Pattern.DOTALL); //$NON-NLS-1$ //$NON-NLS-2$
12 years, 11 months
JBoss Tools SVN: r38115 - in workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite: features and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-24 15:06:27 -0500 (Tue, 24 Jan 2012)
New Revision: 38115
Added:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.3.201201242105.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.3.201201242105.jar
Removed:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.2.201201241535.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.2.201201241535.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.2.201201241535.jar
Modified:
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/artifacts.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/content.jar
workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml
Log:
JBIDE-9309 Easily adding full JBoss AS source
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/artifacts.jar
===================================================================
(Binary files differ)
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/content.jar
===================================================================
(Binary files differ)
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.2.201201241535.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.2.201201241535.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.3.201201242105.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.core_1.0.3.201201242105.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.2.201201241535.jar
===================================================================
(Binary files differ)
Added: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.3.201201242105.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/plugins/org.jboss.tools.as.sourcelookup.ui_1.0.3.201201242105.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml
===================================================================
--- workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml 2012-01-24 18:57:04 UTC (rev 38114)
+++ workspace/snjeza/org.jboss.tools.as.sourcelookup.updatesite/site.xml 2012-01-24 20:06:27 UTC (rev 38115)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.jboss.tools.as.sourcelookup.feature_1.0.2.201201241535.jar" id="org.jboss.tools.as.sourcelookup.feature" version="1.0.2.201201241535">
+ <feature url="features/org.jboss.tools.as.sourcelookup.feature_1.0.3.201201242105.jar" id="org.jboss.tools.as.sourcelookup.feature" version="1.0.3.201201242105">
<category name="org.jboss.tools.as.sourcelookup"/>
</feature>
<category-def name="org.jboss.tools.as.sourcelookup" label="JBoss Tools Source Lookup"/>
12 years, 11 months