8
8
import com .intellij .openapi .extensions .ExtensionPointName ;
9
9
import com .intellij .openapi .project .Project ;
10
10
import com .intellij .openapi .vfs .VfsUtil ;
11
- import com .intellij .openapi .wm .StatusBar ;
12
- import com .intellij .openapi .wm .WindowManager ;
13
11
import com .intellij .psi .PsiElement ;
14
12
import fr .adrienbrault .idea .symfony2plugin .dic .ContainerFile ;
15
13
import fr .adrienbrault .idea .symfony2plugin .dic .container .util .ServiceContainerUtil ;
16
14
import fr .adrienbrault .idea .symfony2plugin .extension .PluginConfigurationExtension ;
17
15
import fr .adrienbrault .idea .symfony2plugin .extension .ServiceContainerLoader ;
18
16
import fr .adrienbrault .idea .symfony2plugin .extension .ServiceContainerLoaderParameter ;
19
- import fr .adrienbrault .idea .symfony2plugin .profiler .widget .SymfonyProfilerWidget ;
20
17
import fr .adrienbrault .idea .symfony2plugin .routing .RouteHelper ;
21
18
import fr .adrienbrault .idea .symfony2plugin .util .IdeHelper ;
22
19
import fr .adrienbrault .idea .symfony2plugin .util .ProjectUtil ;
@@ -38,50 +35,22 @@ public class Symfony2ProjectComponent implements ProjectComponent {
38
35
private static final ExtensionPointName <ServiceContainerLoader > SERVICE_CONTAINER_POINT_NAME = new ExtensionPointName <>("fr.adrienbrault.idea.symfony2plugin.extension.ServiceContainerLoader" );
39
36
public static final ExtensionPointName <PluginConfigurationExtension > PLUGIN_CONFIGURATION_EXTENSION = new ExtensionPointName <>("fr.adrienbrault.idea.symfony2plugin.extension.PluginConfigurationExtension" );
40
37
41
- private Project project ;
38
+ private final Project project ;
42
39
43
40
public Symfony2ProjectComponent (Project project ) {
44
41
this .project = project ;
45
42
}
46
43
47
- public void initComponent () {
48
- //System.out.println("initComponent");
49
- }
50
-
51
- public void disposeComponent () {
52
- //System.out.println("disposeComponent");
53
- }
54
-
55
44
@ NotNull
56
45
public String getComponentName () {
57
46
return "Symfony2ProjectComponent" ;
58
47
}
59
48
60
-
61
-
62
49
public void projectOpened () {
63
50
this .checkProject ();
64
-
65
- // attach toolbar popup (right bottom)
66
- StatusBar statusBar = WindowManager .getInstance ().getStatusBar (this .project );
67
- if (statusBar == null ) {
68
- return ;
69
- }
70
-
71
- // clean bar on project open; we can have multiple projects att some time
72
- if (statusBar .getWidget (SymfonyProfilerWidget .ID ) != null ) {
73
- statusBar .removeWidget (SymfonyProfilerWidget .ID );
74
- }
75
-
76
- if (isEnabled ()) {
77
- SymfonyProfilerWidget symfonyProfilerWidget = new SymfonyProfilerWidget (this .project );
78
- statusBar .addWidget (symfonyProfilerWidget );
79
- }
80
-
81
51
}
82
52
83
53
public void projectClosed () {
84
-
85
54
ServiceXmlParserFactory .cleanInstance (project );
86
55
87
56
// clean routing
@@ -99,7 +68,7 @@ public void showInfoNotification(String content) {
99
68
Notifications .Bus .notify (errorNotification , this .project );
100
69
}
101
70
102
- public boolean isEnabled () {
71
+ private boolean isEnabled () {
103
72
return Settings .getInstance (project ).pluginEnabled ;
104
73
}
105
74
0 commit comments