Download presentation
Presentation is loading. Please wait.
Published byArabella Franklin Modified over 9 years ago
1
Extending Eclipse General concepts and Project related APIs Yearly project, Winter 05/06 The Technion
2
Eclipse – an overview Eclipse is a collection of plugins Each plugin may provide Extension points APIs To be used by other plugin ’ s extensions
3
UI contribution The starting point: org.eclipse.ui.* extension points Usually, for implementing UI features, extensions use org.eclipse.jface.* helper classes (Dialogs, Wizard, etc.) JFace is implemented on top of SWT (Standard Widget Toolkit, org.eclipse.swt.*) (Extensions may use SWT directly)
4
Resources The workspace contains the user ’ s resources: projects, folders and files Resources plug-in provides APIs for manipulating the workspace (org.eclipse.core.resources) Manipulation is done via handles IResource, IProject, IFile … IResource.exist() IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); IProject myProject = myWorkspaceRoot.getProject("MyProj");
5
The Java Model Java-based view on resources Java handles are retrieved via JavaCore IJavaElement, ICompilationUnit, IMethod … Use DOM/AST API for a detailed analysis of a compilation unit org.eclipse.jdt.core.dom
6
Eclipse Runtime The Plugin class represents a plug-in that is running in the platform Managed as an OSGI bundle start(BundleContext context) initialization behavior for a plug-in Use BundleContext to o btain information of all bundles (excluding extensions ’ info) And to register listeners to changes in other bundles ’ life- cycle stop(BundleContext context)
7
Eclipse Runtime (Cont.) IExtensionRegistry provides information related to extension-points and extensions import org.eclipse.core.runtime.Platform; IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtensionPoint point = registry.getExtensionPoint("org.eclipse.ui.views"); IExtension[] extensions = point.getExtensions(); [Then, IConfigurationElement can be used to examine the attributes of an extension and to create a new instance of the related class by calling: createExecutableExtension( … )]
8
Eclipse debug model Defines generic interfaces To be implemented and extended by … (?) ILaunch, IDebugTarget, IThread, IStackFrame, IBreakpoint, DebugEvent … org.eclipse.debug.* org.eclipse.debug.core.DebugPlugin (a starting point)
9
JDT debug supports running and debugging of Java code org.eclipse.jdt.debug.* org.eclipse.jdt.debug.core.JDIDebugModel May be used to create BPs for resources To register BPs listeners
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.