Task #2085

RCP: Mutualize Adapter and AdapterFactory to use TXMResult

Added by Sebastien Jacquot about 2 years ago. Updated 12 months ago.

Status:Closed Start date:03/28/2017
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Development Spent time: -
Target version:TXM 0.8.0a (split/restructuration)

Description

Mutualize Adapter and AdapterFactory to use TXMResult. These classes are used to manage the result tree nodes in corpora view (label, icon, parent, children).

Solution

  • create TXMResultAdapterFactory implements IAdapterFactory
  • create TXMResultAdapter implements IWorkbenchAdapter
  • use TXMResult.getChildren(), TXMResult.getName(), etc.

History

#1 Updated by Sebastien Jacquot about 2 years ago

  • Subject changed from Mutualize Adapter and AdapterFactory to use TXMResult to RCP: Mutualize Adapter and AdapterFactory to use TXMResult
  • Status changed from New to Feedback
  • % Done changed from 0 to 80

Done, locations:

/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java
/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapterFactory.java

#2 Updated by Sebastien Jacquot about 2 years ago

TXMResultAdapter calls TXMResult.getSimpleName() to return the node label (used for example in Corpora view) so every TXMResult must implement this method.

    @Override
    public String getLabel(Object result) {
        return ((TXMResult) result).getSimpleName(); 
    }

#3 Updated by Sebastien Jacquot about 2 years ago

  • Description updated (diff)

#4 Updated by Sebastien Jacquot about 2 years ago

  • Description updated (diff)

#5 Updated by Sebastien Jacquot 12 months ago

  • Status changed from Feedback to Closed
  • % Done changed from 80 to 100

Also available in: Atom PDF