I saw two questions on Eclipse. Eclipse is an editor that is software developed to write code in many different programming languages such as Java, C, and C++.
Question 1: Eclipse: Auto-align "=" in assignments.
The question asks for the way to format Java code in Eclipse as follows:
// Without formatting
private final String s1 = "10011";
private final String s2 = "01100";
private final String ones = "11111";
private final String zeros = "00000";
// With formatting
private final String s1 = "10011";
private final String s2 = "01100";
private final String ones = "11111";
private final String zeros = "00000";
Question 2: Eclipse - "Align Field in Columns" C/C++
The question asks for the way to format C/C++ in Eclipse as follows:
// Without formatting
int mRect = 0;
int mSquare = 0;
bool isTriangle = false;
// With formatting
int mRect = 0;
int mSquare = 0;
bool isTriangle = false;
I believe these two questions are different because the first one asks about Java, the second one asks about C/C++. In Eclipse, each language has a different perspective, and perspectives have different features. This means that quite often a solution works for one language but not for the other languages.
For example, the following answer only works for Java:
Preferences → Java → Code Style → Formatter → goto Edit and check the
Align fields in columns
:
However, there could be a solution that works for both question (e.g. a plugin that is not specific to a language). Does this mean the two questions are duplicates?
(This is a follow-up to If a duplicate is suspected, shouldn't moderators close questions as such instead of deleting answers? focusing on whether the two questions are duplicates.)