angelozerr / ec4e Goto Github PK
View Code? Open in Web Editor NEWEditorConfig for Eclipse based on GenericEditor and tm4e
License: Eclipse Public License 1.0
EditorConfig for Eclipse based on GenericEditor and tm4e
License: Eclipse Public License 1.0
This is for practical reasons: When importing the source tree as Maven projects, m2e takes (by default) the project names from <artifactId>
. I had to search in my workspace for quite long to figure out that the source tree got imported under a nondescriptive root module parent
. Knowing that I am importing ec4e
, I'd expect it to appear under a name that contains ec4e
. org.eclipse.ec4e.parent
or simply ec4e-parent
would be good names for the parent module, IMO. I'll send a PR in short.
Got the following ,editorconfig file in the root of my project:
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
When I open a .ts file from within a subfolder of my project in the Generic Editor (also got WWD installed) and I press tab, I still get a tab character inserted, instead of 4 dots.
Seems like the settings of the .editorconfig file aren't getting applied, cause what happens when I hit tab in the editor follows the global Eclipse workspace setting instead
I'd like to try your new EditorConfig parser in my new EditorConfig Maven plugin. To do so before you release, I use a source dependency of org.eclipse.ec4e.services
(via srcdeps [1]).
However, Tycho p2 plugin does not like the format of srcdeps versions - they are something like 0.1.0.-SRC-revision-3e75ceaea138c6f86231658dbe3d7fced9dfce37
and the plugin complains that -SRC-revision-3e75ceaea138c6f86231658dbe3d7fced9dfce37
is not a valid qualifier.
Because actually I do not need any p2 repos, it would be nice if the problematic Tycho plugin executions could be disabled through properties passed as Maven command line parameters. Defaults would of course stay as they are now.
A PR will follow.
Maybe related to #31
Let's start with the following code.
public class Foo {
public void bar() {
int i = 0;
}
}
My cursor is right after the opening curly brace at line 3 (after public void bar() {
). I hit Enter.
At line 4, I expect to have two tabs before my cursor. Instead, I have one tab, and four spaces.
public class Foo {
public void bar() {
int i = 0;
}
}
.editorconfig
:
root = true
[*]
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
When Ctrl + A > Ctrl + Shift + F, the .editorconfig
configuration is not taken into account.
The following code
public class Foo {
public void bar() {
int i = 0;
}
}
will be converted as
public class Foo {
public void bar() {
int i = 0;
}
}
.editorconfig
:
root = true
[*]
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
Works well with https://github.com/ncjones/editorconfig-eclipse or https://github.com/sindresorhus/atom-editorconfig.
I don't if it is possible to generate a technical report to help you to investigate.
The compiler level is currently at Java 8 [1]. While I personally prefer Java 8, the reality in the world of Java build tools strongly supports going back to Java 7: Both recent Maven and Gradle are still at Java 7. Note that I am saying this because I am writing an EditorConfig Maven plugin. ec4e running smoothly on Java 7 would make the users of my plugin a little bit happier ;).
I have not inspected the code too deeply to see if this is technically possible. I'd first like to ask you @angelozerr if you have some strong opinion on this? I could try to propose a PR if you give me green.
[1]
Lines 101 to 102 in dca9ea4
It should be nice if we could display the number of matched files declared in the section
` 7 files
[{*.json}]
trim_trailing_whitespace = true
32 files
[{*.css}]
indent_size = 4
`
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module /home/ppalaga/orgs/tools/ec4e/org.eclipse.ec4j of /home/ppalaga/orgs/tools/ec4e/pom.xml does not exist @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.eclipse.ec4e:org.eclipse.ec4e.parent:0.1.0-SNAPSHOT (/home/ppalaga/orgs/tools/ec4e/pom.xml) has 1 error
[ERROR] Child module /home/ppalaga/orgs/tools/ec4e/org.eclipse.ec4j of /home/ppalaga/orgs/tools/ec4e/pom.xml does not exist
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
A PR follows.
Fold .editorconfig section
Provide a wizard to create .editorconfig which generate [*] section with properties coming from standard Eclipse preferences.
To make it easier to find for most users, maybe you should publish the plugin on the Eclipse Marketplace.
Maybe you should contact as well the EditorConfig mailing list to let them know your new plugin exists.
Thanks for your work ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.