Merge duplicate statements in module-info.java - merge all duplicates at once, preserve comments, set caret to the resulting statement (IDEA-169211)

This commit is contained in:
Pavel Dolgov
2017-04-18 17:56:01 +03:00
parent 874a7b88cd
commit af08eeeeb9
16 changed files with 136 additions and 113 deletions

View File

@@ -1,3 +1,3 @@
module M {
exports my.api to M4, M6;
exports my.api to M4, M6;<caret>
}

View File

@@ -1,5 +1,5 @@
module M {
exports <caret>my.api to M2, M4;
exports my.api to M6;
exports my.api to M2, M4;
exports <caret>my.api to M6;
exports my.api;
}

View File

@@ -0,0 +1,3 @@
module M {
exports my.api;<caret>
}

View File

@@ -0,0 +1,8 @@
module M {
// first
exports my.api to M2;
// second
exports <caret>my.api to M6;
// third
exports my.api to M4;
}

View File

@@ -0,0 +1,6 @@
module M {
// first
exports my.api to M2, M6, M4;<caret>
// second
// third
}

View File

@@ -1,3 +1,3 @@
module M {
opens my.api to M4, M6;
opens my.api to M4, M6;<caret>
}

View File

@@ -0,0 +1,3 @@
module M {
opens my.api;<caret>
}

View File

@@ -0,0 +1,5 @@
module M {
opens /*first*/ my.api to M4;
opens /*second*/ <caret>my.api to M2;
opens /*third*/ my.api to M6;
}

View File

@@ -0,0 +1,6 @@
module M {
/*first*/
/*second*/
/*third*/
opens my.api to M4, M2, M6;<caret>
}

View File

@@ -1,3 +1,3 @@
module M {
provides my.api.MyService with my.impl.MyServiceImpl,my.impl.MyServiceImpl1;
provides my.api.MyService with my.impl.MyServiceImpl,my.impl.MyServiceImpl1;<caret>
}

View File

@@ -3,5 +3,5 @@ import my.impl.MyServiceImpl1;
import my.impl.MyServiceImpl2;
module M {
provides my.api.MyService with MyServiceImpl,MyServiceImpl2,MyServiceImpl1;
provides my.api.MyService with MyServiceImpl,MyServiceImpl2,MyServiceImpl1;<caret>
}

View File

@@ -3,5 +3,5 @@ import my.impl.MyServiceImpl1;
import my.impl.MyServiceImpl2;
module M {
provides my.api.MyService with MyServiceImpl,MyServiceImpl1,MyServiceImpl2;
provides my.api.MyService with MyServiceImpl,MyServiceImpl1,MyServiceImpl2;<caret>
}