This question is locked. New answers and comments are not allowed.
Hi,
after one of the latest releases (I'm not sure which - sorry) JC started to enter empty lines.
Assume the following code:
That is not "too bad" - but my real problem comes when I remove / replace the curling bracket at the end of
the "PriceGrabber" class definition (or choose JC - Format code).
What I get is:
or "public static string LastErr" gets added blank line before and after it.
Especially when I have a lot of properties in a class this blowing up my code a lot.
For every propert I want (enter - use):
I found no way to "disable" these blank lines. I also found no rule for this in settings.
Neither in VS (which by the way doesn't add such lines if I don't use JC) nor in any of the JC settings.
Manfred
after one of the latest releases (I'm not sure which - sorry) JC started to enter empty lines.
Assume the following code:
Snippet created with CBEnhancer
public class PriceGrabber {
private struct PriceValues {
public double dCurPrice;
public double dRoundAdd;
public int nRoundDigits;
public string strCurSkuID;
}
private class ThreadCounter {
public int m_nThreadCount;
}
private static ThreadCounter m_TC = new ThreadCounter(); //HERE I CHANGE
public const int m_nDaysToCheck = 1;
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
When I change my code and remove / retype the semicolon after "new ThreadCounter()" I get:public class PriceGrabber {
private struct PriceValues {
public double dCurPrice;
public double dRoundAdd;
public int nRoundDigits;
public string strCurSkuID;
}
private class ThreadCounter {
public int m_nThreadCount;
}
private static ThreadCounter m_TC = new ThreadCounter(); //HERE I CHANGE
public const int m_nDaysToCheck = 1;
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
Snippet created with CBEnhancer
private class ThreadCounter {
public int m_nThreadCount;
}
private static ThreadCounter m_TC = new ThreadCounter();
public const int m_nDaysToCheck = 1;
As you can see a newline has been added after the class.private class ThreadCounter {
public int m_nThreadCount;
}
private static ThreadCounter m_TC = new ThreadCounter();
public const int m_nDaysToCheck = 1;
That is not "too bad" - but my real problem comes when I remove / replace the curling bracket at the end of
the "PriceGrabber" class definition (or choose JC - Format code).
What I get is:
Snippet created with CBEnhancer
public class PriceGrabber {
private struct PriceValues {
public double dCurPrice;
public double dRoundAdd;
public int nRoundDigits;
public string strCurSkuID;
}
private class ThreadCounter {
public int m_nThreadCount;
}
private static ThreadCounter m_TC = new ThreadCounter();
public const int m_nDaysToCheck = 1;
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
You see - every (almost) "declaration block" like "private struct PriceValues" (which is the exception - no blank line in front)public class PriceGrabber {
private struct PriceValues {
public double dCurPrice;
public double dRoundAdd;
public int nRoundDigits;
public string strCurSkuID;
}
private class ThreadCounter {
public int m_nThreadCount;
}
private static ThreadCounter m_TC = new ThreadCounter();
public const int m_nDaysToCheck = 1;
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
or "public static string LastErr" gets added blank line before and after it.
Especially when I have a lot of properties in a class this blowing up my code a lot.
For every propert I want (enter - use):
Snippet created with CBEnhancer
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
And what I get is:#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
Snippet created with CBEnhancer
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
#region LastErr
private static string m_strLastErr;
public static string LastErr {
get { return m_strLastErr; }
set { m_strLastErr = value; }
}
#endregion
I found no way to "disable" these blank lines. I also found no rule for this in settings.
Neither in VS (which by the way doesn't add such lines if I don't use JC) nor in any of the JC settings.
Manfred