mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
[code samples] remove @author, cleanup
This commit is contained in:
parent
84ccddf494
commit
18ac589ade
@ -10,8 +10,6 @@ import icons.ActionBasicsIcons;
|
||||
|
||||
/**
|
||||
* Creates an action group to contain menu actions. See plugin.xml declarations.
|
||||
* @author Anna Bulenkova
|
||||
* @author jhake
|
||||
*/
|
||||
public class CustomDefaultActionGroup extends DefaultActionGroup {
|
||||
|
||||
|
@ -15,25 +15,25 @@ import org.jetbrains.annotations.NotNull;
|
||||
* DynamicActionGroup is based on ActionGroup because menu children are determined
|
||||
* on rules other than just positional constraints.
|
||||
*
|
||||
* @author Anna Bulenkova
|
||||
* @see ActionGroup
|
||||
*/
|
||||
public class DynamicActionGroup extends ActionGroup {
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of menu actions for the group.
|
||||
*
|
||||
* @param e Event received when the associated group-id menu is chosen.
|
||||
* @param e Event received when the associated group-id menu is chosen.
|
||||
* @return AnAction[] An instance of AnAction, in this case containing a single instance of the
|
||||
* PopupDialogAction class.
|
||||
*/
|
||||
@NotNull
|
||||
@Override
|
||||
public AnAction[] getChildren(AnActionEvent e) {
|
||||
return new AnAction[]{ new PopupDialogAction("Action Added at Runtime",
|
||||
"Dynamic Action Demo",
|
||||
ActionBasicsIcons.Sdk_default_icon)
|
||||
return new AnAction[]{
|
||||
new PopupDialogAction("Action Added at Runtime",
|
||||
"Dynamic Action Demo",
|
||||
ActionBasicsIcons.Sdk_default_icon)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
// Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package org.intellij.sdk.intention;
|
||||
@ -15,8 +14,6 @@ import org.jetbrains.annotations.*;
|
||||
|
||||
/**
|
||||
* Implements an intention action to replace a ternary statement with if-then-else
|
||||
*
|
||||
* @author dsl
|
||||
*/
|
||||
@NonNls
|
||||
public class ConditionalOperatorConverter extends PsiElementBaseIntentionAction implements IntentionAction {
|
||||
|
@ -8,7 +8,6 @@ import com.intellij.openapi.module.Module;
|
||||
|
||||
/**
|
||||
* Demo Facet class. Everything is handled by the super class.
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoFacet extends Facet<DemoFacetConfiguration> {
|
||||
|
||||
|
@ -11,10 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Provides a custom implementation of the Configuration class for org.intellij.sdk.facet.DemoFacet.
|
||||
*
|
||||
* @author Anna Bulenkova
|
||||
* @author John Hake
|
||||
* Provides a custom implementation of the Configuration class for {@link DemoFacet}.
|
||||
*/
|
||||
public class DemoFacetConfiguration implements FacetConfiguration, PersistentStateComponent<DemoFacetState> {
|
||||
|
||||
|
@ -15,9 +15,7 @@ import java.awt.*;
|
||||
|
||||
/**
|
||||
* Provides the JPanel to be displayed in the facet UI.
|
||||
* Manages validation and modification of the org.intellij.sdk.facet.DemoFacet state.
|
||||
*
|
||||
* @author John Hake
|
||||
* Manages validation and modification of the {@link DemoFacet} state.
|
||||
*/
|
||||
public class DemoFacetEditorTab extends FacetEditorTab {
|
||||
private static final String FACET_PANEL_PROMPT = "Path To SDK: ";
|
||||
|
@ -5,28 +5,26 @@ package org.intellij.sdk.facet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A simple class to store state for the org.intellij.sdk.facet.DemoFacet.
|
||||
* A simple class to store state for the {@link DemoFacet}.
|
||||
* In this case it is just a string containing a path to an SDK.
|
||||
*
|
||||
* @author John Hake
|
||||
*/
|
||||
public class DemoFacetState {
|
||||
static final String DEMO_FACET_INIT_PATH = "";
|
||||
|
||||
public String myPathToSdk;
|
||||
|
||||
|
||||
DemoFacetState() {
|
||||
setDemoFacetState(DEMO_FACET_INIT_PATH);
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public String getDemoFacetState() {
|
||||
return myPathToSdk;
|
||||
}
|
||||
|
||||
|
||||
public void setDemoFacetState(@NotNull String newPath) {
|
||||
myPathToSdk = newPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,11 +10,9 @@ import org.jetbrains.annotations.*;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Defines the type, id, and name of the org.intellij.sdk.facet.DemoFacet. Provides creation of org.intellij.sdk.facet.DemoFacet
|
||||
* Defines the type, id, and name of the {@link DemoFacet}. Provides creation of DemoFacet
|
||||
* and associated Configuration.
|
||||
* Allows application of this facet to all ModuleTypes.
|
||||
*
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoFacetType extends FacetType<DemoFacet, DemoFacetConfiguration> {
|
||||
public static final String FACET_ID = "DEMO_FACET_ID";
|
||||
|
@ -6,9 +6,6 @@ import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.ProblemsHolder;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoCodeInspection extends LocalInspectionTool {
|
||||
|
||||
/**
|
||||
|
@ -6,9 +6,6 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiElementVisitor;
|
||||
import com.intellij.psi.PsiPlainTextFile;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoInspectionVisitor extends PsiElementVisitor {
|
||||
@Override
|
||||
public void visitElement(PsiElement element) {
|
||||
|
@ -2,19 +2,19 @@
|
||||
|
||||
package org.intellij.sdk.project.model;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.Navigatable;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class LibrariesAction extends AnAction {
|
||||
@Override
|
||||
public void update(@NotNull final AnActionEvent event) {
|
||||
|
@ -2,18 +2,21 @@
|
||||
|
||||
package org.intellij.sdk.project.model;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.roots.ModuleRootModificationUtil;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.Navigatable;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class ModificationAction extends AnAction {
|
||||
@Override
|
||||
public void actionPerformed(@NotNull final AnActionEvent event) {
|
||||
|
@ -2,19 +2,20 @@
|
||||
|
||||
package org.intellij.sdk.project.model;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.editor.*;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class ProjectFileIndexSampleAction extends AnAction {
|
||||
@Override
|
||||
public void update(@NotNull final AnActionEvent event) {
|
||||
|
@ -2,16 +2,14 @@
|
||||
|
||||
package org.intellij.sdk.project.model;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class ProjectSdkAction extends AnAction {
|
||||
@Override
|
||||
public void actionPerformed(@NotNull final AnActionEvent event) {
|
||||
|
@ -2,16 +2,14 @@
|
||||
|
||||
package org.intellij.sdk.project.model;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class ShowSourceRootsActions extends AnAction {
|
||||
@Override
|
||||
public void actionPerformed(@NotNull final AnActionEvent event) {
|
||||
|
@ -24,9 +24,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class ImagesProjectNode extends AbstractTreeNode<VirtualFile> {
|
||||
private static final Key<Set<VirtualFile>> IMAGES_PROJECT_DIRS = Key.create("images.files.or.directories");
|
||||
|
||||
|
@ -18,9 +18,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.tree.DefaultTreeModel;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class ImagesProjectViewPane extends AbstractProjectViewPSIPane {
|
||||
public static final String ID = "IMAGES";
|
||||
|
||||
|
@ -13,9 +13,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoModuleWizardStep extends ModuleBuilder {
|
||||
public void setupRootModel(@NotNull ModifiableRootModel modifiableRootModel) throws ConfigurationException {
|
||||
|
||||
|
@ -8,9 +8,6 @@ import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoConfigurationFactory extends ConfigurationFactory {
|
||||
private static final String FACTORY_NAME = "Demo configuration factory";
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
package org.jetbrains.sdk.runConfiguration;
|
||||
|
||||
import com.intellij.execution.*;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.Executor;
|
||||
import com.intellij.execution.configurations.*;
|
||||
import com.intellij.execution.process.OSProcessHandler;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
@ -11,11 +12,9 @@ import com.intellij.execution.process.ProcessTerminatedListener;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.openapi.options.SettingsEditor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoRunConfiguration extends RunConfigurationBase<DemoRunConfigurationOptions> {
|
||||
protected DemoRunConfiguration(Project project, ConfigurationFactory factory, String name) {
|
||||
super(project, factory, name);
|
||||
|
@ -5,9 +5,6 @@ package org.jetbrains.sdk.runConfiguration;
|
||||
import com.intellij.execution.configurations.RunConfigurationOptions;
|
||||
import com.intellij.openapi.components.StoredProperty;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class DemoRunConfigurationOptions extends RunConfigurationOptions {
|
||||
private final StoredProperty<String> myScriptName = string("").provideDelegate(this, "scriptName");
|
||||
|
||||
|
@ -2,15 +2,13 @@
|
||||
|
||||
package org.jetbrains.sdk.runConfiguration;
|
||||
|
||||
import com.intellij.execution.configurations.*;
|
||||
import com.intellij.execution.configurations.ConfigurationFactory;
|
||||
import com.intellij.execution.configurations.ConfigurationType;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoRunConfigurationType implements ConfigurationType {
|
||||
@NotNull
|
||||
@Override
|
||||
|
@ -2,15 +2,13 @@
|
||||
|
||||
package org.jetbrains.sdk.runConfiguration;
|
||||
|
||||
import com.intellij.openapi.options.*;
|
||||
import com.intellij.openapi.ui.*;
|
||||
import com.intellij.openapi.options.SettingsEditor;
|
||||
import com.intellij.openapi.ui.LabeledComponent;
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoSettingsEditor extends SettingsEditor<DemoRunConfiguration> {
|
||||
private JPanel myPanel;
|
||||
private LabeledComponent<TextFieldWithBrowseButton> myScriptName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user