JBoss Tools SVN: r22084 - in workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces: src/org/jboss/tools/jsf/vpe/template/mock/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-05-14 08:34:39 -0400 (Fri, 14 May 2010)
New Revision: 22084
Added:
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputTextTemplate.java
Modified:
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUIComponent.java
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4710 input text has been added template
Added: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputTextTemplate.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputTextTemplate.java (rev 0)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputTextTemplate.java 2010-05-14 12:34:39 UTC (rev 22084)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.icefaces.template;
+
+import javax.faces.render.Renderer;
+
+import org.jboss.tools.jsf.vpe.icefaces.IceFacesActivator;
+import org.jboss.tools.jsf.vpe.icefaces.utill.VpeRendererUtil;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeFacesContext;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeUICommand;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeUIComponent;
+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.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class IceInputTextTemplate extends VpeAbstractTemplate{
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ try {
+ VpeFacesContext.getInstance().setResponseWriter(null);
+ Renderer render = new com.icesoft.faces.component.ext.renderkit.InputTextRenderer();
+ VpeUICommand uiComponent = new VpeUICommand(
+ (Element) sourceNode);
+ Node result = VpeRendererUtil.processRenderer(render, uiComponent);
+ nsIDOMNode resultVisualNode = VpeRendererUtil.createVisualNode(
+ result, visualDocument);
+ if (resultVisualNode.getNodeType() == Node.TEXT_NODE) {
+ nsIDOMElement domElement = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
+ domElement.appendChild(resultVisualNode);
+ resultVisualNode = domElement;
+ }
+ return new VpeCreationData(resultVisualNode);
+ } catch (Throwable th) {
+ IceFacesActivator.getDefault().logError(th);
+ }
+ return VpeTemplateManager.getInstance().getDefTemplate().create(
+ pageContext, sourceNode, visualDocument);
+ }
+
+}
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUIComponent.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUIComponent.java 2010-05-14 12:32:31 UTC (rev 22083)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUIComponent.java 2010-05-14 12:34:39 UTC (rev 22084)
@@ -12,6 +12,11 @@
import java.util.HashMap;
import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.PropertyNotWritableException;
+import javax.el.ValueExpression;
import javax.faces.context.FacesContext;
import javax.faces.el.EvaluationException;
import javax.faces.el.PropertyNotFoundException;
@@ -65,36 +70,72 @@
}
/* (non-Javadoc)
- * @see javax.faces.component.UIComponent#getValueBinding(java.lang.String)
+ * @see javax.faces.component.UIComponent#getValueExpression(java.lang.String)
*/
@Override
- public ValueBinding getValueBinding(String arg0) {
+ public ValueExpression getValueExpression(final String name) {
+ return new ValueExpression(){
- final String value=arg0;
- return new ValueBinding() {
-
@Override
- public void setValue(FacesContext arg0, Object arg1)
- throws EvaluationException, PropertyNotFoundException {
+ public Class<?> getExpectedType() {
+ // TODO Auto-generated method stub
+ return String.class;
}
-
+
@Override
- public boolean isReadOnly(FacesContext arg0) throws EvaluationException,
- PropertyNotFoundException {
- return true;
+ public Class<?> getType(ELContext arg0)
+ throws NullPointerException, PropertyNotFoundException,
+ ELException {
+ // TODO Auto-generated method stub
+ return String.class;
}
-
+
@Override
- public Object getValue(FacesContext arg0) throws EvaluationException,
- PropertyNotFoundException {
- return getAttributes().get(value);
+ public Object getValue(ELContext arg0) throws NullPointerException,
+ PropertyNotFoundException, ELException {
+ return getAttributes().get(name);
}
-
+
@Override
- public Class getType(FacesContext arg0) throws EvaluationException,
- PropertyNotFoundException {
- return null;
+ public boolean isReadOnly(ELContext arg0)
+ throws NullPointerException, PropertyNotFoundException,
+ ELException {
+ // TODO Auto-generated method stub
+ return false;
}
+
+ @Override
+ public void setValue(ELContext arg0, Object arg1)
+ throws NullPointerException, PropertyNotFoundException,
+ PropertyNotWritableException, ELException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean equals(Object arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getExpressionString() {
+ // TODO Auto-generated method stub
+ return (String) getAttributes().get(name);
+ }
+
+ @Override
+ public int hashCode() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isLiteralText() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
};
}
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml 2010-05-14 12:32:31 UTC (rev 22083)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml 2010-05-14 12:34:39 UTC (rev 22084)
@@ -3,12 +3,6 @@
<vpe:templates xmlns:vpe="http://org.jboss.org/tools/vpe/template"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<vpe:template-taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice" />
-
- <vpe:tag name="ice:inputText" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div>#Input Text</div>
- </vpe:template>
- </vpe:tag>
<vpe:tag name="ice:outputText" case-sensitive="yes">
<vpe:template children="yes" modify="yes"
@@ -50,4 +44,17 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
+ <vpe:tag name="ice:inputText" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.icefaces.template.IceInputTextTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
15 years, 11 months
JBoss Tools SVN: r22083 - in trunk/cdi/plugins/org.jboss.tools.cdi.text.ext: src/org/jboss/tools/cdi/text/ext and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-05-14 08:32:31 -0400 (Fri, 14 May 2010)
New Revision: 22083
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/DisposerHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerHyperlink.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/CDIExtensionsMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-6251
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties 2010-05-14 12:23:04 UTC (rev 22082)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.properties 2010-05-14 12:32:31 UTC (rev 22083)
@@ -1,3 +1,4 @@
providerName=JBoss by Red Hat
InjectedPointHyperlinkDetector=CDI Injected Point
+ProducerDisposerHyperlinkDetector=CDI Produser & Disposer
Bundle-Name.0 = CDI Text Editors Extensions
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml 2010-05-14 12:23:04 UTC (rev 22082)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml 2010-05-14 12:32:31 UTC (rev 22083)
@@ -11,5 +11,15 @@
targetId="org.eclipse.jdt.ui.javaCode">
</hyperlinkDetector>
</extension>
+
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
+ <hyperlinkDetector
+ class="org.jboss.tools.cdi.text.ext.hyperlink.ProducerDisposerHyperlinkDetector"
+ id="org.jboss.tools.cdi.text.ext.hyperlink.ProducerDisposerHyperlinkDetector"
+ name="%ProducerDisposerHyperlinkDetector"
+ targetId="org.eclipse.jdt.ui.javaCode">
+ </hyperlinkDetector>
+ </extension>
</plugin>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/CDIExtensionsMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/CDIExtensionsMessages.java 2010-05-14 12:23:04 UTC (rev 22082)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/CDIExtensionsMessages.java 2010-05-14 12:32:31 UTC (rev 22083)
@@ -22,4 +22,6 @@
public static String CDI_EXT_PLUGIN_NO_MESSAGE;
public static String CDI_INJECTED_POINT_HYPERLINK_OPEN_BEAN;
public static String CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECTED_CLASS;
+ public static String CDI_PRODUCER_DISPOSER_HYPERLINK_OPEN_BOUND_DISPOSER;
+ public static String CDI_PRODUCER_DISPOSER_HYPERLINK_OPEN_BOUND_PRODUCER;
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/DisposerHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/DisposerHyperlink.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/DisposerHyperlink.java 2010-05-14 12:32:31 UTC (rev 22083)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.cdi.text.ext.hyperlink;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
+
+public class DisposerHyperlink extends AbstractHyperlink{
+ IMethod method;
+ IRegion region;
+
+ public DisposerHyperlink(IRegion region, IMethod method, IDocument document){
+ this.method = method;
+ this.region = region;
+ setDocument(document);
+ }
+
+
+ @Override
+ protected IRegion doGetHyperlinkRegion(int offset) {
+ return region;
+ }
+
+ protected void doHyperlink(IRegion region) {
+ IEditorPart part = null;
+
+ if(method != null){
+ try{
+ part = JavaUI.openInEditor(method);
+ }catch(JavaModelException ex){
+ CDIExtensionsPlugin.log(ex);
+ }catch(PartInitException ex){
+ CDIExtensionsPlugin.log(ex);
+ }
+
+ if (part != null) {
+ JavaUI.revealInEditor(part, (IJavaElement)method);
+ }
+ }
+ if (part == null)
+ openFileFailed();
+ }
+
+ @Override
+ public String getHyperlinkText() {
+ String text = CDIExtensionsMessages.CDI_PRODUCER_DISPOSER_HYPERLINK_OPEN_BOUND_DISPOSER+" ";
+ if(method != null)
+ text += method.getElementName();
+ return text;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/DisposerHyperlink.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java 2010-05-14 12:32:31 UTC (rev 22083)
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * 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.cdi.text.ext.hyperlink;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.ICodeAssist;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IProducer;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+
+public class ProducerDisposerHyperlinkDetector extends AbstractHyperlinkDetector {
+
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
+ IRegion region, boolean canShowMultipleHyperlinks) {
+ ITextEditor textEditor= (ITextEditor)getAdapter(ITextEditor.class);
+ if (region == null || !canShowMultipleHyperlinks || !(textEditor instanceof JavaEditor))
+ return null;
+
+ int offset= region.getOffset();
+
+ IJavaElement input= EditorUtility.getEditorInputJavaElement(textEditor, false);
+ if (input == null)
+ return null;
+
+ if (input.getResource() == null || input.getResource().getProject() == null)
+ return null;
+
+ IDocument document= textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+ IRegion wordRegion= JavaWordFinder.findWord(document, offset);
+ if (wordRegion == null)
+ return null;
+
+ IFile file = null;
+
+ try {
+ IResource resource = input.getCorrespondingResource();
+ if (resource instanceof IFile)
+ file = (IFile) resource;
+ } catch (JavaModelException e) {
+ CDIExtensionsPlugin.log(e);
+ }
+
+ if(file == null)
+ return null;
+
+ Set<IBean> beans = getBeans(file);
+
+ if(beans == null)
+ return null;
+
+ IJavaElement[] elements = null;
+
+ try {
+ elements = ((ICodeAssist)input).codeSelect(wordRegion.getOffset(), wordRegion.getLength());
+ if (elements == null)
+ return null;
+
+ ArrayList<IHyperlink> hyperlinks = new ArrayList<IHyperlink>();
+ for (IJavaElement element : elements) {
+
+ if(element instanceof IType){
+ if(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME.equals(((IType) element).getFullyQualifiedName())){
+ ICompilationUnit cUnit = (ICompilationUnit)input;
+ element = cUnit.getElementAt(wordRegion.getOffset());
+ if(element == null)
+ continue;
+ }
+ }
+
+ if (element instanceof IMethod) {
+ for(IBean bean : beans){
+ if(bean instanceof IClassBean){
+ IProducerMethod producer = getProducer((IClassBean)bean, (IMethod)element);
+ if(producer != null){
+ List<IMethod> disposers = findDisposerMethods(producer);
+ for(IMethod method : disposers){
+ hyperlinks.add(new DisposerHyperlink(region, method, document));
+ }
+ }else{
+ IBeanMethod disposer = getDisposer((IClassBean)bean, (IMethod)element);
+ if(disposer != null){
+ List<IMethod> producers = findProducerMethods((IClassBean)bean, disposer);
+ for(IMethod method : producers){
+ hyperlinks.add(new ProducerHyperlink(region, method, document));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (hyperlinks != null && !hyperlinks.isEmpty()) {
+ return (IHyperlink[])hyperlinks.toArray(new IHyperlink[hyperlinks.size()]);
+ }
+ } catch (JavaModelException jme) {
+ CDIExtensionsPlugin.log(jme);
+ }
+ return null;
+ }
+
+ private Set<IBean> getBeans(IFile file){
+ CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
+
+ if(cdiNature == null)
+ return null;
+
+
+ ICDIProject cdiProject = cdiNature.getDelegate();
+
+ if(cdiProject == null)
+ return null;
+
+
+ Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
+ return beans;
+ }
+
+ private IProducerMethod getProducer(IClassBean classBean, IMethod method){
+ for(IProducer producer : classBean.getProducers()){
+ if(producer instanceof IProducerMethod && ((IProducerMethod)producer).getMethod().equals(method))
+ return (IProducerMethod)producer;
+ }
+ return null;
+ }
+
+ private IBeanMethod getDisposer(IClassBean classBean, IMethod method){
+ for(IBeanMethod disposer : classBean.getDisposers()){
+ if(disposer.getMethod().equals(method))
+ return disposer;
+ }
+ return null;
+ }
+
+ private List<IMethod> findProducerMethods(IClassBean classBean, IBeanMethod disposer){
+ ArrayList<IMethod> methods = new ArrayList<IMethod>();
+ for(IProducer producer : classBean.getProducers()){
+ if(producer instanceof IProducerMethod){
+ for(IBeanMethod beanMethod : producer.getCDIProject().resolveDisposers((IProducerMethod)producer)){
+ if(beanMethod.equals(disposer))
+ methods.add(((IProducerMethod)producer).getMethod());
+ }
+ }
+ }
+ return methods;
+ }
+
+ private List<IMethod> findDisposerMethods(IProducerMethod producer){
+ ArrayList<IMethod> methods = new ArrayList<IMethod>();
+ for(IBeanMethod beanMethod : producer.getCDIProject().resolveDisposers(producer)){
+ methods.add(beanMethod.getMethod());
+ }
+ return methods;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerDisposerHyperlinkDetector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerHyperlink.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerHyperlink.java 2010-05-14 12:32:31 UTC (rev 22083)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.cdi.text.ext.hyperlink;
+
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
+
+public class ProducerHyperlink extends DisposerHyperlink{
+
+ public ProducerHyperlink(IRegion region, IMethod method, IDocument document){
+ super(region, method, document);
+ }
+
+ @Override
+ public String getHyperlinkText() {
+ String text = CDIExtensionsMessages.CDI_PRODUCER_DISPOSER_HYPERLINK_OPEN_BOUND_PRODUCER+" ";
+ if(method != null)
+ text += method.getElementName();
+ return text;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ProducerHyperlink.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties 2010-05-14 12:23:04 UTC (rev 22082)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/messages.properties 2010-05-14 12:32:31 UTC (rev 22083)
@@ -1,3 +1,5 @@
CDI_EXT_PLUGIN_NO_MESSAGE=No message
CDI_INJECTED_POINT_HYPERLINK_OPEN_BEAN=Open CDI Bean
CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECTED_CLASS=Open Injected Class
+CDI_PRODUCER_DISPOSER_HYPERLINK_OPEN_BOUND_DISPOSER=Open Bound Disposer Method
+CDI_PRODUCER_DISPOSER_HYPERLINK_OPEN_BOUND_PRODUCER=Open Bound Producer Method
15 years, 11 months
JBoss Tools SVN: r22082 - trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-05-14 08:23:04 -0400 (Fri, 14 May 2010)
New Revision: 22082
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebWizardsTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6257 , junits for duplicated wizards were removed.
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebWizardsTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebWizardsTest.java 2010-05-14 12:14:12 UTC (rev 22081)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebWizardsTest.java 2010-05-14 12:23:04 UTC (rev 22082)
@@ -36,11 +36,11 @@
*/
public class WebWizardsTest extends AbstractModelNewWizardTest {
- public void testNewCssWizardInstanceIsCreated() {
+ public void _testNewCssWizardInstanceIsCreated() {
testNewWizardInstanceIsCreated(NewCSSFileWizard.class.getName());
}
- public void testNewJsWizardInstanceIsCreated() {
+ public void _testNewJsWizardInstanceIsCreated() {
testNewWizardInstanceIsCreated(NewJSFileWizard.class.getName());
}
@@ -48,14 +48,19 @@
testNewWizardInstanceIsCreated(NewWebFileWizard.class.getName());
}
- public void testNewJspWizardInstanceIsCreated() {
+ public void _testNewJspWizardInstanceIsCreated() {
testNewWizardInstanceIsCreated(NewJSPFileWizard.class.getName());
}
- //rewritten by Maksim Areshkau, as fix for https://jira.jboss.org/jira/browse/JBIDE-6216,
- //https://jira.jboss.org/jira/browse/JBIDE-6190
+ /*
+ * rewritten by Maksim Areshkau, as fix for
+ * https://jira.jboss.org/jira/browse/JBIDE-6216,
+ * https://jira.jboss.org/jira/browse/JBIDE-6190
+ */
public void testNewXhtmlWizardInstanceIsCreated() {
- //commented by Maksim Areshkau, because in this methid not called
- //init for wizard
+ /*
+ * commented by Maksim Areshkau,
+ * because in this method not called init for wizard
+ */
//testNewWizardInstanceIsCreated(NewXHTMLWizard.class.getName());
IWorkbenchWizard
aWizard = (IWorkbenchWizard) WorkbenchUtils.findWizardByDefId(
@@ -64,7 +69,9 @@
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
aWizard);
try {
- //here we show view to get initialized selection
+ /*
+ * here we show view to get initialized selection
+ */
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.jdt.ui.PackageExplorer"); //$NON-NLS-1$
} catch (PartInitException e) {
fail(e.toString());
@@ -85,7 +92,7 @@
}
}
- public void testNewHtmlWizardInstanceIsCreated() {
+ public void _testNewHtmlWizardInstanceIsCreated() {
testNewWizardInstanceIsCreated(NewHTMLFileWizard.class.getName());
}
15 years, 11 months
JBoss Tools SVN: r22081 - trunk/jst/plugins/org.jboss.tools.jst.web.ui.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-05-14 08:14:12 -0400 (Fri, 14 May 2010)
New Revision: 22081
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-6257 , duplicated wizards were removed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2010-05-14 12:08:31 UTC (rev 22080)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2010-05-14 12:14:12 UTC (rev 22081)
@@ -102,6 +102,7 @@
<category name="%NewWizardCat_JBossToolsWeb"
id="org.jboss.tools.jst.web">
</category>
+ <!--
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard"
@@ -117,6 +118,7 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
+ -->
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewXHTMLWizard"
@@ -146,6 +148,7 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
+ <!--
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard"
@@ -161,6 +164,7 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
+ -->
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewWebFileWizard"
@@ -176,6 +180,7 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
+ <!--
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.common.model.ui.wizard.newfile.NewJSPFileWizard"
@@ -191,7 +196,7 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
-<!-- <wizard
+ <wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard"
finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
@@ -206,7 +211,6 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
--->
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.common.model.ui.wizard.newfile.NewHTMLFileWizard"
@@ -222,6 +226,7 @@
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
+ -->
<wizard
category="org.jboss.tools.jst.web"
class="org.jboss.tools.common.model.ui.wizard.newfile.NewPropertiesFileWizard"
15 years, 11 months
JBoss Tools SVN: r22080 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-14 08:08:31 -0400 (Fri, 14 May 2010)
New Revision: 22080
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: bean class of a session bean is annotated @Interceptor or @Decorator
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-05-14 09:43:34 UTC (rev 22079)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -254,4 +254,53 @@
}
return declarations;
}
+
+ /**
+ * Returns true if the class bean is a session bean.
+ *
+ * @param bean
+ * @return
+ */
+ public static IAnnotationDeclaration getSessionDeclaration(IClassBean bean) {
+ IAnnotationDeclaration declaration = bean.getAnnotation(CDIConstants.STATEFUL_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ return declaration;
+ }
+ declaration = bean.getAnnotation(CDIConstants.STATELESS_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ return declaration;
+ }
+ declaration = bean.getAnnotation(CDIConstants.SINGLETON_ANNOTATION_TYPE_NAME);
+ return declaration;
+ }
+
+ /**
+ * Returns true if the class bean is a session bean.
+ *
+ * @param bean
+ * @return
+ */
+ public static boolean isSessionBean(IBean bean) {
+ return bean instanceof ISessionBean || (bean instanceof IClassBean && (bean.getAnnotation(CDIConstants.STATEFUL_ANNOTATION_TYPE_NAME)!=null || bean.getAnnotation(CDIConstants.STATELESS_ANNOTATION_TYPE_NAME)!=null || bean.getAnnotation(CDIConstants.SINGLETON_ANNOTATION_TYPE_NAME)!=null));
+ }
+
+ /**
+ * Returns true if the class bean is a decorator.
+ *
+ * @param bean
+ * @return
+ */
+ public static boolean isDecorator(IBean bean) {
+ return bean instanceof IDecorator || (bean instanceof IClassBean && bean.getAnnotation(CDIConstants.DECORATOR_STEREOTYPE_TYPE_NAME)!=null);
+ }
+
+ /**
+ * Returns true if the class bean is an interceptor.
+ *
+ * @param bean
+ * @return
+ */
+ public static boolean isInterceptor(IBean bean) {
+ return bean instanceof IInterceptor || (bean instanceof IClassBean && bean.getAnnotation(CDIConstants.INTERCEPTOR_ANNOTATION_TYPE_NAME)!=null);
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-14 09:43:34 UTC (rev 22079)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -229,7 +229,6 @@
validateStereotype(type);
}
- // TODO
return OK_STATUS;
}
@@ -248,8 +247,6 @@
}
IStereotype stereotype = cdiProject.getStereotype(file.getFullPath());
validateStereotype(stereotype);
-
- // TODO
}
/**
@@ -306,8 +303,6 @@
if(bean instanceof IClassBean) {
validateClassBean((IClassBean)bean);
}
-
- // TODO
}
private void validateClassBean(IClassBean bean) {
@@ -317,6 +312,7 @@
} else {
validateSessionBean((ISessionBean)bean);
}
+ validateMixedClassBean(bean);
}
private void validateDisposers(IClassBean bean) {
@@ -705,6 +701,36 @@
}
}
+ /**
+ * Validates class bean which may be both a session and decorator (or interceptor).
+ *
+ * @param bean
+ */
+ private void validateMixedClassBean(IClassBean bean) {
+ ITextSourceReference sessionDeclaration = CDIUtil.getSessionDeclaration(bean);
+ ITextSourceReference decoratorDeclaration = bean.getAnnotation(CDIConstants.DECORATOR_STEREOTYPE_TYPE_NAME);
+ ITextSourceReference interceptorDeclaration = bean.getAnnotation(CDIConstants.INTERCEPTOR_ANNOTATION_TYPE_NAME);
+
+ if(sessionDeclaration!=null) {
+ /*
+ * 3.2. Session beans
+ * - bean class of a session bean is annotated @Decorator
+ */
+ if(decoratorDeclaration!=null) {
+ addError(CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, sessionDeclaration, bean.getResource());
+ addError(CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, decoratorDeclaration, bean.getResource());
+ }
+ /*
+ * 3.2. Session beans
+ * - bean class of a session bean is annotated @Interceptor
+ */
+ if(interceptorDeclaration!=null) {
+ addError(CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR, CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, sessionDeclaration, bean.getResource());
+ addError(CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR, CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, interceptorDeclaration, bean.getResource());
+ }
+ }
+ }
+
private void validateSessionBean(ISessionBean bean) {
if(bean.isStateless()) {
/*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-05-14 09:43:34 UTC (rev 22079)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -70,7 +70,8 @@
public static String ILLEGAL_CONDITIONAL_OBSERVER;
public static String BOTH_INTERCEPTOR_AND_DECORATOR;
- public static String SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR;
+ public static String SESSION_BEAN_ANNOTATED_INTERCEPTOR;
+ public static String SESSION_BEAN_ANNOTATED_DECORATOR;
public static String PRODUCER_IN_INTERCEPTOR;
public static String PRODUCER_IN_DECORATOR;
public static String DISPOSER_IN_INTERCEPTOR;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-05-14 09:43:34 UTC (rev 22079)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-05-14 12:08:31 UTC (rev 22080)
@@ -49,7 +49,8 @@
ILLEGAL_CONDITIONAL_OBSERVER=Bean with scope @Dependent has an observer method declared receive=IF_EXISTS
BOTH_INTERCEPTOR_AND_DECORATOR=The bean class of a managed bean is annotated with both the @Interceptor and @Decorator stereotypes
-SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR=Bean class of a session bean is annotated @Interceptor or @Decorator
+SESSION_BEAN_ANNOTATED_INTERCEPTOR=Bean class of a session bean is annotated @Interceptor
+SESSION_BEAN_ANNOTATED_DECORATOR=Bean class of a session bean is annotated @Decorator
PRODUCER_IN_INTERCEPTOR=Interceptor has a member annotated @Produces
PRODUCER_IN_DECORATOR=Decorator has a member annotated @Produces
DISPOSER_IN_INTERCEPTOR=Interceptor has a method annotated @Disposes
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-14 09:43:34 UTC (rev 22079)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -101,7 +101,7 @@
CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_interceptor_and_decorator,
new String[][]{
{CDIPreferences.BOTH_INTERCEPTOR_AND_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_bothInterceptorAndDecorator_label},
-// {CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_sessionBeanAnnotatedInterceptorOrDecorator_label},
+ {CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_sessionBeanAnnotatedInterceptorOrDecorator_label},
// {CDIPreferences.PRODUCER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerInInterceptorOrDecorator_label},
{CDIPreferences.DISPOSER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_disposerInInterceptorOrDecorator_label},
// {CDIPreferences.MULTIPLE_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleDelegate_label},
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.sessionbeans;
+
+import javax.decorator.Decorator;
+import javax.ejb.Stateless;
+
+@Decorator
+@Stateless
+public class SessionBeanAnnotatedDecoratorBroken {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.sessionbeans;
+
+import javax.ejb.Singleton;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor
+@Singleton
+public class SessionBeanAnnotatedInterceptorBroken {
+ @AroundInvoke
+ public Object alwaysReturnThis(InvocationContext ctx) throws Exception {
+ return ctx.proceed();
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-14 09:43:34 UTC (rev 22079)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-14 12:08:31 UTC (rev 22080)
@@ -351,6 +351,28 @@
}
/**
+ * 3.2. Session beans
+ * - bean class of a session bean is annotated @Interceptor
+ *
+ * @throws Exception
+ */
+ public void testSessionBeanAnnotatedInterceptor() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedInterceptorBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.SESSION_BEAN_ANNOTATED_INTERCEPTOR, 8, 9);
+ }
+
+ /**
+ * 3.2. Session beans
+ * - bean class of a session bean is annotated @Decorator
+ *
+ * @throws Exception
+ */
+ public void testSessionBeanAnnotatedDecorator() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/SessionBeanAnnotatedDecoratorBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.SESSION_BEAN_ANNOTATED_DECORATOR, 6, 7);
+ }
+
+ /**
* 3.5.1. Declaring a resource
* - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
*
15 years, 11 months
JBoss Tools SVN: r22079 - trunk/esb/docs/esb_ref_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-05-14 05:43:34 -0400 (Fri, 14 May 2010)
New Revision: 22079
Modified:
trunk/esb/docs/esb_ref_guide/en-US/esb_support.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-11 - Updated the doc according to ESB for SOA-P 5.0 examples added.
Modified: trunk/esb/docs/esb_ref_guide/en-US/esb_support.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en-US/esb_support.xml 2010-05-14 08:17:38 UTC (rev 22078)
+++ trunk/esb/docs/esb_ref_guide/en-US/esb_support.xml 2010-05-14 09:43:34 UTC (rev 22079)
@@ -144,9 +144,36 @@
<para> Clicking <emphasis>
<property>Next</property>
- </emphasis> brings you to the wizard page where you can select a ESB project example from the example list.
- Every ESB example has two projects, one is a ESB project and another is a Java project used to test the ESB project.</para>
- <para>Here is a list of ready examples available:</para>
+ </emphasis> brings you to the wizard page where you can select a ESB project example from the example list.</para>
+
+ <figure>
+ <title>Project Example Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/05a_esb_project_example.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>Under the <property>Projects</property>
+ section you can find two categories related to ESB:</para>
+
+ <itemizedlist>
+ <listitem><para>ESB</para></listitem>
+ <listitem><para>ESB for SOA-P 5.0</para></listitem>
+ </itemizedlist>
+
+
+ <para>It means that if you use a runtime pointed to a SOA-P 5.0, you should download the examples from
+ the <emphasis>
+ <property>ESB for SOA-P 5.0</property>
+ </emphasis> category in order to avoid the incompatibility errors.
+ </para>
+ </note>
+
+ <para>Every ESB example has two projects, one is a ESB project and another is a Java project used to test the ESB project.</para>
+ <para>Here is a list of ready examples available in both categories (ESB and ESB for SOA-P 5.0):</para>
<itemizedlist>
15 years, 11 months
JBoss Tools SVN: r22078 - in workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces: resources and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-05-14 04:17:38 -0400 (Fri, 14 May 2010)
New Revision: 22078
Added:
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceCommandButtonTemplate.java
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUICommand.java
Modified:
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/.classpath
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/resources/jsf-api.jar
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/resources/jsf-impl.jar
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml
Log:
Processing ice button has been added, https://jira.jboss.org/jira/browse/JBIDE-4710
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/.classpath
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/.classpath 2010-05-14 01:02:42 UTC (rev 22077)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/.classpath 2010-05-14 08:17:38 UTC (rev 22078)
@@ -3,10 +3,10 @@
<classpathentry exported="true" kind="lib" path="resources/servlet-api.jar"/>
<classpathentry exported="true" kind="lib" path="resources/el-api.jar"/>
<classpathentry exported="true" kind="lib" path="resources/jsp-api.jar"/>
- <classpathentry exported="true" kind="lib" path="resources/jsf-api.jar" sourcepath="/home/mareshkau/Programs/mojarra-2.0.0-RC-source.zip"/>
+ <classpathentry exported="true" kind="lib" path="resources/jsf-api.jar" sourcepath="/home/mareshkau/Programs/mojarra-1.2_12-source.zip"/>
<classpathentry exported="true" kind="lib" path="resources/icefaces-facelets.jar"/>
<classpathentry exported="true" kind="lib" path="resources/icefaces.jar" sourcepath="/home/mareshkau/Programs/ICEfaces-1.8.1-src.zip"/>
- <classpathentry exported="true" kind="lib" path="resources/icefaces-comps.jar"/>
+ <classpathentry exported="true" kind="lib" path="resources/icefaces-comps.jar" sourcepath="/home/mareshkau/Programs/ICEfaces-1.8.1-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/resources/jsf-api.jar
===================================================================
(Binary files differ)
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/resources/jsf-impl.jar
===================================================================
(Binary files differ)
Added: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceCommandButtonTemplate.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceCommandButtonTemplate.java (rev 0)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceCommandButtonTemplate.java 2010-05-14 08:17:38 UTC (rev 22078)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.icefaces.template;
+
+import javax.faces.render.Renderer;
+
+import org.jboss.tools.jsf.vpe.icefaces.IceFacesActivator;
+import org.jboss.tools.jsf.vpe.icefaces.utill.VpeRendererUtil;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeFacesContext;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeUICommand;
+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.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class IceCommandButtonTemplate extends VpeAbstractTemplate{
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ try {
+ VpeFacesContext.getInstance().setResponseWriter(null);
+ Renderer render = new com.icesoft.faces.component.ext.renderkit.ButtonRenderer();
+ VpeUICommand uiComponent = new VpeUICommand(
+ (Element) sourceNode);
+ Node result = VpeRendererUtil.processRenderer(render, uiComponent);
+ nsIDOMNode resultVisualNode = VpeRendererUtil.createVisualNode(
+ result, visualDocument);
+ if (resultVisualNode.getNodeType() == Node.TEXT_NODE) {
+ nsIDOMElement domElement = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
+ domElement.appendChild(resultVisualNode);
+ resultVisualNode = domElement;
+ }
+ return new VpeCreationData(resultVisualNode);
+ } catch (Throwable th) {
+ IceFacesActivator.getDefault().logError(th);
+ }
+ return VpeTemplateManager.getInstance().getDefTemplate().create(
+ pageContext, sourceNode, visualDocument);
+ }
+
+}
Added: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUICommand.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUICommand.java (rev 0)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeUICommand.java 2010-05-14 08:17:38 UTC (rev 22078)
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.template.mock.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.PropertyNotFoundException;
+import javax.el.PropertyNotWritableException;
+import javax.el.ValueExpression;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import com.icesoft.faces.component.ext.HtmlCommandButton;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class VpeUICommand extends HtmlCommandButton {
+
+ private Map attributesMap;
+
+ public VpeUICommand(Element sourceElement) {
+ attributesMap = new HashMap();
+ NamedNodeMap attributes = sourceElement.getAttributes();
+ for(int i=0;i<attributes.getLength();i++){
+ Node item = attributes.item(i);
+ attributesMap.put(item.getNodeName(), item.getNodeValue());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponentBase#getRendererType()
+ */
+ @Override
+ public String getRendererType() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponent#getAttributes()
+ */
+ @Override
+ public Map getAttributes() {
+ return attributesMap;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponent#getValueExpression(java.lang.String)
+ */
+ @Override
+ public ValueExpression getValueExpression(final String name) {
+ return new ValueExpression(){
+
+ @Override
+ public Class<?> getExpectedType() {
+ // TODO Auto-generated method stub
+ return String.class;
+ }
+
+ @Override
+ public Class<?> getType(ELContext arg0)
+ throws NullPointerException, PropertyNotFoundException,
+ ELException {
+ // TODO Auto-generated method stub
+ return String.class;
+ }
+
+ @Override
+ public Object getValue(ELContext arg0) throws NullPointerException,
+ PropertyNotFoundException, ELException {
+ return getAttributes().get(name);
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext arg0)
+ throws NullPointerException, PropertyNotFoundException,
+ ELException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void setValue(ELContext arg0, Object arg1)
+ throws NullPointerException, PropertyNotFoundException,
+ PropertyNotWritableException, ELException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean equals(Object arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getExpressionString() {
+ // TODO Auto-generated method stub
+ return (String) getAttributes().get(name);
+ }
+
+ @Override
+ public int hashCode() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isLiteralText() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ };
+ }
+
+}
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml 2010-05-14 01:02:42 UTC (rev 22077)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml 2010-05-14 08:17:38 UTC (rev 22078)
@@ -37,5 +37,17 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
-
+ <vpe:tag name="ice:commandButton" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.icefaces.template.IceCommandButtonTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
15 years, 11 months
JBoss Tools SVN: r22077 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-05-13 21:02:42 -0400 (Thu, 13 May 2010)
New Revision: 22077
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated fixed issues with 2 new JBDS JIRA issues added
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-05-14 00:05:30 UTC (rev 22076)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-05-14 01:02:42 UTC (rev 22077)
@@ -162,6 +162,11 @@
<itemizedlist>
<listitem>
<para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBDS-1215">JBDS-1215</ulink>: The installer was unable to locate the Seam runtimes within the JBoss Enterprise Application Platform 4.3. This occurred because the Seam runtime locations bundled within the JBoss Enterprise Application Platform 4.3 had recently changed from <filename>jboss-eap-4.3/seam</filename> and <filename>jboss-eap-4.3/seamfp</filename> to being <filename>jboss-eap-4.3/seam1</filename> and <filename>jboss-eap-4.3/seam2</filename>. This version of the JBoss Developer Studio includes an updated installer that contains the new Seam runtime locations. The installer is now able to find the Seam runtimes for the latest versions of the JBoss Enterprise Application Platform 4.3.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<ulink url="http://jira.jboss.com/jira/browse/JBDS-1187">JBDS-1187</ulink>: An empty URL tag (<url>) caused the <guimenuitem>Classic Update</guimenuitem> option under <menuchoice><guimenuitem>Preferences</guimenuitem><guimenuitem>General</guimenuitem><guimenuitem>Capabilities</guimenuitem></menuchoice> to error upon installation of a plug-in. To fix this issue the unused URL element has been removed. The <guimenuitem>Classic Update</guimenuitem> option is now usable and installs plug-ins correctly.
</para>
</listitem>
@@ -185,6 +190,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBDS-1091">JBDS-1091</ulink>: Two bugs were found. A problem was found in the <filename>org.jboss.tools.runtime_1.1.0</filename> plug-in and the visibility of the <property>Instance</property> field was changed from public to private. These bugs respectively caused the JBoss Developer Studio <guilabel>Server View</guilabel> to not display all available servers on occasion after using the installer and jBPM runtimes to not be initialized correctly. The <filename>org.jboss.tools.runtime_1.1.0</filename> plug-in has now been updated to force a refresh of the <guilabel>Server View</guilabel> post installation, which can be verified by a refresh message appearing in the log file and the <filename>org.jboss.tools.jbpm.common</filename> plug-in has been updated to set <code>public static final PreferencesManager INSTANCE = new PreferencesManager();</code>. By correcting the <filename>org.jboss.tools.runtime_1.1.0</filename> plug-!
in, all installed servers now appear in the <guilabel>Server View</guilabel> directly after installation of the JBoss Developer Studio through the installer. Fixing the <filename>org.jboss.tools.jbpm.common</filename> plug-in now allows for jBPM runtimes to be initialized correctly. Both issues are fixed with this update.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBDS-1088">JBDS-1088</ulink>: When installing the JBoss Developer Studio, if a previous installation was detected a dialog box would ask if you wished to overwrite the existing directory. If a user continued with installation they would then have a mixture of the old and new product versions. To better assist users a new warning is displayed in this situation, which indicates that you cannot upgrade by installing a new version over an old version. This new dialog box ensures that a user is informed of what will happen.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
15 years, 11 months
JBoss Tools SVN: r22076 - in trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui: views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2010-05-13 20:05:30 -0400 (Thu, 13 May 2010)
New Revision: 22076
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView.java
Log:
OPEN - issue JBIDE-6283: [tester] User input for request parameters/headers should be validated
https://jira.jboss.org/jira/browse/JBIDE-6283
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-05-13 23:44:21 UTC (rev 22075)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-05-14 00:05:30 UTC (rev 22076)
@@ -2,6 +2,8 @@
Command=wsconsume.sh
Bin=bin
Client=client
+DelimitedStringList_NO_COMMAS_WARNING=There are no commas delimiting the name and value for this key/value pair.
+DelimitedStringList_NO_EQUALS_DELIMITER_WARNING=Parameters should be in 'name=value' format.
Lib=lib
Endorsed=endorsed
# END NON-TRANSLATABLE
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-05-13 23:44:21 UTC (rev 22075)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-05-14 00:05:30 UTC (rev 22076)
@@ -27,6 +27,8 @@
public static String Bin;
public static String Command;
public static String Client;
+ public static String DelimitedStringList_NO_COMMAS_WARNING;
+ public static String DelimitedStringList_NO_EQUALS_DELIMITER_WARNING;
public static String Lib;
public static String Endorsed;
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java 2010-05-13 23:44:21 UTC (rev 22075)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/DelimitedStringList.java 2010-05-14 00:05:30 UTC (rev 22076)
@@ -26,6 +26,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
@@ -52,6 +53,7 @@
private List mPropsList;
private Text mAddText;
private boolean isReadOnly = false;
+ private Label mWarningLabel;
// current delimiter
private String mDelimiter = DELIMITER;
@@ -85,7 +87,7 @@
public DelimitedStringList(Composite parent, int style) {
this(parent, style, false);
}
-
+
/**
* Constructor
*
@@ -108,6 +110,13 @@
gridLayout.numColumns = 2;
setLayout(gridLayout);
{
+ this.mWarningLabel = new Label(this, SWT.NONE);
+ GridData wlGridData = new GridData(GridData.FILL_HORIZONTAL);
+ wlGridData.horizontalSpan = 2;
+ this.mWarningLabel.setLayoutData(wlGridData);
+ this.mWarningLabel.setForeground(this.mWarningLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
+ }
+ {
this.mAddText = new Text(this, SWT.BORDER | additionalStyles);
this.mAddText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
this.mAddText.addModifyListener(new AddTextModifyListener(this));
@@ -406,15 +415,25 @@
value = this.mAddText.getText();
boolean flag = value != null && value.trim().length() > 0;
boolean valid = validateText(value);
+ if (!valid) {
+ this.mWarningLabel.setText(this.mWarning);
+ } else {
+ this.mWarningLabel.setText(""); //$NON-NLS-1$
+ }
this.mAddButton.setEnabled(flag && valid);
+
}
}
private boolean validateText(String text) {
if (text != null && text.trim().length() > 0 && text.indexOf(",") > -1) { //$NON-NLS-1$
- this.mWarning = "There are no commas delimiting the name and value for this key/value pair."; //$NON-NLS-1$
+ this.mWarning = JBossWSUIMessages.DelimitedStringList_NO_COMMAS_WARNING;
return false;
}
+ else if (text != null && text.trim().length() > 0 && text.indexOf("=") == -1) { //$NON-NLS-1$
+ this.mWarning = JBossWSUIMessages.DelimitedStringList_NO_EQUALS_DELIMITER_WARNING;
+ return false;
+ }
this.mWarning = null;
return true;
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView.java 2010-05-13 23:44:21 UTC (rev 22075)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView.java 2010-05-14 00:05:30 UTC (rev 22076)
@@ -268,7 +268,7 @@
Button sampleButton = new Button(buttonBar, SWT.PUSH);
sampleButton.setText(JBossWSUIMessages.JAXRSWSTestView_Set_Sample_Data_Label);
- sampleButton.setVisible(true);
+ sampleButton.setVisible(false);
sampleButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
15 years, 11 months
JBoss Tools SVN: r22075 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-13 19:44:21 -0400 (Thu, 13 May 2010)
New Revision: 22075
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Fixed JUnit test.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-13 23:41:02 UTC (rev 22074)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-13 23:44:21 UTC (rev 22075)
@@ -285,7 +285,7 @@
* @throws Exception
*/
public void testStatelessWithApplicationScopeFails() throws Exception {
- IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/DachshundLocal_Broken.java");
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, 23);
}
15 years, 11 months