Giter Club home page Giter Club logo

avroclipse's Introduction

Avroclipse Build Status

An Eclipse editor plugin for defining Apache Avro IDL files.

Current version: 0.0.11

Used techniques/tools:

License: Apache License, Version 2.0

Install Avroclipse

Marketplace

Drag thisDrag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client button to your running Eclipse workspace or search for Avroclipse in the Eclipse Marketplace.

Update Site

Install Avroclipse using the folloing the update site URL:

http://dvdkruk.github.io/avroclipse/updatesite/releases

To add the Avroclipse update site:

  1. Go in your Eclipse instance to Help > Install New Software....
  2. In the "Work with" section, click the Add... button. The "Add Repository" dialog box appears.
  3. Fill the update site link shown above, in the location field and click OK.
  4. Select the Avoclipse checkbox and click Finish.
  5. After installation and restarting Eclipse, Avroclipse is ready to use. Avroclipse editor will automatically be shown when creating or opening a file with the ".avdl" extension.

Zip Archive (Offline)

Another way to install Avroclipse is to use the Avroclipse updatesite zip file. Click here how to do this.

Features

Here are some features of Avroclipse shown.

Syntax Highlighting

Syntax Highlighting

Error Highlighting

Error Highlighting

Code Completion

Code Completion

Getting Started (Development)

  1. Download and install Eclipse IDE for Java and DSL Developers for your OS.
  2. Clone this repository.
  3. Go to the avroclipse.relang directory and execute the following maven command:mvn clean install
  4. Launch Eclipse and set the directory where you cloned the repository as workspace.
  5. Import existing projects into your workspace.
  6. The six projects of Avroclipse should now be in your workspace ready to be edited.
  7. To launch an Eclipse instance with Avroclipse; right click on the avroclipse.ui project and select Run As > Eclipse Application.

Note: Tycho Project Configurators (0.8.0.201409231215) plugin is needed to use the maven pom.xml file correctly in Eclipse.

Alternatives/links

avroclipse's People

Watchers

 avatar  avatar

Forkers

pnoltes

avroclipse's Issues

Conflicts installing plugin

Hi,

I am getting the following problem when trying to install your plugin.
Running on Mars 4.5.2.

Cannot complete the install because of a conflicting dependency.
Software being installed: Avroclipse Generator Java 0.0.4.201602162047 (avroclipse.generator.java 0.0.4.201602162047)
Software currently installed: Xtext Redistributable 2.9.2.v201603040440 (org.eclipse.xtext.redist.feature.group 2.9.2.v201603040440)
Only one of the following can be installed at once:
Xtext 2.5.0.v201312110906 (org.eclipse.xtext 2.5.0.v201312110906)
Xtext 2.8.1.v201503230617 (org.eclipse.xtext 2.8.1.v201503230617)
Xtext 2.7.1.v201409090713 (org.eclipse.xtext 2.7.1.v201409090713)
Xtext 2.1.1.v201111141332 (org.eclipse.xtext 2.1.1.v201111141332)
Xtext 2.3.0.v201206120633 (org.eclipse.xtext 2.3.0.v201206120633)
Xtext 2.4.0.v201303201134 (org.eclipse.xtext 2.4.0.v201303201134)
Xtext 2.5.3.v201402240820 (org.eclipse.xtext 2.5.3.v201402240820)
Xtext 2.7.2.v201409160908 (org.eclipse.xtext 2.7.2.v201409160908)
Xtext 2.7.0.v201409021032 (org.eclipse.xtext 2.7.0.v201409021032)
Xtext 2.9.2.v201603040440 (org.eclipse.xtext 2.9.2.v201603040440)
Xtext 2.6.0.v201405210727 (org.eclipse.xtext 2.6.0.v201405210727)
Xtext 2.4.1.v201304180855 (org.eclipse.xtext 2.4.1.v201304180855)
Xtext 2.4.3.v201309030823 (org.eclipse.xtext 2.4.3.v201309030823)
Xtext 2.5.4.v201404100756 (org.eclipse.xtext 2.5.4.v201404100756)
Xtext 2.4.2.v201306120542 (org.eclipse.xtext 2.4.2.v201306120542)
Xtext 2.8.2.v201504100559 (org.eclipse.xtext 2.8.2.v201504100559)
Xtext 1.0.2.v201102150722 (org.eclipse.xtext 1.0.2.v201102150722)
Xtext 2.2.1.v201112130541 (org.eclipse.xtext 2.2.1.v201112130541)
Xtext 2.3.1.v201208210947 (org.eclipse.xtext 2.3.1.v201208210947)
Xtext 2.8.4.v201508050135 (org.eclipse.xtext 2.8.4.v201508050135)
Xtext 2.0.1.v201108020636 (org.eclipse.xtext 2.0.1.v201108020636)
Xtext 2.5.2.v201402120812 (org.eclipse.xtext 2.5.2.v201402120812)
Xtext 2.7.3.v201411190455 (org.eclipse.xtext 2.7.3.v201411190455)
Xtext 2.8.3.v201506010551 (org.eclipse.xtext 2.8.3.v201506010551)
Xtext 2.5.1.v201402030714 (org.eclipse.xtext 2.5.1.v201402030714)
Xtext 2.6.2.v201407030533 (org.eclipse.xtext 2.6.2.v201407030533)
Xtext 2.6.1.v201406120726 (org.eclipse.xtext 2.6.1.v201406120726)
Xtext 2.8.0.v201503090534 (org.eclipse.xtext 2.8.0.v201503090534)
Xtext 2.9.0.v201512010527 (org.eclipse.xtext 2.9.0.v201512010527)
Xtext 2.9.1.v201512180746 (org.eclipse.xtext 2.9.1.v201512180746)
Xtext 2.10.0.v201605250459 (org.eclipse.xtext 2.10.0.v201605250459)
Cannot satisfy dependency:
From: Avroclipse Core 0.0.4.201602162047 (avroclipse 0.0.4.201602162047)
To: bundle org.eclipse.xtext [2.8.4,2.9.0)
Cannot satisfy dependency:
From: Avroclipse Generator Java 0.0.4.201602162047 (avroclipse.generator.java 0.0.4.201602162047)
To: bundle avroclipse 0.0.2
Cannot satisfy dependency:
From: Xtext Redistributable 2.9.2.v201603040440 (org.eclipse.xtext.redist.feature.group 2.9.2.v201603040440)
To: org.eclipse.xtext [2.9.2.v201603040440]

Update Site error

Trying to install Avroclipse via the Update Site URL resulted in the following error:

Cannot complete the install because one or more required items could not be found.
  Software being installed: AvroIDL SDK Feature 0.0.9.201804181116 (avroclipse.sdk.feature.group 0.0.9.201804181116)
  Missing requirement: AvroIDL SDK Feature 0.0.9.201804181116 (avroclipse.sdk.feature.group 0.0.9.201804181116) requires 'org.eclipse.xtext 0.0.0' but it could not be found

Annotations in union-ed types

According to AVRO spec, any referent to a type may include annotations. At least, I am sure this is the case with the @Java-class annotation for stringables (and the @java-key for stringable keys in maps)
That is, this should be valid AVDL:
union{null, @java-key-class("java.net.URI") map< @java-class("String") string>} UserBank = null
but it is not allowed by current version of Avroclipse, as the parser only allows bare type definitions here:

'union' '{' types+=TypeLink (',' types+=TypeLink)* '}';

Update to the newest Xtext and implement support for IntelliJ IDEA

In Xtext version 2.9 and higher, support for IntelliJ IDEA is added. By moving to a newer version of Xtext, we can utilize this support to make a IntelliJ IDEA version of Avrolipse. This issue consists of the following tasks:

  1. Update to the newest version of Xtext.
  2. Implement IntelliJ IDEA specific code.
  3. Release a version of Avroclipse to the IntelliJ IDEA Plugin Repository

Support for logical types

It appears that logical types are not supported, as in this example:

record MyRecord {
  decimal(9,2) my_decimal;
}

The syntax highlighter gives errors on this.

annotation on method not supported

The following snippet gives formatting error, but can be parsed by the avro-tools:

@namespace("test")
protocol TestInterface {
	
	@const("true")
	string getName();
}

More than one annotation in union-ed types

