JBoss Tools SVN: r31742 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-01 14:51:38 -0400 (Wed, 01 Jun 2011)
New Revision: 31742
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java
Log:
[JBIDE-9054] removed unneeded empty initialization of a local variable
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java 2011-06-01 18:41:10 UTC (rev 31741)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java 2011-06-01 18:51:38 UTC (rev 31742)
@@ -64,11 +64,10 @@
if( module.length == 0 ) return IServer.PUBLISH_STATE_NONE;
int modulePublishState = behaviour.getServer().getModulePublishState(module);
int publishType = behaviour.getPublishType(kind, deltaKind, modulePublishState);
- IJBossServerPublisher publisher;
// Let the publisher decide what to do
if( module.length > 0 ) {
- publisher = ExtensionManager.getDefault().getPublisher(behaviour.getServer(), module, getPublishMethodId());
+ IJBossServerPublisher publisher = ExtensionManager.getDefault().getPublisher(behaviour.getServer(), module, getPublishMethodId());
IModuleResourceDelta[] deltas = new IModuleResourceDelta[]{};
if( deltaKind != ServerBehaviourDelegate.REMOVED)
deltas = behaviour.getPublishedResourceDelta(module);
13 years, 4 months
JBoss Tools SVN: r31741 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-06-01 14:41:10 -0400 (Wed, 01 Jun 2011)
New Revision: 31741
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
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 2011-06-01 18:37:46 UTC (rev 31740)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2011-06-01 18:41:10 UTC (rev 31741)
@@ -178,6 +178,7 @@
}
}
keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
+ keys.add(WRONG_BUILDER_ORDER_KEY);
return keys.toArray(new Key[0]);
}
@@ -188,6 +189,12 @@
return MAX_NUMBER_OF_PROBLEMS_KEY;
}
+ private static final Key WRONG_BUILDER_ORDER_KEY = getKey(CDICorePlugin.PLUGIN_ID, SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME);
+
+ protected Key getWrongBuilderOrderKey() {
+ return WRONG_BUILDER_ORDER_KEY;
+ }
+
public CDIConfigurationBlock(IStatusChangeListener context,
IProject project, IWorkbenchPreferenceContainer container) {
super(context, project, getKeys(), container);
13 years, 4 months
JBoss Tools SVN: r31740 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-06-01 14:37:46 -0400 (Wed, 01 Jun 2011)
New Revision: 31740
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java 2011-06-01 18:36:20 UTC (rev 31739)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorConfigurationBlock.java 2011-06-01 18:37:46 UTC (rev 31740)
@@ -72,6 +72,7 @@
keys.add(getKey(WebKbPlugin.PLUGIN_ID, ELSeverityPreferences.CHECK_VARS));
keys.add(getKey(WebKbPlugin.PLUGIN_ID, ELSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL));
keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
+ keys.add(WRONG_BUILDER_ORDER_KEY);
return keys.toArray(new Key[0]);
}
@@ -82,6 +83,12 @@
return MAX_NUMBER_OF_PROBLEMS_KEY;
}
+ private static final Key WRONG_BUILDER_ORDER_KEY = getKey(WebKbPlugin.PLUGIN_ID, SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME);
+
+ protected Key getWrongBuilderOrderKey() {
+ return WRONG_BUILDER_ORDER_KEY;
+ }
+
public ELValidatorConfigurationBlock(IStatusChangeListener context,
IProject project,
IWorkbenchPreferenceContainer container) {
@@ -98,6 +105,8 @@
addMaxNumberOfMarkersField(composite);
+ addWrongBuilderOrderField(composite);
+
GridLayout layout= new GridLayout(nColumns, false);
layout.marginHeight= 0;
layout.marginWidth= 0;
13 years, 4 months
JBoss Tools SVN: r31739 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-06-01 14:36:20 -0400 (Wed, 01 Jun 2011)
New Revision: 31739
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2011-06-01 18:09:35 UTC (rev 31738)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2011-06-01 18:36:20 UTC (rev 31739)
@@ -14,11 +14,13 @@
import java.util.ArrayList;
import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
@@ -143,6 +145,7 @@
}
}
keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
+ keys.add(WRONG_BUILDER_ORDER_KEY);
return keys.toArray(new Key[0]);
}
@@ -153,6 +156,12 @@
return MAX_NUMBER_OF_PROBLEMS_KEY;
}
+ private static final Key WRONG_BUILDER_ORDER_KEY = getKey(SeamCorePlugin.PLUGIN_ID, SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME);
+
+ protected Key getWrongBuilderOrderKey() {
+ return WRONG_BUILDER_ORDER_KEY;
+ }
+
public SeamValidatorConfigurationBlock(IStatusChangeListener context,
IProject project,
IWorkbenchPreferenceContainer container) {
13 years, 4 months
JBoss Tools SVN: r31738 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-06-01 14:09:35 -0400 (Wed, 01 Jun 2011)
New Revision: 31738
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-9028
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 2011-06-01 17:44:13 UTC (rev 31737)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-06-01 18:09:35 UTC (rev 31738)
@@ -832,7 +832,7 @@
* 10.4.2. Declaring an observer method
* - bean with scope @Dependent has an observer method declared notifyObserver=IF_EXISTS
*/
- if(CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(bean.getScope().getSourceType().getFullyQualifiedName())) {
+ if(bean.getScope()!=null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(bean.getScope().getSourceType().getFullyQualifiedName())) {
ICompilationUnit unit = observer.getMethod().getCompilationUnit();
if(unit!=null) {
try {
@@ -1453,7 +1453,7 @@
* - If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope,
* the container automatically detects the problem and treats it as a deployment problem.
*/
- if(bean.getScope().isNorlmalScope() && injection.getType()!=null) {
+ if(bean.getScope()!=null && bean.getScope().isNorlmalScope() && injection.getType()!=null) {
// - Array types cannot be proxied by the container.
String typeSignature = injection.getType().getSignature();
int kind = Signature.getTypeSignatureKind(typeSignature);
13 years, 4 months
JBoss Tools SVN: r31737 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-06-01 13:44:13 -0400 (Wed, 01 Jun 2011)
New Revision: 31737
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java
Log:
https://issues.jboss.org/browse/JBIDE-9028
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java 2011-06-01 16:07:10 UTC (rev 31736)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidatorManager.java 2011-06-01 17:44:13 UTC (rev 31737)
@@ -148,8 +148,6 @@
marker.setAttribute(IMarker.SEVERITY, severity);
String message = NLS.bind(KbMessages.WRONG_BUILDER_ORDER, project.getName(), findBuilderName(builderId));
marker.setAttribute(IMarker.MESSAGE, message);
- //Temporary to debug
- WebKbPlugin.getDefault().logError(message);
}
}
return isCorrect || severity <= IMarker.SEVERITY_INFO;
13 years, 4 months
JBoss Tools SVN: r31736 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-01 12:07:10 -0400 (Wed, 01 Jun 2011)
New Revision: 31736
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
Log:
[JBIDE-9054] extracted method and renamed local var (no functional change!)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2011-06-01 15:56:04 UTC (rev 31735)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2011-06-01 16:07:10 UTC (rev 31736)
@@ -63,16 +63,16 @@
this.deployRoot = deployRoot;
this.module = module;
this.server = server;
- IStatus[] returnStatus;
+ IStatus[] operationStatus;
// Am I a removal? If yes, remove me, and return
if( publishType == IJBossServerPublisher.REMOVE_PUBLISH)
- returnStatus = removeModule(server, deployRoot, module);
+ operationStatus = removeModule(server, deployRoot, module);
// Am I a full publish? If yes, full publish me, and return
else if( publishType == IJBossServerPublisher.FULL_PUBLISH)
- returnStatus = fullPublish(server, deployRoot, module);
+ operationStatus = fullPublish(server, deployRoot, module);
else {
// Am I changed? If yes, handle my changes
@@ -93,24 +93,30 @@
results.addAll(Arrays.asList(removeModule(server, deployRoot, removedArray)));
}
}
- returnStatus = (IStatus[]) results.toArray(new IStatus[results.size()]);
+ operationStatus = (IStatus[]) results.toArray(new IStatus[results.size()]);
}
TrueZipUtil.umount();
- IStatus finalStatus = null;
- if( returnStatus.length > 0 ) {
+ IStatus finalStatus = createModuleStatus(module, operationStatus);
+
+ monitor.done();
+ return finalStatus;
+ }
+
+
+ private IStatus createModuleStatus(IModule[] module, IStatus[] operationStatus) {
+ IStatus finalStatus;
+ if( operationStatus.length > 0 ) {
MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_INC_FAIL,
"Publish Failed for module " + module[0].getName(), null); //$NON-NLS-1$
- for( int i = 0; i < returnStatus.length; i++ )
- ms.add(returnStatus[i]);
+ for( int i = 0; i < operationStatus.length; i++ )
+ ms.add(operationStatus[i]);
finalStatus = ms;
} else {
finalStatus = new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,
IEventCodes.JST_PUB_FULL_SUCCESS,
NLS.bind(Messages.ModulePublished, module[0].getName()), null);
}
-
- monitor.done();
return finalStatus;
}
13 years, 4 months
JBoss Tools SVN: r31735 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-01 11:56:04 -0400 (Wed, 01 Jun 2011)
New Revision: 31735
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
Log:
[JBIDE-9054] renamed method and removed unneeded parameter so that the code gets more readable (no functional change!)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-06-01 15:52:54 UTC (rev 31734)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-06-01 15:56:04 UTC (rev 31735)
@@ -112,7 +112,7 @@
IPath destFolder, String name, IProgressMonitor monitor) {
// Now transfer the file to RSE
try {
- removeRemoteDeploymentFolder(sourcePath, destFolder, name, new NullProgressMonitor());
+ deleteRemoteResource(destFolder, name, new NullProgressMonitor());
IModuleFile mf = new ModuleFile(sourcePath.toFile(), name, new Path("/")); //$NON-NLS-1$
method.getCallbackHandler(destFolder, server).copyFile(mf, new Path(name),
AbstractServerToolsPublisher.getSubMon(monitor, 150)
@@ -141,14 +141,22 @@
try {
if( DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server))
return DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, server, module, monitor);
- return removeRemoteDeploymentFolder(sourcePath, destFolder, name, monitor);
+ return deleteRemoteResource(destFolder, name, monitor);
} catch(CoreException ce) {
return ce.getStatus();
}
}
- private IStatus removeRemoteDeploymentFolder(IPath sourcePath,
- IPath destFolder, String name, IProgressMonitor monitor) throws CoreException {
+ /**
+ * Removes the resource with the given name from the given parent folder. Either files or folders are removed.
+ * @param sourcePath
+ * @param destFolder
+ * @param name
+ * @param monitor
+ * @return
+ * @throws CoreException
+ */
+ private IStatus deleteRemoteResource(IPath destFolder, String name, IProgressMonitor monitor) throws CoreException {
// Now delete the file from RSE
// TODO *** FIX THIS IT IS NOT LOGGING ERRORS
IStatus[] tmp = method.getCallbackHandler(destFolder, server).deleteResource(new Path(name), monitor);
13 years, 4 months
JBoss Tools SVN: r31734 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-01 11:52:54 -0400 (Wed, 01 Jun 2011)
New Revision: 31734
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
Log:
[JBIDE-9054] made code more readable (no functional change!)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2011-06-01 15:44:56 UTC (rev 31733)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2011-06-01 15:52:54 UTC (rev 31734)
@@ -307,13 +307,17 @@
public IStatus[] deleteResource(IPath resource, IProgressMonitor monitor) {
resource = deployRootFolder.append(resource);
- if( resource.toFile().isDirectory())
- return deleteDirectory(resource.toFile(), monitor);
- if( !resource.toFile().delete()) {
- IStatus s = new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorDeleting, resource.toFile().getAbsolutePath()), null);
- return new IStatus[]{s};
+ File file = resource.toFile();
+ IStatus[] results = new IStatus[]{};
+ if( file.isDirectory()) {
+ results = deleteDirectory(resource.toFile(), monitor);
+ } else {
+ if( !file.delete()) {
+ IStatus s = new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorDeleting, resource.toFile().getAbsolutePath()), null);
+ results = new IStatus[]{s};
+ }
}
- return new IStatus[] {};
+ return results;
}
/**
13 years, 4 months
JBoss Tools SVN: r31733 - in trunk: common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-06-01 11:44:56 -0400 (Wed, 01 Jun 2011)
New Revision: 31733
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.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsELCompletionProposalComputer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
Log:
JBIDE-3845
Code assist for #{messages['...']} should suggest properties when user types "[".
Labels were fixed for the Resource Bundles CA Proposals
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 2011-06-01 15:26:16 UTC (rev 31732)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2011-06-01 15:44:56 UTC (rev 31733)
@@ -921,8 +921,13 @@
bSurroundWithQuotes = true;
} else {
if((filter.startsWith("'") || filter.startsWith("\"")) //$NON-NLS-1$ //$NON-NLS-2$
- && (filter.endsWith("'") || filter.endsWith("\""))) { //$NON-NLS-1$ //$NON-NLS-2$
- filter = filter.length() == 1 ? "" : filter.substring(1, filter.length() - 1); //$NON-NLS-1$
+ || (filter.endsWith("'") || filter.endsWith("\""))) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (filter.startsWith("'") || filter.startsWith("\"")) {
+ filter = filter.length() == 1 ? "" : filter.substring(1); //$NON-NLS-1$
+ }
+ if (filter.endsWith("'") || filter.endsWith("\"")) {
+ filter = filter.length() == 1 ? "" : filter.substring(0, filter.length() - 1); //$NON-NLS-1$
+ }
} else {
//Value is set as expression itself, we cannot compute it
if(isMessages) {
@@ -979,10 +984,11 @@
String replacementString = proposal.getPresentation().substring(filter.length());
if (bSurroundWithQuotes) {
- replacementString = "'" + replacementString + "']"; //$NON-NLS-1$ //$NON-NLS-2$
+ replacementString = "'" + replacementString; //$NON-NLS-1$ //$NON-NLS-2$
}
kbProposal.setReplacementString(replacementString);
+ kbProposal.setLabel(proposal.getPresentationDisplayName());
kbProposal.setImage(getELProposalImage());
kbProposal.setType(typeName);
kbProposal.setSourceType(sourceTypeName);
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2011-06-01 15:26:16 UTC (rev 31732)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2011-06-01 15:44:56 UTC (rev 31733)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2007-2011 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.common.text.xml;
@@ -43,7 +43,7 @@
@SuppressWarnings("restriction")
public class XMLTextViewerConfiguration extends StructuredTextViewerConfigurationXML {
private static final char[] PROPOSAL_AUTO_ACTIVATION_CHARS = new char[] {
- '<', '=', '"', '\'', '.', '{'
+ '<', '=', '"', '\'', '.', '{', '['
};
SourceViewerConfiguration initial = null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsELCompletionProposalComputer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsELCompletionProposalComputer.java 2011-06-01 15:26:16 UTC (rev 31732)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsELCompletionProposalComputer.java 2011-06-01 15:44:56 UTC (rev 31733)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2010 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2010-2011 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist.computers;
@@ -223,7 +223,7 @@
int paraIndex = restOfValue.indexOf(']');
// Is the quotation is in it?
int quoteIndex = restOfValue.indexOf('\'');
- if (quoteIndex == -1 || (paraIndex != -1 && quoteIndex > paraIndex)) {
+ if (quoteIndex == -1 || paraIndex == -1 || (paraIndex != -1 && quoteIndex > paraIndex)) {
// Need to insert closing single-quote
replacementString += '\'';
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java 2011-06-01 15:26:16 UTC (rev 31732)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlELCompletionProposalComputer.java 2011-06-01 15:44:56 UTC (rev 31733)
@@ -226,7 +226,7 @@
int paraIndex = restOfValue.indexOf(']');
// Is the quotation is in it?
int quoteIndex = restOfValue.indexOf('\'');
- if (quoteIndex == -1 || (paraIndex != -1 && quoteIndex > paraIndex)) {
+ if (quoteIndex == -1 || paraIndex == -1 || (paraIndex != -1 && quoteIndex > paraIndex)) {
// Need to insert closing single-quote
replacementString += '\'';
}
@@ -895,7 +895,7 @@
return tr;
}
-
+
/**
* Returns EL Predicate Text Region Information Object
*
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 2011-06-01 15:26:16 UTC (rev 31732)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2011-06-01 15:44:56 UTC (rev 31733)
@@ -195,12 +195,14 @@
if (key.indexOf('.') != -1) {
TextProposal proposal = new TextProposal();
proposal.setReplacementString("['" + key + "']");
+ proposal.setLabel("['" + key + "']");
proposal.setImage(SEAM_MESSAGES_PROPOSAL_IMAGE);
kbProposals.add(proposal);
} else {
TextProposal proposal = new TextProposal();
proposal.setReplacementString(key);
+ proposal.setLabel(key);
proposal.setImage(SEAM_MESSAGES_PROPOSAL_IMAGE);
kbProposals.add(proposal);
13 years, 4 months