mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 09:04:15 +07:00
IDEA-327590 GitOrigin-RevId: 721b34c773e16b93cc593080ba2dbc130606ed40
14 lines
453 B
Java
14 lines
453 B
Java
import com.intellij.openapi.components.Service;
|
|
import com.intellij.openapi.project.Project;
|
|
|
|
@Service(Service.Level.PROJECT)
|
|
final class MyService {
|
|
|
|
public static MyService getInstance(Project project) {
|
|
return project.getService(MyService.class);
|
|
}
|
|
|
|
void foo(Project project) {
|
|
MyService service = project.<weak_warning descr="Can be replaced with 'MyService.getInstance()' call">get<caret>Service</weak_warning>(MyService.class);
|
|
}
|
|
} |