Merge remote-tracking branch 'origin/master'

This commit is contained in:
Roman Shevchenko
2015-06-18 13:12:11 +03:00
17 changed files with 316 additions and 25 deletions
@@ -109,7 +109,6 @@ public abstract class JavaTestFrameworkRunnableState<T extends ModuleBasedConfig
return null;
}
getJavaParameters().getVMParametersList().addProperty("idea." + getFrameworkId() + ".sm_runner");
getJavaParameters().getClassPath().addFirst(PathUtil.getJarPathForClass(ServiceMessageTypes.class));
final RunnerSettings runnerSettings = getRunnerSettings();
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.autodetect;
package com.intellij.psi.codeStyle.autodetect;
import com.intellij.formatting.Block;
import com.intellij.formatting.FormattingModel;
@@ -71,4 +71,29 @@ public class DetectIndentAndTypeTest extends LightPlatformCodeInsightFixtureTest
"\t}\n" +
"}\n");
}
public void testWhenTabsDetected_SetContinuationIndentSizeToDoubleTabSize() {
CommonCodeStyleSettings common = mySettings.getCommonSettings(JavaLanguage.INSTANCE);
CommonCodeStyleSettings.IndentOptions indentOptions = common.getIndentOptions();
assert indentOptions != null;
indentOptions.INDENT_SIZE = 1;
indentOptions.TAB_SIZE = 2;
indentOptions.CONTINUATION_INDENT_SIZE = 8;
myFixture.configureByText(JavaFileType.INSTANCE,
"public class T {\n" +
"\tvoid run() {\n" +
"\t\tint a = 2 <caret>+ 2;\n" +
"\t}\n" +
"}\n");
myFixture.type('\n');
myFixture.checkResult("public class T {\n" +
"\tvoid run() {\n" +
"\t\tint a = 2 \n" +
"\t\t\t\t<caret>+ 2;\n" +
"\t}\n" +
"}\n");
}
}
@@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.autodetect;
package com.intellij.psi.codeStyle.autodetect;
import com.intellij.JavaTestUtil;
import com.intellij.openapi.fileTypes.PlainTextLanguage;
import com.intellij.psi.autodetect.AbstractIndentAutoDetectionTest;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.codeStyle.autodetect.LineIndentInfo;
import com.intellij.psi.codeStyle.autodetect.LineIndentInfoBuilder;
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.autodetect;
package com.intellij.psi.codeStyle.autodetect;
import com.intellij.JavaTestUtil;
import org.jetbrains.annotations.NotNull;