1. 程式人生 > >idea外掛編寫之二

idea外掛編寫之二

做人要有始有終,答應的下一篇一定會給你們寫,雖然以後可能不再會做外掛這類的技術了,但也很開心給我這個機會,讓我做機試題。

idea外掛自定義按鈕開啟EditRunConfigurations

上一篇教大家學會了建立idea的自定義按鈕,這一節在action建立完畢的基礎上,給大家講一下點選事件。

1.開啟一個idea已有的面板,離不開這四句話,而第一句,想必不用解釋了,看不懂得,請看一下getInstance()的用法,以及單例模式;第二句是根據點選事件的id查詢action,這個Id是定死的,給大家提供一些Id在文章末端,喜歡的寶寶,請關注

ActionManager instance = ActionManager
.getInstance(); AnAction action1 = instance.getAction("editRunConfigurations"); InputEvent inputEvent1 = ActionCommand.getInputEvent("editRunConfigurations"); ActionCallback callback1 = ActionManager.getInstance().tryToExecute(action1, inputEvent1, null, null, true);


然後點選開啟的時候,就會彈出下面的框


是不是很簡單呢

ActionId

Built-in Action ID's

These are the names of the actions built into IntelliJ IDEA. You can use these ID's and group names in <add-to-group> tags in your plugin's plugin.xml.

Each table shows the actions in a group, whose ID is shown in fixed-width font, along with the ID of its parent groups (for reference) and its displayed name. You can use the group ID in <add-to-group>

's group-idattribute.

Each row in the table represents an action, whose ID can be used in <add-to-group>'s relative-to-action attribute.

Last updated: IDEA 5.0.2 build 3511.

