JBoss Tools SVN: r25342 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-09-30 11:53:01 -0400 (Thu, 30 Sep 2010)
New Revision: 25342
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
Log:
JBIDE-7196
An exception occurres while validating the CDI project
The Busy Cursor While dialog is not shown in case there is no display defined (Validation case)
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-09-30 15:31:22 UTC (rev 25341)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-09-30 15:53:01 UTC (rev 25342)
@@ -34,6 +34,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
import org.jboss.tools.cdi.internal.core.impl.ClassBean;
@@ -764,20 +765,24 @@
public static CDICoreNature getCDINatureWithProgress(final IProject project){
final CDICoreNature cdiNature = CDICorePlugin.getCDI(project, false);
if(cdiNature != null && !cdiNature.isStorageResolved()){
- try{
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress(){
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- monitor.beginTask(CDICoreMessages.CDI_UTIL_BUILD_CDI_MODEL, 10);
- monitor.worked(3);
- cdiNature.resolve();
- monitor.worked(7);
- }
- });
- }catch(InterruptedException ie){
- CDICorePlugin.getDefault().logError(ie);
- }catch(InvocationTargetException ite){
- CDICorePlugin.getDefault().logError(ite);
+ if (Display.getCurrent() != null) {
+ try{
+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress(){
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ monitor.beginTask(CDICoreMessages.CDI_UTIL_BUILD_CDI_MODEL, 10);
+ monitor.worked(3);
+ cdiNature.resolve();
+ monitor.worked(7);
+ }
+ });
+ }catch(InterruptedException ie){
+ CDICorePlugin.getDefault().logError(ie);
+ }catch(InvocationTargetException ite){
+ CDICorePlugin.getDefault().logError(ite);
+ }
+ } else {
+ cdiNature.resolve();
}
}
14 years, 2 months
JBoss Tools SVN: r25341 - trunk/esb/features/org.jboss.tools.esb.test.feature.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-09-30 11:31:22 -0400 (Thu, 30 Sep 2010)
New Revision: 25341
Modified:
trunk/esb/features/org.jboss.tools.esb.test.feature/feature.xml
Log:
JBIDE-6085
https://jira.jboss.org/browse/JBIDE-6085
Modified: trunk/esb/features/org.jboss.tools.esb.test.feature/feature.xml
===================================================================
--- trunk/esb/features/org.jboss.tools.esb.test.feature/feature.xml 2010-09-30 15:28:51 UTC (rev 25340)
+++ trunk/esb/features/org.jboss.tools.esb.test.feature/feature.xml 2010-09-30 15:31:22 UTC (rev 25341)
@@ -30,10 +30,4 @@
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.jboss.tools.esb.validator.test"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
</feature>
14 years, 2 months
JBoss Tools SVN: r25340 - in trunk/usage: tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-09-30 11:28:51 -0400 (Thu, 30 Sep 2010)
New Revision: 25340
Removed:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/ILinuxDistro.java
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/CurrentLinuxDistro.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/fakes/LinuxDistroFake.java
Log:
[JBIDE-7208] removed unused classes
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/CurrentLinuxDistro.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/CurrentLinuxDistro.java 2010-09-30 15:16:14 UTC (rev 25339)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/CurrentLinuxDistro.java 2010-09-30 15:28:51 UTC (rev 25340)
@@ -81,7 +81,7 @@
private final String releaseFilePath;
private String name;
- private LinuxDistro(String name, String releaseFilePath) {
+ protected LinuxDistro(String name, String releaseFilePath) {
this.name = name;
this.releaseFilePath = releaseFilePath;
}
@@ -94,7 +94,7 @@
return name;
}
- private String getVersion() {
+ public String getVersion() {
try {
String distroString = getDistroFileContent(releaseFilePath);
Matcher matcher = VERSION_REGEX.matcher(distroString);
@@ -106,7 +106,7 @@
return "";
}
- private String getNameAndVersion() {
+ public String getNameAndVersion() {
return new StringBuilder().append(getName()).append(getVersion()).toString();
}
Deleted: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/ILinuxDistro.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/ILinuxDistro.java 2010-09-30 15:16:14 UTC (rev 25339)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/eclipse/ILinuxDistro.java 2010-09-30 15:28:51 UTC (rev 25340)
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * 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.usage.googleanalytics.eclipse;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public interface ILinuxDistro {
-
- public class CurrentDistro {
-
- public static final ILinuxDistro DEBIAN = new LinuxDistro("Debian", "/etc/debian_version");
- public static final ILinuxDistro FEDORA = new LinuxDistro("Fedora", "/etc/fedora-release");
- public static final ILinuxDistro GENTOO = new LinuxDistro("Gentoo", "/etc/gentoo-release");
- public static final ILinuxDistro KNOPPIX = new LinuxDistro("Knoppix", "knoppix_version");
- public static final ILinuxDistro MANDRAKE = new LinuxDistro("Mandrake", "/etc/mandrake-release");
- public static final ILinuxDistro MANDRIVA = new LinuxDistro("Mandriva", "/etc/mandriva-release");
- public static final ILinuxDistro PLD = new LinuxDistro("PLD", "/etc/pld-release");
- public static final ILinuxDistro REDHAT = new LinuxDistro("RedHat", "/etc/redhat-release");
- public static final ILinuxDistro SLACKWARE = new LinuxDistro("Slackware", "/etc/slackware-version");
- public static final ILinuxDistro SUSE = new LinuxDistro("SUSE", "/etc/SuSE-release");
- public static final ILinuxDistro UBUNTU = new LinuxDistro("Ubuntu", "/etc/lsb-release");
- public static final ILinuxDistro YELLOWDOG = new LinuxDistro("YellowDog", "/etc/yellowdog-release");
-
- private static final ILinuxDistro[] ALL = new ILinuxDistro[] {
- DEBIAN,
- FEDORA,
- GENTOO,
- KNOPPIX,
- MANDRAKE,
- MANDRIVA,
- PLD,
- REDHAT,
- SLACKWARE,
- SUSE,
- UBUNTU,
- YELLOWDOG
- };
-
- public ILinuxDistro getDistro() {
- for (ILinuxDistro distro : ALL) {
- if (distro.currentSysIsDistro()) {
- return distro;
- }
- }
- return null;
-
- }
-
- public String getNameAndVersion() {
- ILinuxDistro distro = getDistro();
- if (distro != null) {
- return distro.getName();
- } else {
- return "";
- }
- }
- }
-
- public boolean currentSysIsDistro();
-
- public String getName();
-
- public String getVersion();
-
- public String getNameAndVersion();
-
- public class LinuxDistro implements ILinuxDistro {
-
- /**
- * The pattern to match the contents of the release-file -
- * /etc/fedora-release etc. Attention: Ubuntu has multi-line release
- * file
- *
- * @see <a
- * href="http://superuser.com/questions/11008/how-do-i-find-out-what-version-of-li...">release-file
- * strings</a>
- */
- private final Pattern VERSION_REGEX = Pattern.compile("([0-9.]+)");
-
- private final String releaseFilePath;
- private String name;
-
- protected LinuxDistro(String name, String releaseFilePath) {
- this.name = name;
- this.releaseFilePath = releaseFilePath;
- }
-
- public boolean currentSysIsDistro() {
- return new File(releaseFilePath).exists();
- }
-
- public String getName() {
- return name;
- }
-
- public String getVersion() {
- try {
- String distroString = getDistroFileContent(releaseFilePath);
- Matcher matcher = VERSION_REGEX.matcher(distroString);
- if (matcher.find()) {
- return matcher.group(1);
- }
- } catch (IOException e) {
- }
- return "";
- }
-
- public String getNameAndVersion() {
- return new StringBuilder().append(getName()).append(getVersion()).toString();
- }
-
- protected String getDistroFileContent(String filePath) throws IOException {
- int charachtersToRead = 1024;
- StringBuilder builder = new StringBuilder(charachtersToRead);
- BufferedReader reader = new BufferedReader(new FileReader(filePath));
- char[] buf = new char[charachtersToRead];
- int charRead = 0;
- while ((charRead = reader.read(buf)) != -1 && builder.length() < charachtersToRead) {
- String readData = String.valueOf(buf, 0, charRead);
- builder.append(readData);
- }
- reader.close();
- return builder.toString();
- }
- }
-}
Modified: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java 2010-09-30 15:16:14 UTC (rev 25339)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/LinuxDistroTest.java 2010-09-30 15:28:51 UTC (rev 25340)
@@ -12,7 +12,7 @@
import static org.junit.Assert.assertEquals;
import org.jboss.tools.usage.googleanalytics.eclipse.CurrentLinuxDistro;
-import org.jboss.tools.usage.googleanalytics.eclipse.ILinuxDistro;
+import org.jboss.tools.usage.googleanalytics.eclipse.CurrentLinuxDistro.LinuxDistro;
import org.jboss.tools.usage.test.fakes.LinuxDistroFake;
import org.junit.Test;
@@ -20,20 +20,20 @@
@Test
public void canExtractFedoraVersion() {
- ILinuxDistro distro = new LinuxDistroFake(CurrentLinuxDistro.FEDORA.getName(), "Fedora release 13 (Goddard)");
+ LinuxDistro distro = new LinuxDistroFake(CurrentLinuxDistro.FEDORA.getName(), "Fedora release 13 (Goddard)");
assertEquals("13", distro.getVersion());
}
@Test
public void canExtractUbuntuVersion() {
- ILinuxDistro distro = new LinuxDistroFake(CurrentLinuxDistro.UBUNTU.getName(),
+ LinuxDistro distro = new LinuxDistroFake(CurrentLinuxDistro.UBUNTU.getName(),
"DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=9.04\nDISTRIB_CODENAME=jaunty\nDISTRIB_DESCRIPTION=\"Ubuntu 9.04\"");
assertEquals("9.04", distro.getVersion());
}
@Test
public void canExtractREDHATVersion() {
- ILinuxDistro distro = new LinuxDistroFake(CurrentLinuxDistro.REDHAT.getName(),
+ LinuxDistro distro = new LinuxDistroFake(CurrentLinuxDistro.REDHAT.getName(),
"Red Hat Enterprise Linux Workstation release 6.0 (Santiago)");
assertEquals("6.0", distro.getVersion());
}
Modified: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/fakes/LinuxDistroFake.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/fakes/LinuxDistroFake.java 2010-09-30 15:16:14 UTC (rev 25339)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/fakes/LinuxDistroFake.java 2010-09-30 15:28:51 UTC (rev 25340)
@@ -11,7 +11,7 @@
import java.io.IOException;
-import org.jboss.tools.usage.googleanalytics.eclipse.ILinuxDistro.LinuxDistro;
+import org.jboss.tools.usage.googleanalytics.eclipse.CurrentLinuxDistro.LinuxDistro;
public class LinuxDistroFake extends LinuxDistro {
14 years, 2 months
JBoss Tools SVN: r25339 - in trunk: jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-09-30 11:16:14 -0400 (Thu, 30 Sep 2010)
New Revision: 25339
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/TestKbModel/WebContent/pages/actionparam.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/Ajax4jsf.xml
Log:
https://jira.jboss.org/browse/JBIDE-7189 Tag autocomplete works incorrectly
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/TestKbModel/WebContent/pages/actionparam.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/TestKbModel/WebContent/pages/actionparam.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/TestKbModel/WebContent/pages/actionparam.xhtml 2010-09-30 15:16:14 UTC (rev 25339)
@@ -0,0 +1,11 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+<ui:composition template="hr-layout.xhtml">
+ <a4j:actionparam name="" value="" />
+</ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/TestKbModel/WebContent/pages/actionparam.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java 2010-09-30 15:11:06 UTC (rev 25338)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java 2010-09-30 15:16:14 UTC (rev 25339)
@@ -101,6 +101,7 @@
/**
* https://jira.jboss.org/jira/browse/JBIDE-6284
+ * https://jira.jboss.org/browse/JBIDE-7210
*/
public void testFFacet() {
IFile file = testProject.getFile("WebContent/pages/inputUserName.xhtml");
@@ -113,16 +114,47 @@
query.setUri("http://java.sun.com/jsf/core");
query.setValue("f:facet");
- TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context);
+ TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context, true);
+ boolean ok = false;
for (TextProposal proposal : proposals) {
if("<f:facet name=\"\">".equals(proposal.getReplacementString())) {
- return;
+ ok = true;
}
+ if(proposal.getReplacementString().endsWith("/>")) {
+ fail("<f:facet /> proposal found.");
+ }
}
- fail("Can't find <f:facet name=\"\"> proposal.");
+ assertTrue("Can't find <f:facet name=\"\"> proposal.", ok);
}
/**
+ * https://jira.jboss.org/browse/JBIDE-7210
+ */
+ public void testActionparam() {
+ IFile file = testProject.getFile("WebContent/pages/actionparam.xhtml");
+ ELContext context = PageContextFactory.createPageContext(file);
+ KbQuery query = new KbQuery();
+ query.setMask(true);
+ query.setOffset(400);
+ query.setType(Type.TAG_NAME);
+ query.setPrefix("a4j");
+ query.setUri("http://richfaces.org/a4j");
+ query.setValue("a4j:actionpara");
+
+ TextProposal[] proposals = PageProcessor.getInstance().getProposals(query, context, true);
+ boolean ok = false;
+ for (TextProposal proposal : proposals) {
+ if("<a4j:actionparam name=\"\" value=\"\" />".equals(proposal.getReplacementString())) {
+ ok = true;
+ }
+ if(proposal.getReplacementString().endsWith(" >")) {
+ fail("Not closed <a4j:actionparam > proposal found.");
+ }
+ }
+ assertTrue("Can't find <a4j:actionparam name=\"\" value=\"\" /> proposal.", ok);
+ }
+
+ /**
* https://jira.jboss.org/jira/browse/JBIDE-5231
*/
public void testSeamPdf() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java 2010-09-30 15:11:06 UTC (rev 25338)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java 2010-09-30 15:16:14 UTC (rev 25339)
@@ -322,7 +322,7 @@
String stringQuery = "<" + query; //$NON-NLS-1$
KbQuery kbQuery = createKbQuery(Type.TAG_NAME, query, stringQuery, prefix, uri);
- TextProposal[] proposals = PageProcessor.getInstance().getProposals(kbQuery, getContext());
+ TextProposal[] proposals = PageProcessor.getInstance().getProposals(kbQuery, getContext(), true);
for (int i = 0; proposals != null && i < proposals.length; i++) {
TextProposal textProposal = proposals[i];
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2010-09-30 15:11:06 UTC (rev 25338)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2010-09-30 15:16:14 UTC (rev 25339)
@@ -12,7 +12,10 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolver;
@@ -22,6 +25,7 @@
import org.jboss.tools.jst.web.kb.taglib.CustomTagLibManager;
import org.jboss.tools.jst.web.kb.taglib.IAttribute;
import org.jboss.tools.jst.web.kb.taglib.IComponent;
+import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibComponent;
import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibrary;
import org.jboss.tools.jst.web.kb.taglib.IFacesConfigTagLibrary;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
@@ -54,8 +58,52 @@
* @return
*/
public TextProposal[] getProposals(KbQuery query, ELContext context) {
- ArrayList<TextProposal> proposals = new ArrayList<TextProposal>();
+ return getProposals(query, context, false);
+ }
+ private List<TextProposal> excludeExtendedComponents(List<TextProposal> proposals) {
+ Map<String, Set<TextProposal>> runtimeComponentMap = new HashMap<String, Set<TextProposal>>();
+ Map<String, TextProposal> customComponentMap = new HashMap<String, TextProposal>();
+ for (TextProposal proposal : proposals) {
+ Object source = proposal.getSource();
+ if(source instanceof IComponent) {
+ IComponent component = (IComponent)source;
+ String name = component.getTagLib().getURI() + ":" + component.getName(); //$NON-NLS-1$
+ if(source instanceof ICustomTagLibComponent) {
+ customComponentMap.put(name, proposal);
+ } else {
+ Set<TextProposal> textProposals = runtimeComponentMap.get(name);
+ if(textProposals==null) {
+ textProposals = new HashSet<TextProposal>();
+ }
+ textProposals.add(proposal);
+ runtimeComponentMap.put(name, textProposals);
+ }
+ }
+ }
+ if(!customComponentMap.isEmpty()) {
+ proposals.clear();
+ for (String name : runtimeComponentMap.keySet()) {
+ TextProposal customProposal = customComponentMap.get(name);
+ if(customProposal!=null) {
+ proposals.add(customProposal);
+ } else {
+ proposals.addAll(runtimeComponentMap.get(name));
+ }
+ }
+ }
+ return proposals;
+ }
+
+ /**
+ *
+ * @param query
+ * @param context
+ * @return
+ */
+ public TextProposal[] getProposals(KbQuery query, ELContext context, boolean preferCustomComponentExtensions) {
+ List<TextProposal> proposals = new ArrayList<TextProposal>();
+
if (!isQueryForELProposals(query, context)) {
if(context instanceof IPageContext) {
IPageContext pageContext = (IPageContext)context;
@@ -96,6 +144,9 @@
proposals.add(libProposals[j]);
}
}
+ if(preferCustomComponentExtensions && query.getType() == KbQuery.Type.TAG_NAME) {
+ proposals = excludeExtendedComponents(proposals);
+ }
}
} else {
String value = query.getValue();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2010-09-30 15:11:06 UTC (rev 25338)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2010-09-30 15:16:14 UTC (rev 25339)
@@ -46,7 +46,7 @@
public static final String COMPONENT_TYPE = "component-type"; //$NON-NLS-1$
public static final String BODY_CONTENT = "bodycontent"; //$NON-NLS-1$
- protected boolean canHaveBody;
+ protected boolean canHaveBody = true;
protected String componentClass;
protected String componentType;
protected String description;
@@ -78,7 +78,7 @@
* @param s
*/
public void setCanHaveBody(IValueInfo s) {
- canHaveBody = s == null || "empty".equals(s.getValue()); //$NON-NLS-1$
+ canHaveBody = s == null || !"empty".equals(s.getValue()); //$NON-NLS-1$
attributesInfo.put(BODY_CONTENT, s);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/Ajax4jsf.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/Ajax4jsf.xml 2010-09-30 15:11:06 UTC (rev 25338)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/Ajax4jsf.xml 2010-09-30 15:16:14 UTC (rev 25339)
@@ -79,13 +79,15 @@
</attribute>
</component>
- <component name="actionparam">
+ <component closeTag="true" name="actionparam">
<attribute name="noEscape">
<proposal type="enumeration">
<param value="true" />
<param value="false" />
</proposal>
</attribute>
+ <attribute name="name" required="true"/>
+ <attribute name="value" required="true"/>
</component>
<component name="commandButton">
<attribute name="image">
14 years, 2 months
JBoss Tools SVN: r25338 - trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-09-30 11:11:06 -0400 (Thu, 30 Sep 2010)
New Revision: 25338
Modified:
trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF
Log:
JBIDE-6085
https://jira.jboss.org/browse/JBIDE-6085
Modified: trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF 2010-09-30 15:08:42 UTC (rev 25337)
+++ trunk/esb/tests/org.jboss.tools.esb.validator.test/META-INF/MANIFEST.MF 2010-09-30 15:11:06 UTC (rev 25338)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Contexts and Dependency Injection Test
Bundle-SymbolicName: org.jboss.tools.esb.validator.test
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.3.0.qualifier
Bundle-Vendor: JBoss by Red Hat
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.jboss.tools.esb.core,
14 years, 2 months
JBoss Tools SVN: r25337 - trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-09-30 11:08:42 -0400 (Thu, 30 Sep 2010)
New Revision: 25337
Modified:
trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF
Log:
JBIDE-6085
https://jira.jboss.org/browse/JBIDE-6085
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF 2010-09-30 14:57:12 UTC (rev 25336)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/META-INF/MANIFEST.MF 2010-09-30 15:08:42 UTC (rev 25337)
@@ -16,5 +16,5 @@
org.jboss.tools.esb.project.core,
org.eclipse.wst.validation,
org.eclipse.jdt.ui
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 1.3.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
14 years, 2 months
JBoss Tools SVN: r25336 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-09-30 10:57:12 -0400 (Thu, 30 Sep 2010)
New Revision: 25336
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java
Log:
JBIDE-7168
Code completion inserts methods with parameters.
The cursor is placed inside the parentheses when a method with parameters is inserted by EL CA
In case of method without parameters the cursor is placed after the closing parenthesis.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java 2010-09-30 14:47:16 UTC (rev 25335)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java 2010-09-30 14:57:12 UTC (rev 25336)
@@ -180,4 +180,27 @@
HTMLPrinter.addSmallHeader(buffer, getInfoText(element));
}
}
+
+ /**
+ * Return cursor position of proposal replacement string.
+ *
+ * Method is added because of JBIDE-7168
+ */
+ public int getCursorPosition() {
+ int cursorPosition = -1;
+
+ int openingQuoteInReplacement = getReplacementString().indexOf('(');
+ int closingQuoteInReplacement = getReplacementString().indexOf(')');
+ int openingQuoteInDisplay = getDisplayString().indexOf('(');
+ int closingQuoteInDisplay = getDisplayString().indexOf(')');
+
+ if (openingQuoteInReplacement != -1 && closingQuoteInReplacement != -1 &&
+ openingQuoteInDisplay != -1 && closingQuoteInDisplay != -1 &&
+ (closingQuoteInReplacement - openingQuoteInReplacement) !=
+ (closingQuoteInDisplay - openingQuoteInDisplay)) {
+ cursorPosition = openingQuoteInReplacement + 1;
+ }
+
+ return cursorPosition>-1?cursorPosition:super.getCursorPosition();
+ }
}
14 years, 2 months
JBoss Tools SVN: r25335 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-09-30 10:47:16 -0400 (Thu, 30 Sep 2010)
New Revision: 25335
Modified:
workspace/examples/project-examples-3.0.xml
workspace/examples/project-examples-community-3.1.xml
workspace/examples/project-examples-jbds30.xml
Log:
JBIDE-7094 No Mavenized project examples should appear in the JBDS project examples
Modified: workspace/examples/project-examples-3.0.xml
===================================================================
--- workspace/examples/project-examples-3.0.xml 2010-09-30 14:45:10 UTC (rev 25334)
+++ workspace/examples/project-examples-3.0.xml 2010-09-30 14:47:16 UTC (rev 25335)
@@ -138,96 +138,10 @@
</fixes>
</project>
+
+
<project>
<category>Seam</category>
-
- <name>booking2</name>
- <included-projects>
- booking,booking-ear,booking-ejb,booking-parent,booking-test
- </included-projects>
- <shortDescription>Seam Booking Example - EAR mavenized</shortDescription>
- <description>This example demonstrates the use of Seam in a Java EE 5 environment.
-Transaction and persistence context management is handled by the EJB container.
-It includes the booking, booking-ear, booking-ejb,booking-test and booking-parent projects.
-Requires JBoss EAP 4.3/JBoss AS 4.2.x, Seam 2.0, m2eclipse and testng plugins.
-</description>
- <size>203639</size>
-
- <url>
- http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
- </url>
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43, org.jboss.ide.eclipse.as.runtime.42</property>
- <property name="eclipse-projects">booking,booking-ejb,booking-ear</property>
- <property name="description">This project example requires the JBoss EAP 4.3 or JBoss AS 4.2.x</property>
- </fix>
-
- <fix type="seam">
- <property name="allowed-versions">2.0.0, 2.0.1, 2.0.2</property>
- <property name="eclipse-projects">booking</property>
- <property name="description">This project example requires Seam version 2.0</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.testng.eclipse</property>
- <property name="versions">5.8.0, 5.9.0</property>
- <property name="description">The TestNG plugin is required if you want to run Seam tests. You can install it using the following update site: http://beust.com/eclipse</property>
- </fix>
-
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">0.9.9, 0.10.0</property>
- <property name="description">This project example requires m2eclipse. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
- </fix>
-
- </fixes>
- </project>
-
- <project>
- <category>Seam</category>
- <name>booking3</name>
- <included-projects>
- booking,booking-ear,booking-ejb,booking-parent,booking-test
- </included-projects>
- <shortDescription>Seam Booking Example - EAR mavenized - Seam 2.1.1.GA</shortDescription>
- <description>This example demonstrates the use of Seam in a Java EE 5 environment.
-Transaction and persistence context management is handled by the EJB container.
-It includes the booking, booking-ear, booking-ejb, booking-test and booking-parent projects.
-Requires JBoss EAP 4.3/JBoss AS 4.2.x, Seam 2.1, m2eclipse and testng plugins.
-</description>
- <size>196608</size>
- <url>
- http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
- </url>
-
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43, org.jboss.ide.eclipse.as.runtime.42</property>
- <property name="eclipse-projects">booking,booking-ejb,booking-ear</property>
- <property name="description">This project example requires the JBoss EAP 4.3 or JBoss AS 4.2.x</property>
- </fix>
-
- <fix type="seam">
- <property name="allowed-versions">2.1.0, 2.1.1, 2.1.2</property>
- <property name="eclipse-projects">booking</property>
- <property name="description">This project example requires Seam version 2.1</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.testng.eclipse</property>
- <property name="versions">5.8.0, 5.9.0</property>
- <property name="description">The TestNG plugin is required if you want to run Seam tests. You can install it using the following update site: http://beust.com/eclipse</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">0.9.9, 0.10.0</property>
- <property name="description">This project example requires m2eclipse. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
- </fix>
-
- </fixes>
- </project>
-
- <project>
- <category>Seam</category>
<name>jboss-seam-jpa</name>
<shortDescription>Seam Booking Example - WAR Standalone</shortDescription>
<description>This example demonstrates the use of Seam in a Java EE 5 environment.
Modified: workspace/examples/project-examples-community-3.1.xml
===================================================================
--- workspace/examples/project-examples-community-3.1.xml 2010-09-30 14:45:10 UTC (rev 25334)
+++ workspace/examples/project-examples-community-3.1.xml 2010-09-30 14:47:16 UTC (rev 25335)
@@ -162,6 +162,49 @@
<project>
<category>Seam</category>
+ <name>booking3-mavenized</name>
+ <included-projects>
+ booking,booking-ear,booking-ejb,booking-parent,booking-test
+ </included-projects>
+ <shortDescription>Seam Booking Example - EAR mavenized - Seam 2.1.1.GA</shortDescription>
+ <description>This example demonstrates the use of Seam in a Java EE 5 environment.
+Transaction and persistence context management is handled by the EJB container.
+It includes the booking, booking-ear, booking-ejb, booking-test and booking-parent projects.
+Requires JBoss EAP 4.3/JBoss AS 4.2.x, Seam 2.1, m2eclipse and testng plugins.
+</description>
+ <size>196608</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43, org.jboss.ide.eclipse.as.runtime.42</property>
+ <property name="eclipse-projects">booking,booking-ejb,booking-ear</property>
+ <property name="description">This project example requires the JBoss EAP 4.3 or JBoss AS 4.2.x</property>
+ </fix>
+
+ <fix type="seam">
+ <property name="allowed-versions">2.1.0, 2.1.1, 2.1.2</property>
+ <property name="eclipse-projects">booking</property>
+ <property name="description">This project example requires Seam version 2.1</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.testng.eclipse</property>
+ <property name="versions">5.8.0, 5.9.0</property>
+ <property name="description">The TestNG plugin is required if you want to run Seam tests. You can install it using the following update site: http://beust.com/eclipse</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">0.9.9, 0.10.0</property>
+ <property name="description">This project example requires m2eclipse. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ </fix>
+
+ </fixes>
+ </project>
+
+ <project>
+ <category>Seam</category>
<name>booking3</name>
<included-projects>
booking,booking-ear,booking-ejb,booking-test
@@ -199,6 +242,51 @@
<project>
<category>Seam</category>
+
+ <name>booking2</name>
+ <included-projects>
+ booking,booking-ear,booking-ejb,booking-parent,booking-test
+ </included-projects>
+ <shortDescription>Seam Booking Example - EAR mavenized</shortDescription>
+ <description>This example demonstrates the use of Seam in a Java EE 5 environment.
+Transaction and persistence context management is handled by the EJB container.
+It includes the booking, booking-ear, booking-ejb,booking-test and booking-parent projects.
+Requires JBoss EAP 4.3/JBoss AS 4.2.x, Seam 2.0, m2eclipse and testng plugins.
+</description>
+ <size>203639</size>
+
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.43, org.jboss.ide.eclipse.as.runtime.42</property>
+ <property name="eclipse-projects">booking,booking-ejb,booking-ear</property>
+ <property name="description">This project example requires the JBoss EAP 4.3 or JBoss AS 4.2.x</property>
+ </fix>
+
+ <fix type="seam">
+ <property name="allowed-versions">2.0.0, 2.0.1, 2.0.2</property>
+ <property name="eclipse-projects">booking</property>
+ <property name="description">This project example requires Seam version 2.0</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.testng.eclipse</property>
+ <property name="versions">5.8.0, 5.9.0</property>
+ <property name="description">The TestNG plugin is required if you want to run Seam tests. You can install it using the following update site: http://beust.com/eclipse</property>
+ </fix>
+
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions">0.9.9, 0.10.0</property>
+ <property name="description">This project example requires m2eclipse. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ </fix>
+
+ </fixes>
+ </project>
+
+ <project>
+ <category>Seam</category>
<name>booking22</name>
<included-projects>
booking22,booking22-ear,booking22-ejb,booking22-test
@@ -839,4 +927,33 @@
</fix>
</fixes>
</project>
+
+ <project>
+ <category>RESTEasy</category>
+ <name>simple</name>
+ <included-projects>
+ simple
+ </included-projects>
+
+ <shortDescription>RESTEasy Simple Example</shortDescription>
+ <description>This project is a simple example showing usage of @Path, @GET, PUT, POST, and @PathParam. It uses pure streaming output and includes the 'simple' project.
+Requires m2eclipse and JBoss EAP 4.3/JBoss EAP 5.0/JBoss AS 4.2.x/JBoss AS 5.x.
+ </description>
+ <size>16939</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/resteasy-examp...
+ </url>
+ <fixes>
+ <fix type="wtpruntime">
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50, org.jboss.ide.eclipse.as.runtime.eap.43, org.jboss.ide.eclipse.as.runtime.51, org.jboss.ide.eclipse.as.runtime.50, org.jboss.ide.eclipse.as.runtime.42</property>
+ <property name="eclipse-projects">photoalbum,photoalbum-ear,photoalbum-ejb</property>
+ <property name="description">This project example requires JBoss EAP 4.3/JBoss EAP 5.0/JBoss AS 4.2.x/JBoss AS 5.x</property>
+ </fix>
+ <fix type="plugin">
+ <property name="id">org.maven.ide.eclipse.wtp</property>
+ <property name="versions"> 0.10.0</property>
+ <property name="description">This project example requires m2eclipse. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ </fix>
+ </fixes>
+ </project>
</projects>
Modified: workspace/examples/project-examples-jbds30.xml
===================================================================
--- workspace/examples/project-examples-jbds30.xml 2010-09-30 14:45:10 UTC (rev 25334)
+++ workspace/examples/project-examples-jbds30.xml 2010-09-30 14:47:16 UTC (rev 25335)
@@ -316,33 +316,5 @@
</fixes>
</project>
- <project>
- <category>RESTEasy</category>
- <name>simple</name>
- <included-projects>
- simple
- </included-projects>
-
- <shortDescription>RESTEasy Simple Example</shortDescription>
- <description>This project is a simple example showing usage of @Path, @GET, PUT, POST, and @PathParam. It uses pure streaming output and includes the 'simple' project.
-Requires m2eclipse and JBoss EAP 4.3/JBoss EAP 5.0/JBoss AS 4.2.x/JBoss AS 5.x.
- </description>
- <size>16939</size>
- <url>
- http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/resteasy-examp...
- </url>
- <fixes>
- <fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50, org.jboss.ide.eclipse.as.runtime.eap.43, org.jboss.ide.eclipse.as.runtime.51, org.jboss.ide.eclipse.as.runtime.50, org.jboss.ide.eclipse.as.runtime.42</property>
- <property name="eclipse-projects">photoalbum,photoalbum-ear,photoalbum-ejb</property>
- <property name="description">This project example requires JBoss EAP 4.3/JBoss EAP 5.0/JBoss AS 4.2.x/JBoss AS 5.x</property>
- </fix>
- <fix type="plugin">
- <property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions"> 0.10.0</property>
- <property name="description">This project example requires m2eclipse. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
- </fix>
- </fixes>
- </project>
</projects>
14 years, 2 months
JBoss Tools SVN: r25334 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-09-30 10:45:10 -0400 (Thu, 30 Sep 2010)
New Revision: 25334
Modified:
workspace/snjeza/seam-examples/booking22.zip
workspace/snjeza/seam-examples/dvdstore22.zip
Log:
JBIDE-7122 booking22 & booking22-test example has 3 error markers in html
Modified: workspace/snjeza/seam-examples/booking22.zip
===================================================================
(Binary files differ)
Modified: workspace/snjeza/seam-examples/dvdstore22.zip
===================================================================
(Binary files differ)
14 years, 2 months
JBoss Tools SVN: r25333 - in trunk: common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-09-30 10:38:44 -0400 (Thu, 30 Sep 2010)
New Revision: 25333
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
Log:
JBIDE-7168
Code completion inserts methods with parameters.
The method parameters are shown with their types in the CA
The method parameters aren't to be inserted anymore by the CA
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2010-09-30 14:27:08 UTC (rev 25332)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2010-09-30 14:38:44 UTC (rev 25333)
@@ -719,6 +719,7 @@
if (methodPresentations != null) {
for (MemberPresentation presentation : methodPresentations) {
String presentationString = presentation.getPresentation();
+ String presentationDisplayName = presentation.getPresentationDisplayName();
MemberInfo member = presentation.getMember();
String sourceTypeName = member == null ? null : member.getDeclaringTypeQualifiedName();
if (sourceTypeName != null && sourceTypeName.indexOf('.') != -1)
@@ -729,7 +730,7 @@
ELTextProposal proposal = new ELTextProposal();
proposal.setReplacementString(presentationString);
- proposal.setLabel(presentationString);
+ proposal.setLabel(presentationDisplayName);
proposal.setImage(getELProposalImage());
proposal.setType(typeName);
proposal.setSourceType(sourceTypeName);
@@ -764,6 +765,7 @@
if (propertyPresentations != null) {
for (MemberPresentation presentation : propertyPresentations) {
String presentationString = presentation.getPresentation();
+ String presentationDisplayName = presentation.getPresentationDisplayName();
MemberInfo member = presentation.getMember();
String sourceTypeName = member == null ? null : member.getDeclaringTypeQualifiedName();
if (sourceTypeName != null && sourceTypeName.indexOf('.') != -1)
@@ -774,7 +776,7 @@
ELTextProposal proposal = new ELTextProposal();
proposal.setReplacementString(presentationString);
- proposal.setLabel(presentationString);
+ proposal.setLabel(presentationDisplayName);
proposal.setImage(getELProposalImage());
proposal.setType(typeName);
proposal.setSourceType(sourceTypeName);
@@ -862,7 +864,7 @@
ELTextProposal kbProposal = new ELTextProposal();
kbProposal.setReplacementString(proposal.getPresentation().substring(filter.length()));
- kbProposal.setLabel(proposal.getPresentation());
+ kbProposal.setLabel(proposal.getPresentationDisplayName());
kbProposal.setImage(getELProposalImage());
kbProposal.setType(typeName);
kbProposal.setSourceType(sourceTypeName);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-09-30 14:27:08 UTC (rev 25332)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-09-30 14:38:44 UTC (rev 25333)
@@ -972,12 +972,14 @@
*/
public static class MemberPresentation {
private String presentation;
+ private String displayName;
private MemberInfo member;
private Set<MemberInfo> allMembers = new HashSet<MemberInfo>();
- public MemberPresentation(String presentation, MemberInfo member) {
+ public MemberPresentation(String presentation, String displayName, MemberInfo member) {
super();
this.presentation = presentation;
+ this.displayName = displayName;
this.member = member;
addMember(member);
}
@@ -986,6 +988,10 @@
return presentation;
}
+ public String getPresentationDisplayName() {
+ return displayName;
+ }
+
public MemberInfo getMember() {
return member;
}
@@ -1069,6 +1075,7 @@
MethodInfo method = (MethodInfo)info;
StringBuffer name = new StringBuffer(method.getName());
+ StringBuffer displayName = new StringBuffer(method.getName());
boolean disabledGettersAndSettersView =
!ELCorePlugin.getDefault().getPreferenceStore().getBoolean(ELContentAssistPreferences.SHOW_GETTERS_AND_SETTERS) &&
@@ -1082,19 +1089,27 @@
if (isValidating || enabledNonParenthesesView) {
// Add method as 'foo'
- methods.add(new MemberPresentation(name.toString(), method));
+ methods.add(new MemberPresentation(name.toString(), displayName.toString(), method));
}
- // As requirement of JBIDE-7168: Add method as 'foo()' (do not extract the parameters)
+ // As requirement of JBIDE-7168: Add method as 'foo()' (do not extract the parameters),
+ // but show the method parameters with their types
name.append('(');
-// String[] mParams = method.getParameterNames();
-// for (int j = 0; mParams != null && j < mParams.length; j++) {
-// if (j > 0) name.append(", "); //$NON-NLS-1$
-// name.append(mParams[j]);
-// }
+ displayName.append('(');
+ String[] mParams = method.getParameterNames();
+ String[] mTypes = method.getParameterTypeNames();
+ for (int j = 0; mParams != null && j < mParams.length; j++) {
+ String typeName = mTypes[j] == null ? "" : mTypes[j]; //$NON-NLS-1$
+ if (typeName.indexOf('.') != -1)
+ typeName = typeName.substring(typeName.lastIndexOf('.') + 1);
+
+ if (j > 0) displayName.append(", "); //$NON-NLS-1$
+ displayName.append(typeName).append(' ').append(mParams[j]);
+ }
name.append(')');
+ displayName.append(')');
- methods.add(new MemberPresentation(name.toString(), method));
+ methods.add(new MemberPresentation(name.toString(), displayName.toString(), method));
}
return methods;
}
@@ -1195,7 +1210,7 @@
name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
}
String propertyName = name.toString();
- MemberPresentation pr = new MemberPresentation(propertyName, m);
+ MemberPresentation pr = new MemberPresentation(propertyName, propertyName, m);
if(!properties.contains(pr)) {
properties.add(pr);
presentations.put(pr.getPresentation(), pr);
@@ -1219,7 +1234,7 @@
}
}
} else {
- MemberPresentation pr = new MemberPresentation(info.getName(), info);
+ MemberPresentation pr = new MemberPresentation(info.getName(), info.getName(), info);
properties.add(pr);
presentations.put(pr.getPresentation(), pr);
}
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 2010-09-30 14:27:08 UTC (rev 25332)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2010-09-30 14:38:44 UTC (rev 25333)
@@ -212,7 +212,7 @@
protected void filterSingularMember(TypeInfoCollector.MemberInfo mbr, Set<TypeInfoCollector.MemberPresentation> proposalsToFilter) {
Collection<String> keys = ((MessagesInfo)mbr).getKeys();
for (String key : keys) {
- proposalsToFilter.add(new TypeInfoCollector.MemberPresentation(key, mbr));
+ proposalsToFilter.add(new TypeInfoCollector.MemberPresentation(key, key, mbr));
}
}
14 years, 2 months