Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 37285 Details for
Bug 115927
First attribute quote is deleted if insert JSP expression through statement completion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
org.eclipse.wst.html.ui.patch
org.eclipse.wst.html.ui.patch (text/plain), 3.10 KB, created by
Amy Wu
on 2006-03-30 02:51:31 EST
(
hide
)
Description:
org.eclipse.wst.html.ui.patch
Filename:
MIME Type:
Creator:
Amy Wu
Created:
2006-03-30 02:51:31 EST
Size:
3.10 KB
patch
obsolete
>Index: src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/html/plugins/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java,v >retrieving revision 1.22 >diff -u -r1.22 HTMLContentAssistProcessor.java >--- src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java 7 Sep 2005 23:49:25 -0000 1.22 >+++ src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java 30 Mar 2006 07:46:42 -0000 >@@ -78,7 +78,12 @@ > } > > protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) { >- addTemplates(contentAssistRequest, TemplateContextTypeIdsHTML.ATTRIBUTE_VALUE); >+ // bug115927 do not include first quote >+ int startOffset = contentAssistRequest.getReplacementBeginPosition(); >+ if (contentAssistRequest.getMatchString().length() > 0 && (contentAssistRequest.getMatchString().charAt(0) == '\'' || contentAssistRequest.getMatchString().charAt(0) == '"')) { >+ ++startOffset; >+ } >+ addTemplates(contentAssistRequest, TemplateContextTypeIdsHTML.ATTRIBUTE_VALUE, startOffset); > super.addAttributeValueProposals(contentAssistRequest); > } > >@@ -119,9 +124,20 @@ > * @param context > */ > private void addTemplates(ContentAssistRequest contentAssistRequest, String context) { >+ addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition()); >+ } >+ >+ /** >+ * Adds templates to the list of proposals >+ * >+ * @param contentAssistRequest >+ * @param context >+ * @param startOffset >+ */ >+ private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) { > if (contentAssistRequest == null) > return; >- >+ > // if already adding template proposals for a certain context type, do > // not add again > if (!fTemplateContexts.contains(context)) { >@@ -130,7 +146,7 @@ > > if (getTemplateCompletionProcessor() != null) { > getTemplateCompletionProcessor().setContextType(context); >- ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, contentAssistRequest.getReplacementBeginPosition()); >+ ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset); > for (int i = 0; i < proposals.length; ++i) { > if (useProposalList) > contentAssistRequest.addProposal(proposals[i]); >@@ -151,7 +167,8 @@ > > protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) { > ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode); >- addTemplates(request, TemplateContextTypeIdsHTML.ALL); >+ // bug115927 use original document position for all/any region templates >+ addTemplates(request, TemplateContextTypeIdsHTML.ALL, documentPosition); > return request; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 115927
:
37284
|
37285
|
37286
|
37374
|
37375
|
37376