Author: vrubezhny
Date: 2011-06-08 11:03:55 -0400 (Wed, 08 Jun 2011)
New Revision: 31914
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsTagCompletionProposalComputer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java
Log:
JBIDE-9092
Wrong attribute name proposals appear in CA Window for CSS styles inside
<style></style> tag
issue is fixed
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsTagCompletionProposalComputer.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsTagCompletionProposalComputer.java 2011-06-08
14:57:10 UTC (rev 31913)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/FaceletsTagCompletionProposalComputer.java 2011-06-08
15:03:55 UTC (rev 31914)
@@ -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;
@@ -172,6 +172,9 @@
protected void addAttributeNameProposals(
ContentAssistRequest contentAssistRequest,
CompletionProposalInvocationContext context) {
+ if (!(contentAssistRequest.getNode() instanceof Element))
+ return;
+
super.addAttributeNameProposals(contentAssistRequest, context);
if (isExistingAttribute(JSFC_ATTRIBUTE_NAME)) {
this.replaceJsfcTags = true;
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 2011-06-08
14:57:10 UTC (rev 31913)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/computers/XmlTagCompletionProposalComputer.java 2011-06-08
15:03:55 UTC (rev 31914)
@@ -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;
@@ -116,6 +116,9 @@
@Override
protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest,
CompletionProposalInvocationContext context) {
+ if (!(contentAssistRequest.getNode() instanceof Element))
+ return;
+
String matchString = contentAssistRequest.getMatchString();
String query = matchString;
if (query == null)