/**
* Option IDs
*/
- public static final String OPTION_InsertNewlineBeforeOpeningBrace = "net.sourceforge.phpdt.core.formatter.newline.openingBrace"; //$NON-NLS-1$
- public static final String OPTION_InsertNewlineInControlStatement = "net.sourceforge.phpdt.core.formatter.newline.controlStatement"; //$NON-NLS-1$
- public static final String OPTION_InsertNewLineBetweenElseAndIf = "net.sourceforge.phpdt.core.formatter.newline.elseIf"; //$NON-NLS-1$
- public static final String OPTION_InsertNewLineInEmptyBlock = "net.sourceforge.phpdt.core.formatter.newline.emptyBlock"; //$NON-NLS-1$
- public static final String OPTION_ClearAllBlankLines = "net.sourceforge.phpdt.core.formatter.newline.clearAll"; //$NON-NLS-1$
- public static final String OPTION_SplitLineExceedingLength = "net.sourceforge.phpdt.core.formatter.lineSplit"; //$NON-NLS-1$
- public static final String OPTION_CompactAssignment = "net.sourceforge.phpdt.core.formatter.style.assignment"; //$NON-NLS-1$
- public static final String OPTION_TabulationChar = "net.sourceforge.phpdt.core.formatter.tabulation.char"; //$NON-NLS-1$
- public static final String OPTION_TabulationSize = "net.sourceforge.phpdt.core.formatter.tabulation.size"; //$NON-NLS-1$
-
+ public static final String OPTION_InsertNewlineBeforeOpeningBrace = "net.sourceforge.phpeclipse.formatter.newline.openingBrace"; //$NON-NLS-1$
+ public static final String OPTION_InsertNewlineInControlStatement = "net.sourceforge.phpeclipse.formatter.newline.controlStatement"; //$NON-NLS-1$
+ // public static final String OPTION_InsertNewLineBetweenElseAndIf = "net.sourceforge.phpeclipse.formatter.newline.elseIf"; //$NON-NLS-1$
+ public static final String OPTION_InsertNewLineInEmptyBlock = "net.sourceforge.phpeclipse.formatter.newline.emptyBlock"; //$NON-NLS-1$
+ public static final String OPTION_ClearAllBlankLines = "net.sourceforge.phpeclipse.formatter.newline.clearAll"; //$NON-NLS-1$
+ public static final String OPTION_SplitLineExceedingLength = "net.sourceforge.phpeclipse.formatter.lineSplit"; //$NON-NLS-1$
+ public static final String OPTION_CompactAssignment = "net.sourceforge.phpeclipse.formatter.style.assignment"; //$NON-NLS-1$
+ public static final String OPTION_TabulationChar = "net.sourceforge.phpeclipse.formatter.tabulation.char"; //$NON-NLS-1$
+ public static final String OPTION_TabulationSize = "net.sourceforge.phpeclipse.formatter.tabulation.size"; //$NON-NLS-1$
+ public static final String OPTION_CompactDereferencing = "net.sourceforge.phpeclipse.formatter.style.assignment";
+ // TODO: add the checkbox in the preferences panel ; load/save
+
public static final String INSERT = "insert"; //$NON-NLS-1$
public static final String DO_NOT_INSERT = "do not insert"; //$NON-NLS-1$
public static final String PRESERVE_ONE = "preserve one"; //$NON-NLS-1$
public boolean compactAssignmentMode = false;
// if isTrue, assignments look like x= 12 (not like x = 12);
+ public boolean compactDereferencingMode = true;
+ // if isTrue, dereferencing look like $obj->method (not like $obj -> method);
//number of consecutive spaces used to replace the tab char
public int tabSize = 4; // n spaces for one tab
public boolean indentWithTab = true;
- public boolean compactElseIfMode = true;
+ //public boolean compactElseIfMode = true;
// if true, else and if are kept on the same line.
public boolean newLineInEmptyBlockMode = true;
// if false, no new line in {} if it's empty.
}
continue;
}
- if (optionID.equals(OPTION_InsertNewLineBetweenElseAndIf)) {
- if (optionValue.equals(INSERT)) {
- this.compactElseIfMode = false;
- } else if (optionValue.equals(DO_NOT_INSERT)) {
- this.compactElseIfMode = true;
- }
- continue;
- }
+// if (optionID.equals(OPTION_InsertNewLineBetweenElseAndIf)) {
+// if (optionValue.equals(INSERT)) {
+// this.compactElseIfMode = false;
+// } else if (optionValue.equals(DO_NOT_INSERT)) {
+// this.compactElseIfMode = true;
+// }
+// continue;
+// }
if (optionID.equals(OPTION_InsertNewLineInEmptyBlock)) {
if (optionValue.equals(INSERT)) {
this.newLineInEmptyBlockMode = true;
public boolean isCompactingAssignment() {
return compactAssignmentMode;
}
- public boolean isCompactingElseIf() {
- return compactElseIfMode;
- }
+ public boolean isCompactingDereferencing() {
+ return compactDereferencingMode;
+ }
+// public boolean isCompactingElseIf() {
+// return compactElseIfMode;
+// }
public boolean isUsingTabForIndenting() {
return indentWithTab;
}
/**
* @deprecated - should use a Map when creating the options.
*/
- public void setCompactElseIfMode(boolean flag) {
- compactElseIfMode = flag;
- }
+// public void setCompactElseIfMode(boolean flag) {
+// compactElseIfMode = flag;
+// }
}