diff options
author | nsandonato | 2011-03-22 21:01:01 +0000 |
---|---|---|
committer | nsandonato | 2011-03-22 21:01:01 +0000 |
commit | 8fec63ce556a12745f533b9dae7c9e51264a1a37 (patch) | |
tree | e051bae583e524f43786132ad65b41e99019bfb7 /bundles/org.eclipse.wst.sse.core/src/org/eclipse | |
parent | 913e40edd34258297fedf6093161ff6baa9ca789 (diff) | |
download | webtools.sourceediting-8fec63ce556a12745f533b9dae7c9e51264a1a37.tar.gz webtools.sourceediting-8fec63ce556a12745f533b9dae7c9e51264a1a37.tar.xz webtools.sourceediting-8fec63ce556a12745f533b9dae7c9e51264a1a37.zip |
[215668] [document] Code assist within Style element does not work
Diffstat (limited to 'bundles/org.eclipse.wst.sse.core/src/org/eclipse')
-rw-r--r-- | bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java index 14e9b1532b..445e5f27f5 100644 --- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java +++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2010 IBM Corporation and others. + * Copyright (c) 2001, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -271,6 +271,10 @@ public class StructuredTextPartitioner implements IDocumentPartitioner, IStructu return false; } + protected IStructuredDocumentRegion getParserSpecificPreviousRegion(IStructuredDocumentRegion currentRegion) { + return currentRegion != null ? currentRegion.getPrevious() : null; + } + /** * Returns the content type of the partition containing the given * character position of the given document. The document has previously @@ -556,7 +560,7 @@ public class StructuredTextPartitioner implements IDocumentPartitioner, IStructu // } // else if (structuredDocumentRegion.getStartOffset() == offset) { - IStructuredDocumentRegion previousStructuredDocumentRegion = structuredDocumentRegion.getPrevious(); + IStructuredDocumentRegion previousStructuredDocumentRegion = getParserSpecificPreviousRegion(structuredDocumentRegion); if (previousStructuredDocumentRegion != null) { ITextRegion next = structuredDocumentRegion.getRegionAtCharacterOffset(offset); ITextRegion previousStart = previousStructuredDocumentRegion.getRegionAtCharacterOffset(previousStructuredDocumentRegion.getStartOffset()); |