Stop teaching people to use components (#233)

- Replace documentation on writing components with documentation on migrating away from components
- Split documentation on extensions and extension points (extensions are always needed and EPs are quite uncommon)
- Add documentation on listeners
- Remove application and project components in sample plugins whenever possible
This commit is contained in:
Dmitry Jemerov 2019-12-05 10:10:38 +01:00 committed by Yann Cébron
parent 4fa02cd04e
commit 35bc0962b5
5 changed files with 0 additions and 101 deletions

View File

@ -28,31 +28,6 @@
<!-- Resource bundle from which the text of plugin descriptions, action names and etc. will be loaded -->
<resource-bundle>org.jetbrains.tutorials.sample.PluginSampleBundle</resource-bundle>
<!-- Plugin's application components -->
<application-components>
<component>
<!-- Component's interface class -->
<interface-class>org.jetbrains.tutorials.sample.DummyApplicationComponent</interface-class>
<!-- Component's implementation class -->
<implementation-class>org.jetbrains.tutorials.sample.DummyApplicationComponentImpl</implementation-class>
</component>
</application-components>
<!-- Plugin's project components -->
<project-components>
<component>
<!-- Interface and implementation classes are the same -->
<interface-class>org.jetbrains.tutorials.sample.DummyProjectComponent</interface-class>
<implementation-class>org.jetbrains.tutorials.sample.DummyProjectComponentImpl</implementation-class>
<!-- If the "workspace" option is set "true", the component saves its state to the .iws file
instead of the .ipr file. Note that the <option> element is used only if the component implements the JDOMExternalizable interface. Otherwise, the use of the <option> element takes no effect.-->
<option name="workspace" value="true"/>
<!-- If the "loadForDefaultProject" tag is present, the project component is instantiated also for the default project. -->
<loadForDefaultProject/>
</component>
</project-components>
<!-- Actions -->
<actions>
<!-- The <action> element defines an action to register.

View File

@ -1,9 +0,0 @@
package org.jetbrains.tutorials.sample;
import com.intellij.openapi.components.BaseComponent;
/**
* @author Anna Bulenkova
*/
interface DummyApplicationComponent extends BaseComponent {
}

View File

@ -1,24 +0,0 @@
package org.jetbrains.tutorials.sample;
import org.jetbrains.annotations.NotNull;
/**
* @author Anna Bulenkova
*/
public class DummyApplicationComponentImpl implements DummyApplicationComponent {
@Override
public void initComponent() {
}
@Override
public void disposeComponent() {
}
@NotNull
@Override
public String getComponentName() {
return "DummyApplicationComponent";
}
}

View File

@ -1,9 +0,0 @@
package org.jetbrains.tutorials.sample;
import com.intellij.openapi.components.ProjectComponent;
/**
* @author Anna Bulenkova
*/
public interface DummyProjectComponent extends ProjectComponent {
}

View File

@ -1,34 +0,0 @@
package org.jetbrains.tutorials.sample;
import org.jetbrains.annotations.NotNull;
/**
* @author Anna Bulenkova
*/
public class DummyProjectComponentImpl implements DummyProjectComponent {
@Override
public void projectOpened() {
}
@Override
public void projectClosed() {
}
@Override
public void initComponent() {
}
@Override
public void disposeComponent() {
}
@NotNull
@Override
public String getComponentName() {
return "DummyProjectComponent";
}
}