Git Product home page Git Product logo

pom-sorter's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pom-sorter's Issues

duplication or and tag CDATA

example 1 (duplication):

before:
<argument><![CDATA[&&]]></argument>
after:
<argument><![CDATA[<![CDATA[&&]]>]]></argument>

example 2 (add):

before:
<argument>&amp;&amp;</argument>
after:
<argument><![CDATA[&amp;&amp;]]></argument>

sort comment

If the inside of the unit is the first comment, I'd like to keep it first (relevant only to the first comment in the block)

before sorting:

        <mirror>
            <!-- United States, St. Louis-->
            <mirrorOf>central</mirrorOf>
            <url>http://repo1.maven.org/maven2</url>
            <id>Central</id>
        </mirror>

after sorting (for now):

        <mirror>
            <id>Central</id>
            <!-- United States, St. Louis-->
            <mirrorOf>central</mirrorOf>
            <url>http://repo1.maven.org/maven2</url>
        </mirror>

after sorting (would like to):

        <mirror>
            <!-- United States, St. Louis-->
            <id>Central</id>
            <mirrorOf>central</mirrorOf>
            <url>http://repo1.maven.org/maven2</url>
        </mirror>

Folding sections

Sometimes, after sorting, the editor of "losing" the possibility of folding sections
err0
err1

PomSorter error when running IntelliJ with Java6

Hello,
First of all, thanks for the plugin.
With the latest update, the plugin failms to start with an "Unsupported major.minor version 51.0" that is typical of classes compiled with JDK newer than the runtime one. I'm running IntelliJ using Java6 on OSX, and I suppose that the new plugin has been compiled with Java7. Running IntelliJ with Java7 on OSX has drawbacks especially regarding UI instability, so I would prefer to stick to Java6 runtime.

Best regards,
Vincent

Sort order like in maven.xsd

maven.xsd has really good order of all its elements, it would useful to have possibility to sort our poms according to xsd elemets order.

Tag attributes removed after sorting

Before:

    <configuration>
        <target>
            <echo message="dfasd"/>
        </target>
    </configuration>

After:

    <configuration>
        <target>
            <echo></echo>
        </target>
    </configuration>

Allow sorting tags by attribute values

This would allow sorting generic xml files, since there is no IntelliJ IDEA plugin to sort xml files.

Example xml file:

<profile kind="CodeFormatterProfile" version="11">
        <setting id="paren_in_if" value="do not insert"/>
        <setting id="colon_in_assert" value="insert"/>
        <setting id="enum_constant" value="end_of_line"/>
        <setting id="before_semicolon" value="do not insert"/>
</profile>

Allow sorting setting tags by value of "id" attribute.

Sorry if this is not in scope of this plugin.

No sort of ant tasks by default

By default Pom-sorter substitutes those two lines, which causes build to fail:

<mkdir dir="${project.build.directory}/downloads"/>
<get src="http://archive.apache.org/dist/tomcat/tomcat-7/v${version.org.apache.tomcat}/bin/apache-tomcat-${version.org.apache.tomcat}.zip"
    dest="${project.build.directory}/downloads" verbose="true" skipexisting="true"/>

Full plugin config:

                 <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>generate-test-resources</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <tasks>
                                    <!-- Remove the default ROOT webapp so it won't collide with tests -->
                                    <delete dir="${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/webapps/ROOT"/>
                                    <mkdir dir="${project.build.directory}/downloads"/>
                                    <get src="http://archive.apache.org/dist/tomcat/tomcat-7/v${version.org.apache.tomcat}/bin/apache-tomcat-${version.org.apache.tomcat}.zip"
                                         dest="${project.build.directory}/downloads" verbose="true" skipexisting="true"/>
                                    <unzip src="${project.build.directory}/downloads/apache-tomcat-${version.org.apache.tomcat}.zip"
                                           dest="${project.build.directory}"/>
                                </tasks>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

Blank lines

It would be great to have a way to configure blank lines in between certain tags.

I think there could just be a seperate button to add one to the list of tags.
Moving it up and down and deleting it could work just the same as for tag items in the list.

Pattern-like tag selectors

Currently we can configure how particular tag should be sorted. However sometimes same tag name is used in different context and we would like to define different sort mode for each context.

i.e. maven-antrun-plugin/executions/execution/configuration/target

It would be useful to be able to configure sort mode using pattern like:
/maven-antrun-plugin//target

Expending children of not sorted tag

If <target> is configured not be sorted, then child tag (simple node) is turned into a "complex" node.

Before:

<target>
    <echo message="bla"/>
</target>

After sorting:

<target>
    <echo message="bla"></echo>
</target>

add "null" from empty comments

If the pom-file is empty comments ("" - No spaces), then after they are transformed into sort null-comments ("<!-null->")
err0

Error with IntelliJ Ultimate 133.696

The plugin won't run with the above version of IntelliJ

Plugin 'Pom sorter' failed to initialize and will be disabled. Please restart IntelliJ IDEA.

com.intellij.diagnostic.PluginException: pl/itcrowd/pom_sorter/PomSorter : Unsupported major.minor version 51.0 [Plugin: Pom sorter]
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:130)
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:77)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:408)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:398)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:384)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:107)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:307)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:278)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$300(ProjectManagerImpl.java:82)
at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:562)
at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:558)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:240)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:274)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:642)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:420)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:150)
Caused by: java.lang.UnsupportedClassVersionError: pl/itcrowd/pom_sorter/PomSorter : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:189)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:185)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:161)
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:124)
... 31 more

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.