Refreshing icons on receiving externalAnnotationsChangedExternally event.
This commit is contained in:
@@ -29,6 +29,9 @@
|
|||||||
<component>
|
<component>
|
||||||
<implementation-class>org.jetbrains.jet.plugin.OutdatedKotlinRuntimeNotification</implementation-class>
|
<implementation-class>org.jetbrains.jet.plugin.OutdatedKotlinRuntimeNotification</implementation-class>
|
||||||
</component>
|
</component>
|
||||||
|
<component>
|
||||||
|
<implementation-class>org.jetbrains.jet.plugin.codeInsight.ktSignature.KotlinSignatureInJavaMarkerUpdater</implementation-class>
|
||||||
|
</component>
|
||||||
</project-components>
|
</project-components>
|
||||||
|
|
||||||
<module-components>
|
<module-components>
|
||||||
|
|||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2012 JetBrains s.r.o.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.jet.plugin.codeInsight.ktSignature;
|
||||||
|
|
||||||
|
import com.intellij.codeInsight.ExternalAnnotationsListener;
|
||||||
|
import com.intellij.codeInsight.ExternalAnnotationsManager;
|
||||||
|
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||||
|
import com.intellij.openapi.project.Project;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Evgeny Gerashchenko
|
||||||
|
* @since 31 August 2012
|
||||||
|
*/
|
||||||
|
public class KotlinSignatureInJavaMarkerUpdater extends AbstractProjectComponent {
|
||||||
|
protected KotlinSignatureInJavaMarkerUpdater(Project project) {
|
||||||
|
super(project);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initComponent() {
|
||||||
|
myProject.getMessageBus().connect().subscribe(ExternalAnnotationsManager.TOPIC, new ExternalAnnotationsListener.Adapter() {
|
||||||
|
@Override
|
||||||
|
public void externalAnnotationsChangedExternally() {
|
||||||
|
KotlinSignatureUtil.refreshMarkers(myProject);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user