JBoss Tools SVN: r19115 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2009-12-08 15:26:56 -0500 (Tue, 08 Dec 2009)
New Revision: 19115
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/messages.properties
Log:
OPEN - issue JBIDE-5413: When adding Java class sample input, need to change wizard
https://jira.jboss.org/jira/browse/JBIDE-5413
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/messages.properties 2009-12-08 18:45:25 UTC (rev 19114)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/messages.properties 2009-12-08 20:26:56 UTC (rev 19115)
@@ -4,18 +4,18 @@
BindingsPropertyUICreator_ErrorDialogTitle=Error
JavaBeanSelectionWizardPage_ArrayCheckBoxLabel=Array
JavaBeanSelectionWizardPage_BeanClassEmptyErrorMessage=Bean Class is empty
-JavaBeanSelectionWizardPage_BeanClassLabel=Bean Class :
+JavaBeanSelectionWizardPage_BeanClassLabel=Java Class \:
JavaBeanSelectionWizardPage_BeanTypeLabel=Bean Type :
JavaBeanSelectionWizardPage_BrowseButtonLabel=Browse...
JavaBeanSelectionWizardPage_CantFindClass1=Can't find the class "
JavaBeanSelectionWizardPage_CollectionClassLabel=Collection Class :
JavaBeanSelectionWizardPage_CollectionComponentClassEmptyErrorMessage=Colletion component class is empty
JavaBeanSelectionWizardPage_CollectionLabel=Collection
-JavaBeanSelectionWizardPage_WizardDes=Input Java Class
+JavaBeanSelectionWizardPage_WizardDes=Specify the incoming Java Class sample for this configuration.
JavaBeanSelectionWizardPage_WizardTitle=Input Java Class
JavabeanExpressionUICreator_ExecuteOngroupname=Execute On Element
JavabeanExpressionUICreator_ExpressionLabel=Expression
-JavabeanStrucutredDataWizard_WizardTitle=JavaBean Model Wizard
+JavabeanStrucutredDataWizard_WizardTitle=Java Class Model Wizard
JavabeanValueUICreator_DatagroupName=Data
JavabeanWiringUICreator_WiringOnElementGroupName=Wrie On Element
JavaMethodsSelectionDialog_ErrorDialogTitle=Can't open dialog
15 years, 1 month
JBoss Tools SVN: r19114 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-12-08 13:45:25 -0500 (Tue, 08 Dec 2009)
New Revision: 19114
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
Log:
Fixed junit failure testValidationGlobalTemplates
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2009-12-08 18:28:40 UTC (rev 19113)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2009-12-08 18:45:25 UTC (rev 19114)
@@ -446,7 +446,6 @@
<vpe:if test="hasinparents('p:document')">
<vpe:template children="no" modify="no">
<div style="page-break-before: always;" />
- <vpe:drop container="no" />
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="no" />
@@ -483,7 +482,6 @@
<vpe:template children="no" modify="no">
<span class="vpe-text">1</span>
</vpe:template>
- <vpe:drop container="no" />
</vpe:if>
<vpe:template children="no" modify="no" />
</vpe:tag>
@@ -620,7 +618,5 @@
</vpe:if>
<vpe:template children="no" modify="no" />
</vpe:tag>
-
-
</vpe:templates>
15 years, 1 month
JBoss Tools SVN: r19112 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2009-12-08 12:58:55 -0500 (Tue, 08 Dec 2009)
New Revision: 19112
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java
Log:
JBIDE-5279: Add "Run As" support for smooks configs - added check to make sure the xml is a valid Smooks config
https://jira.jboss.org/jira/browse/JBIDE-5279
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java 2009-12-08 17:48:27 UTC (rev 19111)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchShortcut.java 2009-12-08 17:58:55 UTC (rev 19112)
@@ -16,6 +16,7 @@
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
@@ -23,6 +24,7 @@
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.jboss.tools.smooks.configuration.RuntimeMetadata;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
public class SmooksLaunchShortcut extends JUnitLaunchShortcut {
@@ -96,6 +98,12 @@
if (selected instanceof IFile) {
elementToLaunch = (IFile) selected;
}
+ RuntimeMetadata metadata = new RuntimeMetadata();
+ metadata.setSmooksConfig(elementToLaunch);
+ if (!metadata.isValidSmooksConfig()) {
+ MessageDialog.openError(getShell(), "Launch Failed", metadata.getErrorMessage());
+ return;
+ }
}
performLaunch(elementToLaunch, mode);
} catch (InterruptedException e) {
15 years, 1 month
JBoss Tools SVN: r19111 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-08 12:48:27 -0500 (Tue, 08 Dec 2009)
New Revision: 19111
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java 2009-12-08 17:40:31 UTC (rev 19110)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java 2009-12-08 17:48:27 UTC (rev 19111)
@@ -34,4 +34,8 @@
return source != null ? source : parent != null ? parent.getSourcePath() : null;
}
+ public void setSourcePath(IPath source) {
+ this.source = source;
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2009-12-08 17:40:31 UTC (rev 19110)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2009-12-08 17:48:27 UTC (rev 19111)
@@ -25,7 +25,7 @@
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.common.text.INodeReference;
-public class CDIProject implements ICDIProject, ICDIElement {
+public class CDIProject extends CDIElement implements ICDIProject {
CDICoreNature n;
Map<String, StereotypeElement> stereotypes = new HashMap<String, StereotypeElement>();
@@ -214,7 +214,7 @@
return new HashSet<IObserverMethod>();
}
- public ICDIProject getCDIProject() {
+ public CDIProject getCDIProject() {
return this;
}
@@ -237,6 +237,11 @@
if(d.getKind() == AnnotationDefinition.STEREOTYPE) {
StereotypeElement s = new StereotypeElement();
s.setDefinition(d);
+ s.setParent(this);
+ IResource r = d.getType().getResource();
+ if(r != null) {
+ s.setSourcePath(r.getFullPath());
+ }
stereotypes.put(d.getQualifiedName(), s);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2009-12-08 17:40:31 UTC (rev 19110)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2009-12-08 17:48:27 UTC (rev 19111)
@@ -18,8 +18,10 @@
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.common.text.ITextSourceReference;
-public class ClassBean implements IClassBean {
+public class ClassBean extends CDIElement implements IClassBean {
+ public ClassBean() {}
+
public Set<IBeanMethod> getBeanConstructor() {
// TODO Auto-generated method stub
return null;
@@ -135,19 +137,4 @@
return null;
}
- public ICDIProject getCDIProject() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IResource getResource() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IPath getSourcePath() {
- // TODO Auto-generated method stub
- return null;
- }
-
}
15 years, 1 month
JBoss Tools SVN: r19110 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-08 12:40:31 -0500 (Tue, 08 Dec 2009)
New Revision: 19110
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeDeclaration.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationHelper.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -21,6 +21,7 @@
public String PRODUCES_ANNOTATION_TYPE_NAME = "javax.enterprise.inject.Produces";
public String SCOPE_ANNOTATION_TYPE_NAME = "javax.inject.Scope";
+ public String NORMAL_SCOPE_ANNOTATION_TYPE_NAME = "javax.enterprise.context.NormalScope";
public String PROVIDER_ANNOTATION_TYPE_NAME = "javax.inject.Provider";
@@ -34,5 +35,8 @@
public String CONVERSATION_SCOPED_ANNOTATION_TYPE_NAME = "javax.enterprise.context.ConversationScoped";
public String REQUEST_SCOPED_ANNOTATION_TYPE_NAME = "javax.enterprise.context.RequestScoped";
public String SESSION_SCOPED_ANNOTATION_TYPE_NAME = "javax.enterprise.context.SessionScoped";
+ public String DEPENDENT_ANNOTATION_TYPE_NAME = "javax.enterprise.context.SessionScoped";
+ public String SPECIALIZES_ANNOTATION_TYPE_NAME = "javax.enterprise.inject.Specializes";
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreBuilder.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -25,7 +25,6 @@
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -38,8 +37,6 @@
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeRoot;
-import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.internal.core.scanner.CDIBuilderDelegate;
import org.jboss.tools.cdi.internal.core.scanner.FileSet;
import org.jboss.tools.common.EclipseUtil;
@@ -153,6 +150,9 @@
incrementalBuild(delta, monitor);
}
}
+
+ getCDICoreNature().getDefinitions().applyWorkingCopy();
+
long end = System.currentTimeMillis();
n.fullBuildTime += end - begin;
try {
@@ -232,7 +232,7 @@
return getResourceVisitor().visit(resource);
case IResourceDelta.REMOVED:
CDICoreNature p = getCDICoreNature();
- if(p != null) p.pathRemoved(resource.getFullPath());
+ if(p != null) p.getDefinitions().getWorkingCopy().clean(resource.getFullPath());
break;
case IResourceDelta.CHANGED:
return getResourceVisitor().visit(resource);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -20,8 +20,10 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.jboss.tools.cdi.internal.core.impl.definition.DefinitionContext;
import org.jboss.tools.cdi.internal.core.scanner.lib.ClassPathMonitor;
import org.jboss.tools.common.util.FileUtil;
@@ -102,25 +104,30 @@
public void load() {
if(isStorageResolved) return;
isStorageResolved = true;
+ try {
+ getProject().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ } catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
- postponeFiring();
-
- try {
- boolean b = getClassPath().update();
- if(b) {
- getClassPath().validateProjectDependencies();
- }
- File file = getStorageFile();
-
- //TODO
-
- if(b) {
- getClassPath().process();
- }
-
- } finally {
- fireChanges();
- }
+// postponeFiring();
+//
+// try {
+// boolean b = getClassPath().update();
+// if(b) {
+// getClassPath().validateProjectDependencies();
+// }
+// File file = getStorageFile();
+//
+// //TODO
+//
+// if(b) {
+// getClassPath().process();
+// }
+//
+// } finally {
+// fireChanges();
+// }
}
public void clean() {
@@ -246,7 +253,4 @@
//TODO
}
- public void registerDefinitions(DefinitionContext newDefinitions) {
- System.out.println("ok");
- }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -10,11 +10,11 @@
import org.jboss.tools.common.model.util.EclipseJavaUtil;
public class AnnotationDeclaration implements IAnnotationDeclaration {
- IAnnotation annotation;
- int startPosition = -1;
- int length = 0;
- String annotationTypeName = null;
- IType type = null;
+ protected IAnnotation annotation;
+ protected int startPosition = -1;
+ protected int length = 0;
+ protected String annotationTypeName = null;
+ protected IType type = null;
public AnnotationDeclaration() {}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanField.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanField.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,33 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IMember;
+import org.jboss.tools.cdi.core.IBeanField;
+import org.jboss.tools.cdi.internal.core.impl.definition.FieldDefinition;
+
+public class BeanField extends BeanMember implements IBeanField {
+ protected FieldDefinition definition;
+ protected IField field;
+
+ public BeanField() {}
+
+ public void setDefinition(FieldDefinition definition) {
+ this.definition = definition;
+ setField(definition.getField());
+ setAnnotations(definition.getAnnotations());
+ }
+
+ public IField getField() {
+ return field;
+ }
+
+ public void setField(IField field) {
+ this.field = field;
+ setMember(field);
+ }
+
+ public IMember getSourceMember() {
+ return getField();
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,83 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IBeanMember;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+
+public abstract class BeanMember extends CDIElement implements IBeanMember {
+ protected IClassBean classBean;
+ protected ITypeDeclaration typeDeclaration;
+ protected AnnotationDeclaration named;
+ protected AnnotationDeclaration alternative;
+ protected AnnotationDeclaration specializes;
+ protected AnnotationDeclaration typed;
+
+ public BeanMember() {}
+
+ protected void setMember(IMember member) {
+ try {
+ String returnType = EclipseJavaUtil.getMemberTypeAsString(member);
+ if(returnType != null) {
+ IType t = EclipseJavaUtil.findType(member.getJavaProject(), returnType);
+ if(t != null) {
+ typeDeclaration = new TypeDeclaration(t, -1, 0);
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+
+ protected void setAnnotations(List<AnnotationDeclaration> ds) {
+ for (AnnotationDeclaration d: ds) {
+ String typeName = d.getTypeName();
+ if(CDIConstants.NAMED_QUALIFIER_TYPE_NAME.equals(typeName)) {
+ named = d;
+ } else if(CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME.equals(typeName)) {
+ alternative = d;
+ } else if(CDIConstants.SPECIALIZES_ANNOTATION_TYPE_NAME.equals(typeName)) {
+ specializes = d;
+ } else if(CDIConstants.TYPED_ANNOTATION_TYPE_NAME.equals(typeName)) {
+ typed = d;
+ }
+ }
+ }
+
+ public IClassBean getClassBean() {
+ return classBean;
+ }
+
+ public void setClassBean(IClassBean classBean) {
+ this.classBean = classBean;
+ }
+
+ public int getLength() {
+ ISourceRange r = null;
+ try {
+ getSourceMember().getSourceRange();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return r == null ? 0 : r.getLength();
+ }
+
+ public int getStartPosition() {
+ ISourceRange r = null;
+ try {
+ getSourceMember().getSourceRange();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return r == null ? 0 : r.getOffset();
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,42 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.IParameter;
+import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
+
+public class BeanMethod extends BeanMember implements IBeanMethod {
+ protected MethodDefinition definition;
+ protected IMethod method;
+
+ public BeanMethod() {}
+
+ public void setDefinition(MethodDefinition definition) {
+ this.definition = definition;
+ setMethod(definition.getMethod());
+ setAnnotations(definition.getAnnotations());
+ }
+
+ public IMethod getMethod() {
+ return method;
+ }
+
+ public void setMethod(IMethod method) {
+ this.method = method;
+ setMember(method);
+ }
+
+ public IMember getSourceMember() {
+ return getMethod();
+ }
+
+ public List<IParameter> getParameters() {
+ // TODO
+ return new ArrayList<IParameter>();
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,37 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.cdi.core.ICDIElement;
+import org.jboss.tools.cdi.core.ICDIProject;
+
+public class CDIElement implements ICDIElement {
+ protected CDIElement parent;
+ protected IPath source;
+
+ public CDIProject getCDIProject() {
+ return parent != null ? parent.getCDIProject() : null;
+ }
+
+ public void setParent(CDIElement parent) {
+ this.parent = parent;
+ }
+
+ public CDIElement getParent() {
+ return parent;
+ }
+
+ public IResource getResource() {
+ IPath path = getSourcePath();
+ if(path == null) return null;
+ IResource r = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if(r == null || !r.exists()) return null;
+ return r;
+ }
+
+ public IPath getSourcePath() {
+ return source != null ? source : parent != null ? parent.getSourcePath() : null;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIElement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -1,20 +1,41 @@
package org.jboss.tools.cdi.internal.core.impl;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.ICDIElement;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IObserverMethod;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.common.text.INodeReference;
-public class CDIProject implements ICDIProject {
+public class CDIProject implements ICDIProject, ICDIElement {
+ CDICoreNature n;
+ Map<String, StereotypeElement> stereotypes = new HashMap<String, StereotypeElement>();
+
+ public CDIProject() {}
+
+ public CDICoreNature getNature() {
+ return n;
+ }
+
public List<INodeReference> getAlternativeClasses() {
// TODO Auto-generated method stub
return null;
@@ -79,49 +100,145 @@
}
public Set<IType> getQualifierTypes() {
- // TODO Auto-generated method stub
- return null;
+ Set<IType> result = new HashSet<IType>();
+ List<AnnotationDefinition> ds = n.getDefinitions().getAllAnnotations();
+ for (AnnotationDefinition d: ds) {
+ if(d.getKind() == AnnotationDefinition.QUALIFIER) {
+ result.add(d.getType());
+ }
+ }
+ return result;
}
public Set<IType> getStereotypes() {
- // TODO Auto-generated method stub
- return null;
+ Set<IType> result = new HashSet<IType>();
+ List<AnnotationDefinition> ds = n.getDefinitions().getAllAnnotations();
+ for (AnnotationDefinition d: ds) {
+ if(d.getKind() == AnnotationDefinition.STEREOTYPE) {
+ result.add(d.getType());
+ }
+ }
+ return result;
}
public boolean isNormalScope(IType annotationType) {
- // TODO Auto-generated method stub
+ if(annotationType == null) return false;
+ try {
+ if(!annotationType.isAnnotation()) return false;
+ } catch (CoreException e) {
+ return false;
+ }
+ AnnotationDefinition d = n.getDefinitions().getAnnotation(annotationType);
+ List<AnnotationDeclaration> ds = d.getAnnotations();
+ for (AnnotationDeclaration a: ds) {
+ if(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME.equals(a.getTypeName())) {
+ return true;
+ }
+ }
return false;
}
public boolean isPassivatingScope(IType annotationType) {
- // TODO Auto-generated method stub
+ if(annotationType == null) return false;
+ try {
+ if(!annotationType.isAnnotation()) return false;
+ } catch (CoreException e) {
+ return false;
+ }
+ AnnotationDefinition d = n.getDefinitions().getAnnotation(annotationType);
+ List<AnnotationDeclaration> ds = d.getAnnotations();
+ for (AnnotationDeclaration a: ds) {
+ if(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME.equals(a.getTypeName())) {
+ IAnnotation ann = a.getDeclaration();
+ try {
+ IMemberValuePair[] ps = ann.getMemberValuePairs();
+ if(ps != null) for (IMemberValuePair p: ps) {
+ if("passivating".equals(p.getMemberName())) {
+ Object o = p.getValue();
+ return o != null && "true".equalsIgnoreCase(o.toString());
+ }
+ }
+ } catch (JavaModelException e) {
+
+ }
+ return true;
+ }
+ }
return false;
}
public boolean isQualifier(IType annotationType) {
- // TODO Auto-generated method stub
- return false;
+ if(annotationType == null) return false;
+ try {
+ if(!annotationType.isAnnotation()) return false;
+ } catch (CoreException e) {
+ return false;
+ }
+ int k = n.getDefinitions().getAnnotationKind(annotationType);
+
+ return k == AnnotationDefinition.QUALIFIER;
}
public boolean isScope(IType annotationType) {
- // TODO Auto-generated method stub
- return false;
+ if(annotationType == null) return false;
+ try {
+ if(!annotationType.isAnnotation()) return false;
+ } catch (CoreException e) {
+ return false;
+ }
+ int k = n.getDefinitions().getAnnotationKind(annotationType);
+
+ return k == AnnotationDefinition.SCOPE;
}
public boolean isStereotype(IType annotationType) {
- // TODO Auto-generated method stub
- return false;
+ if(annotationType == null) return false;
+ try {
+ if(!annotationType.isAnnotation()) return false;
+ } catch (CoreException e) {
+ return false;
+ }
+ int k = n.getDefinitions().getAnnotationKind(annotationType);
+
+ return k == AnnotationDefinition.STEREOTYPE;
}
public Set<IBean> resolve(Set<IBean> beans) {
- // TODO Auto-generated method stub
- return null;
+ // TODO
+ return beans;
}
public Set<IObserverMethod> resolveObserverMethods(
IInjectionPoint injectionPoint) {
- // TODO Auto-generated method stub
- return null;
+ // TODO
+ return new HashSet<IObserverMethod>();
}
+ public ICDIProject getCDIProject() {
+ return this;
+ }
+
+ public IResource getResource() {
+ return n.getProject();
+ }
+
+ public IPath getSourcePath() {
+ return n.getProject().getFullPath();
+ }
+
+ public StereotypeElement getStereotype(String qualifiedName) {
+ return stereotypes.get(qualifiedName);
+ }
+
+ public void rebuildStereotypes() {
+ stereotypes.clear();
+ List<AnnotationDefinition> ds = n.getDefinitions().getAllAnnotations();
+ for (AnnotationDefinition d: ds) {
+ if(d.getKind() == AnnotationDefinition.STEREOTYPE) {
+ StereotypeElement s = new StereotypeElement();
+ s.setDefinition(d);
+ stereotypes.put(d.getQualifiedName(), s);
+ }
+ }
+ }
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,153 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
+import org.jboss.tools.cdi.core.IObserverMethod;
+import org.jboss.tools.cdi.core.IProducer;
+import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.common.text.ITextSourceReference;
+
+public class ClassBean implements IClassBean {
+
+ public Set<IBeanMethod> getBeanConstructor() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IBeanMethod> getDisposers() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IInterceptorBindingDeclaration> getInterceptorBindings() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IObserverMethod> getObserverMethods() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IProducer> getProducers() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<ITypeDeclaration> getAllTypeDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IAnnotationDeclaration getAlternativeDeclaration() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IType getBeanClass() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IInjectionPoint> getInjectionPoints() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IType> getLegalTypes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ITextSourceReference getNameLocation() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IAnnotationDeclaration> getQualifierDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<ITypeDeclaration> getRestrictedTypeDeclaratios() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IBean getSpecializedBean() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IAnnotationDeclaration getSpecializesAnnotationDeclaration() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IStereotypeDeclaration> getStereotypeDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isAlternative() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isDependent() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isEnabled() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isSpecializing() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public IType getScope() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Set<IAnnotationDeclaration> getScopeDeclarations() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ICDIProject getCDIProject() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IResource getResource() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IPath getSourcePath() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,239 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+import org.jboss.tools.common.java.IJavaSourceReference;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.common.text.ITextSourceReference;
+
+public class ProducerField extends BeanField implements IProducerField {
+
+ public ProducerField() {}
+
+ public Set<ITypeDeclaration> getAllTypeDeclarations() {
+ Set<ITypeDeclaration> result = new HashSet<ITypeDeclaration>();
+ if(typeDeclaration != null) {
+ result.add(typeDeclaration);
+ }
+ return result;
+ }
+
+ public IAnnotationDeclaration getAlternativeDeclaration() {
+ return alternative;
+ }
+
+ public IType getBeanClass() {
+ return typeDeclaration != null ? typeDeclaration.getType() : null;
+ }
+
+ public Set<IInjectionPoint> getInjectionPoints() {
+ return new HashSet<IInjectionPoint>();
+ }
+
+ public Set<IType> getLegalTypes() {
+ // TODO
+ return null;
+ }
+
+ public String getName() {
+ String name = getField().getElementName();
+ if(named == null) {
+ return name;
+ }
+ IAnnotation a = named.getDeclaration();
+ try {
+ IMemberValuePair[] vs = a.getMemberValuePairs();
+ if(vs == null || vs.length == 0) {
+ return name;
+ } else {
+ Object value = vs[0].getValue();
+ if(value != null && value.toString().trim().length() > 0) {
+ return value.toString().trim();
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return name;
+ }
+
+ public ITextSourceReference getNameLocation() {
+ final IField f = getField();
+ return new IJavaSourceReference(){
+
+ public int getStartPosition() {
+ try {
+ ISourceRange r = f.getSourceRange();
+ return r == null ? -1 : r.getOffset();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ return -1;
+ }
+ }
+
+ public int getLength() {
+ try {
+ ISourceRange r = f.getSourceRange();
+ return r == null ? 0 : r.getLength();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ return 0;
+ }
+ }
+
+ public IMember getSourceMember() {
+ return f;
+ }
+ };
+ }
+
+ public Set<IAnnotationDeclaration> getQualifierDeclarations() {
+ Set<IAnnotationDeclaration> result = new HashSet<IAnnotationDeclaration>();
+ for(AnnotationDeclaration a: definition.getAnnotations()) {
+ int k = getCDIProject().getNature().getDefinitions().getAnnotationKind(a.getType());
+ if(k == AnnotationDefinition.QUALIFIER) {
+ result.add(a);
+ }
+ }
+ return result;
+ }
+
+ public Set<ITypeDeclaration> getRestrictedTypeDeclaratios() {
+ Set<ITypeDeclaration> result = new HashSet<ITypeDeclaration>();
+ if(typed != null) {
+ IAnnotation a = typed.getDeclaration();
+ try {
+ IMemberValuePair[] ps = a.getMemberValuePairs();
+ if(ps == null || ps.length == 0) return result;
+ Object value = ps[0].getValue();
+ if(value instanceof Object[]) {
+ Object[] os = (Object[])value;
+ for (int i = 0; i < os.length; i++) {
+ String typeName = os[i].toString();
+ IType type = EclipseJavaUtil.findType(getField().getJavaProject(), typeName);
+ if(type != null) {
+ result.add(new TypeDeclaration(type, -1, 0));
+ }
+ }
+ } else if(value != null) {
+ String typeName = value.toString();
+ IType type = EclipseJavaUtil.findType(getField().getJavaProject(), typeName);
+ if(type != null) {
+ result.add(new TypeDeclaration(type, -1, 0));
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+ return result;
+ }
+
+ public IBean getSpecializedBean() {
+ return null;
+ }
+
+ public IAnnotationDeclaration getSpecializesAnnotationDeclaration() {
+ return null;
+ }
+
+ public Set<IStereotypeDeclaration> getStereotypeDeclarations() {
+ Set<IStereotypeDeclaration> result = new HashSet<IStereotypeDeclaration>();
+ for (AnnotationDeclaration d: definition.getAnnotations()) {
+ if(d instanceof IStereotypeDeclaration) {
+ StereotypeDeclaration sd = (StereotypeDeclaration)d;
+ StereotypeElement s = getCDIProject().getStereotype(d.getTypeName());
+ sd.setStereotype(s);
+ result.add(sd);
+ }
+ }
+ return result;
+ }
+
+ public boolean isAlternative() {
+ return alternative != null;
+ }
+
+ public boolean isDependent() {
+ IType scope = getScope();
+ return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getFullyQualifiedName());
+ }
+
+ public boolean isEnabled() {
+ return true;
+ }
+
+ public boolean isSpecializing() {
+ return false;
+ }
+
+ public IType getScope() {
+ Set<IAnnotationDeclaration> ds = getScopeDeclarations();
+ if(!ds.isEmpty()) {
+ return ds.iterator().next().getType();
+ }
+ List<AnnotationDeclaration> ds2 = definition.getAnnotations();
+ for (AnnotationDeclaration d: ds2) {
+ int k = getCDIProject().getNature().getDefinitions().getAnnotationKind(d.getType());
+ if(k == AnnotationDefinition.STEREOTYPE) {
+ AnnotationDefinition a = getCDIProject().getNature().getDefinitions().getAnnotation(d.getType());
+ ds = getScopeDeclarations(getCDIProject().getNature(), a.getAnnotations());
+ if(!ds.isEmpty()) {
+ return ds.iterator().next().getType();
+ }
+ }
+ }
+ try {
+ return EclipseJavaUtil.findType(getField().getJavaProject(), CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ public Set<IAnnotationDeclaration> getScopeDeclarations() {
+ return getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
+ }
+
+ public static Set<IAnnotationDeclaration> getScopeDeclarations(CDICoreNature n, List<? extends IAnnotationDeclaration> ds) {
+ Set<IAnnotationDeclaration> result = new HashSet<IAnnotationDeclaration>();
+ for (IAnnotationDeclaration d: ds) {
+ int k = n.getDefinitions().getAnnotationKind(d.getType());
+ if(k == AnnotationDefinition.SCOPE) {
+ result.add(d);
+ }
+ }
+ return result;
+ }
+
+ public static Set<IAnnotationDeclaration> getStereotypeDeclarations(CDICoreNature n, List<? extends IAnnotationDeclaration> ds) {
+ Set<IAnnotationDeclaration> result = new HashSet<IAnnotationDeclaration>();
+ for (IAnnotationDeclaration d: ds) {
+ int k = n.getDefinitions().getAnnotationKind(d.getType());
+ if(k == AnnotationDefinition.STEREOTYPE) {
+ result.add(d);
+ }
+ }
+ return result;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,229 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.core.IStereotype;
+import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+import org.jboss.tools.common.java.IJavaSourceReference;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.common.text.ITextSourceReference;
+
+public class ProducerMethod extends BeanMethod implements IProducerMethod {
+
+ public ProducerMethod() {}
+
+ public Set<ITypeDeclaration> getAllTypeDeclarations() {
+ Set<ITypeDeclaration> result = new HashSet<ITypeDeclaration>();
+ if(typeDeclaration != null) {
+ result.add(typeDeclaration);
+ }
+ return result;
+ }
+
+ public IAnnotationDeclaration getAlternativeDeclaration() {
+ return alternative;
+ }
+
+ public IType getBeanClass() {
+ return typeDeclaration != null ? typeDeclaration.getType() : null;
+ }
+
+ public Set<IInjectionPoint> getInjectionPoints() {
+ return new HashSet<IInjectionPoint>();
+ }
+
+ public Set<IType> getLegalTypes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getName() {
+ String name = getMethod().getElementName();
+ if(named == null) {
+ return name;
+ }
+ IAnnotation a = named.getDeclaration();
+ try {
+ IMemberValuePair[] vs = a.getMemberValuePairs();
+ if(vs == null || vs.length == 0) {
+ if(name.startsWith("get") && name.length() > 3) {
+ return name.substring(3, 4).toLowerCase() + name.substring(4);
+ } else if(name.startsWith("is") && name.length() > 2) {
+ return name.substring(2, 3).toLowerCase() + name.substring(3);
+ }
+ } else {
+ Object value = vs[0].getValue();
+ if(value != null && value.toString().trim().length() > 0) {
+ return value.toString().trim();
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return name;
+ }
+
+ public ITextSourceReference getNameLocation() {
+ final IMethod f = getMethod();
+ return new IJavaSourceReference(){
+
+ public int getStartPosition() {
+ try {
+ ISourceRange r = f.getSourceRange();
+ return r == null ? -1 : r.getOffset();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ return -1;
+ }
+ }
+
+ public int getLength() {
+ try {
+ ISourceRange r = f.getSourceRange();
+ return r == null ? 0 : r.getLength();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ return 0;
+ }
+ }
+
+ public IMember getSourceMember() {
+ return f;
+ }
+ };
+ }
+
+ public Set<IAnnotationDeclaration> getQualifierDeclarations() {
+ Set<IAnnotationDeclaration> result = new HashSet<IAnnotationDeclaration>();
+ for(AnnotationDeclaration a: definition.getAnnotations()) {
+ int k = getCDIProject().getNature().getDefinitions().getAnnotationKind(a.getType());
+ if(k == AnnotationDefinition.QUALIFIER) {
+ result.add(a);
+ }
+ }
+ return result;
+ }
+
+ //similar to ProducerField.getRestrictedTypeDeclaratios
+ public Set<ITypeDeclaration> getRestrictedTypeDeclaratios() {
+ Set<ITypeDeclaration> result = new HashSet<ITypeDeclaration>();
+ if(typed != null) {
+ IAnnotation a = typed.getDeclaration();
+ try {
+ IMemberValuePair[] ps = a.getMemberValuePairs();
+ if(ps == null || ps.length == 0) return result;
+ Object value = ps[0].getValue();
+ if(value instanceof Object[]) {
+ Object[] os = (Object[])value;
+ for (int i = 0; i < os.length; i++) {
+ String typeName = os[i].toString();
+ IType type = EclipseJavaUtil.findType(getMethod().getJavaProject(), typeName);
+ if(type != null) {
+ result.add(new TypeDeclaration(type, -1, 0));
+ }
+ }
+ } else if(value != null) {
+ String typeName = value.toString();
+ IType type = EclipseJavaUtil.findType(getMethod().getJavaProject(), typeName);
+ if(type != null) {
+ result.add(new TypeDeclaration(type, -1, 0));
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+ return result;
+ }
+
+ public IBean getSpecializedBean() {
+ if(specializes == null) {
+ return null;
+ }
+ //TODO find producer method in super type
+
+ return null;
+ }
+
+ public IAnnotationDeclaration getSpecializesAnnotationDeclaration() {
+ return specializes;
+ }
+
+ public Set<IStereotypeDeclaration> getStereotypeDeclarations() {
+ Set<IStereotypeDeclaration> result = new HashSet<IStereotypeDeclaration>();
+ for (AnnotationDeclaration d: definition.getAnnotations()) {
+ if(d instanceof IStereotypeDeclaration) {
+ StereotypeDeclaration sd = (StereotypeDeclaration)d;
+ StereotypeElement s = getCDIProject().getStereotype(d.getTypeName());
+ sd.setStereotype(s);
+ result.add(sd);
+ }
+ }
+ return result;
+ }
+
+ public boolean isAlternative() {
+ return alternative != null;
+ }
+
+ public boolean isDependent() {
+ IType scope = getScope();
+ return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getFullyQualifiedName());
+ }
+
+ public boolean isEnabled() {
+ //if it is overrided by producer method which specializes it, return false!
+ return true;
+ }
+
+ public boolean isSpecializing() {
+ return specializes != null;
+ }
+
+ //same as ProducerField.getScope
+ public IType getScope() {
+ Set<IAnnotationDeclaration> ds = getScopeDeclarations();
+ if(!ds.isEmpty()) {
+ return ds.iterator().next().getType();
+ }
+ List<AnnotationDeclaration> ds2 = definition.getAnnotations();
+ for (AnnotationDeclaration d: ds2) {
+ int k = getCDIProject().getNature().getDefinitions().getAnnotationKind(d.getType());
+ if(k == AnnotationDefinition.STEREOTYPE) {
+ AnnotationDefinition a = getCDIProject().getNature().getDefinitions().getAnnotation(d.getType());
+ ds = ProducerField.getScopeDeclarations(getCDIProject().getNature(), a.getAnnotations());
+ if(!ds.isEmpty()) {
+ return ds.iterator().next().getType();
+ }
+ }
+ }
+ try {
+ return EclipseJavaUtil.findType(getMethod().getJavaProject(), CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME);
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ public Set<IAnnotationDeclaration> getScopeDeclarations() {
+ return ProducerField.getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeDeclaration.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeDeclaration.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeDeclaration.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,25 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import org.jboss.tools.cdi.core.IStereotype;
+import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+
+public class StereotypeDeclaration extends AnnotationDeclaration implements IStereotypeDeclaration {
+ protected StereotypeElement stereotype;
+
+ public StereotypeDeclaration(AnnotationDeclaration d) {
+ annotation = d.annotation;
+ startPosition = d.startPosition;
+ length = d.length;
+ annotationTypeName = d.annotationTypeName;
+ type = d.type;
+ }
+
+ public IStereotype getStereotype() {
+ return stereotype;
+ }
+
+ public void setStereotype(StereotypeElement stereotype) {
+ this.stereotype = stereotype;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeDeclaration.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,87 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
+import org.jboss.tools.cdi.core.IStereotype;
+import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+
+public class StereotypeElement extends CDIElement implements IStereotype {
+ AnnotationDefinition definition;
+ protected AnnotationDeclaration named;
+ protected AnnotationDeclaration alternative;
+
+ public StereotypeElement() {}
+
+ public void setDefinition(AnnotationDefinition definition) {
+ this.definition = definition;
+ setAnnotations(definition.getAnnotations());
+ }
+
+ protected void setAnnotations(List<AnnotationDeclaration> ds) {
+ for (AnnotationDeclaration d: ds) {
+ String typeName = d.getTypeName();
+ if(CDIConstants.NAMED_QUALIFIER_TYPE_NAME.equals(typeName)) {
+ named = d;
+ } else if(CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME.equals(typeName)) {
+ alternative = d;
+ }
+ }
+ }
+
+ public IAnnotationDeclaration getAlternativeDeclaration() {
+ return alternative;
+ }
+
+ public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
+ // TODO
+ return new HashSet<IInterceptorBindingDeclaration>();
+ }
+
+ public IAnnotation getNameLocation() {
+ return named != null ? named.getDeclaration() : null;
+ }
+
+ public IType getSourceType() {
+ return definition.getType();
+ }
+
+ public Set<IStereotypeDeclaration> getStereotypeDeclarations() {
+ Set<IStereotypeDeclaration> result = new HashSet<IStereotypeDeclaration>();
+ for (AnnotationDeclaration d: definition.getAnnotations()) {
+ if(d instanceof IStereotypeDeclaration) {
+ result.add((IStereotypeDeclaration)d);
+ }
+ }
+ return result;
+ }
+
+ public boolean isAlternative() {
+ if(alternative != null) return true;
+ return alternative != null;
+ }
+
+ public IType getScope() {
+ Set<IAnnotationDeclaration> ss = getScopeDeclarations();
+ if(!ss.isEmpty()) {
+ return ss.iterator().next().getType();
+ }
+ Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ds) {
+
+ }
+ return null;
+ }
+
+ public Set<IAnnotationDeclaration> getScopeDeclarations() {
+ return ProducerField.getScopeDeclarations(getCDIProject().getNature(), definition.getAnnotations());
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -0,0 +1,30 @@
+package org.jboss.tools.cdi.internal.core.impl;
+
+import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.ITypeDeclaration;
+
+public class TypeDeclaration implements ITypeDeclaration {
+ IType type;
+ int length;
+ int startPosition;
+
+ public TypeDeclaration() {}
+
+ TypeDeclaration(IType type, int startPosition, int length) {
+ this.type = type;
+ this.length = length;
+ this.startPosition = startPosition;
+ }
+
+ public IType getType() {
+ return type;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public int getStartPosition() {
+ return startPosition;
+ }
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/TypeDeclaration.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -7,12 +7,16 @@
import org.eclipse.jdt.core.IAnnotatable;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.internal.core.impl.AnnotationDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.StereotypeDeclaration;
public abstract class AbstractMemberDefinition {
protected List<AnnotationDeclaration> annotations = new ArrayList<AnnotationDeclaration>();
protected IAnnotatable member;
+ protected AnnotationDeclaration injectAnnotation;
+ protected AnnotationDeclaration producesAnnotation;
public AbstractMemberDefinition() {}
@@ -30,11 +34,24 @@
for (int i = 0; i < ts.length; i++) {
AnnotationDeclaration a = new AnnotationDeclaration();
a.setDeclaration(ts[i], contextType);
+ if(context.getAnnotationKind(a.getType()) == AnnotationDefinition.STEREOTYPE) {
+ a = new StereotypeDeclaration(a);
+ }
annotations.add(a);
+ if(CDIConstants.INJECT_ANNOTATION_TYPE_NAME.equals(a.getTypeName())) {
+ injectAnnotation = a;
+ } else if(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME.equals(a.getTypeName())) {
+ producesAnnotation = a;
+ }
}
}
public List<AnnotationDeclaration> getAnnotations() {
return annotations;
}
+
+ public boolean isCDIAnnotated() {
+ return injectAnnotation != null || producesAnnotation != null;
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -15,6 +15,7 @@
public static final int QUALIFIER = 3; //has Qualifier
public static final int STEREOTYPE = 4; //has Stereotype
public static final int INTERCEPTOR_BINDING = 5; //has InterceptorBinding
+ public static final int SCOPE = 6; //has Scope or NormalScope
//TODO add other definition kinds of interest
protected int kind = NON_RELEVANT;
@@ -43,16 +44,19 @@
ds.put(typeName, a);
}
- if(ds.containsKey(CDIConstants.STEREOTYPE_ANNOTATION_TYPE_NAME)) {
+ if(ds.containsKey(CDIConstants.SCOPE_ANNOTATION_TYPE_NAME)
+ || ds.containsKey(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME)) {
+ kind = SCOPE;
+ } else if(ds.containsKey(CDIConstants.STEREOTYPE_ANNOTATION_TYPE_NAME)) {
kind = STEREOTYPE;
} else if(ds.containsKey(CDIConstants.QUALIFIER_ANNOTATION_TYPE_NAME)) {
kind = QUALIFIER;
} else if(ds.containsKey(CDIConstants.INTERCEPTOR_BINDING_ANNOTATION_TYPE_NAME)) {
kind = INTERCEPTOR_BINDING;
} else if(AnnotationHelper.BASIC_ANNOTATION_TYPES.contains(qualifiedName)) {
- kind = AnnotationDefinition.BASIC;
+ kind = AnnotationDefinition.BASIC;
} else if(AnnotationHelper.CDI_ANNOTATION_TYPES.contains(qualifiedName)) {
- kind = AnnotationDefinition.CDI;
+ kind = AnnotationDefinition.CDI;
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationHelper.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationHelper.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationHelper.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -9,6 +9,7 @@
public static final Set<String> BASIC_ANNOTATION_TYPES = new HashSet<String>();
public static final Set<String> CDI_ANNOTATION_TYPES = new HashSet<String>();
public static final Set<String> SCOPE_ANNOTATION_TYPES = new HashSet<String>();
+ public static final Set<String> STEREOTYPE_ANNOTATION_TYPES = new HashSet<String>();
{
BASIC_ANNOTATION_TYPES.add(INHERITED_ANNOTATION_TYPE_NAME);
@@ -19,6 +20,10 @@
SCOPE_ANNOTATION_TYPES.add(CONVERSATION_SCOPED_ANNOTATION_TYPE_NAME);
SCOPE_ANNOTATION_TYPES.add(REQUEST_SCOPED_ANNOTATION_TYPE_NAME);
SCOPE_ANNOTATION_TYPES.add(SESSION_SCOPED_ANNOTATION_TYPE_NAME);
+ SCOPE_ANNOTATION_TYPES.add(DEPENDENT_ANNOTATION_TYPE_NAME);
+
+ STEREOTYPE_ANNOTATION_TYPES.add(MODEL_STEREOTYPE_TYPE_NAME);
+ STEREOTYPE_ANNOTATION_TYPES.add(DECORATOR_STEREOTYPE_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(QUALIFIER_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(NAMED_QUALIFIER_TYPE_NAME);
@@ -26,16 +31,17 @@
CDI_ANNOTATION_TYPES.add(DEFAULT_QUALIFIER_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(NEW_QUALIFIER_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(STEREOTYPE_ANNOTATION_TYPE_NAME);
- CDI_ANNOTATION_TYPES.add(MODEL_STEREOTYPE_TYPE_NAME);
- CDI_ANNOTATION_TYPES.add(DECORATOR_STEREOTYPE_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(TYPED_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(PRODUCES_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(SCOPE_ANNOTATION_TYPE_NAME);
+ CDI_ANNOTATION_TYPES.add(NORMAL_SCOPE_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(PROVIDER_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(INJECT_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(ALTERNATIVE_ANNOTATION_TYPE_NAME);
CDI_ANNOTATION_TYPES.add(INTERCEPTOR_BINDING_ANNOTATION_TYPE_NAME);
+
CDI_ANNOTATION_TYPES.addAll(SCOPE_ANNOTATION_TYPES);
+ CDI_ANNOTATION_TYPES.addAll(STEREOTYPE_ANNOTATION_TYPES);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -1,7 +1,9 @@
package org.jboss.tools.cdi.internal.core.impl.definition;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -15,14 +17,17 @@
protected CDICoreNature project;
protected IJavaProject javaProject;
- Set<IType> types = new HashSet<IType>();
- Map<IPath, Set<IType>> resources = new HashMap<IPath, Set<IType>>();
- Map<IType, AbstractTypeDefinition> typeDefinitions = new HashMap<IType, AbstractTypeDefinition>();
- Map<IType, AnnotationDefinition> annotations = new HashMap<IType, AnnotationDefinition>();
+ Set<String> types = new HashSet<String>();
+ Map<IPath, Set<String>> resources = new HashMap<IPath, Set<String>>();
+ Map<String, AbstractTypeDefinition> typeDefinitions = new HashMap<String, AbstractTypeDefinition>();
+ Map<String, AnnotationDefinition> annotations = new HashMap<String, AnnotationDefinition>();
+ DefinitionContext workingCopy;
+ DefinitionContext original;
+
public DefinitionContext() {}
- public DefinitionContext copy() {
+ private DefinitionContext copy() {
DefinitionContext copy = new DefinitionContext();
copy.project = project;
copy.javaProject = javaProject;
@@ -41,31 +46,40 @@
return project;
}
- public void addType(IPath file, IType type, AbstractTypeDefinition def) {
+ public void addType(IPath file, String typeName, AbstractTypeDefinition def) {
if(file != null) {
- Set<IType> ts = resources.get(file);
+ Set<String> ts = resources.get(file);
if(ts == null) {
- ts = new HashSet<IType>();
+ ts = new HashSet<String>();
resources.put(file, ts);
}
- ts.add(type);
- types.add(type);
+ ts.add(typeName);
+ types.add(typeName);
}
if(def != null) {
- typeDefinitions.put(type, def);
if(def instanceof AnnotationDefinition) {
- annotations.put(type, (AnnotationDefinition)def);
+ synchronized (annotations) {
+ annotations.put(def.getQualifiedName(), (AnnotationDefinition)def);
+ }
+ } else {
+ synchronized (typeDefinitions) {
+ typeDefinitions.put(def.getQualifiedName(), def);
+ }
}
}
}
public void clean(IPath path) {
- Set<IType> ts = resources.remove(path);
+ Set<String> ts = resources.remove(path);
if(ts == null) return;
- for (IType t: ts) {
+ for (String t: ts) {
types.remove(t);
- typeDefinitions.remove(t);
- annotations.remove(t);
+ synchronized (typeDefinitions) {
+ typeDefinitions.remove(t);
+ }
+ synchronized (annotations) {
+ annotations.remove(t);
+ }
}
}
@@ -75,11 +89,19 @@
if(d != null) {
return d.getKind();
}
+ String name = annotationType.getFullyQualifiedName();
//? use cache for basic?
- if(types.contains(annotationType)) {
+ if(types.contains(name)) {
return AnnotationDefinition.NON_RELEVANT;
}
- String name = annotationType.getFullyQualifiedName();
+ if(AnnotationHelper.SCOPE_ANNOTATION_TYPES.contains(name)) {
+ createAnnotation(annotationType, name);
+ return AnnotationDefinition.SCOPE;
+ }
+ if(AnnotationHelper.STEREOTYPE_ANNOTATION_TYPES.contains(name)) {
+ createAnnotation(annotationType, name);
+ return AnnotationDefinition.STEREOTYPE;
+ }
if(AnnotationHelper.BASIC_ANNOTATION_TYPES.contains(name)) {
return AnnotationDefinition.BASIC;
}
@@ -87,15 +109,59 @@
return AnnotationDefinition.CDI;
}
- d = new AnnotationDefinition();
+ return createAnnotation(annotationType, name);
+ }
+
+ private int createAnnotation(IType annotationType, String name) {
+ AnnotationDefinition d = new AnnotationDefinition();
d.setType(annotationType, this);
int kind = d.getKind();
if(kind <= AnnotationDefinition.CDI) {
d = null;
}
- addType(annotationType.getPath(), annotationType, d);
+ addType(annotationType.getPath(), name, d);
return kind;
}
+ public DefinitionContext getWorkingCopy() {
+ if(original != null) {
+ return this;
+ }
+ if(workingCopy != null) {
+ return workingCopy;
+ }
+ workingCopy = copy();
+ workingCopy.original = this;
+ return workingCopy;
+ }
+
+ public void applyWorkingCopy() {
+ if(original != null) {
+ original.applyWorkingCopy();
+ return;
+ }
+ if(workingCopy == null) {
+ return;
+ }
+ //TODO
+
+ workingCopy = null;
+ }
+
+ public AnnotationDefinition getAnnotation(IType type) {
+ String name = type.getFullyQualifiedName();
+ return annotations.get(name);
+ }
+
+ public List<AnnotationDefinition> getAllAnnotations() {
+ List<AnnotationDefinition> result = new ArrayList<AnnotationDefinition>();
+ synchronized (annotations) {
+ result.addAll(annotations.values());
+ }
+ return result;
+
+ }
+
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -6,6 +6,7 @@
public class MethodDefinition extends AbstractMemberDefinition {
IMethod method;
+ boolean isConstructor;
public MethodDefinition() {}
@@ -18,9 +19,20 @@
return method;
}
+ public boolean isConstructor() {
+ return isConstructor();
+ }
+
protected void init(IType contextType, DefinitionContext context) throws CoreException {
super.init(contextType, context);
- //TODO process parameters
+ isConstructor = method.isConstructor();
+ //TODO process parameters for disposers and observers
}
+
+ public boolean isCDIAnnotated() {
+ //TODO return true if it is disposer or observer
+ return super.isCDIAnnotated();
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -27,8 +27,7 @@
for (int i = 0; i < fs.length; i++) {
FieldDefinition f = new FieldDefinition();
f.setField(fs[i], context);
- int k = getMaxAnnotationKind(f.getAnnotations(), context);
- if(k >= AnnotationDefinition.CDI) {
+ if(f.isCDIAnnotated()) {
fields.add(f);
}
}
@@ -36,20 +35,10 @@
for (int i = 0; i < ms.length; i++) {
MethodDefinition m = new MethodDefinition();
m.setMethod(ms[i], context);
- int k = getMaxAnnotationKind(m.getAnnotations(), context);
- if(k >= AnnotationDefinition.CDI) {
+ if(m.isCDIAnnotated()) {
methods.add(m);
}
}
}
- private int getMaxAnnotationKind(List<AnnotationDeclaration> as, DefinitionContext context) throws CoreException {
- int result = -1;
- for (AnnotationDeclaration a: as) {
- int k = context.getAnnotationKind(a.getType());
- if(k > result) result = k;
- }
- return result;
- }
-
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java 2009-12-08 16:20:31 UTC (rev 19109)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java 2009-12-08 17:40:31 UTC (rev 19110)
@@ -35,7 +35,7 @@
}
public void build(FileSet fileSet, CDICoreNature projectNature) {
- DefinitionContext context = projectNature.getDefinitions().copy();
+ DefinitionContext context = projectNature.getDefinitions().getWorkingCopy();
Set<IPath> ps = fileSet.getAllPaths();
for (IPath p: ps) context.clean(p);
context.setProject(projectNature);
@@ -59,11 +59,10 @@
for (IType type: ts) {
TypeDefinition def = new TypeDefinition();
def.setType(type, context);
- context.addType(f, type, def);
+ context.addType(f, type.getFullyQualifiedName(), def);
}
}
- projectNature.registerDefinitions(context);
}
}
15 years, 1 month
JBoss Tools SVN: r19109 - trunk/bpel/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-12-08 11:20:31 -0500 (Tue, 08 Dec 2009)
New Revision: 19109
Modified:
trunk/bpel/releng/build.properties.example.linux
Log:
updated deps
Modified: trunk/bpel/releng/build.properties.example.linux
===================================================================
--- trunk/bpel/releng/build.properties.example.linux 2009-12-08 15:48:26 UTC (rev 19108)
+++ trunk/bpel/releng/build.properties.example.linux 2009-12-08 16:20:31 UTC (rev 19109)
@@ -12,7 +12,7 @@
mainFeatureToBuildID=org.jboss.tools.bpel.sdk.feature
testFeatureToBuildID=org.jboss.tools.bpel.tests.feature
-build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
+build.steps=buildUpdate,buildTests,generateDigests,testLocal,publish,cleanup
# Re-use local sources?
# note: to run tests locally, these plugins must be pre-checked out into the local source folder:
@@ -33,13 +33,15 @@
http://repository.jboss.org/eclipse/galileo/emf-runtime-2.5.0.zip,\
http://repository.jboss.org/eclipse/galileo/xsd-runtime-2.5.0.zip,\
http://repository.jboss.org/eclipse/galileo/wtp-R-3.1.1-20090917225226.zip,\
-http://repository.jboss.org/eclipse/galileo/dtp_1.7.1.zip,\
-http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
+http://repository.jboss.org/eclipse/galileo/dtp_1.7.1.zip
+#http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
#http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz
# use precompiled binaries from latest build as input to this build
-repositoryURLs=http://download.eclipse.org/releases/galileo/,http://download.jboss.org/jbosstools/updates/nightly/trunk/
-pluginIDsToInstall=org.jboss.ide.eclipse.as.wtp.core+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.eclipse.core.net
+repositoryURLs=http://download.jboss.org/jbosstools/updates/nightly/trunk/,\
+http://repository.jboss.org/eclipse/galileo/eclipse-Update-R-3.5.1-200909170800.zip
+#,http://download.eclipse.org/releases/galileo/
+IUsToInstall=org.eclipse.sdk.feature.group+org.eclipse.sdk.ide+org.eclipse.core.net+org.eclipse.equinox.common+org.eclipse.core.runtime+org.eclipse.wst.common.emfworkbench.integration+org.eclipse.wst.xml.core+org.jboss.ide.eclipse.as.wtp.core+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group
flattenDependencies=true
parallelCompilation=true
15 years, 1 month
JBoss Tools SVN: r19108 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-12-08 10:48:26 -0500 (Tue, 08 Dec 2009)
New Revision: 19108
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5414 fixed build compilation error.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java 2009-12-08 14:28:41 UTC (rev 19107)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java 2009-12-08 15:48:26 UTC (rev 19108)
@@ -60,9 +60,5 @@
public static JstlTemplatePlugin getDefault() {
return plugin;
}
-
- @Override
- public String getId() {
- return PLUGIN_ID;
- }
+
}
\ No newline at end of file
15 years, 1 month
JBoss Tools SVN: r19107 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-12-08 09:28:41 -0500 (Tue, 08 Dec 2009)
New Revision: 19107
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameSeamContextVariableProcessor.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5401
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-12-08 14:26:21 UTC (rev 19106)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-12-08 14:28:41 UTC (rev 19107)
@@ -58,6 +58,9 @@
if(component != null){
checkDeclarations(component);
+ if(status.hasFatalError())
+ return status;
+
rootChange = new CompositeChange(SeamCoreMessages.RENAME_SEAM_COMPONENT_PROCESSOR_TITLE);
renameComponent(pm, component);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameSeamContextVariableProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameSeamContextVariableProcessor.java 2009-12-08 14:26:21 UTC (rev 19106)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameSeamContextVariableProcessor.java 2009-12-08 14:28:41 UTC (rev 19107)
@@ -65,6 +65,9 @@
if(component != null){
checkDeclarations(component);
+ if(status.hasFatalError())
+ return status;
+
renameComponent(pm, component);
}else{
renameSeamContextVariable(pm, file);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2009-12-08 14:26:21 UTC (rev 19106)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2009-12-08 14:28:41 UTC (rev 19107)
@@ -304,19 +304,19 @@
protected void checkDeclarations(ISeamComponent component) throws CoreException{
if(component.getJavaDeclaration() != null){
- if(SeamUtil.isJar(component.getJavaDeclaration()) && component.getJavaDeclaration().getName() != null)
+ if(component.getJavaDeclaration().getResource() == null)
+ status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
+ else if(SeamUtil.isJar(component.getJavaDeclaration()) && component.getJavaDeclaration().getName() != null)
status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), component.getJavaDeclaration().getResource().getFullPath().toString()}));
- else if(component.getJavaDeclaration().getResource() == null)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
}
Set<ISeamXmlComponentDeclaration> xmlDecls = component.getXmlDeclarations();
for(ISeamXmlComponentDeclaration xmlDecl : xmlDecls){
- if(SeamUtil.isJar(xmlDecl) && xmlDecl.getName() != null)
+ if(xmlDecl.getResource() == null)
+ status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
+ else if(SeamUtil.isJar(xmlDecl) && xmlDecl.getName() != null)
status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR, new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
- else if(xmlDecl.getResource() == null)
- status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION, new String[]{component.getName()}));
}
}
15 years, 1 month
JBoss Tools SVN: r19106 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-12-08 09:26:21 -0500 (Tue, 08 Dec 2009)
New Revision: 19106
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5383
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2009-12-08 14:23:59 UTC (rev 19105)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2009-12-08 14:26:21 UTC (rev 19106)
@@ -56,7 +56,7 @@
Set<IType> getLegalTypes();
/**
- * Obtains the all type declarations of the bean class or producer method or
+ * Obtains all the type declarations of the bean class or producer method or
* field (legal types as well as illegal ones).
*
* @return the type declarations
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-12-08 14:23:59 UTC (rev 19105)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-12-08 14:26:21 UTC (rev 19106)
@@ -86,16 +86,16 @@
Set<IBean> getBeans(IPath path);
/**
- * Returns the all available qualifier types.
+ * Returns all the available qualifier types.
*
- * @return the all available qualifier types.
+ * @return all the available qualifier types.
*/
Set<IType> getQualifierTypes();
/**
- * Returns the all available stereotypes.
+ * Returns all the available stereotypes.
*
- * @return the all available stereotypes.
+ * @return all the available stereotypes.
*/
Set<IType> getStereotypes();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java 2009-12-08 14:23:59 UTC (rev 19105)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IParameter.java 2009-12-08 14:26:21 UTC (rev 19106)
@@ -22,9 +22,9 @@
public interface IParameter extends IBeanMember {
/**
- * Returns the all annotations of this parameter.
+ * Returns all the annotations of this parameter.
*
- * @return the all annotations of this parameter.
+ * @return all the annotations of this parameter.
*/
Set<IAnnotationDeclaration> getAnnotationDeclarations();
15 years, 1 month
JBoss Tools SVN: r19105 - branches/jbosstools-3.1.0.RC1/jsf/plugins/org.jboss.tools.jsf.vpe.seam.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-12-08 09:23:59 -0500 (Tue, 08 Dec 2009)
New Revision: 19105
Modified:
branches/jbosstools-3.1.0.RC1/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties
Log:
Fixed junit failures with seam-pdf components.
Modified: branches/jbosstools-3.1.0.RC1/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties
===================================================================
--- branches/jbosstools-3.1.0.RC1/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties 2009-12-08 14:22:03 UTC (rev 19104)
+++ branches/jbosstools-3.1.0.RC1/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties 2009-12-08 14:23:59 UTC (rev 19105)
@@ -6,6 +6,8 @@
lib/,\
lib/antlr.jar,\
templates/,\
- plugin.properties
+ plugin.properties,\
+ resources/
src.includes = templates/,\
- src/
+ src/,\
+ resources/
15 years, 1 month