Root Action Group
IDName
CaptureMemorySnapShotCapture memory snapshot
CaptureCPUUsageDataCapture cpu usage data
ContextHelpContext Help
RunConfigurationSelect Run/Debug Configuration
ShowIntentionActionsShow Intention Actions
ToggleReadOnlyAttributeToggle Read-Only Attribute
TogglePopupHintsToggle Popup Hints for Current File
RunGcRun Garbage Collector
ShowPopupMenuShow Context Menu
CloseWindowClose Active Window
Vcs.ShowHistoryShow File History
Vcs.ShowHistoryForBlockShow History for Selection
Vcs.ShowTabbedFileHistoryShow History
AddToFavoritesPopupAdd To Favorites
AddNewFavoritesListAdd New Favorites List
ExpandAllExpand All
CollapseAllCollapse All
ExportToTextFileExport to Text File
ExpandTreeNodeExpand Tree Node
CollapseTreeNodeCollapse Tree Node
FullyExpandTreeNodeFully Expand Tree Node
NextDiffMove to the next difference
PreviousDiffMove to the previous difference
RefreshRefresh
CheckinProjectCheck In Project
CheckinFilesCheck In
UpdateFilesUpdate
CheckStatusForFilesCheck Status
AnnotateAnnotate
Compare.SameVersionCompare with The Same Repository Version
Compare.LastVersionCompare with The Last Repository Version
Compare.SelectedCompare with...
Compare.SpecifiedCompare with Specified Revision...
CompareTwoFilesCompare Two Files
CompareFileWithEditorCompare File with Editor
ModuleSettingsModule Settings...
RunContextGroup
IDName
CreateRunConfigurationCreate Run Configuration
EditorActions (Editor Actions)
IDName
EditorChooseLookupItemChoose Lookup Item
EditorChooseLookupItemReplaceChoose Lookup Item Replace
NextTemplateVariableNext Template Variable
PreviousTemplateVariablePrevious Template Variable
NextParameterNext Parameter
PrevParameterPrev Parameter
EditorPageUpPage Up
EditorPageDownPage Down
EditorPageUpWithSelectionPage Up with Selection
EditorPageDownWithSelectionPage Up with Selection
EditorCopyCopy
EditorCutCut
EditorPastePaste
EditorPasteSimplePaste Simple
EditorPasteFromX11Paste from X clipboard
EditorDeleteDelete
EditorBackSpaceBackspace
EditorMoveToPageTopMove Caret to Page Top
EditorMoveToPageBottomMove Caret to Page Bottom
EditorMoveToPageTopWithSelectionMove Caret to Page Top with Selection
EditorMoveToPageBottomWithSelectionMove Caret to Page Bottom with Selection
EditorEnterEnter
EditorEscapeEscape
EditorUpUp
EditorDownDown
EditorLeftLeft
EditorRightRight
EditorUpWithSelectionUp with Selection
EditorDownWithSelectionDown with Selection
EditorLeftWithSelectionLeft with Selection
EditorRightWithSelectionRight with Selection
EditorIndentSelectionIndent Selection
EditorUnindentSelectionUnindent Selection
EditorTabTab
EmacsStyleIndentEmacs Tab
EditorScrollUpScroll Up
EditorScrollDownScroll Down
EditorMoveUpAndScrollMove Up and Scroll
EditorMoveDownAndScrollMove Down and Scroll
EditorMoveUpAndScrollWithSelectionMove Up and Scroll with Selection
EditorMoveDownAndScrollWithSelectionMove Down and Scroll with Selection
EditorLineStartMove Caret to Line Start
EditorLineEndMove Caret to Line End
EditorCutLineEndCut up to Line End
EditorTextStartMove Caret to Text Start
EditorTextEndMove Caret to Text End
EditorLineStartWithSelectionMove Caret to Line Start with Selection
EditorLineEndWithSelectionMove Caret to Line End with Selection
EditorTextStartWithSelectionMove Caret to Text Start with Selection
EditorTextEndWithSelectionMove Caret to Text End with Selection
EditorNextWordMove Caret to Next Word
EditorPreviousWordMove Caret to Previous Word
EditorNextWordWithSelectionMove Caret to Next Word with Selection
EditorPreviousWordWithSelectionMove Caret to Previous Word with Selection
EditorCodeBlockStartMove Caret to Code Block Start
EditorCodeBlockEndMove Caret to Code Block End
EditorCodeBlockStartWithSelectionMove Caret to Code Block Start with Selection
EditorCodeBlockEndWithSelectionMove Caret to Code Block End with Selection
EditorDeleteToWordStartDelete to Word Start
EditorDeleteToWordEndDelete to Word End
EditorDeleteLineDelete Line at Caret
EditorDuplicateDuplicate Line or Block
EditorSelectWordSelect Word at Caret
EditorUnSelectWordUnselect Word at Caret
EditorToggleInsertStateToggle Insert/Overwrite
EditorToggleColumnModeColumn Mode
EditorToggleShowWhitespacesShow Whitespaces
EditorToggleShowLineNumbersShow Line Numbers
EditorScrollToCenterScroll to Center
EditorToggleCaseToggle Case
EditorJoinLinesJoin Lines
EditorSelectLineSelect Line at Caret
EditorSplitLineSplit Line
EditorStartNewLineStart New Line
EditorCompleteStatementComplete Current Statement
J2EEGenerateGroup
IDName
CreateSessionBeanSession Bean
CreateContainerManagedEntityBeanActionCMP Entity Bean
CreateBeanManagedEntityBeanActionBMP Entity Bean
CreateMessageBeanMessage Bean
CreateTransferObjectTransfer Object
CreateCMPFieldCMP Field
CreateEJBRelationshipEJB Relationship
CreateJSPActionJsp
CreateJSPXActionJspx
CreateServletActionServlet
CreateFilterActionFilter
CreateListenerActionListener
GenerateGroup (Generate)
IDName
GenerateConstructorConstructor
GenerateGetterGetter
GenerateSetterSetter
GenerateGetterAndSetterGetter and Setter
GenerateEqualsequals() and hashCode()
OverrideMethodsOverride Methods...
ImplementMethodsImplement Methods...
DelegateMethodsDelegate Methods...
GenerateSuperMethodCallsuper method call
NewGroup (New)
IDName
NewClassClass
NewInterfaceInterface
NewEnumEnum
NewAnnotationType@Interface
NewFileFile
NewDirDirectory/Package
NewFromTemplateFrom Template
NewDialogDialog
LocalVcsGroup (Local History)
IDName
LocalVcs.ShowHistoryShow History
LocalVcs.HistoryForBlockShow History for Selection
LocalVcs.AddLabelAdd Label...
VcsGroups (Version Control)
IDName
Vcs.MarkSourcesAsCurrentMark Project as Current
VcsGroups > VcsGlobalGroup (Version Control Group)
IDName
Vcs.FileViewShow File View
Vcs.UpdateProjectUpdate Project
Vcs.ProjectStatusCheck Project Status
MainMenu > FileMenu (File)
IDName
NewProjectNew Project...
NewModuleNew Module...
OpenProjectOpen Project...
OpenFileOpen File...
CloseProjectClose Project
ShowSettingsSettings
TemplateProjectPropertiesTemplate Project Settings
SaveAllSave All
ExportSettingsExport Settings...
ImportSettingsImport Settings...
ImportFromJBuilderImport From JBuilder
SynchronizeSynchronize
ReloadFromDiskReload from Disk
ExportToHTMLExport to HTML...
PrintPrint...
ExitExit
MainMenu > EditMenu (Edit)
IDName
$UndoUndo
$RedoRedo
$SelectAllSelect All
NewElementNew...
$DeleteDelete
ToggleBookmarkToggle Bookmark
ShowBookmarksShow Bookmarks
MainMenu > EditMenu > CutCopyPasteGroup
IDName
$CutCut
$CopyCopy
CopyPathsCopy Paths
CopyReferenceCopy Reference
$PastePaste
PasteMultiplePaste...
MainMenu > SearchMenu (Search)
IDName
FindFind...
ReplaceReplace...
FindNextFind Next
FindPreviousFind Previous
FindWordAtCaretFind Word at Caret
IncrementalSearchIncremental Search
FindUsagesFind Usages...
FindUsagesInFileFind Usages in File...
HighlightUsagesInFileHighlight Usages in File
FindJoinpointsByPointcutActionFind Join Point Identified by Pointcut
FindInPathFind in Path...
ReplaceInPathReplace in Path...
MainMenu > ViewMenu (View)
IDName
ViewToolBarToolbar
ViewStatusBarStatus Bar
ToggleFullScreenModeFull Screen
EditSourceJump to Source
ViewSourceShow Source
OpenInBrowserOpen in Browser
ExternalJavaDocExternal JavaDoc
RecentFilesRecent Files...
QuickChangeSchemeQuick Switch Scheme...
TypeHierarchyType Hierarchy
MethodHierarchyMethod Hierarchy
CallHierarchyCall Hierarchy
RecentChangesRecent Changes...
MainMenu > ViewMenu > CodeEditorViewGroup
IDName
FileStructurePopupFile Structure Popup
SelectInSelect In...
QuickJavaDocQuick Documentation Lookup
QuickImplementationsQuick Definition Lookup
ParameterInfoParameter Info
EditorContextInfoContext Info
ShowErrorDescriptionError Description
MainMenu > ViewMenu > CommanderViewGroup
IDName
CommanderSyncViewsSynchronize Views
CommanderSwapPanelsSwap Panels
MainMenu > ViewMenu > ProjectViewGroup
IDName
ProjectViewChangeViewChange View
MainMenu > ViewMenu > FoldingGroup (Folding)
IDName
ExpandRegionExpand
CollapseRegionCollapse
ExpandAllRegionsExpand All
CollapseAllRegionsCollapse All
ExpandJavadocsExpand Javadocs
CollapseJavadocsCollapse Javadocs
CollapseSelectionFold Selection / Remove region
CollapseBlockFold Code Block
MainMenu > GoToMenu (Go To)
IDName
GotoClassClass...
GotoFileFile...
GotoSymbolSymbol...
GotoLineLine...
GotoDeclarationDeclaration
GotoDefinitionDefinition
GotoUsageUsage
GotoImplementationImplementation(s)
SmartGotoImplementationCalled Implementation(s)
GotoTypeDeclarationType Declaration
GotoSuperMethodSuper Method
GotoAspectAspect
GotoNextErrorNext Highlighted Error
GotoPreviousErrorPrevious Highlighted Error
MethodDownNext Method
MethodUpPrevious Method
GotoNextBookmarkNext Bookmark
GotoPreviousBookmarkPrevious Bookmark
BackBack
ForwardForward
JumpToLastChangeLast Edit Location
PreviousOccurencePrevious Occurrence
NextOccurenceNext Occurrence
VcsShowNextChangeMarkerGo To Next Change
VcsShowPrevChangeMarkerGo To Prev Change
MainMenu > CodeMenu (Code)
IDName
SurroundWithSurround With...
GenerateGenerate...
InsertLiveTemplateInsert Live Template...
SurroundWithLiveTemplateSurround with Live Template...
CommentByLineCommentComment with Line Comment
CommentByBlockCommentComment with Block Comment
ReformatCodeReformat Code...
AutoIndentLinesAuto-Indent Lines
OptimizeImportsOptimize Imports...
MoveStatementDownMove Statement Down
MoveStatementUpMove Statement Up
MainMenu > CodeMenu > CodeCompletionGroup (Complete Code)
IDName
CodeCompletionBasic
WordCompletionComplete Word
SmartTypeCompletionSmartType
ClassNameCompletionClass Name
MainMenu > AnalyzeMenu (Analyze)
IDName
InspectCodeInspect Code...
InspectCodeWithEditorProfileInspect Code With Editor Settings
ViewOfflineInspectionView Offline Inspection Results...
ShowPackageDepsAnalyze Dependencies...
ShowBackwardPackageDepsAnalyze Backward Dependencies...
ShowPackageCyclesAnalyze Cyclic Dependencies...
ShowModulesDependenciesAnalyze Module Dependencies...
DupLocateLocate Duplicates...
UnscrambleAnalyze Stacktrace...
MainMenu > RefactoringMenu (Refactor)
IDName
RenameElementRename...
ChangeSignatureChange Signature...
MakeStaticMake Static...
ConvertToInstanceMethodConvert To Instance Method...
MoveMove...
CopyElementCopy...
CloneElementClone...
SafeDeleteSafe Delete...
ExtractMethodExtract Method...
MethodDuplicatesReplace Method Code Duplicates...
IntroduceVariableIntroduce Variable...
IntroduceFieldIntroduce Field...
IntroduceConstantIntroduce Constant...
IntroduceParameterIntroduce Parameter...
ExtractInterfaceExtract Interface...
ExtractSuperclassExtract Superclass...
TurnRefsToSuperUse Interface Where Possible...
MembersPullUpPull Members Up...
MemberPushDownPush Members Down...
InheritanceToDelegationReplace Inheritance with Delegation...
InlineInline...
AnonymousToInnerConvert Anonymous to Inner...
EncapsulateFieldsEncapsulate Fields...
ReplaceTempWithQueryReplace Temp with Query...
ReplaceConstructorWithFactoryReplace Constructor with Factory Method...
GenerifyGenerify...
MigrateMigrate...
Type MigrationType Migration...
ExtractIncludeExtract Include File...
MainMenu > BuildMenu (Build)
IDName
CompileProjectRebuild Project
CompileDirtyMake Project
MakeModuleMake Module
CompileCompile
GenerateAntBuildGenerate Ant Build
BuildJarBuild Jars...
MainMenu > RunMenu (Run)
IDName
editRunConfigurationsEdit Configurations
StopStop
HotswapReload Changed Classes
StepOverStep Over
StepIntoStep Into
StepOutStep Out
ForceStepOverForce Step Over
ForceStepIntoForce Step Into
RunToCursorRun to Cursor
Debugger.PopFramePop Frame
PausePause Program
ResumeResume Program
EvaluateExpressionEvaluate Expression...
QuickEvaluateExpressionQuick Evaluate Expression
ShowExecutionPointShow Execution Point
ToggleLineBreakpointToggle Line Breakpoint
ToggleMethodBreakpointToggle Method Breakpoint
ToggleFieldBreakpointToggle Field Watchpoint
ToggleBreakpointEnabledToggle Breakpoint Enabled
ViewBreakpointsView Breakpoints
ExportThreadsExport Threads...
MainMenu > ToolsMenu (Tools)
IDName
SaveAsTemplateSave as Live Template...
SaveFileAsTemplateSave File as Template...
GenerateJavadocGenerate JavaDoc...
DataSourcesData Sources...
MainMenu > ToolsMenu > Macros > StanardMacroActions (Standard Macro Actions)
IDName
PlaybackLastMacroPlayback Last Macro
StartStopMacroRecordingStart/Stop Macro Recording
EditMacrosEdit Macros...
MainMenu > ToolsMenu >
IDName
ValidateXmlValidate
AddAntBuildFileAdd as Ant Build File
GenerateDTDGenerate DTD from XML file
MainMenu > ToolsMenu

