Hello
by jbosstools-commits@lists.jboss.org
Hi, how are you?
if you would like to chat sometime?
You can email me anytime as im just going to be unpacking for a few days and have no friends here yet.
I hope that we can chat some more and get to know each other.
Hope to hear from you soon My email is Lauryn(a)emailfriendz.com
15 years
JBoss Tools SVN: r19586 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui: wizards/project and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-25 09:02:29 -0500 (Fri, 25 Dec 2009)
New Revision: 19586
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5573
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-12-25 13:23:26 UTC (rev 19585)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-12-25 14:02:29 UTC (rev 19586)
@@ -506,8 +506,16 @@
}
if(webroot != null) {
IFolder f = project.getFolder("WEB-ROOT"); //$NON-NLS-1$
- if(!f.exists()) f.createLink(new Path(webroot), IFolder.FORCE, null);
- setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT"); //$NON-NLS-1$
+ if(f.exists()) {
+ setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT"); //$NON-NLS-1$
+ } else if(project.exists() && webroot.startsWith(project.getLocation().toString().replace('\\', '/') + "/")) {
+ f = project.getFolder(webroot.substring(project.getLocation().toString().replace('\\', '/').length() + 1));
+ }
+ if(!f.exists()) {
+ f = project.getFolder("WEB-ROOT"); //$NON-NLS-1$
+ f.createLink(new Path(webroot), IFolder.FORCE, null);
+ setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT"); //$NON-NLS-1$
+ }
}
if(javaRoot != null && javaRoot.length > 0 && javaRoot[0].length() > 0) {
IFolder f = project.getFolder("src"); //$NON-NLS-1$
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizard.java 2009-12-25 13:23:26 UTC (rev 19585)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizard.java 2009-12-25 14:02:29 UTC (rev 19586)
@@ -41,10 +41,10 @@
import org.jboss.tools.jst.web.ui.WebUiPlugin;
public abstract class ImportWebProjectWizard extends Wizard implements IImportWizard {
- public static final String IMPORT_WEB_PROJECT_WIZARD_PROJECT_LOCATION = "IMPORT_STRUTS_PROJECT_WIZARD_PROJECT_LOCATION"; //$NON-NLS-1$
- public static final String IMPORT_WEB_PROJECT_SELECT_WEB_XML = "IMPORT_STRUTS_PROJECT_SELECT_WEB_XML"; //$NON-NLS-1$
- public static final String IMPORT_WEB_PROJECT_WIZARD_PROJECT_FOLDERS = "IMPORT_STRUTS_PROJECT_WIZARD_PROJECT_FOLDERS"; //$NON-NLS-1$
- public static final String IMPORT_WEB_PROJECT_SELECT_PROJECT_FOLDERS = "IMPORT_STRUTS_PROJECT_SELECT_PROJECT_FOLDERS"; //$NON-NLS-1$
+ public static final String IMPORT_WEB_PROJECT_WIZARD_PROJECT_LOCATION = "IMPORT_WEB_PROJECT_WIZARD_PROJECT_LOCATION"; //$NON-NLS-1$
+ public static final String IMPORT_WEB_PROJECT_SELECT_WEB_XML = "IMPORT_WEB_PROJECT_SELECT_WEB_XML"; //$NON-NLS-1$
+ public static final String IMPORT_WEB_PROJECT_WIZARD_PROJECT_FOLDERS = "IMPORT_WEB_PROJECT_WIZARD_PROJECT_FOLDERS"; //$NON-NLS-1$
+ public static final String IMPORT_WEB_PROJECT_SELECT_PROJECT_FOLDERS = "IMPORT_WEB_PROJECT_SELECT_PROJECT_FOLDERS"; //$NON-NLS-1$
protected IWorkbench workbench;
protected IStructuredSelection selection;
15 years
JBoss Tools SVN: r19585 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-25 08:23:26 -0500 (Fri, 25 Dec 2009)
New Revision: 19585
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5573
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-12-25 11:30:52 UTC (rev 19584)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-12-25 13:23:26 UTC (rev 19585)
@@ -575,11 +575,21 @@
}
IResource sr = s.getResource();
if(sr == null) return null;
- if(!sr.getFullPath().isPrefixOf(resource.getFullPath())) return null;
- String path = resource.getFullPath().toString();
- String rootpath = sr.getFullPath().toString();
- String relpath = path.substring(rootpath.length()).replace('\\', '/');
- if(relpath.length() == 0) return s;
+ String relpath = null;
+ if(sr.getFullPath().isPrefixOf(resource.getFullPath())) {
+ String path = resource.getFullPath().toString();
+ String rootpath = sr.getFullPath().toString();
+ relpath = path.substring(rootpath.length()).replace('\\', '/');
+ if(relpath.length() == 0) return s;
+ } else if(sr.getLocation() != null && resource.getLocation() != null
+ && sr.getLocation().isPrefixOf(resource.getLocation())) {
+ String path = resource.getLocation().toString();
+ String rootpath = sr.getLocation().toString();
+ relpath = path.substring(rootpath.length()).replace('\\', '/');
+ if(relpath.length() == 0) return s;
+ }
+
+ if(relpath == null) return null;
XModelObject o = s.getChildByPath(relpath.substring(1));
if(o == null && resource.exists()) {
@@ -591,7 +601,9 @@
while(p != null && !XModelObjectConstants.TRUE.equals(p.get("overlapped"))) p = p.getParent(); //$NON-NLS-1$
if(p == null) {
IResource r = (IResource)o.getAdapter(IResource.class);
- if(r == null || !resource.getFullPath().equals(r.getFullPath())) {
+ if(r == null || (!resource.getFullPath().equals(r.getFullPath())
+ && (resource.getLocation() == null || r.getLocation() == null || !resource.getLocation().equals(r.getLocation()))
+ )) {
//failure, more detailed file system is needed.
return null;
}
15 years
JBoss Tools SVN: r19584 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-25 06:30:52 -0500 (Fri, 25 Dec 2009)
New Revision: 19584
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2009-12-25 11:30:52 UTC (rev 19584)
@@ -0,0 +1,190 @@
+Definition Errors
+
+2.2.2. Restricting the bean types of a bean
+- bean class or producer method or field specifies a @Typed annotation,
+ and the value member specifies a class which does not correspond to a type
+ in the unrestricted set of bean types of a bean
+
+2.4.3. Declaring the bean scope
+- bean class or producer method or field specifies multiple scope type annotations
+
+2.4.4. Default scope
+- bean does not explicitly declare a scope when there is no default scope
+ (there are two different stereotypes declared by the bean that declare different default scopes)
+
+2.7.1.1. Declaring the default scope for a stereotype
+- stereotype declares more than one scope
+
+2.7.1.3. Declaring a @Named stereotype
+- stereotype declares a non-empty @Named annotation
+
+3.1. Managed beans
+- the bean class of a managed bean is annotated with both
+ the @Interceptor and @Decorator stereotypes
+- managed bean with a public field declares any scope other than @Dependent
+- managed bean with a parameterized bean class declares any scope other than @Dependent
+
+3.1.4. Specializing a managed bean
+- managed bean class annotated @Specializes does not directly extend
+ the bean class of another managed bean
+
+3.2. Session beans
+
+- session bean specifies an illegal scope (a stateless session bean must belong
+ to the @Dependent pseudo-scope; a singleton bean must belong to either the
+ @ApplicationScoped scope or to the @Dependent pseudo-scope, a stateful session
+ bean may have any scope)
+- bean class of a session bean is annotated @Interceptor or @Decorator
+- session bean with a parameterized bean class declares any scope other than @Dependent
+
+3.2.4. Specializing a session bean
+- session bean class annotated @Specializes does not directly extend
+ the bean class of another session bean
+
+3.3. Producer methods
+- producer method return type contains a wildcard type parameter
+- producer method with a parameterized return type with a type variable declares
+ any scope other than @Dependent
+- producer method return type is a type variable
+
+3.3.2. Declaring a producer method
+- producer method is annotated @Inject
+- producer method has a parameter annotated @Disposes
+- producer method has a parameter annotated @Observes
+- non-static method of a session bean class is annotated @Produces, and the method
+ is not a business method of the session bean
+- interceptor or decorator has a method annotated @Produces
+
+3.3.3. Specializing a producer method
+- method annotated @Specializes is static or does not directly override another producer method
+
+3.3.6. Declaring a disposer method
+- method has more than one parameter annotated @Disposes
+- disposer method is annotated @Produces or @Inject or has a parameter annotated @Observes
+- non-static method of a session bean class has a parameter annotated @Disposes, and
+ the method is not a business method of the session bean
+- interceptor or decorator has a method annotated @Disposes
+
+3.3.7. Disposer method resolution
+- there is no producer method declared by the (same) bean class that is assignable
+ to the disposed parameter of a disposer method
+- there are multiple disposer methods for a single producer method
+
+3.4. Producer fields
+- producer field type contains a wildcard type parameter
+- producer field with a parameterized type with a type variable declares any
+ scope other than @Dependent
+- producer field type is a type variable
+
+3.4.2. Declaring a producer field
+- producer field is annotated @Inject
+- non-static field of a session bean class is annotated @Produces
+- interceptor or decorator has a field annotated @Produces
+
+3.5.1. Declaring a resource
+- producer field declaration specifies an EL name (together with one of
+ @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
+- matching object in the Java EE component environment is not of the same type
+ as the producer field declaration
+
+3.6. Additional built-in beans
+- Java EE component class has an injection point of type UserTransaction
+ and qualifier @Default, and may not validly make use of the JTA UserTransaction
+ according to the Java EE platform specification
+
+3.7.1. Declaring a bean constructor
+- bean class has more than one constructor annotated @Inject
+- bean constructor has a parameter annotated @Disposes, or @Observes
+
+3.8.1. Declaring an injected field
+- injected field is annotated @Produces
+
+3.9.1. Declaring an initializer method
+- generic method of a bean is annotated @Inject (initializer method is a non-abstract,
+ non-static, non-generic method of a bean class)
+
+3.11. The qualifier @Named at injection points
+- injection point other than injected field declares a @Named annotation that
+ does not specify the value member
+
+4.3.1. Direct and indirect specialization
+- X specializes Y but does not have some bean type of Y
+- X specializes Y and Y has a name and X declares a name explicitly, using @Named
+
+5.2.2. Legal injection point types
+- injection point type is a type variable
+
+5.5.7. Injection point metadata
+- bean that declares any scope other than @Dependent has an injection point of type
+ InjectionPoint and qualifier @Default
+- Java EE component class supporting injection that is not a bean has an injection
+ point of type InjectionPoint and qualifier @Default
+
+8.1.2. Decorator delegate injection points
+- decorator has more than one delegate injection point, or
+ does not have a delegate injection point
+- injection point that is not an injected field, initializer method parameter
+ or bean constructor method parameter is annotated @Delegate
+- bean class that is not a decorator has an injection point annotated @Delegate
+
+8.1.3. Decorated types of a decorator
+- delegate type does not implement or extend a decorated type of the decorator,
+ or specifies different type parameters
+
+9.2. Declaring the interceptor bindings of an interceptor
+- interceptor for lifecycle callbacks declares an interceptor binding type
+ that is defined @Target({TYPE, METHOD})
+
+9.3. Binding an interceptor to a bean
+- managed bean has a class level interceptor binding and is declared final
+ or has a non-static, non-private, final method
+- non-static, non-private, final method of a managed bean has a method level
+ interceptor binding
+
+9.5.2. Interceptor binding types with members
+- the set of interceptor bindings of a bean or interceptor, including bindings
+ inherited from stereotypes and other interceptor bindings, has two instances
+ of a certain interceptor binding type and the instances have different values
+ of some annotation member
+
+10.4.2. Declaring an observer method
+- method has more than one parameter annotated @Observes
+- observer method is annotated @Produces or @Inject or has a parameter annotated @Disposes
+- non-static method of a session bean class has a parameter annotated @Observes,
+ and the method is not a business method of the EJB
+- interceptor or decorator has a method with a parameter annotated @Observes
+
+10.4.3. Conditional observer methods
+- bean with scope @Dependent has an observer method declared receive=IF_EXISTS
+
+Non-Portable behavior
+
+2.4.1. Built-in scope types
+- interceptor or decorator has any scope other than @Dependent
+
+2.5.3. Beans with no EL name
+- interceptor or decorator has a name
+
+2.6.1. Declaring an alternative
+- interceptor or decorator is an alternative
+
+2.7.1.3. Declaring a @Named stereotype
+- stereotype declares any other qualifier annotation
+- stereotype is annotated @Typed
+
+4.3.1. Direct and indirect specialization
+- interceptor or decorator is annotated @Specializes
+
+5.2.5. Qualifier annotations with members
+- array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding
+
+9.2. Declaring the interceptor bindings of an interceptor
+- interceptor declared using @Interceptor does not declare any interceptor binding
+
+9.5.2. Interceptor binding types with members
+- array-valued or annotation-valued member of an interceptor binding type
+ is not annotated @Nonbinding
+
+12.1. Bean archives
+- bean class is deployed in two different bean archives
+
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years
JBoss Tools SVN: r19583 - in trunk/esb/plugins: org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-12-25 04:20:13 -0500 (Fri, 25 Dec 2009)
New Revision: 19583
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
Log:
JBIDE-5540: New ESB Project Wizard - Late Error Message: "Please specify the project primary target runtime"
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java 2009-12-25 09:20:03 UTC (rev 19582)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java 2009-12-25 09:20:13 UTC (rev 19583)
@@ -91,6 +91,9 @@
private String getProjectTargetRuntimeID(IProject project) throws CoreException{
IFacetedProject fp = ProjectFacetsManager.create(project);
IRuntime runtime = fp.getPrimaryRuntime();
+ if(runtime == null){
+ return "";
+ }
return runtime.getProperty("id");
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-12-25 09:20:03 UTC (rev 19582)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-12-25 09:20:13 UTC (rev 19583)
@@ -53,7 +53,7 @@
ESBFacetInstallationPage_Button_Text_New=New
ESBFacetInstallationPage_Default_SRC_Folder=src
ESBFacetInstallationPage_Description=Configure project structure and classpath
-ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime=Please specify the project primary target runtime
+ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime=The project primary target runtime is not specified, Server supplied ESB runtime will not be installed correctly.
ESBFacetInstallationPage_Error_Message_Invalid_ESB_Runtime=The specified target runtime does not contain a valid ESB {0} runtime .
ESBFacetInstallationPage_Error_Message_No_Target_Runtime=No target runtime was specified.
ESBFacetInstallationPage_Error_Message_Specify_Content_Folder=Please specify a valid content folder.
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2009-12-25 09:20:03 UTC (rev 19582)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2009-12-25 09:20:13 UTC (rev 19583)
@@ -358,8 +358,8 @@
if (ifpwc != null) {
IRuntime runtime = ifpwc.getPrimaryRuntime();
if (runtime == null) {
- setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime);
- hasRuntime = false;
+ setMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime, WARNING);
+ hasRuntime = true;
setPageComplete(isPageComplete());
return false;
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2009-12-25 09:20:03 UTC (rev 19582)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2009-12-25 09:20:13 UTC (rev 19583)
@@ -13,8 +13,10 @@
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jst.common.project.facet.JavaFacetUtils;
import org.eclipse.jst.common.project.facet.core.internal.JavaFacetUtil;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -39,9 +41,9 @@
return ESBProjectConstant.ESB_PROJECT_FACET;
}
- protected void createPresetPanel(Composite top) {
- new Label(top, SWT.NONE);
- }
+// protected void createPresetPanel(Composite top) {
+// new Label(top, SWT.NONE);
+// }
@Override
protected void validatePage() {
@@ -55,6 +57,11 @@
}
+ protected IDialogSettings getDialogSettings() {
+ return J2EEUIPlugin.getDefault().getDialogSettings();
+ }
+
+
@Override
protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion )
{
15 years
JBoss Tools SVN: r19582 - in branches/jbosstools-3.1.0.RC1/esb/plugins: org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-12-25 04:20:03 -0500 (Fri, 25 Dec 2009)
New Revision: 19582
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
Log:
JBIDE-5540: New ESB Project Wizard - Late Error Message: "Please specify the project primary target runtime"
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java 2009-12-24 19:54:08 UTC (rev 19581)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java 2009-12-25 09:20:03 UTC (rev 19582)
@@ -95,6 +95,9 @@
private String getProjectTargetRuntimeID(IProject project) throws CoreException{
IFacetedProject fp = ProjectFacetsManager.create(project);
IRuntime runtime = fp.getPrimaryRuntime();
+ if(runtime == null){
+ return "";
+ }
return runtime.getProperty("id");
}
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-12-24 19:54:08 UTC (rev 19581)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2009-12-25 09:20:03 UTC (rev 19582)
@@ -53,7 +53,7 @@
ESBFacetInstallationPage_Button_Text_New=New
ESBFacetInstallationPage_Default_SRC_Folder=src
ESBFacetInstallationPage_Description=Configure project structure and classpath
-ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime=Please specify the project primary target runtime
+ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime=The project primary target runtime is not specified, Server supplied ESB runtime will not be installed correctly.
ESBFacetInstallationPage_Error_Message_Invalid_ESB_Runtime=The specified target runtime does not contain a valid ESB {0} runtime .
ESBFacetInstallationPage_Error_Message_No_Target_Runtime=No target runtime was specified.
ESBFacetInstallationPage_Error_Message_Specify_Content_Folder=Please specify a valid content folder.
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2009-12-24 19:54:08 UTC (rev 19581)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2009-12-25 09:20:03 UTC (rev 19582)
@@ -358,8 +358,8 @@
if (ifpwc != null) {
IRuntime runtime = ifpwc.getPrimaryRuntime();
if (runtime == null) {
- setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime);
- hasRuntime = false;
+ setMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime, WARNING);
+ hasRuntime = true;
setPageComplete(isPageComplete());
return false;
}
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2009-12-24 19:54:08 UTC (rev 19581)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2009-12-25 09:20:03 UTC (rev 19582)
@@ -13,8 +13,10 @@
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jst.common.project.facet.JavaFacetUtils;
import org.eclipse.jst.common.project.facet.core.internal.JavaFacetUtil;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -39,9 +41,9 @@
return ESBProjectConstant.ESB_PROJECT_FACET;
}
- protected void createPresetPanel(Composite top) {
- new Label(top, SWT.NONE);
- }
+// protected void createPresetPanel(Composite top) {
+// new Label(top, SWT.NONE);
+// }
@Override
protected void validatePage() {
@@ -55,6 +57,11 @@
}
+ protected IDialogSettings getDialogSettings() {
+ return J2EEUIPlugin.getDefault().getDialogSettings();
+ }
+
+
@Override
protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion )
{
15 years
JBoss Tools SVN: r19581 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-12-24 14:54:08 -0500 (Thu, 24 Dec 2009)
New Revision: 19581
Modified:
workspace/snjeza/seam-examples/booking-mavenized.zip
Log:
https://jira.jboss.org/jira/browse/JBDS-1025 JBDS 2.1 "Seam Booking Example - EAR mavenized" does not build from commandline
Modified: workspace/snjeza/seam-examples/booking-mavenized.zip
===================================================================
(Binary files differ)
15 years
JBoss Tools SVN: r19580 - in trunk/jst: tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-12-24 13:31:05 -0500 (Thu, 24 Dec 2009)
New Revision: 19580
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component
Log:
JBIDE-5479: Changes to File in VPE Editor are saved even when user decide to not save them.
JBIDE-5478: "Unsupported Content Type" warning when reopening .jsp file.
Issues are fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-12-24 18:27:06 UTC (rev 19579)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-12-24 18:31:05 UTC (rev 19580)
@@ -354,10 +354,6 @@
return context;
}
- if (file == null) {
- System.out.println();
- }
-
IStructuredModel model = null;
try {
model = manager.getModelForRead(file);
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component 2009-12-24 18:27:06 UTC (rev 19579)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1807Test/.settings/org.eclipse.wst.common.component 2009-12-24 18:31:05 UTC (rev 19580)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
-<wb-module deploy-name="JsfJspJbide1807Test">
+<wb-module deploy-name="JsfJspJbide1813Test">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
-<property name="context-root" value="JsfJspJbide1807Test"/>
+<property name="context-root" value="JsfJspJbide1813Test"/>
<property name="java-output-path"/>
</wb-module>
</project-modules>
15 years
JBoss Tools SVN: r19579 - in trunk/jst: plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-12-24 13:27:06 -0500 (Thu, 24 Dec 2009)
New Revision: 19579
Added:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/WebContent/WEB-INF/
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/WebContent/WEB-INF/web.xml
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.project
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java
Log:
JBIDE-5479: Changes to File in VPE Editor are saved even when user decide to not save them.
JBIDE-5478: "Unsupported Content Type" warning when reopening .jsp file.
Issues are fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-12-24 17:04:18 UTC (rev 19578)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-12-24 18:27:06 UTC (rev 19579)
@@ -944,7 +944,8 @@
*/
protected TextRegion getELPrefix(ContentAssistRequest request) {
if (!DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE.equals(request.getRegion().getType()) &&
- !DOMRegionContext.XML_CONTENT.equals(request.getRegion().getType()))
+ !DOMRegionContext.XML_CONTENT.equals(request.getRegion().getType()) &&
+ !DOMRegionContext.BLOCK_TEXT.equals(request.getRegion().getType()))
return null;
String text = request.getDocumentRegion().getFullText(request.getRegion());
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-12-24 17:04:18 UTC (rev 19578)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-12-24 18:27:06 UTC (rev 19579)
@@ -41,9 +41,6 @@
import org.eclipse.jdt.ui.text.IJavaPartitions;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.rules.IToken;
@@ -112,7 +109,7 @@
* @author Alexey Kazakov
*/
@SuppressWarnings("restriction")
-public class PageContextFactory implements IResourceChangeListener, IDocumentListener {
+public class PageContextFactory implements IResourceChangeListener {
private static PageContextFactory fInstance;
private static final String XHTML_TAG_LIB_URI = "http://www.w3.org/1999/xhtml"; //$NON-NLS-1$
public static final String XML_PAGE_CONTEXT_TYPE = "XML_PAGE_CONTEXT_TYPE"; //$NON-NLS-1$
@@ -145,32 +142,18 @@
private void saveConvext(ELContext context) {
if (context != null && context.getResource() != null) {
-// int size = 0; // remove this line
synchronized (cache) {
cache.put(context.getResource(), context);
-// size = cache.size(); // remove this line
}
-// System.out.println("Saved Context : " +
-// (System.currentTimeMillis() - ctm) + "ms, "
-// + context.getResource().getFullPath().toString() + ", " + context.getClass().getSimpleName() + ", Totals: " + size);
}
}
private ELContext removeSavedContext(IFile resource) {
- ELContext removedContext = null; // Remove this line
+ ELContext removedContext = null;
synchronized (cache) {
removedContext = cache.remove(resource);
- if (removedContext instanceof XmlContextImpl &&
- ((XmlContextImpl)removedContext).getDocument() != null) {
- ((XmlContextImpl)removedContext).getDocument().removeDocumentListener(this);
- }
}
-
-// if (removedContext != null) { // TODO: Remove this statement
-// System.out.println("Removed Context : " + removedContext.getResource().getFullPath().toString() + ", " + removedContext.getClass().getSimpleName() + ", Totals: " + cache.size());
-// }
-
return removedContext;
}
@@ -346,15 +329,19 @@
* @return
*/
private ELContext createPageContext(IFile file, List<String> parents) {
- ELContext context = getSavedContext(file);
+ ELContext context = parents == null ? null : getSavedContext(file);
if (context != null) {
return context;
}
+ if (file == null)
+ return createPageContextInstance(null);
+
IContentType type = IDE.getContentType(file);
-
- if(JavaCore.JAVA_SOURCE_CONTENT_TYPE.equalsIgnoreCase(type.getId())) {
+ String typeId = (type == null ? null : type.getId());
+
+ if(JavaCore.JAVA_SOURCE_CONTENT_TYPE.equalsIgnoreCase(typeId)) {
context = createJavaContext(file);
- } else if(JAVA_PROPERTIES_CONTENT_TYPE.equalsIgnoreCase(type.getId())) {
+ } else if(JAVA_PROPERTIES_CONTENT_TYPE.equalsIgnoreCase(typeId)) {
context = createPropertiesContext(file);
} else {
// ctm = System.currentTimeMillis();
@@ -366,6 +353,11 @@
// there is no need to report it, just stop validation.
return context;
}
+
+ if (file == null) {
+ System.out.println();
+ }
+
IStructuredModel model = null;
try {
model = manager.getModelForRead(file);
@@ -400,14 +392,8 @@
}
}
- if (context != null) {
- if (context instanceof XmlContextImpl) {
- IDocument contextDocument = ((XmlContextImpl) context).getDocument();
- if (contextDocument != null) {
- contextDocument.addDocumentListener(this);
- }
- }
- saveConvext(context);
+ if (context != null && parents != null) {
+ saveConvext(context);
}
return context;
@@ -1138,35 +1124,4 @@
}
}
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentAboutToBeChanged(DocumentEvent event) {
- // Nothing to do
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentChanged(DocumentEvent event) {
- if (event.getDocument() == null)
- return;
-
- synchronized (cache) {
- // Remove all the contexts that are parent to the removed context
- ELContext[] contexts = cache.values().toArray(new ELContext[0]);
- if (contexts != null) {
- for (ELContext context : contexts) {
- if (context instanceof XmlContextImpl &&
- event.getDocument().equals(((XmlContextImpl)context).getDocument())) {
- cleanUp(context.getResource());
- return;
- }
- }
- }
- }
- }
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java 2009-12-24 17:04:18 UTC (rev 19578)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java 2009-12-24 18:27:06 UTC (rev 19579)
@@ -21,7 +21,6 @@
public class XmlContextImpl extends ELContextImpl implements IXmlContext {
protected IDocument document;
- private FileEditorInput editorInput;
// Fix for JBIDE-5097: It must be a map of <IRegion to Map of <NS-Prefix to NS>>
protected Map<IRegion, Map<String, INameSpace>> nameSpaces = new HashMap<IRegion, Map<String, INameSpace>>();
@@ -32,16 +31,14 @@
@Override
public void setResource(IFile resource) {
super.setResource(resource);
- if (this.document != null) {
- if (!resource.equals(editorInput.getFile())) {
- releaseConnectedDocument(editorInput);
- editorInput = null;
- }
- }
- if (editorInput == null)
- editorInput = new FileEditorInput(resource);
- document = getConnectedDocument(editorInput);
+ FileEditorInput editorInput = null;
+ try {
+ editorInput = new FileEditorInput(resource);
+ document = getConnectedDocument(editorInput);
+ } finally {
+ releaseConnectedDocument(editorInput);
+ }
}
/*
@@ -119,18 +116,6 @@
}
nameSpaces.get(region).put(nameSpace.getPrefix(), nameSpace); // Fix for JBIDE-5097
}
-
-
- /**
- * Disconnects the editor input from the document provider
- */
- @Override
- protected void finalize() throws Throwable {
- if (editorInput != null) {
- releaseConnectedDocument(editorInput);
- }
- super.finalize();
- }
private IDocument getConnectedDocument(IEditorInput input) {
IDocumentProvider provider= DocumentProviderRegistry.getDefault().getDocumentProvider(input);
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.project 2009-12-24 17:04:18 UTC (rev 19578)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/.project 2009-12-24 18:27:06 UTC (rev 19579)
@@ -21,5 +21,6 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
</natures>
</projectDescription>
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/WebContent/WEB-INF/web.xml 2009-12-24 18:27:06 UTC (rev 19579)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>JsfJspJbide1813Test</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/JsfJspJbide1813Test/WebContent/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java 2009-12-24 17:04:18 UTC (rev 19578)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/ContentAssistantTestCase.java 2009-12-24 18:27:06 UTC (rev 19579)
@@ -114,6 +114,13 @@
if (replacementStringParts[0].equalsIgnoreCase(proposalName)) return true;
}
+ // for an Unclosed EL the closing character is appended to the proposal string (i.e. person} )
+ // perform case sensitive compare operation
+ replacementStringParts = replacementString.split("}");
+ if (replacementStringParts != null && replacementStringParts.length > 0) {
+ if (replacementStringParts[0].equals(proposalName)) return true;
+ }
+
// For an attribute value proposal there will be the quote characters
replacementString = Utils.trimQuotes(replacementString);
if (replacementString.equalsIgnoreCase(proposalName)) return true;
15 years
JBoss Tools SVN: r19578 - 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-24 12:04:18 -0500 (Thu, 24 Dec 2009)
New Revision: 19578
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.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/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/DecoratorBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBean.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
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/AbstractBeanElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2009-12-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AbstractBeanElement.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -24,6 +24,7 @@
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IScopeDeclaration;
+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.AbstractMemberDefinition;
@@ -61,6 +62,16 @@
return null;
}
+ public boolean isAlternative() {
+ if(getDefinition().getAlternativeAnnotation() != null) return true;
+ Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ds) {
+ IStereotype s = d.getStereotype();
+ if(s != null && s.isAlternative()) return true;
+ }
+ return false;
+ }
+
public Set<IStereotypeDeclaration> getStereotypeDeclarations() {
Set<IStereotypeDeclaration> result = new HashSet<IStereotypeDeclaration>();
for (AnnotationDeclaration d: definition.getAnnotations()) {
Modified: 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 2009-12-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMember.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -58,8 +58,9 @@
return classBean;
}
- public void setClassBean(IClassBean classBean) {
+ public void setClassBean(ClassBean classBean) {
this.classBean = classBean;
+ setParent(classBean);
}
public IType getType() {
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-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -11,8 +11,10 @@
package org.jboss.tools.cdi.internal.core.impl;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.jdt.core.IAnnotation;
@@ -71,7 +73,7 @@
bm = new BeanMethod();
}
bm.setDefinition(m);
- bm.setParent(this);
+ bm.setClassBean(this);
methods.add(bm);
}
List<FieldDefinition> fs = definition.getFields();
@@ -86,7 +88,7 @@
bf = new BeanField();
}
bf.setDefinition(f);
- bf.setParent(this);
+ bf.setClassBean(this);
fields.add(bf);
}
}
@@ -108,10 +110,43 @@
public void setSuperClassBean(ClassBean bean) {
superClassBean = bean;
if(superClassBean != null && isSpecializing()) {
- superClassBean.specializingClassBeans.add(this);
+ superClassBean.addSpecializingClassBean(this);
}
+ if(bean != null) {
+ Map<String, ProducerMethod> thisProducers = getProducerMethodsForSignatures();
+ Map<String, ProducerMethod> superProducers = bean.getProducerMethodsForSignatures();
+ for (String s: thisProducers.keySet()) {
+ ProducerMethod thisProducer = thisProducers.get(s);
+ ProducerMethod superProducer = superProducers.get(s);
+ if(thisProducer != null && superProducer != null) {
+ if(thisProducer.getSpecializesAnnotationDeclaration() != null) {
+ thisProducer.setSpecializedBean(superProducer);
+ }
+ }
+ }
+ }
}
+ Map<String, ProducerMethod> getProducerMethodsForSignatures() {
+ Map<String, ProducerMethod> result = new HashMap<String, ProducerMethod>();
+ for (BeanMethod b: methods) {
+ if(b instanceof ProducerMethod) {
+ String s = b.getMethod().getElementName();
+ try {
+ s += ":" + b.getMethod().getSignature();
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ result.put(s, (ProducerMethod)b);
+ }
+ }
+ return result;
+ }
+
+ void addSpecializingClassBean(ClassBean bean) {
+ specializingClassBeans.add(bean);
+ }
+
public ClassBean getSuperClassBean() {
return superClassBean;
}
@@ -245,31 +280,35 @@
return getDefinition().getSpecializesAnnotation();
}
- public boolean isAlternative() {
- if(getDefinition().getAlternativeAnnotation() != null) return true;
- Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
- for (IStereotypeDeclaration d: ds) {
- IStereotype s = d.getStereotype();
- if(s != null && s.isAlternative()) return true;
- }
- return false;
- }
-
public boolean isDependent() {
IScope scope = getScope();
return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
+ boolean hasEnabledSpecializingClassBean() {
+ for (ClassBean sb: specializingClassBeans) {
+ if(sb.hasEnabledSpecializingClassBean() || sb.isEnabled()) return true;
+ }
+ return false;
+ }
+
public boolean isEnabled() {
- if(!specializingClassBeans.isEmpty()) {
+ if(hasEnabledSpecializingClassBean()) {
return false;
}
- if(getDefinition().getAlternativeAnnotation() != null) {
- if(!getCDIProject().isClassAlternativeActivated(getDefinition().getQualifiedName())) {
- return false;
+ if(isAlternative()) {
+ if(getCDIProject().isClassAlternativeActivated(getDefinition().getQualifiedName())) {
+ return true;
}
+ Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ds) {
+ IStereotype s = d.getStereotype();
+ if(s != null && s.isAlternative() && !getCDIProject().getAlternatives(s.getSourceType().getFullyQualifiedName()).isEmpty()) {
+ return true;
+ }
+ }
+ return false;
}
- // TODO
return true;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/DecoratorBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/DecoratorBean.java 2009-12-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/DecoratorBean.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -33,4 +33,8 @@
return getDefinition().getDecoratorAnnotation();
}
+ public boolean isEnabled() {
+ return !getCDIProject().getDecoratorClasses(getBeanClass().getFullyQualifiedName()).isEmpty();
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBean.java 2009-12-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBean.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -26,4 +26,8 @@
return getDefinition().getInterceptorAnnotation();
}
+ public boolean isEnabled() {
+ return !getCDIProject().getInterceptorClasses(getBeanClass().getFullyQualifiedName()).isEmpty();
+ }
+
}
Modified: 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 2009-12-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerField.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -107,22 +107,28 @@
return null;
}
- public boolean isAlternative() {
- if(getDefinition().getAlternativeAnnotation() != null) return true;
- Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
- for (IStereotypeDeclaration d: ds) {
- IStereotype s = d.getStereotype();
- if(s != null && s.isAlternative()) return true;
- }
- return false;
- }
-
public boolean isDependent() {
IScope scope = getScope();
return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
public boolean isEnabled() {
+ if(classBean != null && !classBean.isEnabled()) {
+ return false;
+ }
+ if(isAlternative()) {
+ if(classBean != null && !getCDIProject().getAlternatives(classBean.getBeanClass().getFullyQualifiedName()).isEmpty()) {
+ return true;
+ }
+ Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ds) {
+ IStereotype s = d.getStereotype();
+ if(s != null && s.isAlternative() && !getCDIProject().getAlternatives(s.getSourceType().getFullyQualifiedName()).isEmpty()) {
+ return true;
+ }
+ }
+ return false;
+ }
return true;
}
Modified: 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 2009-12-24 16:41:41 UTC (rev 19577)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2009-12-24 17:04:18 UTC (rev 19578)
@@ -44,6 +44,9 @@
public class ProducerMethod extends BeanMethod implements IProducerMethod {
protected AnnotationDeclaration produces;
+ ProducerMethod specialized = null;
+ Set<ProducerMethod> specializingProducerMethods = new HashSet<ProducerMethod>();
+
public ProducerMethod() {}
public void setDefinition(MethodDefinition definition) {
@@ -77,6 +80,10 @@
}
public String getName() {
+ ProducerMethod specialized = getSpecializedBean();
+ if(specialized != null) {
+ return specialized.getName();
+ }
AnnotationDeclaration named = findNamedAnnotation();
if(named == null) return null;
@@ -111,36 +118,56 @@
return null;
}
- public IBean getSpecializedBean() {
+ public void setSpecializedBean(ProducerMethod other) {
+ specialized = other;
+ if(other != null) {
+ other.specializingProducerMethods.add(this);
+ }
+ }
+
+ public ProducerMethod getSpecializedBean() {
if(getDefinition().getSpecializesAnnotation() == null) {
return null;
}
- //TODO find producer method in super type
-
- return null;
+ return specialized;
}
public IAnnotationDeclaration getSpecializesAnnotationDeclaration() {
return getDefinition().getSpecializesAnnotation();
}
- public boolean isAlternative() {
- if(getDefinition().getAlternativeAnnotation() != null) return true;
- Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
- for (IStereotypeDeclaration d: ds) {
- IStereotype s = d.getStereotype();
- if(s != null && s.isAlternative()) return true;
- }
- return false;
- }
-
public boolean isDependent() {
IScope scope = getScope();
return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
+ boolean hasEnabledSpecializingProducerMethod() {
+ for (ProducerMethod sb: specializingProducerMethods) {
+ if(sb.hasEnabledSpecializingProducerMethod() || sb.isEnabled()) return true;
+ }
+ return false;
+ }
+
public boolean isEnabled() {
- //if it is overrided by producer method which specializes it, return false!
+ if(classBean != null && !classBean.isEnabled()) {
+ return false;
+ }
+ if(hasEnabledSpecializingProducerMethod()) {
+ return false;
+ }
+ if(isAlternative()) {
+ if(classBean != null && !getCDIProject().getAlternatives(classBean.getBeanClass().getFullyQualifiedName()).isEmpty()) {
+ return true;
+ }
+ Set<IStereotypeDeclaration> ds = getStereotypeDeclarations();
+ for (IStereotypeDeclaration d: ds) {
+ IStereotype s = d.getStereotype();
+ if(s != null && s.isAlternative() && !getCDIProject().getAlternatives(s.getSourceType().getFullyQualifiedName()).isEmpty()) {
+ return true;
+ }
+ }
+ return false;
+ }
return true;
}
15 years