JBoss Tools SVN: r4722 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-11-05 15:56:12 -0500 (Mon, 05 Nov 2007)
New Revision: 4722
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1213, s:button was adjusted.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2007-11-05 20:07:03 UTC (rev 4721)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2007-11-05 20:56:12 UTC (rev 4722)
@@ -80,21 +80,110 @@
</vpe:tag>
<vpe:tag name="s:button" case-sensitive="yes">
- <vpe:if test="@type=''">
- <vpe:template children="no" modify="no">
- <input type="submit" value="{@value}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
- </vpe:template>
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="@type=''">
+ <vpe:template children="no" modify="no">
+ <input type="submit" value="{jsfvalue(@value)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="(@type='button')|(@type='reset')|(@type='submit')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{jsfvalue(@value)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
</vpe:if>
- <vpe:if test="(@type='button')|(@type='reset')|(@type='submit')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{@value}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
- </vpe:template>
- </vpe:if>
- <vpe:if test="@type='image'">
- <vpe:template children="no" modify="no">
- <input type="{@type}" src="{src(@image)}" value="{@value}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
- </vpe:template>
- </vpe:if>
</vpe:tag>
<vpe:tag name="s:link" case-sensitive="yes">
17 years, 1 month
JBoss Tools SVN: r4721 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-11-05 15:07:03 -0500 (Mon, 05 Nov 2007)
New Revision: 4721
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1256 EL autcompletion and validation should be aware of ELResolvers
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05 19:56:48 UTC (rev 4720)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05 20:07:03 UTC (rev 4721)
@@ -463,11 +463,12 @@
String name = token.getText();
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
- List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
status.setMapOrBundleAmoungTheTokens();
}
+ List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
for (TypeInfoCollector.MemberInfo property : properties) {
StringBuffer propertyName = new StringBuffer(property.getName());
if (property instanceof TypeInfoCollector.MethodInfo) { // Setter or getter
@@ -491,7 +492,11 @@
}
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
List<TypeInfoCollector.MemberInfo> methods = infos.getMethods();
for (TypeInfoCollector.MemberInfo method : methods) {
if (name.equals(method.getName())) {
@@ -508,7 +513,11 @@
if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
// return all the methods + properties
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
proposals.addAll(infos.getMethodPresentations());
proposals.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
}
@@ -517,7 +526,11 @@
// return filtered methods + properties
Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
proposalsToFilter.addAll(infos.getMethodPresentations());
proposalsToFilter.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-11-05 19:56:48 UTC (rev 4720)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-11-05 20:07:03 UTC (rev 4721)
@@ -202,8 +202,6 @@
}
public static TypeInfoCollector collectTypeInfo(IType type) {
- if (type == null)
- System.out.println("type is null");
TypeInfoCollector typeInfo = new TypeInfoCollector(type);
typeInfo.collectInfo();
return typeInfo;
17 years, 1 month
JBoss Tools SVN: r4720 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-11-05 14:56:48 -0500 (Mon, 05 Nov 2007)
New Revision: 4720
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1256 EL autcompletion and validation should be aware of ELResolvers
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05 19:33:29 UTC (rev 4719)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05 19:56:48 UTC (rev 4720)
@@ -282,14 +282,24 @@
Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters;
Set<String> proposals;
private ELOperandToken lastResolvedToken;
+ private boolean isMapOrBundleAmoungTheTokens;
public SeamELOperandResolveStatus(List<ELOperandToken> tokens) {
this.tokens = tokens;
this.lastResolvedToken = null;
+ this.isMapOrBundleAmoungTheTokens = false;
}
+ public boolean isMapOrBundleAmoungTheTokens() {
+ return this.isMapOrBundleAmoungTheTokens;
+ }
+
+ public void setMapOrBundleAmoungTheTokens() {
+ this.isMapOrBundleAmoungTheTokens = true;
+ }
+
public boolean isOK() {
- return !getProposals().isEmpty();
+ return !getProposals().isEmpty() || isMapOrBundleAmoungTheTokens();
}
public boolean isError() {
@@ -455,6 +465,9 @@
for (TypeInfoCollector.MemberInfo mbr : members) {
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
+ if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrBundleAmoungTheTokens();
+ }
for (TypeInfoCollector.MemberInfo property : properties) {
StringBuffer propertyName = new StringBuffer(property.getName());
if (property instanceof TypeInfoCollector.MethodInfo) { // Setter or getter
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-11-05 19:33:29 UTC (rev 4719)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-11-05 19:56:48 UTC (rev 4720)
@@ -202,6 +202,8 @@
}
public static TypeInfoCollector collectTypeInfo(IType type) {
+ if (type == null)
+ System.out.println("type is null");
TypeInfoCollector typeInfo = new TypeInfoCollector(type);
typeInfo.collectInfo();
return typeInfo;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java 2007-11-05 19:33:29 UTC (rev 4719)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java 2007-11-05 19:56:48 UTC (rev 4720)
@@ -431,6 +431,10 @@
this.fType = type;
}
+ public IType getType() {
+ return this.fType;
+ }
+
public void collectInfo() {
if (fMethods == null) {
fMethods = new ArrayList<MethodInfo>();
@@ -475,12 +479,33 @@
}
boolean isDataModelObject(IType type) throws JavaModelException {
- boolean isDataModelObject = "javax.faces.model.DataModel".equals(type.getFullyQualifiedName());
- if (!isDataModelObject) {
+ return isInstanceofType(type, "javax.faces.model.DataModel");
+ }
+
+ public static boolean isResourceBundle(IType type) {
+ try {
+ return isInstanceofType(type, "java.util.ResourceBundle");
+ } catch (JavaModelException e) {
+ return false;
+ }
+ }
+
+ public static boolean isMap(IType type) {
+ try {
+ return isInstanceofType(type, "java.util.Map");
+ } catch (JavaModelException e) {
+ return false;
+ }
+ }
+
+ public static boolean isInstanceofType(IType type, String qualifiedTypeName) throws JavaModelException {
+ if (qualifiedTypeName == null || type == null) return false;
+ boolean isInstanceofType = qualifiedTypeName.equals(type.getFullyQualifiedName());
+ if (!isInstanceofType) {
ITypeHierarchy typeHierarchy = type.newSupertypeHierarchy(new NullProgressMonitor());
- IType[] superTypes = typeHierarchy == null ? null : typeHierarchy.getSupertypes(fType);
- for (int i = 0; !isDataModelObject && superTypes != null && i < superTypes.length; i++) {
- if ("javax.faces.model.DataModel".equals(superTypes[i])) {
+ IType[] superTypes = typeHierarchy == null ? null : typeHierarchy.getSupertypes(type);
+ for (int i = 0; !isInstanceofType && superTypes != null && i < superTypes.length; i++) {
+ if (qualifiedTypeName.equals(superTypes[i])) {
return true;
}
}
17 years, 1 month
JBoss Tools SVN: r4719 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-05 14:33:29 -0500 (Mon, 05 Nov 2007)
New Revision: 4719
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1256
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-11-05 19:12:06 UTC (rev 4718)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-11-05 19:33:29 UTC (rev 4719)
@@ -11,10 +11,8 @@
package org.jboss.tools.seam.internal.core.validation;
import java.io.IOException;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IFile;
@@ -25,7 +23,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.internal.ui.text.FastJavaPartitionScanner;
import org.eclipse.jdt.ui.text.IJavaPartitions;
import org.eclipse.jface.text.BadLocationException;
@@ -52,7 +49,6 @@
import org.jboss.tools.seam.internal.core.el.ELOperandToken;
import org.jboss.tools.seam.internal.core.el.ELToken;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
-import org.jboss.tools.seam.internal.core.el.SeamELOperandTokenizer;
import org.jboss.tools.seam.internal.core.el.SeamELTokenizer;
import org.jboss.tools.seam.internal.core.el.TypeInfoCollector;
@@ -277,14 +273,9 @@
position = 0;
}
-// Set<ISeamContextVariable> usedVariables = new HashSet<ISeamContextVariable>();
-// Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters = new HashMap<String, TypeInfoCollector.MethodInfo>();
-
-// List<String> suggestions = engine.getCompletions(project, file, operand, prefix, position, true, usedVariables, unpairedGettersOrSetters);
-
SeamELCompletionEngine.SeamELOperandResolveStatus status =
engine.resolveSeamELOperand(project, file, operand, prefix, position, true);
-
+
if(status.getUsedVariables().size()==0 && status.isError()) {
// Save resources with unknown variables names
validationContext.addUnnamedElResource(file.getFullPath());
@@ -314,18 +305,14 @@
return;
}
-// SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(operand, position + prefix.length());
-// List<ELOperandToken> tokens = tokenizer.getTokens();
List<ELOperandToken> tokens = status.getUnresolvedTokens();
-
+
for (ELOperandToken token : tokens) {
if((token.getType()==ELOperandToken.EL_NAME_TOKEN) || (token.getType()==ELOperandToken.EL_METHOD_TOKEN)) {
-// if(!isResolvedVar(token.getText(), usedVariables)) {
- varName = token.getText();
- offsetOfVarName = documnetOffset + operandToken.getStart() + token.getStart();
- lengthOfVarName = varName.length();
- break;
-// }
+ varName = token.getText();
+ offsetOfVarName = documnetOffset + operandToken.getStart() + token.getStart();
+ lengthOfVarName = varName.length();
+ break;
}
}
}
@@ -339,15 +326,6 @@
addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{varName}, lengthOfVarName, offsetOfVarName, file);
}
- private boolean isResolvedVar(String varName, Set<ISeamContextVariable> usedVariables) {
- for (ISeamContextVariable seamContextVariable : usedVariables) {
- if(varName.equals(seamContextVariable.getName())) {
- return true;
- }
- }
- return false;
- }
-
public static class EL {
private String value;
private int length;
17 years, 1 month
JBoss Tools SVN: r4718 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core: validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-11-05 14:12:06 -0500 (Mon, 05 Nov 2007)
New Revision: 4718
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1256 EL autcompletion and validation should be aware of ELResolvers
The validator is fixed due to correctly show the name of unresolved variable/property
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05 18:26:20 UTC (rev 4717)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-11-05 19:12:06 UTC (rev 4718)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.internal.core.el;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -19,6 +20,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
@@ -33,6 +36,7 @@
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ScopeType;
+import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
/**
@@ -66,7 +70,15 @@
if(document!=null) {
documentContent = document.get();
}
- return getCompletions(project, file, documentContent, prefix, position, false, null, null);
+
+ List<String> completions = new ArrayList<String>();
+ SeamELOperandResolveStatus status = resolveSeamELOperand(project, file, documentContent, prefix, position, false);
+ if (status.isOK()) {
+ completions.addAll(status.getProposals());
+ }
+ return completions;
+
+// return getCompletions(project, file, documentContent, prefix, position, false, null, null);
}
/**
@@ -121,9 +133,9 @@
usedVariables.addAll(resolvedVariables);
}
- if ((resolvedExpressionPart == null || resolvedExpressionPart.isEmpty()) &&
+ if (resolvedExpressionPart.isEmpty() &&
!returnEqualedVariablesOnly &&
- tokens != null && tokens.size() > 0 &&
+ tokens.size() > 0 &&
tokens.get(tokens.size() - 1).getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
// no vars are resolved
// the tokens are the part of var name ended with a separator (.)
@@ -264,6 +276,276 @@
return res;
}
+ public static class SeamELOperandResolveStatus {
+ private List<ELOperandToken> tokens;
+ public List<ISeamContextVariable> usedVariables;
+ Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters;
+ Set<String> proposals;
+ private ELOperandToken lastResolvedToken;
+
+ public SeamELOperandResolveStatus(List<ELOperandToken> tokens) {
+ this.tokens = tokens;
+ this.lastResolvedToken = null;
+ }
+
+ public boolean isOK() {
+ return !getProposals().isEmpty();
+ }
+
+ public boolean isError() {
+ return !isOK();
+ }
+
+ public List<ELOperandToken> getResolvedTokens() {
+ List<ELOperandToken> resolvedTokens = new ArrayList<ELOperandToken>();
+ int index = tokens.indexOf(lastResolvedToken); // index == -1 means that no tokens are resolved
+ for (int i = 0; i < tokens.size() && i <= index; i++) {
+ resolvedTokens.add(tokens.get(i));
+ }
+ return resolvedTokens;
+ }
+
+ public List<ELOperandToken> getUnresolvedTokens() {
+ List<ELOperandToken> unresolvedTokens = new ArrayList<ELOperandToken>();
+ int index = tokens.indexOf(lastResolvedToken); // index == -1 means that no tokens are resolved
+ for (int i = index + 1; i < tokens.size(); i++) {
+ unresolvedTokens.add(tokens.get(i));
+ }
+ return unresolvedTokens;
+ }
+
+ public ELOperandToken getLastResolvedToken() {
+ return lastResolvedToken;
+ }
+
+ public void setLastResolvedToken(ELOperandToken lastResolvedToken) {
+ this.lastResolvedToken = lastResolvedToken;
+ }
+
+ public List<ELOperandToken> getTokens() {
+ return tokens;
+ }
+
+ public void setTokens(List<ELOperandToken> tokens) {
+ this.tokens = tokens;
+ }
+
+ public Set<String> getProposals() {
+ return proposals == null ? new TreeSet<String>() : proposals;
+ }
+
+ public void setProposals(Set<String> proposals) {
+ this.proposals = proposals;
+ }
+
+ public List<ISeamContextVariable> getUsedVariables() {
+ return (usedVariables == null ? new ArrayList<ISeamContextVariable>() : usedVariables);
+ }
+
+ public void setUsedVariables(List<ISeamContextVariable> usedVariables) {
+ this.usedVariables = usedVariables;
+ }
+
+ public Map<String, TypeInfoCollector.MethodInfo> getUnpairedGettersOrSetters() {
+ if (unpairedGettersOrSetters == null) {
+ unpairedGettersOrSetters = new HashMap<String, TypeInfoCollector.MethodInfo>();
+ }
+ return unpairedGettersOrSetters;
+ }
+
+ public void clearUnpairedGettersOrSetters() {
+ getUnpairedGettersOrSetters().clear();
+ }
+
+ }
+
+ public SeamELOperandResolveStatus resolveSeamELOperand(ISeamProject project, IFile file, String documentContent, CharSequence prefix,
+ int position, boolean returnEqualedVariablesOnly) throws BadLocationException, StringIndexOutOfBoundsException {
+
+
+ SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(documentContent, position + prefix.length());
+ SeamELOperandResolveStatus status= new SeamELOperandResolveStatus(tokenizer.getTokens());
+
+ List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
+ ScopeType scope = getScope(project, file);
+ List<List<ELOperandToken>> variations = getPossibleVarsFromPrefix(status.getTokens());
+
+ if (variations.isEmpty()) {
+ resolvedVariables = resolveVariables(project, scope,
+ status.getTokens(), status.getTokens(),
+ returnEqualedVariablesOnly);
+ } else {
+ for (List<ELOperandToken> variation : variations) {
+ List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
+ resolvedVars = resolveVariables(project, scope,
+ variation, status.getTokens(),
+ returnEqualedVariablesOnly);
+ if (resolvedVars != null && !resolvedVars.isEmpty()) {
+ resolvedVariables = resolvedVars;
+ status.setLastResolvedToken(variation.get(variation.size() - 1));
+ break;
+ }
+ }
+ }
+
+ // Save all resolved variables. It's useful for incremental validation.
+ if(resolvedVariables!=null && resolvedVariables.size()>0) {
+ status.setUsedVariables(resolvedVariables);
+ }
+
+ if (status.getResolvedTokens().isEmpty() &&
+ !returnEqualedVariablesOnly &&
+ status.getTokens().size() > 0 &&
+ status.getTokens().get(status.getTokens().size() - 1).getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
+ // no vars are resolved
+ // the tokens are the part of var name ended with a separator (.)
+ resolvedVariables = resolveVariables(project, scope, status.getTokens(), status.getTokens(), returnEqualedVariablesOnly);
+ String prefixString = prefix.toString();
+ Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ for (ISeamContextVariable var : resolvedVariables) {
+ String varName = var.getName();
+ if(varName.startsWith(prefixString)) {
+ proposals.add(varName.substring(prefixString.length()));
+ }
+ }
+ status.setProposals(proposals);
+ return status;
+ }
+
+
+ // Here we have a list of vars for some part of expression
+ // OK. we'll proceed with members of these vars
+ if (areEqualExpressions(status.getResolvedTokens(), status.getTokens())) {
+ // First segment is the last one
+ Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ for (ISeamContextVariable var : resolvedVariables) {
+ String varName = var.getName();
+ String prefixString = prefix.toString();
+ if(prefixString.length()<=varName.length()) {
+ proposals.add(varName.substring(prefixString.length()));
+ } else if(returnEqualedVariablesOnly) {
+ proposals.add(varName);
+ }
+ }
+ status.setLastResolvedToken(status.getTokens().isEmpty() ? null : status.getTokens().get(status.getTokens().size() - 1));
+ status.setProposals(proposals);
+ return status;
+ }
+
+ // First segment is found - proceed with next tokens
+ int startTokenIndex = status.getResolvedTokens().size();
+ List<TypeInfoCollector.MemberInfo> members = new ArrayList<TypeInfoCollector.MemberInfo>();
+ for (ISeamContextVariable var : resolvedVariables) {
+ TypeInfoCollector.MemberInfo member = SeamExpressionResolver.getMemberInfoByVariable(var, returnEqualedVariablesOnly);
+ if (member != null && !members.contains(member))
+ members.add(member);
+ }
+ for (int i = startTokenIndex; i < status.getTokens().size() && members.size() > 0; i++) {
+ ELOperandToken token = status.getTokens().get(i);
+ if (i < status.getTokens().size() - 1) { // inside expression
+ if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
+ // proceed with next token
+ status.setLastResolvedToken(token);
+ continue;
+ }
+ if (token.getType() == ELOperandToken.EL_NAME_TOKEN) {
+ // Find properties for the token
+ String name = token.getText();
+ List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
+ for (TypeInfoCollector.MemberInfo mbr : members) {
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
+ for (TypeInfoCollector.MemberInfo property : properties) {
+ StringBuffer propertyName = new StringBuffer(property.getName());
+ if (property instanceof TypeInfoCollector.MethodInfo) { // Setter or getter
+ propertyName.delete(0, (propertyName.charAt(0) == 'i' ? 2 : 3));
+ propertyName.setCharAt(0, Character.toLowerCase(propertyName.charAt(0)));
+ }
+ if (name.equals(propertyName.toString())) {
+ newMembers.add(property);
+ }
+ }
+ }
+ members = newMembers;
+ if (members != null && members.size() > 0)
+ status.setLastResolvedToken(token);
+ }
+ if (token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
+ // Find methods for the token
+ String name = token.getText();
+ if (name.indexOf('(') != -1) {
+ name = name.substring(0, name.indexOf('('));
+ }
+ List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
+ for (TypeInfoCollector.MemberInfo mbr : members) {
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ List<TypeInfoCollector.MemberInfo> methods = infos.getMethods();
+ for (TypeInfoCollector.MemberInfo method : methods) {
+ if (name.equals(method.getName())) {
+ newMembers.add(method);
+ }
+ }
+ }
+ members = newMembers;
+ if (members != null && members.size() > 0)
+ status.setLastResolvedToken(token);
+ }
+ } else { // Last segment
+ Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
+ // return all the methods + properties
+ for (TypeInfoCollector.MemberInfo mbr : members) {
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ proposals.addAll(infos.getMethodPresentations());
+ proposals.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
+ }
+ } else if (token.getType() == ELOperandToken.EL_NAME_TOKEN ||
+ token.getType() == ELOperandToken.EL_METHOD_TOKEN) {
+ // return filtered methods + properties
+ Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ for (TypeInfoCollector.MemberInfo mbr : members) {
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ proposalsToFilter.addAll(infos.getMethodPresentations());
+ proposalsToFilter.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
+ }
+ for (String proposal : proposalsToFilter) {
+ // We do expect nothing but name for method tokens (No round brackets)
+ String filter = token.getText();
+ if(returnEqualedVariablesOnly) {
+ // This is used for validation.
+ if (proposal.equals(filter)) {
+ proposals.add(proposal);
+ if(status.getUnpairedGettersOrSetters()!=null) {
+ TypeInfoCollector.MethodInfo unpirMethod = status.getUnpairedGettersOrSetters().get(filter);
+ status.clearUnpairedGettersOrSetters();
+ if(unpirMethod!=null) {
+ status.getUnpairedGettersOrSetters().put(filter, unpirMethod);
+ }
+ }
+ break;
+ }
+ } else {
+ // This is used for CA.
+ if (proposal.startsWith(filter)) {
+ proposals.add(proposal.substring(filter.length()));
+ }
+ }
+ }
+ }
+ status.setProposals(proposals);
+ if (status.isOK()){
+ status.setLastResolvedToken(token);
+ }
+ }
+ }
+
+ if(status.getProposals().isEmpty() && status.getUnpairedGettersOrSetters()!=null) {
+ status.clearUnpairedGettersOrSetters();
+ }
+ return status;
+
+ }
+
private String computeVariableName(List<ELOperandToken> tokens){
if (tokens == null)
tokens = new ArrayList<ELOperandToken>();
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-11-05 18:26:20 UTC (rev 4717)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-11-05 19:12:06 UTC (rev 4718)
@@ -277,26 +277,29 @@
position = 0;
}
- Set<ISeamContextVariable> usedVariables = new HashSet<ISeamContextVariable>();
- Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters = new HashMap<String, TypeInfoCollector.MethodInfo>();
+// Set<ISeamContextVariable> usedVariables = new HashSet<ISeamContextVariable>();
+// Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters = new HashMap<String, TypeInfoCollector.MethodInfo>();
- List<String> suggestions = engine.getCompletions(project, file, operand, prefix, position, true, usedVariables, unpairedGettersOrSetters);
-
- if(usedVariables.size()==0 && suggestions.size()==0) {
+// List<String> suggestions = engine.getCompletions(project, file, operand, prefix, position, true, usedVariables, unpairedGettersOrSetters);
+
+ SeamELCompletionEngine.SeamELOperandResolveStatus status =
+ engine.resolveSeamELOperand(project, file, operand, prefix, position, true);
+
+ if(status.getUsedVariables().size()==0 && status.isError()) {
// Save resources with unknown variables names
validationContext.addUnnamedElResource(file.getFullPath());
} else {
// Save links between resource and used variables names
- for(ISeamContextVariable variable: usedVariables) {
+ for(ISeamContextVariable variable: status.getUsedVariables()) {
validationContext.addLinkedElResource(variable.getName(), file.getFullPath());
}
}
// Check pair for getter/setter
- if(unpairedGettersOrSetters.size()>0) {
- TypeInfoCollector.MethodInfo unpairedMethod = unpairedGettersOrSetters.values().iterator().next();
+ if(status.getUnpairedGettersOrSetters().size()>0) {
+ TypeInfoCollector.MethodInfo unpairedMethod = status.getUnpairedGettersOrSetters().values().iterator().next();
String methodName = unpairedMethod.getName();
- String propertyName = unpairedGettersOrSetters.keySet().iterator().next();
+ String propertyName = status.getUnpairedGettersOrSetters().keySet().iterator().next();
String missingMethodName = SeamCoreMessages.SEAM_EL_VALIDATOR_SETTER;
String existedMethodName = SeamCoreMessages.SEAM_EL_VALIDATOR_GETTER;
if(methodName.startsWith("s")) { //$NON-NLS-1$
@@ -306,21 +309,23 @@
addError(UNPAIRED_GETTER_OR_SETTER_MESSAGE_ID, SeamPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, operand.length(), documnetOffset, file);
}
- if (suggestions != null && suggestions.size() > 0) {
+ if (status.isOK()) {
// It's valid EL.
return;
}
- SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(operand, position + prefix.length());
- List<ELOperandToken> tokens = tokenizer.getTokens();
+// SeamELOperandTokenizer tokenizer = new SeamELOperandTokenizer(operand, position + prefix.length());
+// List<ELOperandToken> tokens = tokenizer.getTokens();
+ List<ELOperandToken> tokens = status.getUnresolvedTokens();
+
for (ELOperandToken token : tokens) {
if((token.getType()==ELOperandToken.EL_NAME_TOKEN) || (token.getType()==ELOperandToken.EL_METHOD_TOKEN)) {
- if(!isResolvedVar(token.getText(), usedVariables)) {
+// if(!isResolvedVar(token.getText(), usedVariables)) {
varName = token.getText();
offsetOfVarName = documnetOffset + operandToken.getStart() + token.getStart();
lengthOfVarName = varName.length();
break;
- }
+// }
}
}
}
17 years, 1 month
JBoss Tools SVN: r4717 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-05 13:26:20 -0500 (Mon, 05 Nov 2007)
New Revision: 4717
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java
Log:
Removed @Override to compile code
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2007-11-05 17:46:14 UTC (rev 4716)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2007-11-05 18:26:20 UTC (rev 4717)
@@ -20,6 +20,7 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -27,11 +28,10 @@
import org.w3c.dom.Node;
public class RichFacesPanelBarTemplate extends VpeAbstractTemplate implements
- VpeToggableTemplate {
+ VpeToggableTemplate, VpeTemplate {
private static Map toggleMap = new HashMap();
- @Override
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java 2007-11-05 17:46:14 UTC (rev 4716)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java 2007-11-05 18:26:20 UTC (rev 4717)
@@ -149,7 +149,6 @@
return creationData;
}
- @Override
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
return encode(null, (Element) sourceNode, visualDocument, null, false,
17 years, 1 month
JBoss Tools SVN: r4716 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2007-11-05 12:46:14 -0500 (Mon, 05 Nov 2007)
New Revision: 4716
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1247
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css 2007-11-05 17:45:17 UTC (rev 4715)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css 2007-11-05 17:46:14 UTC (rev 4716)
@@ -140,6 +140,10 @@
vertical-align: middle;
}
+.rich-calendar-popupinput {
+ vertical-align: middle;
+}
+
.rich-calendar-today {
background-color: #ff7800; /*unknown parameter - need to add*/
color: #ffebda; /*unknown parameter - need to add*/
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2007-11-05 17:45:17 UTC (rev 4715)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2007-11-05 17:46:14 UTC (rev 4716)
@@ -133,6 +133,7 @@
+ (CALENDAR_WIDTH - CALENDAR_IMAGE_WIDTH) + "px;");
input.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR, ATTRIBUTE_TEXT);
input.setAttribute(HtmlComponentUtil.HTML_READONLY_ATTR, "true");
+ input.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-calendar-popupinput");
String value = source.getAttribute(HtmlComponentUtil.HTML_VALUE_ATTR);
if (value != null) {
input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
17 years, 1 month
JBoss Tools SVN: r4715 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2007-11-05 12:45:17 -0500 (Mon, 05 Nov 2007)
New Revision: 4715
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1213
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2007-11-05 17:38:39 UTC (rev 4714)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2007-11-05 17:45:17 UTC (rev 4715)
@@ -79,24 +79,23 @@
</vpe:template>
</vpe:tag>
- <vpe:tag name="s:button" case-sensitive="yes">
- <vpe:if test="attrpresent('value')">
- <vpe:template children="false" modify="yes">
- <button type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}" title="{tagstring()}">
- <vpe:value expr="{@value}" />
- </button>
+ <vpe:tag name="s:button" case-sensitive="yes">
+ <vpe:if test="@type=''">
+ <vpe:template children="no" modify="no">
+ <input type="submit" value="{@value}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
</vpe:template>
</vpe:if>
- <vpe:if test="not(attrpresent('value'))">
- <vpe:template children="false" modify="yes">
- <button type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}" title="{tagstring()}">
- Submit Query
- </button>
+ <vpe:if test="(@type='button')|(@type='reset')|(@type='submit')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{@value}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
</vpe:template>
</vpe:if>
- </vpe:tag>
+ <vpe:if test="@type='image'">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" src="{src(@image)}" value="{@value}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
<vpe:tag name="s:link" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
17 years, 1 month
JBoss Tools SVN: r4714 - trunk/common/plugins/org.jboss.tools.common.model/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-05 12:38:39 -0500 (Mon, 05 Nov 2007)
New Revision: 4714
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta
Log:
http://jira.jboss.com/jira/browse/JBIDE-1269
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta 2007-11-05 16:43:57 UTC (rev 4713)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_page.meta 2007-11-05 17:38:39 UTC (rev 4714)
@@ -278,7 +278,7 @@
</XActionItem>
<XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
<XActionItem BaseActionName="Delete"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler"
+ HandlerClassName="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
</XActionItem>
<XActionItem ICON="action.empty" kind="list" name="Properties">
@@ -397,7 +397,7 @@
</XActionItem>
<XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
<XActionItem BaseActionName="Delete"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler"
+ HandlerClassName="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
</XActionItem>
<XActionItem ICON="action.empty" kind="list" name="Properties">
@@ -496,7 +496,7 @@
</XActionItem>
<XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
<XActionItem BaseActionName="Delete"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler"
+ HandlerClassName="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
</XActionItem>
<XActionItem ICON="action.empty" kind="list" name="Properties">
@@ -601,7 +601,7 @@
</XActionItem>
<XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
<XActionItem BaseActionName="Delete"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler"
+ HandlerClassName="org.jboss.tools.common.model.options.impl.DeleteGroupHandler"
ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
</XActionItem>
<XActionItem ICON="action.empty" kind="list" name="Properties">
17 years, 1 month