JBoss Tools SVN: r28754 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-01-31 08:48:02 -0500 (Mon, 31 Jan 2011)
New Revision: 28754
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java
Log:
https://issues.jboss.org/browse/JBIDE-7635
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-01-31 13:32:41 UTC (rev 28753)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-01-31 13:48:02 UTC (rev 28754)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.cdi.ui.marker;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -18,7 +17,6 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.ICompilationUnit;
@@ -27,18 +25,14 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
-import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IInjectionPoint;
-import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.cdi.internal.core.impl.CDIProject;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationErrorManager;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
@@ -203,9 +197,9 @@
IInjectionPoint ip = CDIUtil.findInjectionPoint(allBeans, element, start);
- if(ip instanceof IInjectionPointField)
+ //if(ip instanceof IInjectionPointField)
return ip;
- return null;
+ //return null;
}
private List<IBean> findBeans(IInjectionPoint injectionPoint){
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-01-31 13:32:41 UTC (rev 28753)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-01-31 13:48:02 UTC (rev 28754)
@@ -28,9 +28,12 @@
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageDeclaration;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
@@ -116,6 +119,8 @@
}
public static void addQualifier(String qualifiedName, ICompilationUnit compilationUnit, IJavaElement element) throws JavaModelException{
+ if(!(element instanceof ISourceReference))
+ return;
IAnnotation annotation = getAnnotation(element, qualifiedName);
if(annotation != null && annotation.exists())
return;
@@ -128,9 +133,11 @@
String shortName = getShortName(qualifiedName);
annotation = getAnnotation(element, CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
+ if(annotation != null && annotation.exists())
+ buffer.replace(annotation.getSourceRange().getOffset()+annotation.getSourceRange().getLength(), 0, lineDelim+AT+shortName);
+ else
+ buffer.replace(((ISourceReference)element).getSourceRange().getOffset(), 0, AT+shortName+lineDelim);
- buffer.replace(annotation.getSourceRange().getOffset()+annotation.getSourceRange().getLength(), 0, lineDelim+AT+shortName);
-
synchronized(compilationUnit) {
compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
}
@@ -204,28 +211,155 @@
return list;
}
- public static void addQualifiersToInjectedPoint(IInjectionPoint injectionPoint, IBean bean){
+ private static void addQualifiersToParameter(ICompilationUnit compilationUnit, IInjectionPoint injectionPoint, Set<IQualifier> qualifiers){
+ if(!(injectionPoint instanceof IInjectionPointParameter))
+ return;
try{
- ICompilationUnit original = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
- ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
- IJavaElement element = getInjectedJavaElement(compilationUnit, injectionPoint);
- Set<IQualifier> qualifiers = bean.getQualifiers();
+ for(IQualifier qualifier : qualifiers){
+ String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
+ if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME))
+ addImport(qualifierName, compilationUnit);
+ }
- // delete unneeded qualifiers
+ synchronized(compilationUnit) {
+ compilationUnit.reconcile(ICompilationUnit.NO_AST, true, null, null);
+ }
- List<IQualifier> toDelete = findQualifiersToDelete(injectionPoint, qualifiers);
+ String paramName = ((IInjectionPointParameter)injectionPoint).getName();
+ IMethod method = ((IInjectionPointParameter)injectionPoint).getBeanMethod().getMethod();
+ IType type = method.getDeclaringType();
+ IType t = compilationUnit.getType(type.getElementName());
+ IMethod m = t.getMethod(method.getElementName(), method.getParameterTypes());
+
+
+ IBuffer buffer = compilationUnit.getBuffer();
- for(IQualifier qualifier : toDelete){
- deleteQualifierAnnotation(compilationUnit, element, qualifier);
+ MethodStructure ms = parseMethod(m, buffer.getContents());
+ if(ms == null)
+ return;
+
+ for(Parameter parameter : ms.getParameters()){
+ if(parameter.getName().equals(paramName)){
+ StringBuffer b = new StringBuffer();
+ if(parameter.getIndex() > 0)
+ b.append(SPACE);
+ for(IQualifier qualifier : qualifiers){
+ String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
+ if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME)){
+ String annotation = getShortName(qualifierName);
+ b.append(AT+annotation+SPACE);
+ }
+ }
+ b.append(parameter.getType()+SPACE);
+ b.append(parameter.getName());
+ buffer.replace(parameter.getOffset(), parameter.getLength(), b.toString());
+ }
}
- for(IQualifier qualifier : qualifiers){
- String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
- if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME)){
- MarkerResolutionUtils.addQualifier(qualifierName, compilationUnit, element);
+ }catch(JavaModelException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ }
+
+ static void getParams(IMethod method, MethodStructure ms, String paramsString, int offset) throws JavaModelException{
+ String[] types = method.getParameterTypes();
+ String[] names = method.getParameterNames();
+
+ int paramIndex = 0;
+ int paramPosition = 0;
+ int i = 0;
+ int c1 = 0;
+ int c2 = 0;
+ char quote = '\0';
+ StringBuffer sb = new StringBuffer();
+ while(i < paramsString.length()) {
+ char c = paramsString.charAt(i);
+ if(c == ',' && c1 == 0 && c2 == 0 && quote == '\0') {
+ if(sb.toString().trim().length() > 0) {
+ String param = sb.toString();
+ Parameter parameter = new Parameter(paramIndex, Signature.getSignatureSimpleName(types[paramIndex]), names[paramIndex], offset+paramPosition, param.length());
+ paramIndex++;
+ ms.addParameter(parameter);
+ paramPosition = i+1;
}
+ sb.setLength(0);
+ i++;
+ continue;
+ } else if(c == '(' && quote == '\0') {
+ c1++;
+ } else if(c == ')' && quote == '\0') {
+ c1--;
+ } else if(c == '<' && quote == '\0') {
+ c2++;
+ } else if(c == '>' && quote == '\0') {
+ c2--;
+ } else if((c == '\'' || c == '"') && quote == '\0') {
+ quote = c;
+ } else if(quote == c) {
+ quote = '\0';
}
+ sb.append(c);
+ i++;
+ }
+ if(sb.length() > 0) {
+ String param = sb.toString();
+ Parameter parameter = new Parameter(paramIndex, Signature.getSignatureSimpleName(types[paramIndex]), names[paramIndex], offset+paramPosition, param.length());
+ paramIndex++;
+ ms.addParameter(parameter);
+ paramPosition = i+1;
+ }
+ }
+
+ private static MethodStructure parseMethod(IMethod method, String text){
+ try{
+ MethodStructure ms = new MethodStructure();
+ ISourceRange range = method.getSourceRange();
+ ISourceRange nameRange = method.getNameRange();
+ if(nameRange != null) range = nameRange;
+ int paramStart = text.indexOf('(', range.getOffset());
+ if(paramStart < 0) return null;
+ int declEnd = text.indexOf('{', paramStart);
+ if(declEnd < 0) return null;
+ int paramEnd = text.lastIndexOf(')', declEnd);
+ if(paramEnd < 0) return null;
+ String paramsString = text.substring(paramStart + 1, paramEnd);
+ getParams(method, ms, paramsString, paramStart+1);
+
+ return ms;
+ }catch(JavaModelException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ return null;
+ }
+
+ public static void addQualifiersToInjectedPoint(IInjectionPoint injectionPoint, IBean bean){
+ try{
+ ICompilationUnit original = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ Set<IQualifier> qualifiers = bean.getQualifiers();
+ if(injectionPoint instanceof IInjectionPointParameter){
+ addQualifiersToParameter(compilationUnit, injectionPoint, qualifiers);
+ }else{
+ IJavaElement element = getInjectedJavaElement(compilationUnit, injectionPoint);
+ if(element == null || !element.exists())
+ return;
+
+ // delete unneeded qualifiers
+
+ List<IQualifier> toDelete = findQualifiersToDelete(injectionPoint, qualifiers);
+
+ for(IQualifier qualifier : toDelete){
+ deleteQualifierAnnotation(compilationUnit, element, qualifier);
+ }
+
+ for(IQualifier qualifier : qualifiers){
+ String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
+ if(!qualifierName.equals(CDIConstants.ANY_QUALIFIER_TYPE_NAME) && !qualifierName.equals(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME)){
+ MarkerResolutionUtils.addQualifier(qualifierName, compilationUnit, element);
+ }
+ }
+ }
compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
compilationUnit.discardWorkingCopy();
}catch(CoreException ex){
@@ -257,33 +391,70 @@
}
}
- public static IJavaElement getInjectedJavaElement(ICompilationUnit compolationUnit, IInjectionPoint injectionPoint){
+ private static IJavaElement getInjectedJavaElement(ICompilationUnit compilationUnit, IInjectionPoint injectionPoint){
if(injectionPoint instanceof IInjectionPointField){
IField field = ((IInjectionPointField)injectionPoint).getField();
IType type = field.getDeclaringType();
- IType t = compolationUnit.getType(type.getElementName());
+ IType t = compilationUnit.getType(type.getElementName());
IField f = t.getField(field.getElementName());
return f;
}else if(injectionPoint instanceof IInjectionPointMethod){
IMethod method = ((IInjectionPointMethod)injectionPoint).getMethod();
IType type = method.getDeclaringType();
- IType t = compolationUnit.getType(type.getElementName());
+ IType t = compilationUnit.getType(type.getElementName());
IMethod m = t.getMethod(method.getElementName(), method.getParameterTypes());
return m;
- }else if(injectionPoint instanceof IInjectionPointParameter){
- String paramName = ((IInjectionPointParameter)injectionPoint).getName();
- IMethod method = ((IInjectionPointParameter)injectionPoint).getBeanMethod().getMethod();
- IType type = method.getDeclaringType();
- IType t = compolationUnit.getType(type.getElementName());
- IMethod m = t.getMethod(method.getElementName(), method.getParameterTypes());
- ITypeParameter p = m.getTypeParameter(paramName);
-
- return p;
}
return null;
}
+
+ static class MethodStructure{
+ List<Parameter> parameters = new ArrayList<Parameter>();
+
+ public List<Parameter> getParameters(){
+ return parameters;
+ }
+
+ public void addParameter(Parameter parameter){
+ parameters.add(parameter);
+ }
+ }
+
+ static class Parameter{
+ String type;
+ String name;
+ int offset, length;
+ int index;
+
+ public Parameter(int index, String type, String name, int offset, int length){
+ this.index = index;
+ this.type = type;
+ this.name = name;
+ this.offset = offset;
+ this.length = length;
+ }
+
+ public int getOffset(){
+ return offset;
+ }
+
+ public int getLength(){
+ return length;
+ }
+
+ public String getType(){
+ return type;
+ }
+
+ public String getName(){
+ return name;
+ }
+ public int getIndex(){
+ return index;
+ }
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java 2011-01-31 13:32:41 UTC (rev 28753)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java 2011-01-31 13:48:02 UTC (rev 28754)
@@ -203,7 +203,6 @@
return false;
}
}
-
class BeanListLabelProvider implements ILabelProvider{
13 years, 11 months
JBoss Tools SVN: r28753 - trunk/bpel/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-01-31 08:32:41 -0500 (Mon, 31 Jan 2011)
New Revision: 28753
Modified:
trunk/bpel/docs/reference/en-US/reference.xml
Log:
Modified: trunk/bpel/docs/reference/en-US/reference.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/reference.xml 2011-01-31 13:14:08 UTC (rev 28752)
+++ trunk/bpel/docs/reference/en-US/reference.xml 2011-01-31 13:32:41 UTC (rev 28753)
@@ -91,7 +91,7 @@
<itemizedlist>
<listitem><para><emphasis>Asynchronous BPEL Process</emphasis> -
generates the basis of orchestration logic: receive and reply activities
- are included into the process;client WSDL is generated,
+ are included into the process; client WSDL is generated,
service is defined in the <property>parentlink</property> of the process.
The caller is notified asynchronously when the process completes.
</para></listitem>
13 years, 11 months
JBoss Tools SVN: r28752 - trunk/bpel/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-01-31 08:14:08 -0500 (Mon, 31 Jan 2011)
New Revision: 28752
Modified:
trunk/bpel/docs/reference/en-US/deploy.xml
Log:
* bpel-deploy.xml changed to deploy.xml
Modified: trunk/bpel/docs/reference/en-US/deploy.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/deploy.xml 2011-01-31 13:07:10 UTC (rev 28751)
+++ trunk/bpel/docs/reference/en-US/deploy.xml 2011-01-31 13:14:08 UTC (rev 28752)
@@ -8,7 +8,7 @@
</para>
<itemizedlist>
<listitem>
- <para>Create the bpel-deploy.xml by selecting
+ <para>Create the deploy.xml by selecting
<emphasis><property>New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor</property></emphasis>. Click the <property>Next</property> button.
</para>
<figure>
@@ -23,10 +23,10 @@
<listitem>
<para>On the next wizard page you should enter the following information:</para>
<para><emphasis><property>BPEL Project</property></emphasis>: Click the <property>Browse...</property> button to select the BPEL project in your workspace which you want to deploy to the runtime.
- Please note, that you should select the <property>bpelContent</property> folder in your new BPEL project as a value of <property>BPEL Project</property> field because the bpel-deploy.xml should be created in this place.
+ Please note, that you should select the <property>bpelContent</property> folder in your new BPEL project as a value of <property>BPEL Project</property> field because the deploy.xml should be created in this place.
</para>
- <para><emphasis><property>File name</property></emphasis>: The default value is bpel-deploy.xml. Please, don't change it.</para>
- <para>Click on <property>Finish</property> button to close the wizard and a new bpel-deploy.xml file will be created.</para>
+ <para><emphasis><property>File name</property></emphasis>: The default value is deploy.xml. Please, don't change it.</para>
+ <para>Click on <property>Finish</property> button to close the wizard and a new deploy.xml file will be created.</para>
<figure>
<title>New BPEL Deploy file Wizard</title>
<mediaobject>
@@ -37,14 +37,14 @@
</figure>
</listitem>
<listitem>
- <para>Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor.
+ <para>Double-click the deploy.xml file to open it in ODE Descriptor Deployment Editor.
In the <property>Inbound Interfaces</property> section, click the
<property>Associated Port</property> column and select <property>HelloWorldProcessPort</property>
in the dropdown box.The <property>Related Service</property> and <property>Binding Used</property>
- columns should be automatically filled in. Save the <emphasis><property>bpel-deploy.xml</property></emphasis>.
+ columns should be automatically filled in. Save the <emphasis><property>deploy.xml</property></emphasis>.
</para>
<figure>
- <title>bpel-deploy.xml file editor</title>
+ <title>deploy.xml file editor</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/deploy_createdeploy_3.png"/>
13 years, 11 months
JBoss Tools SVN: r28751 - trunk/bpel/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-01-31 08:07:10 -0500 (Mon, 31 Jan 2011)
New Revision: 28751
Modified:
trunk/bpel/docs/reference/en-US/deploy.xml
Log:
Modified: trunk/bpel/docs/reference/en-US/deploy.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/deploy.xml 2011-01-31 13:04:39 UTC (rev 28750)
+++ trunk/bpel/docs/reference/en-US/deploy.xml 2011-01-31 13:07:10 UTC (rev 28751)
@@ -2,7 +2,7 @@
<chapter id="deploy">
<title>Deploy a JBoss BPEL project to JBoss BPEL Runtime</title>
<section id="createdeploy">
- <title>Creating a bpel-deploy.xml file</title>
+ <title>Creating a deploy.xml file</title>
<para>If you want to deploy a BPEL project to JBoss BPEL Runtime, you should create a deploy.xml file.
JBoss tools can help you to create it:
</para>
13 years, 11 months
JBoss Tools SVN: r28750 - trunk/bpel/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-01-31 08:04:39 -0500 (Mon, 31 Jan 2011)
New Revision: 28750
Modified:
trunk/bpel/docs/reference/en-US/deploy.xml
Log:
* bpel-deploy.xml renamed to deploy.xml
Modified: trunk/bpel/docs/reference/en-US/deploy.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/deploy.xml 2011-01-31 12:23:14 UTC (rev 28749)
+++ trunk/bpel/docs/reference/en-US/deploy.xml 2011-01-31 13:04:39 UTC (rev 28750)
@@ -3,7 +3,7 @@
<title>Deploy a JBoss BPEL project to JBoss BPEL Runtime</title>
<section id="createdeploy">
<title>Creating a bpel-deploy.xml file</title>
- <para>If you want to deploy a BPEL project to JBoss BPEL Runtime, you should create a bpel-deploy.xml file.
+ <para>If you want to deploy a BPEL project to JBoss BPEL Runtime, you should create a deploy.xml file.
JBoss tools can help you to create it:
</para>
<itemizedlist>
@@ -129,4 +129,4 @@
>JBoss Tools Users Forum</ulink> to ask questions.
There we are also waiting for your suggestions and comments.</para>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
13 years, 11 months
JBoss Tools SVN: r28749 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-01-31 07:23:14 -0500 (Mon, 31 Jan 2011)
New Revision: 28749
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
Log:
https://issues.jboss.org/browse/JBIDE-8152 , code adjustment.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2011-01-31 11:38:23 UTC (rev 28748)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2011-01-31 12:23:14 UTC (rev 28749)
@@ -273,8 +273,6 @@
controller.getSourceBuilder().getStructuredTextViewer().getDocument().replace(reg.getOffset(), reg.getLength(), "en_GB");
/*
* Wait until new value is applied and children are refreshed.
- */
- /*
* Wait while all deferred events are processed
*/
while(Display.getCurrent().readAndDispatch());
13 years, 11 months
JBoss Tools SVN: r28748 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2011-01-31 06:38:23 -0500 (Mon, 31 Jan 2011)
New Revision: 28748
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java
Log:
added replacement of #{request.contextPath} el expression (https://issues.jboss.org/browse/JBIDE-8257)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2011-01-31 11:07:31 UTC (rev 28747)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2011-01-31 11:38:23 UTC (rev 28748)
@@ -186,7 +186,7 @@
if (((this.isAvailable(file) && this.isAvailableForNode(sourceNode, file)))
|| isInResourcesBundle(pageContext, sourceNode)){
rst = true;
- }else if(Jsf2ResourceUtil.isContainJSFExternalContextPath(sourceNode)){
+ }else if(Jsf2ResourceUtil.isContainJSFContextPath(sourceNode)){
rst = true;
}if(Jsf2ResourceUtil.isContainJSF2ResourceAttributes(sourceNode)) {
//added by Maksim Areshkau, see JBIDE-4812
@@ -392,6 +392,10 @@
rst = Jsf2ResourceUtil.processExternalContextPath(value);
}
+ if(Jsf2ResourceUtil.isRequestContextPathString(value)){
+ rst = Jsf2ResourceUtil.processRequestContextPath(value);
+ }
+
if(Jsf2ResourceUtil.isJSF2ResourceString(rst)){
rst = Jsf2ResourceUtil.processCustomJSFAttributes(pageContext, rst);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java 2011-01-31 11:07:31 UTC (rev 28747)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Jsf2ResourceUtil.java 2011-01-31 11:38:23 UTC (rev 28748)
@@ -25,24 +25,34 @@
* @author mareshkau
*/
public class Jsf2ResourceUtil {
+
private static final Pattern resourcePatternWithSinglCoat = Pattern
.compile("[#\\$]\\{\\s*resource\\s*\\[\\s*'(.*)'\\s*\\]\\s*\\}"); //$NON-NLS-1$
private static final Pattern resourcePatternWithDoableCoat = Pattern
.compile("[#\\$]\\{\\s*resource\\s*\\[\\s*\"(.*)\"\\s*\\]\\s*\\}"); //$NON-NLS-1$
private static final Pattern jsfExternalContextPath = Pattern
.compile("^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}"); //$NON-NLS-1$
+ private static final Pattern jsfRequestContextPath = Pattern
+ .compile("^\\s*(\\#|\\$)\\{request.contextPath\\}"); //$NON-NLS-1$
+
/**
- * Check if node contains attributes like this src="#{facesContext.externalContext.requestContextPath}/images/sample.gif"
+ * Check if node contains attributes like this src=
+ * "#{facesContext.externalContext.requestContextPath}/images/sample.gif"
+ * or like #{request.contextPath}/css/style.css
+ *
* @param sourceNode
- * @return true if node contains #{facesContext.externalContext.requestContextPath}/images/sample.gif
+ * @return true if node contains
+ * #{facesContext.externalContext.requestContextPath}/images/sample.gif
+ * or #{request.contextPath}/css/style.css
* @author mareshkau, fix for https://jira.jboss.org/jira/browse/JBIDE-5985
*/
- public static boolean isContainJSFExternalContextPath(Node sourceNode) {
+ public static boolean isContainJSFContextPath(Node sourceNode) {
boolean result = false;
if (sourceNode.getNodeType() == Node.TEXT_NODE) {
String textValue = sourceNode.getNodeValue();
if (textValue != null) {
- if (Jsf2ResourceUtil.isExternalContextPathString(textValue)) {
+ if (Jsf2ResourceUtil.isExternalContextPathString(textValue) ||
+ Jsf2ResourceUtil.isRequestContextPathString(textValue)) {
result = true;
}
}
@@ -50,17 +60,19 @@
final NamedNodeMap nodeMap = sourceNode.getAttributes();
if ((nodeMap != null) && (nodeMap.getLength() > 0)) {
for (int i = 0; i < nodeMap.getLength(); i++) {
- if (Jsf2ResourceUtil
- .isExternalContextPathString(((Attr) nodeMap
- .item(i)).getValue())) {
+ Attr nodeAttr = (Attr) nodeMap.item(i);
+ String attrValue = nodeAttr.getValue();
+ if (Jsf2ResourceUtil.isExternalContextPathString(attrValue)
+ || Jsf2ResourceUtil
+ .isRequestContextPathString(attrValue)) {
result = true;
-
}
}
}
}
return result;
}
+
/**
* Checks string for jsf declaration
* @param attributeValue
@@ -76,6 +88,17 @@
}
return result;
}
+
+ /**
+ * Checks string for request.contextPath declaration
+ * @param attributeValue
+ * @return true if string contains #{request.contextPath}
+ */
+ public static boolean isRequestContextPathString(String attributeValue) {
+ Matcher requestContextPathMatcher = jsfRequestContextPath
+ .matcher(attributeValue);
+ return requestContextPathMatcher.find();
+ }
/**
* Checks is node contained jsf attributes declaration
@@ -150,6 +173,7 @@
}
return result;
}
+
/**
* Replaced "^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}" with ""
* @param value
@@ -158,4 +182,13 @@
public static String processExternalContextPath(String value) {
return value.replaceFirst("^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ /**
+ * Replaced "^\\s*(\\#|\\$)\\{request.contextPath\\}" with ""
+ * @param value
+ * @return value with replaced "^\\s*(\\#|\\$)\\{request.contextPath\\}"
+ */
+ public static String processRequestContextPath(String value) {
+ return value.replaceFirst(jsfRequestContextPath.pattern(), ""); //$NON-NLS-1$
+ }
}
13 years, 11 months
JBoss Tools SVN: r28747 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 06:07:31 -0500 (Mon, 31 Jan 2011)
New Revision: 28747
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnection.java
Log:
added copyright header and author
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnection.java 2011-01-31 11:05:48 UTC (rev 28746)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnection.java 2011-01-31 11:07:31 UTC (rev 28747)
@@ -1,5 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+/**
+ * @author Jeff Johnston
+ */
public interface CloudConnection {
public boolean performTest();
13 years, 11 months
JBoss Tools SVN: r28746 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: icons and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-31 06:05:48 -0500 (Mon, 31 Jan 2011)
New Revision: 28746
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/delta.png
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java
Log:
[JBIDE-8283] changed cloud connection icon, switched to png from gif (better quality, better antialias)
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/delta.png
===================================================================
(Binary files differ)
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/icons/delta.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-31 04:29:42 UTC (rev 28745)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-01-31 11:05:48 UTC (rev 28746)
@@ -10,14 +10,14 @@
</category>
<view
name="%CloudViewerName"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
category="org.jboss.tools.deltacloud.ui"
class="org.jboss.tools.deltacloud.ui.views.cloud.DeltaCloudView"
id="org.jboss.tools.deltacloud.ui.views.CloudView">
</view>
<view
name="CloudViewerName2"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
category="org.jboss.tools.deltacloud.ui"
class="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudNavigator"
id="org.jboss.tools.deltacloud.ui.views.CloudView2">
@@ -26,14 +26,14 @@
<view
category="org.jboss.tools.deltacloud.ui"
class="org.jboss.tools.deltacloud.ui.views.cloudelements.InstanceView"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
id="org.jboss.tools.deltacloud.ui.views.InstanceView"
name="%InstanceViewer.name">
</view>
<view
category="org.jboss.tools.deltacloud.ui"
class="org.jboss.tools.deltacloud.ui.views.cloudelements.ImageView"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
id="org.jboss.tools.deltacloud.ui.views.ImageView"
name="%ImageViewer.name"
restorable="true">
@@ -89,7 +89,7 @@
<wizard
category="org.jboss.tools.deltacloud.ui.wizard.category"
class="org.jboss.tools.internal.deltacloud.ui.wizards.NewCloudConnectionWizard"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
id="org.jboss.tools.deltacloud.ui.connection.wizard"
name="%NewWizard.name">
</wizard>
@@ -98,7 +98,7 @@
point="org.eclipse.ui.perspectives">
<perspective
class="org.jboss.tools.deltacloud.ui.DeltaCloudPerspective"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
id="org.jboss.tools.deltacloud.ui.perspective"
name="%DeltaCloudPerspective.name">
</perspective>
@@ -856,7 +856,7 @@
<navigatorContent
activeByDefault="true"
contentProvider="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudContentProvider"
- icon="icons/delta.gif"
+ icon="icons/delta.png"
id="org.jboss.tools.deltacloud.ui.cloudContentRoot"
labelProvider="org.jboss.tools.deltacloud.ui.views.cloud.cnf.CloudLabelProvider"
name="DeltaClouds"
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java 2011-01-31 04:29:42 UTC (rev 28745)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/SWTImagesFactory.java 2011-01-31 11:05:48 UTC (rev 28746)
@@ -34,7 +34,8 @@
}
private static final String NAME_PREFIX= Activator.PLUGIN_ID + '.';
private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
- public static final String IMG_CLOUD= NAME_PREFIX + "cloud.gif"; //$NON-NLS-1$
+ public static final String IMG_CLOUD= NAME_PREFIX + "delta.png"; //$NON-NLS-1$
+// public static final String IMG_CLOUD= NAME_PREFIX + "cloud.gif"; //$NON-NLS-1$
public static final String IMG_COLLAPSE_ALL= NAME_PREFIX + "collapseall.gif"; //$NON-NLS-1$
public static final String IMG_DELTA= NAME_PREFIX + "delta.gif"; //$NON-NLS-1$
public static final String IMG_DELTA_LARGE= NAME_PREFIX + "delta-large.gif"; //$NON-NLS-1$
13 years, 11 months
JBoss Tools SVN: r28745 - trunk/as/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-30 23:29:42 -0500 (Sun, 30 Jan 2011)
New Revision: 28745
Modified:
trunk/as/docs/reference/en-US/Revision_History.xml
trunk/as/docs/reference/en-US/tptp_support.xml
Log:
General Updates
Modified: trunk/as/docs/reference/en-US/Revision_History.xml
===================================================================
--- trunk/as/docs/reference/en-US/Revision_History.xml 2011-01-31 04:23:37 UTC (rev 28744)
+++ trunk/as/docs/reference/en-US/Revision_History.xml 2011-01-31 04:29:42 UTC (rev 28745)
@@ -1,4 +1,52 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
-<appendix><title>Revision History</title><simpara><revhistory><revision><revnumber>1</revnumber><date>Wed Jun 09 2010</date><author><firstname>JBoss Tools</firstname><surname>Documentation Team</surname><email></email></author><revdescription><simplelist><member>General updates</member></simplelist></revdescription></revision><revision><revnumber>0</revnumber><date>Fri Nov 20 2009</date><author><firstname>Isaac</firstname><surname>Rooskov</surname><email>irooskov(a)redhat.com</email></author><revdescription><simplelist><member>Initial creation of book by publican</member></simplelist></revdescription></revision></revhistory></simpara></appendix>
+<appendix>
+ <title>Revision History</title>
+ <simpara>
+ <revhistory>
+ <revision>
+ <revnumber>2</revnumber>
+ <date>Mon Jan 31 2011</date>
+ <author>
+ <firstname>Matthew</firstname>
+ <surname>Casperson</surname>
+ <email>mcaspers(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>General updates</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>1</revnumber>
+ <date>Wed Jun 09 2010</date>
+ <author>
+ <firstname>JBoss Tools</firstname>
+ <surname>Documentation Team</surname>
+ <email></email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>General updates</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>0</revnumber>
+ <date>Fri Nov 20 2009</date>
+ <author>
+ <firstname>Isaac</firstname>
+ <surname>Rooskov</surname>
+ <email>irooskov(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Initial creation of book by publican</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ </revhistory>
+ </simpara>
+</appendix>
Modified: trunk/as/docs/reference/en-US/tptp_support.xml
===================================================================
--- trunk/as/docs/reference/en-US/tptp_support.xml 2011-01-31 04:23:37 UTC (rev 28744)
+++ trunk/as/docs/reference/en-US/tptp_support.xml 2011-01-31 04:29:42 UTC (rev 28745)
@@ -1,69 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="tptp_support">
- <title>TPTP Support</title>
- <para>This chapter provides an overview on how to enable TPTP Profiling for <property>JBoss
- AS</property> adapters in <property>JBoss Tools</property>.</para>
+ <title>TPTP Support</title>
+ <para>
+ This chapter provides an overview on how to enable TPTP Profiling for <productname>JBoss AS</productname> adapters in <productname>JBoss Tools</productname>.
+ </para>
- <section>
- <title>TPTP Profiling</title>
+ <section>
+ <title>TPTP Profiling</title>
- <para>To get TPTP profiling work on <property>JBoss Application Server</property> you should
- do the following:</para>
-
- <itemizedlist>
- <listitem><para>Download <ulink
- url="http://www.eclipse.org/tptp/home/downloads/"
- >TPTP Runtime</ulink> and install it, i. e. just add the content of <emphasis>
- <code>plugins/features</code>
- </emphasis> folders from downloaded directory to the same folders in your eclipse
- installation directory or use the <emphasis><property>Help > Install New Software</property></emphasis>
- command.</para>
- </listitem>
- <listitem><para>Install <property>JBoss TPTP Tools</property>
- which provide TPTP support for JBoss AS servers (find the latest stable version of the JBoss TPTP profile feature at
- <ulink url="http://www.jboss.org/tools/download/stable">http://www.jboss.org/tools/download/stable</ulink>).</para></listitem>
- </itemizedlist>
+ <para>To get TPTP profiling work on <productname>JBoss Application Server</productname> you should do the following:</para>
- <para>And now all profile actions should work for you. To start <property>JBoss
- AS</property> in profiling mode use <emphasis>
- <property>Start the server in profiling mode</property>
- </emphasis> button or <emphasis>
- <property>Profile As > Profile on Server</property>
- </emphasis> option in the context menu of the project.</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Download <ulink url="http://www.eclipse.org/tptp/home/downloads/">TPTP Runtime</ulink> and install it, i. e. just add the content of <emphasis><code>plugins/features</code></emphasis> folders from downloaded directory to the same folders in your eclipse installation directory or use the <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Install New Software</guimenuitem></menuchoice> command.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Install <property>JBoss TPTP Tools</property> which provide TPTP support for JBoss AS servers (find the latest stable version of the JBoss TPTP profile feature at <ulink url="http://www.jboss.org/tools/download/stable">http://www.jboss.org/tools/download/stable</ulink>).
+ </para>
+ </listitem>
+ </itemizedlist>
- <figure>
- <title>Start the Server in Profiling mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tptp_support/tptp_support_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <para>
+ And now all profile actions should work for you. To start <productname>JBoss AS</productname> in profiling mode use <guibutton>Start the server in profiling mode</guibutton> button or select <menuchoice><guimenuitem>Profile As</guimenuitem><guimenuitem>Profile on Server</guimenuitem></menuchoice> from the context menu of the project.
+ </para>
- <para>To enable TPTP features in your workbench use <property>Profiling and Logging
- Perspective</property> that you can find in the list of proposed perspectives: <emphasis>
- <property>Window > Open Perspective > Other…</property>
- </emphasis>
- </para>
+ <figure>
+ <title>Start the Server in Profiling mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tptp_support/tptp_support_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <figure>
- <title>Profiling and Logging Perspective</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tptp_support/tptp_support_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
+ <para>
+ To enable TPTP features in your workbench use <property>Profiling and Logging Perspective</property> that you can find in the list of proposed perspectives: <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice>
+ </para>
- <section>
- <title>Relevant Resources Links</title>
- <para>All additional information on TPTP(Test and Performance Tools Platform) you can find
- in <ulink
- url="http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/quicktour/quic..."
- >eclipse documentation</ulink>.</para>
- <para>In summary, this reference should help you to start with <ulink
- url="http://www.jboss.org/jbossas">JBoss AS</ulink> and get to know with functionality
- for work with it.</para>
- </section>
+ <figure>
+ <title>Profiling and Logging Perspective</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tptp_support/tptp_support_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>
+ All additional information on TPTP (Test and Performance Tools Platform) can be found in the <ulink url="http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/quicktour/quic...">Eclipse documentation</ulink>.
+ </para>
+ </section>
</chapter>
13 years, 11 months