Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Handly/Migration05"
< Handly
(Created page with "== Migration Guide for Handly 0.5 == Changes that need to be catered for by current adopters as part of migrating to Handly 0.5 from the previous major release (0.4). * '''I...") |
|||
Line 18: | Line 18: | ||
** Adopted the <tt>h</tt> prefix for the names of non-static API methods: <tt>getName</tt> → <tt>hName</tt>, <tt>exists</tt> → <tt>hExists</tt>, etc. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491564 bug 491564]) | ** Adopted the <tt>h</tt> prefix for the names of non-static API methods: <tt>getName</tt> → <tt>hName</tt>, <tt>exists</tt> → <tt>hExists</tt>, etc. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491564 bug 491564]) | ||
** <tt>getHandleManager</tt> → <tt>hElementManager</tt> | ** <tt>getHandleManager</tt> → <tt>hElementManager</tt> | ||
− | ** | + | ** The type of a parameter and/or return value has changed in some of the API methods (<tt>Body</tt> → <tt>Object</tt>, [https://bugs.eclipse.org/bugs/show_bug.cgi?id=491570 bug 491570]): |
*** <tt>buildStructure('''Body''', Map<IHandle, '''Body'''>, ..)</tt> → <tt>hBuildStructure('''Object''', Map<IElement, '''Object'''>, ..)</tt> | *** <tt>buildStructure('''Body''', Map<IHandle, '''Body'''>, ..)</tt> → <tt>hBuildStructure('''Object''', Map<IElement, '''Object'''>, ..)</tt> | ||
*** <tt>'''Body''' findBody()</tt> → <tt>'''Object''' hFindBody()</tt> | *** <tt>'''Body''' findBody()</tt> → <tt>'''Object''' hFindBody()</tt> | ||
Line 35: | Line 35: | ||
** Field <tt>file</tt> is now private and must be accessed through the corresponding accessor method | ** Field <tt>file</tt> is now private and must be accessed through the corresponding accessor method | ||
** Adopted the <tt>h</tt> prefix for the names of non-static API methods: <tt>getFile</tt> → <tt>hFile</tt>, <tt>getBuffer</tt> → <tt>hBuffer</tt>, etc. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491564 bug 491564]) | ** Adopted the <tt>h</tt> prefix for the names of non-static API methods: <tt>getFile</tt> → <tt>hFile</tt>, <tt>getBuffer</tt> → <tt>hBuffer</tt>, etc. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491564 bug 491564]) | ||
− | ** | + | ** The type of a parameter has changed in some of the API methods: |
*** <tt>buildStructure(SourceElementBody, Map<IHandle, '''Body'''>, ..)</tt> → <tt>hBuildStructure(SourceElementBody, Map<IElement, '''Object'''>, ..)</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491570 bug 491570]) | *** <tt>buildStructure(SourceElementBody, Map<IHandle, '''Body'''>, ..)</tt> → <tt>hBuildStructure(SourceElementBody, Map<IElement, '''Object'''>, ..)</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491570 bug 491570]) | ||
*** <tt>becomeWorkingCopy('''IWorkingCopyBuffer''', ..)</tt> → <tt>hBecomeWorkingCopy('''IBuffer''', ..)</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=492179 bug 492179]) | *** <tt>becomeWorkingCopy('''IWorkingCopyBuffer''', ..)</tt> → <tt>hBecomeWorkingCopy('''IBuffer''', ..)</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=492179 bug 492179]) | ||
Line 48: | Line 48: | ||
*** <tt>'''public''' toStringMinimal(StringBuilder)</tt> → <tt>'''protected''' hToStringMinimal(IndentationPolicy, int, StringBuilder)</tt> | *** <tt>'''public''' toStringMinimal(StringBuilder)</tt> → <tt>'''protected''' hToStringMinimal(IndentationPolicy, int, StringBuilder)</tt> | ||
* '''HandleDeltaBuilder''' has been renamed to <tt>ElementDifferencer</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491568 bug 491568], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=491575 bug 491575]) | * '''HandleDeltaBuilder''' has been renamed to <tt>ElementDifferencer</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491568 bug 491568], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=491575 bug 491575]) | ||
− | ** | + | ** The type of a parameter and/or return value has changed in some of the API methods: |
*** <tt>HandleDeltaBuilder('''IHandle''')</tt> → <tt>ElementDifferencer('''ElementDelta.Builder''')</tt> | *** <tt>HandleDeltaBuilder('''IHandle''')</tt> → <tt>ElementDifferencer('''ElementDelta.Builder''')</tt> | ||
*** <tt>'''HandleDelta''' getDelta()</tt> → <tt>'''IElementDelta''' getDelta()</tt> | *** <tt>'''HandleDelta''' getDelta()</tt> → <tt>'''IElementDelta''' getDelta()</tt> | ||
Line 57: | Line 57: | ||
** Methods <tt>internalClose(IHandle)</tt> and <tt>removing(IHandle, '''Body''')</tt> have been effectively replaced with <tt>closeChildren(IElement, Object)</tt> and <tt>removing(IElement, '''Object''')</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491570 bug 491570]) | ** Methods <tt>internalClose(IHandle)</tt> and <tt>removing(IHandle, '''Body''')</tt> have been effectively replaced with <tt>closeChildren(IElement, Object)</tt> and <tt>removing(IElement, '''Object''')</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=491570 bug 491570]) | ||
* '''IBodyCache''' | * '''IBodyCache''' | ||
− | ** | + | ** The type of a parameter and/or return value has changed in some of the API methods (<tt>Body</tt> → <tt>Object</tt>, [https://bugs.eclipse.org/bugs/show_bug.cgi?id=491570 bug 491570]): |
*** <tt>'''Body''' get(IHandle)</tt> → <tt>'''Object''' get(IElement)</tt> | *** <tt>'''Body''' get(IHandle)</tt> → <tt>'''Object''' get(IElement)</tt> | ||
*** <tt>'''Body''' peek(IHandle)</tt> → <tt>'''Object''' peek(IElement)</tt> | *** <tt>'''Body''' peek(IHandle)</tt> → <tt>'''Object''' peek(IElement)</tt> | ||
Line 66: | Line 66: | ||
** New API method: <tt>getChildCount(IElement, Object)</tt> | ** New API method: <tt>getChildCount(IElement, Object)</tt> | ||
* '''WorkingCopyInfo''' has taken over the reconciling related responsibilities from <tt>IWorkingCopyBuffer</tt> and now works with any <tt>IBuffer</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=492179 bug 492179]) | * '''WorkingCopyInfo''' has taken over the reconciling related responsibilities from <tt>IWorkingCopyBuffer</tt> and now works with any <tt>IBuffer</tt> ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=492179 bug 492179]) | ||
− | ** | + | ** The type of a parameter and/or return value has changed in some of the API methods: |
*** <tt>WorkingCopyInfo('''IWorkingCopyBuffer''')</tt> → <tt>WorkingCopyInfo('''IBuffer''')</tt> | *** <tt>WorkingCopyInfo('''IWorkingCopyBuffer''')</tt> → <tt>WorkingCopyInfo('''IBuffer''')</tt> | ||
*** <tt>'''IWorkingCopyBuffer''' getBuffer()</tt> → <tt>'''IBuffer''' getBuffer()</tt> | *** <tt>'''IWorkingCopyBuffer''' getBuffer()</tt> → <tt>'''IBuffer''' getBuffer()</tt> |
Latest revision as of 02:03, 19 June 2016
Migration Guide for Handly 0.5
Changes that need to be catered for by current adopters as part of migrating to Handly 0.5 from the previous major release (0.4).
- IHandle has been replaced with a trio of IElement, IElementExtension, and Elements (bug 491568, bug 491564)
- IHandle.ToStringStyle has become a top-level class (bug 491647)
- ISourceElement has been effectively replaced with a trio of ISourceElement, ISourceElementExtension, and Elements (bug 491564)
- getElementAt → getSourceElementAt
- ISourceElement.Property has become a top-level class (bug 491649)
- ISourceFile has been effectively replaced with a trio of ISourceFile, ISourceFileExtension, and Elements (bug 491564)
- SourceElements has been replaced with Elements (bug 491564)
- getElementAt → getSourceElementAt2
- getSourceElementInfo → getSourceElementInfo2
- IHandleDelta has been replaced with a quartet of IElementDelta, IElementDeltaConstants, IElementDeltaExtension, and ElementDeltas (bug 491568, bug 491564)
- getResourceDeltas and getMarkerDeltas may now return null (bug 488819)
- Handle has been renamed to Element (bug 491568)
- Fields parent and name are now private and must be accessed through corresponding accessor methods
- Adopted the h prefix for the names of non-static API methods: getName → hName, exists → hExists, etc. (bug 491564)
- getHandleManager → hElementManager
- The type of a parameter and/or return value has changed in some of the API methods (Body → Object, bug 491570):
- buildStructure(Body, Map<IHandle, Body>, ..) → hBuildStructure(Object, Map<IElement, Object>, ..)
- Body findBody() → Object hFindBody()
- Body peekAtBody() → Object hPeekAtBody()
- Body getBody() → Object hBody()
- Body newBody() → Object hNewBody()
- Body toStringBody(..) → Object hToStringBody(..)
- toStringChildren(.., Body) → hToStringChildren(.., Object)
- toStringBody(.., Body, ..) → hToStringBody(.., Object, ..)
- generateAncestorBodies(Map<IHandle, Body>, ..) → hGenerateAncestorBodies(Map<IElement, Object>, ..)
- generateBodies(Body, Map<IHandle, Body>, ..) → hGenerateBodies(Object, Map<IElement, Object>, ..)
- removing(Body) → hRemoving(Object)
- SourceElement
- Adopted the h prefix for the names of non-static API methods: getElementAt → hSourceElementAt, etc. (bug 491564)
- SourceFile
- Field file is now private and must be accessed through the corresponding accessor method
- Adopted the h prefix for the names of non-static API methods: getFile → hFile, getBuffer → hBuffer, etc. (bug 491564)
- The type of a parameter has changed in some of the API methods:
- buildStructure(SourceElementBody, Map<IHandle, Body>, ..) → hBuildStructure(SourceElementBody, Map<IElement, Object>, ..) (bug 491570)
- becomeWorkingCopy(IWorkingCopyBuffer, ..) → hBecomeWorkingCopy(IBuffer, ..) (bug 492179)
- SourceConstruct
- Adopted the h prefix for the names of non-static API methods: getOccurrenceCount → hOccurrenceCount, etc. (bug 491564)
- HandleDelta has been renamed to ElementDelta (bug 491568)
- Adopted the h prefix for the names of non-static API methods: getElement → hElement, getKind → hKind, etc. (bug 491564)
- insertXXX methods along with setMarkerDeltas and addResourceDelta have been replaced with a new API, ElementDelta.Builder (bug 491575)
- New API method: hToString(ToStringStyle)
- Some of the public toStringXXX methods have become protected:
- public toStringFull → protected hToStringFull
- public toStringMinimal(StringBuilder) → protected hToStringMinimal(IndentationPolicy, int, StringBuilder)
- HandleDeltaBuilder has been renamed to ElementDifferencer (bug 491568, bug 491575)
- The type of a parameter and/or return value has changed in some of the API methods:
- HandleDeltaBuilder(IHandle) → ElementDifferencer(ElementDelta.Builder)
- HandleDelta getDelta() → IElementDelta getDelta()
- findContentChange(Body, Body, IHandle) → findContentChange(Object, Object, IElement) (bug 491570)
- newDelta method is no longer needed and has been removed
- New API methods: getElement() and isEmptyDelta()
- The type of a parameter and/or return value has changed in some of the API methods:
- HandleManager has been renamed to ElementManager (bug 491568)
- Methods internalClose(IHandle) and removing(IHandle, Body) have been effectively replaced with closeChildren(IElement, Object) and removing(IElement, Object) (bug 491570)
- IBodyCache
- The type of a parameter and/or return value has changed in some of the API methods (Body → Object, bug 491570):
- Body get(IHandle) → Object get(IElement)
- Body peek(IHandle) → Object peek(IElement)
- put(IHandle, Body) → put(IElement, Object)
- putAll(Map<IHandle, Body>) → putAll(Map<IElement, Object>)
- The type of a parameter and/or return value has changed in some of the API methods (Body → Object, bug 491570):
- ElementCache now extends OverflowingLruCache<IElement, Object> instead of previously extending OverflowingLruChache<IHandle, Body> (bug 491570)
- ensureSpaceLimit(Body, IHandle) → ensureSpaceLimit(Object, IElement)
- New API method: getChildCount(IElement, Object)
- WorkingCopyInfo has taken over the reconciling related responsibilities from IWorkingCopyBuffer and now works with any IBuffer (bug 492179)
- The type of a parameter and/or return value has changed in some of the API methods:
- WorkingCopyInfo(IWorkingCopyBuffer) → WorkingCopyInfo(IBuffer)
- IWorkingCopyBuffer getBuffer() → IBuffer getBuffer()
- New API methods: onInit(), needsReconciling(), reconcile(..), getWorkingCopy()
- New API classes: DefaultWorkingCopyInfo, XtextWorkingCopyInfo
- The type of a parameter and/or return value has changed in some of the API methods:
- IWorkingCopyInfoFactory
- createWorkingCopyInfo(IWorkingCopyBuffer) → createWorkingCopyInfo(IBuffer) (bug 429179)
- IWorkingCopyBuffer and its implementations are no longer needed and have been removed (bug 429179)
- IWorkingCopyReconciler and its implementations are no longer needed and have been removed (bug 429179)
- Some of the API elements have been renamed (bug 491568)
- IContentAdaper#getHandle → #adapt
- HandleLabelProvider → ElementLabelProvider
- HandleTreeContentProvider → ElementTreeContentProvider
- AbstractWorkingSetUpdater#processHandleDelta → #processElementDelta
- Previously deprecated API elements have been removed (bug 487183)
- IBuffer#dispose - Replaced with #release
- IDocumentBuffer - Effectively replaced with IBuffer#getDocument
- IElementForEditorInputFactory - Replaced with IInputElementProvider
- ISourceFile#openBuffer - Replaced with #getBuffer
- TextFileSnapshot(IFile) - Replaced with TextFileSnapshot(IFile, boolean)