Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbchilds2008-08-21 21:14:27 +0000
committerbchilds2008-08-21 21:14:27 +0000
commit6fd2dc7641e489450e7cde56cc897427bde0b696 (patch)
tree6f1416817d569b015db1d9b541c92be583097b44 /bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt
parent57d8fb3f2d57c2b59245f776849edaf53dba87f2 (diff)
downloadwebtools.sourceediting-6fd2dc7641e489450e7cde56cc897427bde0b696.tar.gz
webtools.sourceediting-6fd2dc7641e489450e7cde56cc897427bde0b696.tar.xz
webtools.sourceediting-6fd2dc7641e489450e7cde56cc897427bde0b696.zip
3.0.1 merge
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt')
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java2
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java1
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java12
3 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java
index 31052722c5..56ff0f8d85 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java
@@ -23,6 +23,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.jsdt.core.IAccessRule;
+import org.eclipse.wst.jsdt.core.IIncludePathAttribute;
import org.eclipse.wst.jsdt.core.IIncludePathEntry;
import org.eclipse.wst.jsdt.core.JavaScriptCore;
import org.eclipse.wst.jsdt.core.LibrarySuperType;
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java
index 39acf07e91..8f07dd7692 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java
@@ -49,6 +49,7 @@ import org.eclipse.wst.jsdt.core.JavaScriptModelException; // import
// org.eclipse.wst.jsdt.core.LibrarySuperType;
import org.eclipse.wst.jsdt.core.WorkingCopyOwner;
import org.eclipse.wst.jsdt.internal.core.DocumentContextFragmentRoot;
+import org.eclipse.wst.jsdt.internal.core.Member;
import org.eclipse.wst.jsdt.internal.core.SourceRefElement;
import org.eclipse.wst.jsdt.web.core.internal.Logger;
import org.eclipse.wst.jsdt.web.core.internal.project.JsWebNature;
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java
index 5f09a09a70..44a296f12c 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java
@@ -73,6 +73,8 @@ public class JsTranslator extends Job implements IJsTranslator{
private static final boolean REMOVE_XML_COMMENT = true;
private static final String XML_COMMENT_START = "<!--"; //$NON-NLS-1$
private static final String XML_COMMENT_END = "-->"; //$NON-NLS-1$
+ private static final boolean REPLACE_INNER_BLOCK_SECTIONS_WITH_SPACE = false;
+
static {
String value = Platform.getDebugOption("org.eclipse.wst.jsdt.web.core/debug/jsjavamapping"); //$NON-NLS-1$
@@ -478,16 +480,20 @@ public class JsTranslator extends Job implements IJsTranslator{
int regionLength = regionText.length();
// /Position inScript = new Position(scriptOffset,
// regionLength);
- Position inHtml = new Position(scriptStart, scriptTextEnd);
- scriptLocationInHtml.add(inHtml);
+
+
spaces = Util.getPad(scriptStart - scriptOffset);
fScriptText.append(spaces);
// fJsToHTMLRanges.put(inScript, inHtml);
- if(isBlockRegion) {
+ if(isBlockRegion && REPLACE_INNER_BLOCK_SECTIONS_WITH_SPACE) {
spaces = Util.getPad(regionLength);
fScriptText.append(spaces);
+ }else if(isBlockRegion){
+ fScriptText.append(regionText);
}else {
fScriptText.append(regionText);
+ Position inHtml = new Position(scriptStart, scriptTextEnd);
+ scriptLocationInHtml.add(inHtml);
}

Back to the top