Skip to content

Commit

Permalink
migrate files and remove xtend nature from regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Dec 14, 2023
1 parent 856c922 commit 1a0e3ae
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 69 deletions.
1 change: 0 additions & 1 deletion plugins/org.eclipse.n4js.regex/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
<attribute name="ignore_optional_problems" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
3 changes: 1 addition & 2 deletions plugins/org.eclipse.n4js.regex/build.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source.. = src/,\
src-gen/,\
xtend-gen/
src-gen/
bin.includes = model/,\
META-INF/,\
.,\
Expand Down
5 changes: 0 additions & 5 deletions plugins/org.eclipse.n4js.regex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ Contributors:
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
* Contributors:
* NumberFour AG - Initial API and implementation
*/
package org.eclipse.n4js.regex
package org.eclipse.n4js.regex;

import org.eclipse.xtext.conversion.impl.INTValueConverter
import org.eclipse.xtext.conversion.impl.INTValueConverter;

/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
*/
class RegularExpressionRuntimeModule extends AbstractRegularExpressionRuntimeModule {
public class RegularExpressionRuntimeModule extends AbstractRegularExpressionRuntimeModule {

/**
* INT is a data type rule thus the specialized binding
*/
def Class<? extends INTValueConverter> bindINTValueConverter() {
return RegExINTValueConverter;
public Class<? extends INTValueConverter> bindINTValueConverter() {
return RegExINTValueConverter.class;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
* Contributors:
* NumberFour AG - Initial API and implementation
*/
package org.eclipse.n4js.regex

package org.eclipse.n4js.regex;

/**
* Initialization support for running Xtext languages without Equinox extension registry.
*/
class RegularExpressionStandaloneSetup extends RegularExpressionStandaloneSetupGenerated {
public class RegularExpressionStandaloneSetup extends RegularExpressionStandaloneSetupGenerated {

def static void doSetup() {
new RegularExpressionStandaloneSetup().createInjectorAndDoEMFRegistration()
/***/
static public void doSetup() {
new RegularExpressionStandaloneSetup().createInjectorAndDoEMFRegistration();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright (c) 2016 NumberFour AG.
* 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* NumberFour AG - Initial API and implementation
*/
package org.eclipse.n4js.regex.generator;

import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.generator.AbstractGenerator;
import org.eclipse.xtext.generator.IFileSystemAccess2;
import org.eclipse.xtext.generator.IGeneratorContext;

/**
* Generates code from your model files on save.
*
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation
*/
public class RegularExpressionGenerator extends AbstractGenerator {

@Override
public void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) {
// fsa.generateFile('greetings.txt', 'People to greet: ' +
// resource.allContents
// .filter(typeof(Greeting))
// .map[name]
// .join(', '))
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
* Contributors:
* NumberFour AG - Initial API and implementation
*/
package org.eclipse.n4js.regex.scoping
package org.eclipse.n4js.regex.scoping;

/**
* This class contains custom scoping description.
*
* see : http://www.eclipse.org/Xtext/documentation.html#scoping
* on how and when to use it
* see : http://www.eclipse.org/Xtext/documentation.html#scoping on how and when to use it
*/
class RegularExpressionScopeProvider extends org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider {

public class RegularExpressionScopeProvider extends org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider {
// empty
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
* Contributors:
* NumberFour AG - Initial API and implementation
*/
package org.eclipse.n4js.regex.validation
package org.eclipse.n4js.regex.validation;
//import org.eclipse.xtext.validation.Check

/**
* Custom validation rules.
*
* see http://www.eclipse.org/Xtext/documentation.html#validation
*/
class RegularExpressionValidator extends AbstractRegularExpressionValidator {
public class RegularExpressionValidator extends AbstractRegularExpressionValidator {

// public static val INVALID_NAME = 'invalidName'
//
// @Check
// def checkGreetingStartsWithCapital(Greeting greeting) {
// if (!Character.isUpperCase(greeting.name.charAt(0))) {
// warning('Name should start with a capital',
// MyDslPackage.Literals.GREETING__NAME,
// INVALID_NAME)
// }
// }
// public static val INVALID_NAME = 'invalidName'
//
// @Check
// def checkGreetingStartsWithCapital(Greeting greeting) {
// if (!Character.isUpperCase(greeting.name.charAt(0))) {
// warning('Name should start with a capital',
// MyDslPackage.Literals.GREETING__NAME,
// INVALID_NAME)
// }
// }
}
2 changes: 0 additions & 2 deletions plugins/org.eclipse.n4js.regex/xtend-gen/.gitignore

This file was deleted.

0 comments on commit 1a0e3ae

Please sign in to comment.