(Originally a comment to #16)
In the example I provided, the java-key-class annotation is now correctly parsed, but the parser now fails if I create a union with more than one annotation in the same type. when it reaches the annotation within the map definition. Despite what it may seem, this is not a specially contrived example:
union{null, @java-key-class("java.net.URI") @java-element-class("String") map<string>}UserBank = null;// keys are URIs
This is valid avro (and is not a specially contrived example but a real one to create a nullable map from URIs to strings), but is considered wrong by the editor.
After reading AVRO IDL grammar (written in JavaCC, yet easy to understand for anyone who has ever written a parser, you can just ignore the first initialization block within each production rule), you can notice that: Union definition, Map type definition, etc. all refer to the same rule within, that of a Type, which can include one or more schema properties (i.e. annotations)

The current grammar of Avroclipse does not support AVRO-legal more than one annotation in union types.

[Comment edited, as the original version was not accurate]

Originally posted by @ysmartin in https://github.com/_render_node/MDEyOklzc3VlQ29tbWVudDQ0MjYzNDA1OA==/timeline/issue_comment#issuecomment-442634058

Extend pojo generator to support nested arrays and maps in unions.

The current pojo generator, which supports Avro reflect and Jackson doesn't generate code for types of arrays and maps in unions.

TODO:
Extends the avroclipse.generator.java project so that is generate java code for avro idl desciptions with arrays and maps nested in unions.

File:
avroclipse/avroclipse.generator.java/src/avroclipse/generator/java/JavaWithAnnotationsGenerator.xtend

Problems parsing union with arrays

Hi,

I am getting an error in the avro editor when I have a union with an array as below:

@namespace("comms.avro.messages")

protocol MessageInterface {

record TestUnion {
union { null, string} field0 = null;
union {null, array} field1 = null; // this gives me an error.

}

}

Implement formatter for annotations

When you format the code (ctrl+shift+f) annotations are formatted with a lot of spaces. This should be compacter and nicer. For example:
@ namespace ( "some.namespace" )
should be formatted as:
@namespace("some.namespace")

Projects with non-default location not handled correctly

Hello,

The avpr generator fails when the project is not in the default location of the workspace (create from existing directory)

java.io.FileNotFoundException: /home/maintain/workspace_mars/myart/avro/tracking.services.TrackDb.avdl (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.apache.avro.compiler.idl.Idl.(Idl.java:45)
at avroclipse.generator.avpr.AvprFileGenerator.doGenerate(AvprFileGenerator.java:39)
at avroclipse.generator.AvroIDLGenerator.doGenerate(AvroIDLGenerator.java:41)
at avroclipse.generator.AvroIDLGenerator$1.apply(AvroIDLGenerator.java:33)
at avroclipse.generator.AvroIDLGenerator$1.apply(AvroIDLGenerator.java:1)
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtensions.java:363)
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtensions.java:333)
at avroclipse.generator.AvroIDLGenerator.doGenerate(AvroIDLGenerator.java:36)
at org.eclipse.xtext.builder.BuilderParticipant.handleChangedContents(BuilderParticipant.java:524)
at org.eclipse.xtext.builder.BuilderParticipant.handleChangedContents(BuilderParticipant.java:513)
at org.eclipse.xtext.builder.BuilderParticipant.doGenerate(BuilderParticipant.java:498)
at org.eclipse.xtext.builder.BuilderParticipant.doBuild(BuilderParticipant.java:263)
at org.eclipse.xtext.builder.BuilderParticipant.build(BuilderParticipant.java:221)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant$DeferredBuilderParticipant.build(RegistryBuilderParticipant.java:161)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant.build(RegistryBuilderParticipant.java:69)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:252)
at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:228)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:123)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

The optional (java & avpr) generator plugins are installed even when they are not selected in the installation section

When you install Avroclipse using the marketplace, it gives you the option to install the Avroclipse SDK Feature, avroclipse.generator.avpr & avroclipse.generator.java. The Avroclipse SDK Feature is selected by default, but the generator plugins are optional. If you only select the Avroclipse SDK Feature and continue the installation, it actually installs the SDK and both the generator plugins. The result should actually be that only the Avroclipse SDK Feature is installed.

Does not use imports

Hi,

The editor highlights the import idl syntax, but it does not take the contents of the imports, thus whatever i defined in that file are not reflected in my current avdl, thus the syntax error.

Thanks
Shannon

Restrictions on namespace syntax

Hi

Installed this excellent plugin, but when I opened some IDLs i got errors saying that "_ - &" are not allowed in namespace names. I cannot find any confirmation of this in the specification and running the compiler from command line does not generate any warnings or errors with the same IDLs. Why is this restriction in the plugin?

BR
eldacar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.