1

Eclipse で xml ファイルをフォーマットしようとすると、各フィールドが新しい行に配置されます。代わりに、各プロパティを 1 行に配置したいと考えています。たとえば、CTRL + SHFT + Fを押すと、Eclipseは次のようにフォーマットします。

<hibernate-mapping package="com.server.entities">
<class
    name="Branch"
    table="Branch"
>
    <meta attribute="sync-DAO">false</meta>
    <id name="Id"
        type="java.lang.Long"
        column="id"
    >
        <generator class="native"/>
    </id>

    <property
        name="Created"
        column="created"
        type="timestamp"
        not-null="false"
        length="23"
    />
    <property
        name="LastUpdated"
        column="lastUpdated"
        type="timestamp"
        not-null="false"
        length="23"
    />
    <property
        name="CreatedBy"
        column="createdBy"
        type="java.lang.Long"
        not-null="false"
        length="19"
    />

しかし、私が欲しいのは

<hibernate-mapping package="com.kaizen.report.server.entities">
<class name="Branch" table="Branch">
    <meta attribute="sync-DAO">false</meta>
    <id name="Id" type="java.lang.Long" column="id">
        <generator class="native"/>
    </id>

<property name="Created" column="created" type="timestamp" not-null="false" length="23"/>
4

1 に答える 1

2

eclipse.org の XML エディターを使用している場合は、XML エディター設定ページに移動し、オプションを変更して、より長い行を許可し、複数の属性をそれぞれ新しい行に分割しないようにします。

于 2012-10-23T08:00:59.720 に答える