相關推薦

idea外掛編寫

做人要有始有終,答應的下一篇一定會給你們寫,雖然以後可能不再會做外掛這類的技術了,但也很開心給我這個機會,讓我做機試題。idea外掛自定義按鈕開啟EditRunConfigurations上一篇教大家學會了建立idea的自定義按鈕,這一節在action建立完畢的基礎上,給大家

3DsMax匯出外掛編寫)——常規SDK方法進行資訊獲取和儲存檔案

之前已經把配置vs和maxSdk的方法介紹過了, 下面來介紹一下匯出外掛的具體寫法。不過這不是一個容易說的很詳細的問題。因為我們要寫匯出外掛,通常都是因為想根據自己想要的資訊來匯出,所以就算我把我整個工程都公開,意義也不大的,因為那是根據我自己需要的資料寫

android service外掛

3. Service的外掛化 現在已經明白了Service元件的工作原理,可對如何實現Service的外掛化依然是一頭霧水。 從上文的原始碼分析來看,Service元件與Activity有著非常多的相似之處:它們都是通過Context類完成啟動, 接著通過 Activit

IntelliJ Idea外掛開發新增自定義庫(Library)

在一些程式碼工程沒有用ivy,maven這些庫檔案管理工具,jar包要麼和工程檔案放在一起或是存在本地的目錄中然後通過開發工具匯入。還有一種就是庫檔案打包在中介軟體中,開發時需要引入,不方便用ivy,maven進行依賴管理,這時候可能就需要開發一個IntelliJ Idea外

