-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
slewi
committed
Oct 8, 2021
1 parent
a39780e
commit b83c573
Showing
6 changed files
with
71 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/generator/src/main/java/org/eclipse/ecf/grpc/osgigenerator/OSGiGenerator.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ecf.grpc.osgigenerator.OSGiGenerator"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="grpc-osgi-generator"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="examples/hello-world/target/generated-sources/protobuf/java/descriptor_dump"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="generator"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
</launchConfiguration> | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/generator/src/main/java/org/eclipse/ecf/grpc/osgigenerator/OSGiGenerator.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ecf.grpc.osgigenerator.OSGiGenerator"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="grpc-osgi-generator"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="examples/hello-world/target/generated-sources/protobuf/java/descriptor_dump -rx3"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="generator"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
</launchConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
generator/src/main/java/org/eclipse/ecf/grpc/osgigenerator/RxJava3OSGiGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.eclipse.ecf.grpc.osgigenerator; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.google.protobuf.GeneratedMessage.GeneratedExtension; | ||
import com.salesforce.jprotoc.Generator; | ||
import com.salesforce.jprotoc.ProtocPlugin; | ||
|
||
public class RxJava3OSGiGenerator extends OSGiGenerator { | ||
|
||
public RxJava3OSGiGenerator(boolean rx3) { | ||
super(rx3); | ||
} | ||
|
||
public static void main(String[] args) { | ||
List<Generator> generators = new ArrayList<Generator>(); | ||
generators.add(new RxJava3OSGiGenerator(true)); | ||
@SuppressWarnings("rawtypes") | ||
List<GeneratedExtension> extensions = new ArrayList<GeneratedExtension>(); | ||
extensions.add(OsgiServiceOptionsProto.generationType); | ||
extensions.add(OsgiServiceOptionsProto.interfaceMethodBodyType); | ||
extensions.add(OsgiServiceOptionsProto.fileReactivexVersion); | ||
extensions.add(OsgiServiceOptionsProto.serviceReactivexVersion); | ||
if (args.length == 0) { | ||
ProtocPlugin.generate(generators, extensions); | ||
} else { | ||
ProtocPlugin.debug(generators, extensions, args[0]); | ||
} | ||
} | ||
|
||
} |