Presentation is loading. Please wait.

Presentation is loading. Please wait.

Plug-ins Crash Course Roland Overgaauw

Similar presentations


Presentation on theme: "Plug-ins Crash Course Roland Overgaauw"— Presentation transcript:

1

2 Plug-ins Crash Course Roland Overgaauw e-mail: r.overgaauw@infoprofs.nl

3 Plug-ins Crash Course

4 Wat is Eclipse een opensource framework een kernel & een verzameling Plug-ins

5 Eclipse Bouwstenen Platform Core (load en execute plugins) Workbench UI (bestaat uit plug-ins) Gui SWT JFace perspectives editors views dialogs etc... Help Team Workspace/Resources

6 plug-ins afhankelijk van plug-ins Workbench UI Tool 1 Tool 3 Tool 4 Tool 2 Platform Core Java Devl Tool extention pointsplug-ins

7 Wat is een Plug-in(1)

8 Wat is een Plug-in(2) directory in [INSTALL]/plugins [INSTALL] Plug-ins

9 Wat is een Plug-in(3) must have –directory –plugin manifest: plugin.xml –(jar file)

10 Hello Frodo (1) wizard 1 The hard way / The Easy way –File -> new -> Project –of klik

11 Hello Frodo (2) wizard 2

12 Hello Frodo (3) wizard 3

13 Hello Frodo (3) wizard 4

14 Hello Frodo (4) wizard 5

15 Hello Frodo (5.1) easy 1

16 Hello Frodo (5.1) easy 2

17 Hello Frodo (5.1) easy 3

18 Hello Frodo (5.1) easy 4

19 Hello Frodo (5.2) easy 5

20 Hello Frodo (6) result

21 Hello Frodo (7) plugin.xml 1 <plugin id="nl.java2.demo.plugin02" name="Plugin02 Plug-in" version="1.0.0" provider-name="java 2 nl" class="nl.java2.demo.plugin02.Plugin02Plugin">

22 Hello Frodo (8) plugin.xml 2 plugin.xml - Manifest –dependencies welke andere plugins heb ik nodig –runtime waar kan ik mijn classjes vinden (jarfile) –extentions welke andere extention point(s) gebruik ik –extentionspoint welke nieuwe extention point(s) lever ik

23 Hello Frodo (9) extensions page

24 Hello Frodo (10) add extension

25 Hello Frodo (11) choose extension point

26 Hello Frodo (12) add actionSet

27 Hello Frodo (13) add menu

28 Hello Frodo (14) add ction

29 Hello Frodo (15) add separation

30 Hello Frodo (16) add ActionClass

31 Hello Frodo (17) add ActionClass

32 Hello Frodo (18) ActionClass package nl.java2.demo.plugin02; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class MyAction implements IWorkbenchWindowActionDelegate { private IWorkbenchWindow workbenchWindow; public MyAction() { } public void run(IAction action) { MessageDialog.openInformation(workbenchWindow.getShell(), "Plugin02 Plug-in", "Hello, Frodo” ); } public void selectionChanged(IAction action, ISelection selection) { } public void dispose() { } public void init(IWorkbenchWindow window) { workbenchWindow = window; }

33 Hello Frodo (19) testen

34 Hello Frodo (20) perspective

35 Hello Frodo (21) commands

36 Hello Frodo (22) result 1 properties van (menu)

37 Hello Frodo (23) result 2

38 Hello Frodo (24) deploying plug-ins

39 Hello Frodo (25) deploying plug-ins

40 Hello Frodo (26) finished

41 extention points (1) Editors Perspectives Views

42 extention points (2) perspectives ui.perspectives –niewe workbench perspectives en default layout ui.perspectiveExtensions –toegevoegde waarde aan bestaande perspectives

43 extention points (3) editors & views ui.editors –editors in de editors pane ui.editorActions –toevoegen van Actions aan bestaande editors menu of toolbar ui.views ui.viewsActions

44 extention points (4) actions ui.actionsSets –User actions in menu’s, toolbars ui.actionsSetPartAssociations –Verbinding tussen actions en componenten ui.popupMenus

45 extention points (5) ui.commands –Shortcuts via Keyboard –(Windows -> Preferences -> Workebench -> Keys) ui.dropActions –sleur n pleur

46 extention points (6) ui.preferencePages ui.propertiesPages ui.startup ui.workingSets

47 extention points (7) Gandalfs ui.exportWizards ui.importWizards ui.newWizards –extends org.eclipse.jface.wizard.Wizard –implement org.eclipse.ui.INewWizard –methode addPage() gebruiken om WizardPage toe te voegen.

48 extention points (8) help ui.markerHelp –toeveoegen van help markers ui.markerResolution –class MarkerResolutionGenerator –voor gebruik van QuickFix functies help.contexts help.support help.ui.browser

49 Q&A

50 Thanx! presentatie te bekijken op http://www.xs4all.nl/~rfover


Download ppt "Plug-ins Crash Course Roland Overgaauw"

Similar presentations


Ads by Google