Eclipse plugin development learning notes (1)

zhaozj2021-02-16  63

Start 1) Access to the Eclipse plug-in source file File> Import ...> External plug-insid ...> EXTERNAL PLUG-INS AND FRAGENTS> Go to the next page Accept the default option> "Add All" in page 3. "Workspace Set Up with Binary Projects But Linked Contents "means: PDE created in Workspace, Plug-in Projects, just a reference link instead of copy.

2) Here's The First Rule of Eclipse: Controlion Rule: Everything is a control.

3) About Plug-In Development Environment (PDE) host workbench: edit the plug-in run-time workbench: run the plug-in under development If you write to System.out from inside a plug-in under development, the text appears In The Host Workbench, Not The Run-Time Workbench. 4) Basic Structure of Plug-in Declaration / Implementation Separation: A plug-in is represented as a directory containing the following Plugin.xml- The Manifest, A Description of the Contributions Of the Plug-in Resources, Like Icons Java Code, IN A JAR (OPTIONAL) 5) About Plugin.xml A Toolbar button

ID = "org.eclipse.contribution.hello" - "New Plug-in Project" ID number

Name = "org.eclipse.contribution.hello" - the name of the Plug-in, casual

Version = "1.0.0">

- The description of the button set Point points to the button set of Eclipse, Point corresponds to a certain element in Eclipse.

- a collection of buttons

ID = "org.eclipse.contribution.hello.actionset"

Label = "Hello Action SET">

- The action will be called when the button is pressed.

ID = "Org.eclipse.Contribution.Hello.helloAction"

Label = "Hello"

--To Appear As a Button, Each Action Has To Be Associated with a Toolbar Path, A Hint to Eclipse.

Toolbarpath = "Hellogrou"

--Create the class importing the interface iWorkBenchWindowActionDelegate

Class = "Org.eclipse.Contribution.Hello.helloAction">

转载请注明原文地址:https://www.9cbs.com/read-17798.html

New Post(0)