Skip to content

Commit 213c6c5

Browse files
committed
Try to get the
Nodeclipse#19 fixed
1 parent f01485f commit 213c6c5

File tree

18 files changed

+118
-2173
lines changed

18 files changed

+118
-2173
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/.ArrayTest.java._trace
2+
/.AssignTest.java._trace
3+
/.ClassTest.java._trace
4+
/.ControlFlowTest.java._trace
5+
/.DictionaryTest.java._trace
6+
/.FunctionCallTest.java._trace
7+
/.LambdaTest.java._trace
8+
/.LiteralTest.java._trace
9+
/.OperatorsTest.java._trace
10+
/.ScopeTest.java._trace
11+
/ArrayTest.java
12+
/AssignTest.java
13+
/ClassTest.java
14+
/ControlFlowTest.java
15+
/DictionaryTest.java
16+
/FunctionCallTest.java
17+
/LambdaTest.java
18+
/LiteralTest.java
19+
/OperatorsTest.java
20+
/ScopeTest.java
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.NodesCoffeeTest.java._trace
2+
/.Showcase.java._trace
3+
/NodesCoffeeTest.java
4+
/Showcase.java

csep.tests/xtend-gen/csep/tests/coffee/Showcase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void test_interpolation() {
3737
_builder.append("quote = \"A picture is a fact. -- #{ author }\"");
3838
_builder.newLine();
3939
_builder.newLine();
40-
_builder.append("sentence = \"#{ 22 / 7 } is a decent approximation of \uFFFD\uFFFD\"");
40+
_builder.append("sentence = \"#{ 22 / 7 } is a decent approximation of \ufffd\ufffd\"");
4141
_builder.newLine();
4242
this.ok(_builder);
4343
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.PositionTest.java._trace
2+
/.TokenTest.java._trace
3+
/PositionTest.java
4+
/TokenTest.java
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.CakefileTest.java._trace
2+
/.ErrorLocationTest.java._trace
3+
/.MissingFeaturesTest.java._trace
4+
/CakefileTest.java
5+
/ErrorLocationTest.java
6+
/MissingFeaturesTest.java
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.HelperTest.java._trace
2+
/HelperTest.java

csep.ui/src-gen/csep/ui/contentassist/AbstractCoffeeScriptProposalProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
1010

1111
/**
12-
* Represents a generated, default implementation of interface {@link IProposalProvider}.
12+
* Represents a generated, default implementation of superclass {@link org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider}.
1313
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
1414
* with a more concrete subtype.
1515
*/

csep.ui/src-gen/csep/ui/contentassist/antlr/PartialCoffeeScriptContentAssistParser.java

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/**
1616
* @author Sebastian Zarnekow - Initial contribution and API
1717
*/
18+
@SuppressWarnings("restriction")
1819
public class PartialCoffeeScriptContentAssistParser extends CoffeeScriptParser implements IPartialContentAssistParser {
1920

2021
private AbstractRule rule;

csep/src-gen/csep/CoffeeScript.genmodel

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
modelPluginID="csep" forceOverwrite="true" modelName="CoffeeScript" updateClasspath="false"
55
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="5.0"
66
copyrightFields="false" editPluginID="csep.edit" editorPluginID="csep.editor"
7-
runtimeVersion="2.8">
7+
runtimeVersion="2.9">
88
<genPackages prefix="CoffeeScript" basePackage="csep" disposableProviderFactory="true"
99
ecorePackage="CoffeeScript.ecore#/">
1010
<genClasses ecoreClass="CoffeeScript.ecore#//Root"/>

csep/src-gen/csep/CoffeeScript.xmi

-2,164
This file was deleted.
14.5 KB
Binary file not shown.

csep/src-gen/csep/CoffeeScriptStandaloneSetupGenerated.java

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public Injector createInjectorAndDoEMFRegistration() {
2424
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
2525
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
2626
"xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());
27+
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
28+
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
29+
"xtextbin", new org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl());
2730
if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
2831
EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);
2932

csep/src-gen/csep/coffeeScript/impl/CoffeeScriptFactoryImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static CoffeeScriptFactory init()
3030
{
3131
try
3232
{
33-
CoffeeScriptFactory theCoffeeScriptFactory = (CoffeeScriptFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.coffeescript.org/eclipse");
33+
CoffeeScriptFactory theCoffeeScriptFactory = (CoffeeScriptFactory)EPackage.Registry.INSTANCE.getEFactory(CoffeeScriptPackage.eNS_URI);
3434
if (theCoffeeScriptFactory != null)
3535
{
3636
return theCoffeeScriptFactory;

csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,7 @@ private List<CoffeeSymbol> tokenize(String code, Map<String, Object> opts)
359359
code = "\n" + code;
360360
this.fOffsetCorrection -= 1;
361361
}
362-
code = code.replaceAll("\r", "").replaceFirst(
363-
TRAILING_SPACES.pattern(), "");
362+
code = code.replaceAll("\r", "");
364363
this.fCode = code;
365364
this.fLine = 0;
366365
if (opts.containsKey("fLine")) {
@@ -891,7 +890,7 @@ private int lineToken() {
891890
if (noNewlines) {
892891
this.suppressNewlines();
893892
} else {
894-
this.newlineToken();
893+
this.newlineToken(indent.length());
895894
}
896895
return indent.length();
897896
}
@@ -969,9 +968,9 @@ private int whitespaceToken() {
969968
return 0;
970969
}
971970

972-
private void newlineToken() {
971+
private void newlineToken(int i) {
973972
if (this.tag() != Terminals.TERMINATOR) {
974-
this.token(Terminals.TERMINATOR, "\n", 1);
973+
this.token(Terminals.TERMINATOR, "\n", i);
975974
}
976975
// return this;
977976
}

csep/src/csep/Main.java

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package csep;
2+
3+
import java.io.FileInputStream;
4+
import java.io.IOException;
5+
6+
import org.eclipse.emf.common.util.URI;
7+
import org.eclipse.emf.ecore.resource.ResourceSet;
8+
import org.eclipse.xtext.resource.XtextResource;
9+
10+
import com.google.inject.Injector;
11+
12+
public class Main {
13+
14+
public static void main(String[] args) throws IOException {
15+
FileInputStream in = new FileInputStream("x.coffee");
16+
int c = 0;
17+
int n = 0;
18+
while((n=in.read())>0) c++;
19+
in.close();
20+
System.out.println(c);
21+
22+
23+
Injector i = new CoffeeScriptStandaloneSetup().createInjectorAndDoEMFRegistration();
24+
ResourceSet rs = i.getInstance(ResourceSet.class);
25+
XtextResource r = (XtextResource)rs.getResource(URI.createURI("x.coffee"), true);
26+
r.load(null);
27+
System.out.println(r.getParseResult().getRootNode().getTotalLength());
28+
}
29+
30+
}

csep/x.coffee

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
3+
4+
#xxxxx
5+
6+
a = 1+1
7+
8+
9+
10+
11+
12+
13+
1+1
14+
15+
1111+1111+111+111
16+
xx=1+1+1
17+
1+1
18+
19+
20+
sssss=1+1
21+
22+
23+
24+
25+
26+
27+
28+
bla = 1+1
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.CoffeeScriptGenerator.java._trace
2+
/CoffeeScriptGenerator.java

0 commit comments

Comments
 (0)