idea外掛java記憶體分析工具(JProfiler)

前言 在執行java的時候有時候想測試雲執行時佔用記憶體情況,這時候就需要使用測試工具查看了。在eclipse裡面有 Eclipse Memory Analyzer tool(MAT)外掛可以測試,而

ssh密鑰分發:使用sshpass配合ssh-kopy-id編寫腳本批量分發密鑰:

pre The stk 成功 安裝 word ping通 root賬戶 str 使用sshpass配合ssh-kopy-id編寫腳本批量分發密鑰: 首先sshpass是一個ssh連接時的免交互工具,首先要安裝一下: yum install sshpass -y 接下

MAVEN系列@編寫POM.xml和講解

0、慣例,廢話 廢話少說,直接提槍上陣,如有不妥之處,還請多多賜教。      現在的專案建立都是使用的整合化開發工具,各種工具,各種用法,不管是什麼工具,反正目標只有一個,就是一切為自己開發服務。然後廢話說了那麼多,也不是今天的重點,重點是下面的目錄

Idea建立maven web專案,並使用tomcat外掛執行(

前言: 在上一篇的基礎上,加入springmvc支援   一:建立web.xml檔案 我們要整合springMVC,需要在web.xml中配置DispatcherServlet;所以先建立web.xml檔案     &

高效程式設計IDEA外掛

阿里巴巴Java開發規約掃描外掛-Alibaba Java Coding Guidelines https://blog.csdn.net/xvshu/article/details/78263195 程式碼規範外掛 - checkStyle-idea http://www.cnblogs.

【 Visual C 】遊戲開發筆記 最簡單的DirectX vc視窗的編寫

                筆記一中我們介紹瞭如何用程式碼建立空的win32視窗,然而建立空的win32視窗只完成了一半的工作,接下來要做的工作是設定Direct3D,從而可以在螢幕上渲染圖形。Direct3D要呼叫很多函式才能成功設定API。一旦完成設定,並且設定成功,就可以向螢幕上渲染圖形。下面是函式

菜鳥先飛維碼jquery-qrcode外掛生成

二維碼的概述 二維碼又稱QR Code,QR全稱Quick Response,是一個近幾年來移動裝置上超流行的一種編碼方式,它比傳統的Bar Code條形碼能存更多的資訊,也能表示更多的資料型別。 二維碼的生成工具 java生成

IDEA總結(用IDEA新建一個spring結構的web專案)

先建一個普通的web專案,如果不會的話可以參考之前的IDEA總結之一(如何新建 普通的maven +web專案以及如何執行mavenweb專案)點選開啟連結然後右鍵專案 Add Framwork Support...這裡也說一下如何快速的新建springboot點選New P

linux驅動由淺入深系列:輸入子系統(編寫一個gpio_key驅動)

本系列導航: 在上一篇文章中我們大致瞭解了linux input subsystem的功能及應用層的使用,本文我們一起來看一看驅動程式碼的編寫。接下來一篇,計劃寫一下應用層如何模擬按鍵訊息,產生與按下實際按鍵相同的效果。 在“linux驅動由淺入深系列:驅動程式的基

(tensorflow十)TensorFlow Eager Execution立即執行外掛

一、安裝 有GPU的安裝 docker pull tensorflow/tensorflow:nightly-gpu docker run --runtime=nvidia -it -p 8888:8888 tensorflow/tensorflow:n

IDEA裡面新增lombok外掛,編寫簡略風格Java程式碼

在 java平臺上,lombok 提供了簡單的註解的形式來幫助我們消除一些必須有但看起來很臃腫的程式碼, 比如屬性的get/set,及物件的toString等方法,特別是相對於 POJO; 關於lombok的相關資訊,lombok 下面開始在IDEA裡

websocket實現QQ聊天一(UI js編寫)

今天說明一下 websocket實現QQ聊天js程式碼 說明:根據自己實際情況編寫,但是萬變不離這幾個狀態,建議將它封裝為單獨的js檔案,引入 function setMessageInnerHTML(data) { $('.newsList').append(d

編寫C語言版本的卷積神經網路CNN:CNN網路的總體結構

      上一節我們總體介紹專案並說明Minst手寫數字資料庫的使用,這一節我們將重點介紹CNN網路總體結構。 上圖我們已經非常熟悉,其為Yann在1998年介紹的LeNet-5網路的結構,其剛被提出,就在學術和工業領域上得到廣泛應用,而本文的CNN卷積網路卻是如下

IDEA優秀外掛分享---Mybatis Log Plugin

小夥伴們在使用mybatis的時候有時候會出現一些sql異常,這個時候就需要對執行的sql語句進行檢查。然而mybatis一般使用log4j列印執行的sql語句,型別下面這種的: 這個時候如果sql語句比較長比較複雜的話再手動拼接起來就會比較複雜,萬一再手抖一下還原sq

#Python 初學編寫一個小遊戲#

#密碼輸入三次錯誤輸入限制 password_list = ['####','12345']

Jenkins 外掛開發旅:兩天內從 idea 到釋出(上篇)

本文首發於:Jenkins 中文社群 本文介紹了筆者首個 Jenkins 外掛開發的旅程, 包括從產生 idea 開始,然後經過