Task #2687
RCP: X.X, simplify TXMResult persistable variables
Statut: | Closed | Début: | 03/12/2019 | |
---|---|---|---|---|
Priorité: | Normal | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | Toolbox | Temps passé: | - | |
Version cible: | TXM 0.8.1 |
Description
1) make userPersistable a parameter (see example below)
2a) replace
class TXMResult: /** * Internal persistable state. */ protected boolean internalPersistable; /** * User persistable state. */ protected boolean userPersistable;
With:
class TXMResult: /** * persistable state. */ @Parameter(key = TXMPreferences.PERSISTABLE, type = Parameter.INTERNAL) protected boolean persistable; /** re-implement this methods if your result must always is persistable **/ public boolean isInternalPersistable() { return false; } ... class Partition: public boolean isInternalPersistable() { return true; }
and find a way to a TXMResult command to tell when it was set persistable at creation time
2b) Current state
Sets the member to true in the constructor of class that needs to be always persisted, eg.:
/** * * @param partition */ public Part(Partition partition, String partName, String query) { super(partition); this.userName = partName; this.pQuery = new CQLQuery(query); this.pID = CqpObject.partNamePrefix + CQPCorpus.getNextSubcorpusCounter(); this.setVisible(false); this.internalPersistable = true; }
Historique
#1 Mis à jour par Matthieu Decorde il y a presque 6 ans
- Description mis à jour (diff)
#2 Mis à jour par Sebastien Jacquot il y a presque 6 ans
- Description mis à jour (diff)
#3 Mis à jour par Sebastien Jacquot il y a plus de 5 ans
- Statut changé de New à Closed
- Version cible changé de TXM 0.8.2 à TXM 0.8.1
- % réalisé changé de 0 à 100