Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3687

parameters comment formatting has destructive bug when the line is too long

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Next, 11.2
    • None
    • None

    Description

      here is an example code:

       

      package com.fordfrog.ibtws;
      
      import com.fordfrog.ibtws.entities.ContractSpec;
      import com.fordfrog.ibtws.impl.entities.ContractSpecImpl;
      
      /**
       * TWS service factory.
       */
      public class TWSServiceFactory {
      
          /**
           * Creates new {@link ContractSpec} instance.
           *
           * @param secType                        {@link ContractSpec#getSecType()}
           * @param symbol                         {@link ContractSpec#getSymbol()}
           * @param currency                       {@link ContractSpec#getCurrency()}
           * @param exchange                       {@link ContractSpec#getExchange()}
           * @param lastTradingDateOrContractMonth {@link #getLastTradingDateOrContractMonth()}
           * @param multiplier                     {@link ContractSpec#getMultiplier()}
           *
           * @return
           */
          public static ContractSpec createContractSpec(final String secType,
                  final String symbol, final String currency, final String exchange,
                  final String lastTradingDateOrContractMonth,
                  final String multiplier) {
              return new ContractSpecImpl(secType, symbol, currency, exchange,
                      lastTradingDateOrContractMonth, multiplier);
          }
      }
      

      after saving the code, the parameter comments change to this:

          /**
           * Creates new {@link ContractSpec} instance.
           *
           * @param secType                        {@link ContractSpec#getSecType()}
           * @param symbol                         {@link ContractSpec#getSymbol()}
           * @param currency                       {@link ContractSpec#getCurrency()}
           * @param exchange                       {@link ContractSpec#getExchange()}
           * @param
           *                                       lastTradingDateOrContractMonth {@link #getLastTradingDateOrContractMonth()}
           * @param
           *                                       multiplier                     {@link ContractSpec#getMultiplier()}
           *
           * @return
           */
      

      if i later modify the code and resave it, it becomes this:

          /**
           * Creates new {@link ContractSpec} instance.
           *
           * @param secType                        {@link ContractSpec#getSecType()}
           * @param symbol                         {@link ContractSpec#getSymbol()}
           * @param currency                       {@link ContractSpec#getCurrency()}
           * @param exchange                       {@link ContractSpec#getExchange()}
           * @param etLastTradingDateOrContractMonth()}
           * @param ntractSpec#getMultiplier()}
           *
           * @return
           */
      

      further edits and savings cripple it even more.

      i'm attaching exported formatting configuration from netbeans options.

      Attachments

        1. formatting.zip
          2 kB
          Miroslav Šulc

        Activity

          People

            Unassigned Unassigned
            fordfrog Miroslav Šulc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: