Package com.intellij.util.messages

Examples of com.intellij.util.messages.MessageBus.connect()


    private static MessageBusConnection connect(Object handler) {
        EventManager eventManager = EventManager.getInstance();
        MessageBusConnection connection = eventManager.connectionCache.get(handler);
        if (connection == null) {
            MessageBus messageBus = ApplicationManager.getApplication().getMessageBus();
            connection = messageBus.connect();
            eventManager.connectionCache.put(handler, connection);
        }
        return connection;
    }
View Full Code Here


    private static MessageBusConnection connect(Project project, Object handler) {
        EventManager eventManager = EventManager.getInstance();
        MessageBusConnection connection = eventManager.connectionCache.get(handler);
        if (connection == null) {
            MessageBus messageBus = project.getMessageBus();
            connection = messageBus.connect();
            eventManager.connectionCache.put(handler, connection);
        }
        return connection;
    }
   
View Full Code Here

    @Override public void initComponent(){
        final ParameterInfoComponentAdapter fakeParameterInfoComponent = new ParameterInfoComponentAdapter();

        MessageBus bus = ApplicationManager.getApplication().getMessageBus();
        bus.connect().subscribe(EditorHintListener.TOPIC, new EditorHintListener(){
            public void hintShown(final Project project, final LightweightHint hint, final int flags){

                JComponent component = hint.getComponent();
                Class<? extends JComponent> aClass = component.getClass();
View Full Code Here

        MessageBus bus = project.getMessageBus();
        codeStyleManager = new CodeStyleManager(project);
        EditorSettingsManager editorSettingsManager = new EditorSettingsManager();
        EncodingManager encodingManager = new EncodingManager(project);
        LineEndingsManager lineEndingsManager = new LineEndingsManager(project);
        bus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, codeStyleManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, encodingManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, editorSettingsManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, lineEndingsManager);
    }
View Full Code Here

        codeStyleManager = new CodeStyleManager(project);
        EditorSettingsManager editorSettingsManager = new EditorSettingsManager();
        EncodingManager encodingManager = new EncodingManager(project);
        LineEndingsManager lineEndingsManager = new LineEndingsManager(project);
        bus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, codeStyleManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, encodingManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, editorSettingsManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, lineEndingsManager);
    }

    public void initComponent() {}
View Full Code Here

        EditorSettingsManager editorSettingsManager = new EditorSettingsManager();
        EncodingManager encodingManager = new EncodingManager(project);
        LineEndingsManager lineEndingsManager = new LineEndingsManager(project);
        bus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, codeStyleManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, encodingManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, editorSettingsManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, lineEndingsManager);
    }

    public void initComponent() {}
View Full Code Here

        EncodingManager encodingManager = new EncodingManager(project);
        LineEndingsManager lineEndingsManager = new LineEndingsManager(project);
        bus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, codeStyleManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, encodingManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, editorSettingsManager);
        bus.connect().subscribe(AppTopics.FILE_DOCUMENT_SYNC, lineEndingsManager);
    }

    public void initComponent() {}

    public void disposeComponent() {}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.